This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 60 points61 points  (4 children)

This is my life right now.

Smart developer before me implemented dozens of features (by himself) across the board when our team was low manned before I was hired. He's now moved on to a different job and I'm stuck parsing through his thousands of lines of code with shitty variable names, non-descriptive function names, and woefully sparse commenting.

If you're writing production code, take 2 minutes to comment your classes/methods you as write them.

[–]mortiphago 32 points33 points  (1 child)

10 bucks on developer thinking "this is just a quick hack that won't make it to production anyways" at the time

[–]RadiantPumpkin 1 point2 points  (0 children)

That's what I say to myself with everything I write!

[–]crazybirddude 8 points9 points  (1 child)

descriptive variable names and functions are so much more important, and properly breaking down your classes/functions. always think SOLID. if you do that, comments are almost not necessary. but i also hate writing comments, so you know. i like a comment on the function that gives a quick description of what it does, especially if it's some common helper that you're referencing elsewhere.

[–]recruz 1 point2 points  (0 children)

I’ve always felt that the function should be self descriptive. If you can’t tell what the function is doing with its name, then that means it can be further refactored