The other day I had a discussion with a coworker about comments. Often he annotates the parts of the code that he writes with his name / SVN name like this:
The reasons for this are:
- He works from home and doesn’t have a SVN access. Hence he can not use the blame annotate function of SVN.
- The blame function is too slow for legacy classes with a couple hundred or thousand LOC, the naming comments are visible at once.
Quite honestly, I disagree with both:
- The comments are no substitution for the SVN history because every developer had to add his name to every change in every class. Only that would replace the blame function. However that would bloat the code immense.
- Poor performance is not the failure of the implementation of blame, but the existence of such large classes. Waiting a couple of minutes to get results from SVN should be a huge motivation for refactoring the mega classes into handsomer ones.
My colleague and I agreed that he would continue adding these comments and it’s OK if I delete them when I stumble across them. That works for me, although it is a task I would rather want to avoid.