News for hackers. Stuff that matters.
Re:Document your code just by hitting “record” by notanotherycom1 on Tuesday November 03, 2020 @10:29PM (#24986285)
No joke, I saw a comment in my code base literally yesterday written from a week ago. I said this is crap and it's taking me more than 5seconds to understand and I ended up simply changing some variable names and refactor the function. It took maybe 2 minutes to do but now I don't need a comment and it's cleaner code for future changes. (It's in a file we are actively working on and WILL change)

tl;dr: Refactor not comment

Re:Document your code just by hitting “record” by eru on Wednesday November 04, 2020 @06:15AM (#24988056)
Ideally the code should describe what you are doing and how you are doing it.

You might need comments to describe why you are doing something. And you definitely need comments for why you are _not_ doing something else.