View Single Post
  #2   Spotlight this post!  
Unread 15-11-2011, 23:32
Jeff Pahl's Avatar
Jeff Pahl Jeff Pahl is offline
likes to look at shiny things...
FRC #5148 (New Berlin Blitz)
Team Role: Engineer
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Waukesha, WI
Posts: 344
Jeff Pahl has a reputation beyond reputeJeff Pahl has a reputation beyond reputeJeff Pahl has a reputation beyond reputeJeff Pahl has a reputation beyond reputeJeff Pahl has a reputation beyond reputeJeff Pahl has a reputation beyond reputeJeff Pahl has a reputation beyond reputeJeff Pahl has a reputation beyond reputeJeff Pahl has a reputation beyond reputeJeff Pahl has a reputation beyond reputeJeff Pahl has a reputation beyond repute
Re: How to go from simple working code to professional code

I get paid to write LabVIEW code at my job, so I guess that makes me a "professional" LabVIEW programmer. And I go out of my way to keep everything "simple". If your code works, simple is not a bad thing.

In fact, I was at a NI Symposium last week, and the discussion around the table during lunch (after the excellent presentation on FIRST by Mark Lawrence, the MN Planning Committee Chair) was about the evils of having a very large monitor when programming in LV. The consensus was that having a smaller monitor and trying to hold to a "if it doesn't all fit on one screen it's too much for one VI" rule tended to make for much more concise and easy to read code.

Back to your question, I think the answer you may be looking for in terms of cleaning up your code to make it "more professional" may be to see if you can combine IF statement trees into CASE structures, or possibly to re-structure your code into a state machine design pattern. It's kind of hard to really answer your question without seeing code.

And remember, if it works, and is readable, then however you are doing it is "not wrong".
__________________
Team 5148 - 2014 Wisconsin Regional Rookie All-Stars!!

Mentor: 1379: 2004-2008 / 2530: 2008-2013 / 2861: 2009 / 5148: 2014-??
Lead Robot Inspector: 10,000 Lakes '09 - '11 / Lake Superior '11-'12 / Northern Lights '13, '15 - '16 / Championship '09 - '12, '14 - '15
Attending/Inspecting 2017: TBD, Wisconsin, STL Championship

"Sometimes the questions are complicated and the answers are simple" -Dr. Seuss
Reply With Quote