4 ms·
Comments are very important, but I wouldn't call them "code" because they're not checked. This is one area I predict will be very important in the future, possi
by armchairhacker 3y ago
Comments are very important, but I wouldn't call them "code" because they're not checked. This is one area I predict will be very important in the future, possibly with the help of LLMs: comment checkers. They'll not only ensure the comment isn't factually incorrect, but that there aren't sneaky edge cases (or not-so-sneaky, not-so-edge "oh I forgot to mention [the most important part]...") missing from the comment.
- paulddraper 3y ago> But wait! The comments will get out of sync with the code! Well, they shouldn’t. When we perform our code reviews, we need to review the comments as well as the code. Comments should be correct, understandable, and valuable; we need to keep these points in mind during our reviews. Problem solved, apparently.
- lmm 3y agoWhy use CI to check your code automatically and reliably when you can do it manually and unreliably?
- samatman 3y agoCI makes a good prerequisite for code review. It's a terrible substitute for it.
- bravetraveler 3y agoBut, return code 0 /s
- dhosek 3y agoI had a code review once where I had a comment on line 16 saying do X because Y referring to the code on line 17. During code review, someone asked, why are you doing X on line 17?
- chatmasta 3y agoNot necessarily. If the diff is in the body of the function, a lot of review tools won't even show the unchanged comment lines above it. It's easy to overlook some drift between what the comment says a function does, and what it actually does.
- lazyasciiart 3y agoYea. Some are about smart enough to show the name of the method even if it’s out of view, I wish they could expand to include header comments.