notes-computer-programming-comments

" 1. Don’t say what the code does
 (because the code already says that)

2. Don’t explain awkward logic
 (improve the code to make it clear)

3. Don’t add too many comments
 (it’s messy and they’ll get out of date)

Explain why the code exists: Even perfect code cannot explain its own existence. When should I use this code? When shouldn’t I use it? What are the alternatives to this code? " -- Peter Hilton