So I found my self staring at 300 lines of indecipherable code. No comments, no pointers as to what is going on....and all I had to do was fix a small bug. I've always found fixing bugs fun and crucial. If you don't fix the small bugs then you cannot move on to that cool feature you wanted to add (that will change the face of the company and promote you to CEO). After hours of scratching my head, running the debugger, staring at the screen, playing ping pong, more staring at the screen, the code was still indecipherable. So I caught hold of my colleague and asked if he knew who wrote this code? and all I got was...."Why do you need him anyway? Surely you can read code!".
Well..yes. I can read code and so can any computer graduate. But fixing code should not be like cracking a cold war era encrypted message. Code needs Comments. No matter how smart your team is, no matter if the guy who wrote the code is NEVER leaving the company. Comments make life easy and save time.
And no...this does not count:
return 1; // returns 1
Stack Overflow on the best and worst of comments and one of my favorites from Dilbert.
Well..yes. I can read code and so can any computer graduate. But fixing code should not be like cracking a cold war era encrypted message. Code needs Comments. No matter how smart your team is, no matter if the guy who wrote the code is NEVER leaving the company. Comments make life easy and save time.
And no...this does not count:
return 1; // returns 1
Stack Overflow on the best and worst of comments and one of my favorites from Dilbert.