Go to Post Ken Leung is the most efficient sleeper I know. Standing up, at the scoring table, during the pig roast, whatever. That guy can sleep! - Paul Copioli [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 29-11-2009, 16:52
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Software Development Guide

I've made a Software Development Guide geared towards FIRST teams using LabVIEW.
http://kamocat.com/programming/FRC_style_guide.pdf

I'm looking for feedback and suggestions for improvement.
__________________
-- Marshal Horn

Last edited by kamocat : 30-11-2009 at 00:03.
Reply With Quote
  #2   Spotlight this post!  
Unread 30-11-2009, 21:24
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Software Development Guide

There are plenty of good elements there, but several of those don't really apply to LV Realtime and/or are dated to older versions of LV.

In particular, the comment about slowing down while loops or using event structures is good advice for UI loops, not for robot loops. The correct approach there is to use the loop time appropriate for the sensor or actuator. You will probably not be doing UI loops.

The comment about building an array in a loop is somewhat dated. LV has implemented more and more heuristic optimizations over the years, and while the more complex code is going to be somewhat more efficient, it is often much harder to read and write, and the difference is often quite small. I'm not saying that this isn't a good tip when you are trying to optimize performance for a particular piece of code, but it is not a good tip for general code usage -- at least not IMO.

The global and local variable comment is a big one to watch, specifically, keep the writers to a minimum, and especially watch the read/modify/write sequences to them. Build a functional global instead -- google it.

Since you are not generally dealing with arrays at all in robotics, I wouldn't worry too much about coercion dots. In fact dots between signed and unsigned ints do not even cause any additional storage or code. There are plenty of other cases where a primitive can implement a coercion dot with no work or code. While there will occasionally be an expensive conversion, simply getting rid of the coercion dot by putting in an explicit conversion bullet will not actually fix the problems, simply take more code to do the same work. Other means for getting rid of coercion are far more effective.

Indicators automatically compare data and optimize this case for you. You don't really need to compare to avoid updating an indicator. On the other hand, on RT, it is very useful to do this for UI property writes, and to avoid reading them any more often than needed.

Mostly what I'm saying is that this list is a starting point that I mostly agree with, but be sure to question the items and see if you can thin it out over time or more directly pinpoint when it is important to write extra code or spend extra time.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 08-02-2010, 01:35
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Software Development Guide

I've done another revision.
Corrected typos and made small clarifications.
Added introduction for clarification of the process and intent.
Revised and recategorized style guide.

http://kamocat.com/programming/soft_dev_FRC.pdf

I welcome any feedback or suggestions.
__________________
-- Marshal Horn
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Software Development Process? tcj103 Programming 5 08-02-2005 15:46
<R14> and Software Development Joe Johnson Rules/Strategy 12 10-01-2005 02:24


All times are GMT -5. The time now is 04:00.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi