“Everyone in this country should learn to program a computer, because it teaches you to think.” — Steve Jobs


Have you ever wondered how computer programmers think, how they solve problems or how they even start to approach a real live challenge and translate it into a language which a computer can understand?
Is there something we can learn from coders which could help us to become better at problem solving and decision making?

I have been wondering the same. My background is not in computer science, however about 18 months ago I decided to do a bachelor in artificial intelligence. I was never outstanding in math; had no prior programming experience and I certainly do not have an engineering degree. In fact, my background is in business and social sciences.

As you may imagine, this has not been an easy ride. I am discovering parts in my brain that I didn’t even know existed. Often, I feel frustration especially when trying to tackle a specifically hard coding problem. However, I also have moments where I suddenly come up with a creative solution and it magically seems to work. So, as I am going through my personal journey of learning a new language (and coding really is like learning a new language), I also apply what some might call meta-learning, a process of learning how to learn: In this process I have been trying to distill down how great coders approach a specific problem and whether there are some general principles which we can derive not only in coding but as a general approach to life/work when it comes to problem solving (in neuroscientific terms they call this transfer learning). This really was the inspiration for this article.

It turns out, that good programmers seem to have some system which helps them to break down difficult challenges into chunks which are easier to solve. In talking to different coders, I got the impression that most of them converge to what I would call a 4-step approach when being faced with complex problems. Let’s try and get a handle of these steps and figure out how they could be relevant for real live problems, whether you are a consultant or trying to buy a house.


Step 1: Understanding


It may feel obvious to you, however really understanding a problem is half the solution. In American crime series, they often have these big walls full of photos, notes and ideas which relate to suspects and the crime scene. The police investigators draw connections between various items on the wall and use this to get a more intuitive understanding of potentially hidden facts. In the same spirit I have recently bought a white board, a wonderful tool to scribble down ideas and look at the same data repeatedly. A friend of mine who is studying to become a doctor uses her white board to summarize her understanding of complex medical subjects and artificially teaches her insights to the only person in the room — a tiny brown teddy bear who is patiently listening as she speaks about neurotransmitters in the brain. So, make sure, you have the right tools to help you get a grip of the problem you are trying to solve. They can be post it notes, a drawing pad in A3 or just a regular journal. For some reason I still prefer haptic items to digital tools at least when it comes to sketching ideas and concepts.


Step 2: Blueprint


Once you have understood the problem, you now need to start scribbling your solution. This is not a detailed step by step solution but rather a high-level plan how you will approach this. Think of it like the architecture of your solution where you may use connectors, boxes and other symbols to visualise your thoughts.

So how do Computer programs work? You have some input, you have an algorithm, which you apply to the input, which in turn will lead to your (hopefully) desired output. What is the input you are dealing with? In programming this could be an array of data or just a file of strings. In consulting it may be the essence of qualitative interviews you have just done with your clients: e.g. key insights, assumptions and restrictions which were shared with you.

InputOutput for an algorithm

As for the output, the question is: What should your world look like once you have created an algorithm for your problem? But what exactly is an algorithm? In computer science, this is just a set of instructions which will act upon your input and produce an output. You can think of it as a recipe when cooking dinner. A step-by-step guide to get you to that delicious Pad Thai meal to impress your partner. Scalable businesses often have a set of instructions (kind of an algorithm) to produce predictable outcomes for their customers. The Ikea concept, McDonalds, they all have created predictable consumer experiences. It does not matter whether you have a Burger in Kansas City or in Bangkok: the taste is the same. Behind this experience is typically a system at work which follows iterative and predictable steps.

Blueprint of a software project. Credits to Max Rieger

…which leads us to step 3.

Step 3 Decomposition of the problem


This is probably the most important task in your journey. If you have been coding for years, you may do this naturally: you are deconstructing a large complex challenge into smaller more sizable chunks of work. When looking at complex tasks it can quickly overwhelm you and you may feel there is no way for you to solve this. So, what do you do? You take one problem at a time. You work on the first, then the second chunk and eventually once you have figured out a solution for all of them, you bring them together into a coherent algorithm. Once it is done it looks like magic but what you were really doing is just decomposing a big challenge into something more manageable. Make no mistake: this may seem like an easy task, but in fact it the most difficult one. Over millions of years in evolution we have developed a mechanism which allows us to do “stuff” intuitively without thinking about it. When you walk, eat your breakfast or even get out of bed in the morning, you do this by using your implicit memory. However, the computer has no idea. You need to tell it what to do precisely. In a sense you make the implicit explicit. You need to dive into territories of your brain (the cerebellum), which are running on auto pilot. It feels counter-intuitive to think about something you don’t need to think about.

Elon Musk often talks about a technique called first principles thinking, essentially a tool to drill down into the foundational elements of a specific business problem. He used this when coming up with solutions for Space X and the boring company.

Step 4 Debug


Now you may or may not have come up with the right solution. Often you are probably still struggling. So, what to do next? In coding this is where we start debugging our program. We use edge cases to see if it still works. In other words, is the abstraction level of the code good enough to cater for these edge cases (for instance negative numbers or zero). In a nutshell, you feed the program with data which you may not immediately have thought about. A good (or bad) example, where debugging was not done well enough was where machine learning engineers developed a program which was able to recognise faces. The coders were all from a Caucasian/white background and so they did not think about the fact that their program might not work on people with a different skin color. The program failed miserably and generated a huge outcry about how artificial intelligence implicitly recreated already existing biases present in humans.

Even though these may be the four steps that most programmers might go through, these steps are not clear cut. In other words, while you are still amid the planning phase you may switch to decomposition and vice versa.

Hopefully, this short article about algorithmic thinking helped you to see how this could be relevant for other areas in your life. As Elon Musk and many other innovators and entrepreneurs have demonstrated: it takes time to develop the skill of algorithmic thinking, but once you mastered it, you will find it useful to tackle complex challenges.