By thinking about the problem and not writing a single line of code until you have the algorithm ready. When you start to write code, you end up thinking about the solution of the problem in some sort of piece wise solution (AKA first do this then that and so on) which inhibits you from thinking about the problem holistically and hence you end up with lots of complex conditionals and control flow structures.