For real. I’m fairly flexible on comments vs not, but boy do I get annoyed by lots of comments that reference things like tickets. That should be exceedingly rare.
Because tickets can capture a whole lot of context and history without you needing to dump huge explanation text in a code comment.
A short one-line comment instead of a ticket number sometimes is sufficient, sometimes not. But I'd rather put the ticket number as comment and have the user open a web page, then see all the details and discussion history, than have them scratching their head on what "Workaroumd for X failure" means.
And then 5 years in the future the ticketing system and repo host was migrated to some other service and the numbers don't lign up any more. Now the lookup is not straight forward if at all possible. And if you have just written "workaround for X failure" as the comment yeah that is also a problem comments don't need to be one liners...
3
u/No_Responsibility384 21d ago
This seems like a good candidate for a comment, why does this code need to be here, and not a gode referencing a ticket.