Writing the overall design in plain English before writing the implementation. Not super detailed, but the main data structures and invariants and mechanisms that will make the implementation working. Then start the implementation refining such document as I discover new things.
* Start by describing what you are trying to do.
* Specifically.
* Not 'build a web business to enable users to achieve their
potential', not 'create another library for X but simpler'
but *specifically what the software will do* and, most
importantly, the priorities of scope increase (it'll happen
anyway; just get the priorities and their order down in
text ASAP).
* Put it in a readme.txt or something.
* For any given subsystem of the code (meaning: any section
which can sort-of stand on its own) write another such file,
in more detail.
* Let these files guide your tests too.
* Keep them up to date. If priorities change, *start* by
updating the readmes. The code isn't immutable; nor is the
plan. But the plan comes first.
* When unsure how a new subsystem or feature is going to work,
write out your ideas and thought processes in text. Don't
start coding at all for a day or two after you sketch out the
basics. *Append* to this file instead of replacing large
parts.
[edit] Wasn't intended to quote that part (sorry to mobile users) but I can never remember how to get bulleted lists on this site...