- Understand what problem you are trying to solve. So many skip this, or don’t spend enough time on it or don’t even realize that it’s something to do. The main failure of good programmers that I’ve seen is in not knowing what problem they were trying to solve.
- Figure out what you need to do to solve the problem before you solve it. This can be anything from skimming the code you’re about to change to organizing your thoughts in a full-blown design document. You have to have a good idea of how you’re going to go about solving the problem in the code.
You can apply these steps to pretty much anything you need to do, from fixing bugs, to implementing features, to writing emails, to holding meetings. If you know what problem you’re trying to solve, and have a good sense of how you’re going to do it, actually solving it becomes a lot simpler and a lot easier to get right.