Great article!
Great article!
Posted Mar 19, 2022 9:50 UTC (Sat) by dottedmag (subscriber, #18590)In reply to: Great article! by vstinner
Parent article: Donenfeld: Random number generator enhancements for Linux 5.17 and 5.18
- how/why this thing is changed
- how/why this thing is done this way
The question to distinguish them is "would this documentation be still necessary if the code, as it appears after this commit, was there from the beginning of the repository?"
Putting the first kind of documentation in a commit message is a no-brainer. Putting the second kind there is a great way to make it inaccessible. Cryptic two lines of code, no comments next to it? Only the most disciplined engineers will dig the history to find out why. Cryptic two lines of code, 200 lines of comment explaining why the code is here, and why it is done this way? Nobody reading the code will miss it.
