I make sure I understand the problem and the desired result.
I consider if I can break the problem down into simpler problems.
I want to have a map in my mind, or in notes on paper, so I’m writing code according to a plan, rather than writing code in hopes a plan or solution will happen by accident.
Measure twice, cut once.