Oh fuck I hate encountering this level of commenting. If it’s complicated, you should have a design doc. Source code is not where you write your dissertation. Simple explanations are good, especially since the code could be updated while the comment is likely to remain unchanged. Long expositions are usually the result of bad coding or improperly allocated design.
Absolutely agreed. If your code line by line isn’t clear, then the code is the problem.
Commenting before a block of code (a function / algorithm or whatever) explaining what it is meant to do, absolutely that’s great though, saves time when revisiting.
And that one single line that makes zero FUCKING SENSE AND YOU SPENT 5 DAYS TRYING TO FIX IT!!! That definitely needs a comment so the next idiot (aka you in 6 months) doesn’t think “what useless shit is this? Let’s delete this!”.
Oh fuck I hate encountering this level of commenting. If it’s complicated, you should have a design doc. Source code is not where you write your dissertation. Simple explanations are good, especially since the code could be updated while the comment is likely to remain unchanged. Long expositions are usually the result of bad coding or improperly allocated design.
Absolutely agreed. If your code line by line isn’t clear, then the code is the problem.
Commenting before a block of code (a function / algorithm or whatever) explaining what it is meant to do, absolutely that’s great though, saves time when revisiting.
As long as it’s updated when the code changes
And that one single line that makes zero FUCKING SENSE AND YOU SPENT 5 DAYS TRYING TO FIX IT!!! That definitely needs a comment so the next idiot (aka you in 6 months) doesn’t think “what useless shit is this? Let’s delete this!”.