3 ms·
Why don’t you put that as a comment on the code?
by d3nj4l 4y ago
Why don’t you put that as a comment on the code?
- lexicality 4y agoComments are for why code is written the way it is, commits are for why the code is written in the first place. You _could_ tag every line of code with // JIRA-123 The PM wants this to be blue but if you did it would become unreadable and wouldn't be kept up to date.
- kazinator 4y agoBecause if 37 changes are done to the same 15 line function over time, the amount of comment material will dwarf the function. And most of it will pertain to historic versions of the function which are not what actually appears below the comment; a comment made 13 revisions ago makes sense for the 13-revision-old version of the function.
- d3nj4l 4y agoYou just update the comment?