News for hackers. Stuff that matters.
Re:Reducing technical debt by valuing comments as much as code by baby on Wednesday February 01, 2023 @02:15AM (#34607462)
> Code cannot lie

Sure, but it can take you on a freaking trip. Comment your code bro.

This whole argument makes me think of C coders who say C is perfectly safe as long as you don’t write bugs.

Re:Reducing technical debt by valuing comments as much as code by ajross on Wednesday February 01, 2023 @11:31AM (#34612934)
The point is not to fetishize comments. Write a comment if you feel something needs explanation, but don't freak out about "uncommented code" as a smell or whatever, when reading the code should have been your first step anyway.

And to repeat: when debugging, train yourself to ignore the comments. They will absolutely lie to you.

Re:Reducing technical debt by valuing comments as much as code by baby on Wednesday February 01, 2023 @12:03PM (#34613546)
Imo comments are like formatting. If you don’t enforce it in CI it’s going to be bad
Re:Reducing technical debt by valuing comments as much as code by ajross on Wednesday February 01, 2023 @04:26PM (#34618037)
Forcing developers to write comments[1] just to get code merged seems like the best possible way to ensure those comments are lies.

[1] Which, it's important to point out since you used the term "CI", are fundamentally untestable. There's absolutely no way to ensure a comment is correct. A CI smoke test at the very least verifies code builds and doesn't break pre-existing cases. No such validation is even theoretically possible for comments.

Re:Reducing technical debt by valuing comments as much as code by baby on Thursday February 02, 2023 @01:08AM (#34622757)
I’ve seen it done before and no, it was beautiful, everything was commented