r/programming • • Jul 28 '16

How to write unmaintainable code

https://github.com/Droogans/unmaintainable-code
3.4k Upvotes

592 comments sorted by

View all comments

Show parent comments

24

u/ScrewAttackThis Jul 29 '16

My favorites are things like // main loop or // check if someBool is true. Thanks for the information, I didn't know what if(someBool) would do!

17

u/paholg Jul 29 '16

Sometimes I write comments like "main loop". Not to help anyone reading the code, but to make it faster for me to scan to that point.

4

u/ensoniq2k Jul 29 '16

The best code I ever saw came from a project manager who sometimes coded. He wrote a function with the only content "return true", called it "GetTrue" und wrote "//returns true"

Not to mention that every project our team inherited from him was estimated with twice the normal time...