Hacker News new | ask | show | jobs
by whoisjuan 1832 days ago
This is something you can quickly see with Git. If the comment lines are older than the code lines you can at least start with the assumption that the comment might be outdated.

That’s more useful than dealing with stale documentation which can also be outdated. At least with code comments you have contextual proximity.

1 comments

This sounds like a great idea for an editor plugin.
1. Iterate through all blocks of comments. 2. Determine if there have been updates within the block of comments first (one line of three updating, for example). 2. For each block of comments, find the proceeding block of code. 3. Compare the last update of comments to the last updates of the code. 4. Warn the user when it's over a threshold.

Something like that?