boolean a = true; boolean b = true;
And every where through the code :
if(a == false){ b = true } if(b == true){ a = false }
Then you use either b or a in the code, depending on your feeling of the day.
ANother great example, is inter thread communication, being performed using a boolean in database. The boolean is checked using a while true loop, in each process. The database was hit several thousand times a second, by each thread. In the end, it appears that the variable is just a shared value.
There are plenty of people with decades of bad habits because there wasn't code review, peer coaching or treating coding as a "magical" [0] artisan profession. Something to be constantly refined but never completely mastered.
[0] SICP, of course.
I mean there is stuff so bad that even my non programmer friend laughed at.
But naming the guy, or putting the guy's name out there would be a fault from my side, which I don't want to make :).
But I really do see frightening stuff, trust me :).
In a small shop, a single person can easily be a huge liability. There's usually nowhere to hide because everyone has to be delivering on overall execution. If cofounders are from enterprise, this might've been lost in translation.
But my point if not so much about this guy and the problems we had.
My question is more : What could / should be done to avoid this kind of developers to do more harm in other companies.
Can you change the variable names and throw some of the sanitized insanity into a gist?