04-13-2015 02:02 PM
This is just a rant. Because I'm annoied.
I just went to another corporate site to do a review of their software. They had ~20 test stands (at about 100k / stand) built by a company... a company that was bought out not too long ago.
It is no wonder they failed.
Every single rookie mistake existed in the code. I spent about 2 hours trying to figure out what was going on with just ONE top level VI and finally gave up. Huge abuse of local variables, block diagram that was likely 15x15 full screens. 5 layers deep of stacked structures with nested while loops, etc. Not to mention hidden wires, huge coupling with sub VIs, and a complete lack of comments.
Best part? Every single test stand is running in the development environment... a shortcut to a top level VI that has automatic error handling (nothing programmatic) turned on. In multiple stands, the main VI had been overwritten within the last year because normal operators clicked "save changes" as they exited.
How the hell do these people even get LabVIEW coding jobs, let alone justify selling that crap to customers? Now we have giant, steaming pile of crap code that we don't have the money to replace, and that I'm going to have to support.
Ok. /rant.
04-13-2015 02:26 PM
04-13-2015 02:28 PM
I have inherited almost as bad of code, from other Alliance Partners too. I have actually gone to my (then) boss and asked him if he wanted be to spend 40 hours to try to figure out what the $!$#$!# the code is doing, 20 hours to figure out what needs fixed, and another 40 to fix everything else that fix broke OR I could just completely rewrite it all in 40 hours with a decent architecture and comments, a lot more scalabiltiy, and run 2-4x faster. Being the great manager that he is*, he chose the former.
NOTE: My hours here were greatly scaled down to just make the point. In reality, I was talking about months.
* For those who couldn't tell, that was sarcasm.
04-13-2015 03:16 PM
@crossrulz wrote:
Being the great manager that he is*, he chose the former.
Isn't that frustrating? Knowing you could redo it with code that is maintainable but being forced to support garbage?
I will admit that no small amount of blame rests with my company. They have nobody at the site who knows the first thing about LabVIEW (or code at all), so they didn't catch any of these issues. Just kept ordering...
04-13-2015 03:48 PM
And if you think any of this is LabVIEW specific, you are mistaken. Bad code can be produced in any language!
As an example, here is an interesting analysis of some Toyota firmware code. 😮
04-14-2015 02:55 AM
This closing phrase resonated deeply with me:
"If you have to fight to implement quality, or conversely, if others let you get away with shoddy work, quality cannot flourish. The culture must support proper peer review, documented rule enforcement, use of code-quality tools and metrics, etc."
04-14-2015 06:18 PM
@altenbach wrote:
Bad code can be produced in any language!
04-18-2015 02:23 PM
05-04-2015 09:25 AM