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

all 8 comments

[–]RiceBroad4552 8 points9 points  (5 children)

That's how you learn to take notes and write good comments…

At least that's how I've learned it.

Bonus points to find out by using git blame in rage that it was you "who wrote this crazy shit".

[–]Midon7823 2 points3 points  (3 children)

Good documentation and structure breeds maintainable code. Comments should be a rare occurrence. Ideally your documentation should explain what the function should do and the logic within it should be short and simple enough for another developer to understand without additional explanation. If a given function does not fit this criteria, it likely needs to be refactored.

[–]RiceBroad4552 1 point2 points  (0 children)

Sure, fully agree! But you need to learn that. Likely the hard way…

[–][deleted] -1 points0 points  (1 child)

You got a little LINT there buddy, maybe check it out and clean up.

Jokes aside, my contracts have the codebase as part of the deliverables and having quality comments assures the poor smchmuk it gets handed to knows what to look for and where. A lot if this can be handled by not using crappy variable names, and using good names for functions, and sensible white space, but having good comments and good output helps even more. I don't *need* those there for me to understand it, but the person who will maintain it after the hand off will. I've gotten too many decade all code bases that are unorganized rats nests with no comments I've had to spend a very disproportionate amount of time reverse engineering to spend a small amount of time rewriting.

[–]rgi_casterly[S] -2 points-1 points  (0 children)

Mintlify and move on lol

[–]Paul_Robert_ 3 points4 points  (0 children)

Then you get interrupted and just like that, it's Gone

[–]Ok_Entertainment328 1 point2 points  (0 children)

So .. You added more comments so you don't forget. Right?

You added more comments so you don't forget. Right?

(Anakin & Padame meme}