3 ms·
I find that comments at the top of functions are helpful when implementing an algorithm found in reference material, especially if they have a citation. At lea
by over 11y ago
I find that comments at the top of functions are helpful when implementing an algorithm found in reference material, especially if they have a citation. At least that way you can check that the function appears to do what the reference material specifies.
But generally commit messages, descriptive symbols, simple logic, short functions, and unit tests are better.