LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help Manaing Large Amounts of Bad Code

Thanks again guys.  I really appricate the advice.  There are some really useful tips in here.  

Lukin
Certified LabVIEW Architect
0 Kudos
Message 11 of 13
(531 Views)

I feel for you, I have been in this exact situation before (at a previous job- at my current employer we all write immaculate code Smiley Happy)     The tough part is that those running the application don't see what is behind the scenes and often don't appreciate "good" coding style, as long as the app appears to work as expected.  The problem is when you need to change something and aren't the original "architect" of the monster program, it takes forever to track down all the places where you need to make changes.  In your case you have the benefit at least that the original writer of the code is gone, so you can slowly re-write it over time.  If management won't grant you the time to re-write, do it in little bits over time.  And as another poster said, use source code control to back up your changes, that way you can revert if something you do breaks the "monster".  I suggest Subversion, specifically TortoiseSVN.



Message 12 of 13
(483 Views)

A little late to the discussion but I agree that re-writing is probably a bad idea. Perception is reality. If your operators are happy they'll lynch you if you break it. Most of the times that I inherited ugly code it didn't work well anyway and I had the luxury of being able to re-write, or at the very least make major modifications to get it to work. I will offer this: start making sub-vis, one logical chunk at a time. Touch and document everything. This will make the code more manageable. Eventually you will get to a place where the code is consolidated into blocks that make sense and may even fit on one screen. Good luck.

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 13 of 13
(385 Views)