News for hackers. Stuff that matters.
Re:AI is not Making Engineers 10x as Productive by cjfd on Tuesday August 05, 2025 @10:32AM (#44798466)
Very often comments generated by humans are also useless. The reason for this are mandated comment policies, e.g., 'every public method should have a comment'. An utterly disgusting practice. One should only have a comment if one has something interesting to say. In a not-overly-complex code base there should maybe be a comment perhaps every 100 lines or so. In many cases it makes more sense to comment the unit tests than the code.
Re:AI is not Making Engineers 10x as Productive by skydhash on Tuesday August 05, 2025 @11:20AM (#44799171)
I think the rules for comments on public method is to use something like doxygen to extract the reference. And most IDE can display them upon hovering. And comments can remind the caller of pre- and post-conditions.
Re:AI is not Making Engineers 10x as Productive by drgiggles on Tuesday August 05, 2025 @10:48AM (#44798720)
I am pretty far to one end of the spectrum on need for comments. Very rarely is a comment useful to help you/another developer decipher the intent and function of a piece of code.