Monday, August 6, 2012

Horrible LabVIEW

At my current company, I inherited some LabVIEW code that was written five or so years ago by a previous employee (who left at least three years ago).  The code works, so it has that going for it.

I would argue that there are some basic rules that any decent LabVIEW person should know.  I wrote a post many years ago about LV style, but what I'm talking about is more of a ground level set of standards.  This list includes things like:

  1. Don't route wires underneath objects
  2. Don't send wires right to left
  3. Avoid complicated bends
  4. Avoid stacked sequences
  5. Avoid local variables
  6. Comment the code
  7. Utilize error trapping
The code I inherited breaks six out of seven of these.



I know that when I first learned LV (well over a decade ago), I wrote some sketchy code before I learned better. Maybe that's what this is - I really hope this guy's coding improved.  What he wrote back then is just painful for me now.

No comments: