The Biggest Mistake New Programmers Make

There is one mistake that I see every new programmer make. I taught a supplementary introduction to programming course for four semesters in college, and have more recently mentored several people learning to program. All of them make this mistake. The best part is that I still make this mistake at least once a week too.

When you are trying to program something you have to do things that are probably wrong. The road to a solution is forking into multiple paths, and you need to figure out where the dead ends are. To a beginner, this exploration process feels like it isn't the correct way to program. The feeling is "if only I knew how to program better I could solve this." You see all the roads in front of you and think your problem is that you can't pick the right road off the bat. The real issue is that you aren't going down those roads and seeing where they lead.

When you get to this point you experience either paralysis or thrashing. With paralysis you're just staring at your computer screen feeling completely overwhelmed. If you're thrashing you start going down one road, feel it isn't getting to the solution fast enough, go back and try a different road, but a minute down that road and you remember the third option, so you start down that path and soon find yourself spinning around forgetting what you were even trying to do. With either situation you're feeling helpless, overwhelmed, and are cursing the fact that you aren't a better programmer.

So what's the solution I use to get myself out of this? Write down a list of all of the potential solutions. Explore a single option at a time. If starting down one path gives you another idea to try, add it on to the end of the list. Give yourself a time limit for trying each of these options. If you're feeling paralyzed you'll feel like you're wasting your time (that's the insidious part of being paralyzed – actually doing something feels like a waste of time), and if you're thrashing you'll feel like you aren't going fast enough. But this is the only way I can dig myself out of this hole, and I've seen it work for others too. Eventually you'll find your solution, and you'll wonder how you ever became so intimidated by the problem in the first place.

This mental trap lies at the heart of all problem solving for me. Solving issues often isn't the hard part, it's letting yourself explore to find the solution without feeling overwhelmed and exhausting yourself that's the challenge.