When it comes to code documentation, it is usually accepted that code should explain itself, and inline code documentation (excluding public API documentation) should only explain meta-code issues such as workarounds, explanations on why specific implementations were chosen, etc.
How do you accomplish making your code more readable and more explaining itself?
Edit: in addition to general comments, I’m also looking for specific tips. So if you say ‘short but meaningful variable names’, it would be nice to also get a helpful tip as well (e.g. ‘use the three-word principle’).
Check out Jeff Atwood’s Code Smells blog post. It pretty much sums it up. I’ll add my personal ethos when it comes to good readable code:
/* finished */comments right beforereturn true;. Seriously, what’s the point? Most (good) code explains itself;