Hacker News new | ask | show | jobs
by d3nj4l 1440 days ago
Why don’t you put that as a comment on the code?
2 comments

Comments 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.
Because 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.
You just update the comment?