Hacker News new | ask | show | jobs
by nikster 4488 days ago
The naming thing is huge. Give things good names. One can also factor out some specialized code into its own method / class - but because you want to re-use it necessarily but because you want to describe what it is doing. Divide et impera.

Having to explain to another what you're doing - I found that to be great as well. It removes bugs and produces cleaner code. You don't even need another - at check-in time, for every change, you can ask yourself "what is this doing" and "why". And if the answer isn't convincing, change what you're doing.

The value of peer-review was rarely on the peer's side - the other person doesn't really know what you're doing and is unlikely to catch a bug. But the peer would ask some question so you would start thinking about it and discover a problem.

The best thing about asking somebody for advice is often to come up with a good question. If you ask the right question, it contains the answer.