|
|
|
|
|
by j-kidd
4507 days ago
|
|
In my opinion, the full explanation is too long to be put as code comment, but is just right as the commit message. The best way is to keep the commit message, but add a short comment like: // Hack to trigger layout change in latest Mozilla
Then, whoever interested in the hack can read the full explanation from the commit message.Basically, for simple code with unclear purpose, I'd go with short comment in the code plus full explanation in the commit message. For hard-to-read code with complicated logic, I'd go with long comment in the code. Or refactoring. Ticket description, commit message, code comment, and the code itself are all necessary to keep the codebase "documented". |
|