Another thought from episode 95 of the Ruby Rogues podcast had me thinking about just exactly what I do as a programmer. Yes, most of my time is probably spent writing code, but there’s one big aspect of being a programmer that is often over looked. Problem solving.

Most programmers write code that will end up solving a problem. Whether it’s a small web product or a large ERP platform, the code that we write as programmers usually has a single aim. To solve a problem. Solving problems doesn’t start with code though.

First you must understand the problem you are facing. You must be familiar with the domain language of the problem and understand why the problem is occuring. I like to visualise the problem I am facing. Sketching out the problem in a mind map or even as a flow chart for is always a first step to understanding the problem. With a visual aid of the problem you might recognise solutions that you have previously implemented or even gaps in the problem that require further knowledge.

With the problem now understood, you then set about providing possible solutions to the problem. One solution isn’t enough though. It’s highly unlikely that the first solution you think of will always be the best fit for the problem. I always like to try and come up with at least three solutions to a problem if I can. If I am stuck for solutions then it I like to implement the easiest solution to the problem that will work. Okay it might not be the best solution, but it is a solution. In time, a better solution will present itself, but I think it’s best to at least start with some kind of solution.

Problem solving is just one part of a programmer’s day, but it is an important one.