<< |
>>
#2059 Dodano: 13-09-2009 01:23. Głosów: 165
I once spent a lot of time trying to figure out why "x" was incrementing in something (I inherited) like this:
int x = 1;
/**++++++++++++++++++++++++++++++++++++++++++++++++++++
++ This is a long comment of a lot of text that ++
++ had absolutely no redeeming value except that ++
++ it could easily */x++/** mislead you into making ++
++ your eye skip right past the relevant part in ++
++ the middle of the block of unending comments. ++
++++++++++++++++++++++++++++++++++++++++++++++++++++*/;
After that one, we learned to look for the telltale comment-with-semicolon and then scanned backwards.
For those who care, the guy was indeed sabotaging the code, and was fired 3 weeks later (big corp, wheels grind slowly).
/*źródło: http://thedailywtf.com/Comments/Illogical-Logic-Flow.aspx#266508 */
<< |
>>
int x = 1;
/**++++++++++++++++++++++++++++++++++++++++++++++++++++
++ This is a long comment of a lot of text that ++
++ had absolutely no redeeming value except that ++
++ it could easily */x++/** mislead you into making ++
++ your eye skip right past the relevant part in ++
++ the middle of the block of unending comments. ++
++++++++++++++++++++++++++++++++++++++++++++++++++++*/;
After that one, we learned to look for the telltale comment-with-semicolon and then scanned backwards.
For those who care, the guy was indeed sabotaging the code, and was fired 3 weeks later (big corp, wheels grind slowly).
/*źródło: http://thedailywtf.com/Comments/Illogical-Logic-Flow.aspx#266508 */