The first step in fixing a broken program is getting it to fail repeatably (on the simplest example possible).
Don't use hands to do things that can be efficiently done by the computer.
Bell Labs, from More Programming Pearls: Confessions Of A Coder.
Whenever possible, steal code.
Quoted in More Programming Pearls, Column 6: Bumper-Sticker Computer Science.