Code Complexity

Figure 1: Code Complexity

“Let’s build the simplest solution possible.” - But what exactly does simple mean? All too often, it is mistakenly confused with easy. But “simple” and “easy” are two fundamentally different concepts. Rich Hickey picked that apart in his presentation Simple Made Easy.

Easy means ’to be at hand’.

When a team decides to implement a feature as quickly and easily as possible, it usually means implementing the most immediate solution. The developers know a particular piece of code very well and decide to implement the change there. Instead of thinking more carefully about the architecture and the right place for the code, the solution is built with the least effort. In the long run, this leads to more technical and functional complexity.

Another example, not from software development: when my wife speaks Slovak with me, it is easy for her. But for me (as a non-Slovakian) it is incredibly hard to follow her and understand everything correctly (or at all).

In other words, easy in the sense of “to be at hand” increases complexity.

Simple is the opposite of complex

When you look at code and directly understand what it is about without having to go into too much detail yourself, then you experience the code as simple.

Most of the time, however, it is not the first draft, but polished through many iterations, reviews and considerations until in the end the essence remains.

The opposite is also immediately apparent: Everything is connected to everything else, and you have to go through many levels of abstraction before you can understand what is actually happening.

Unfortunately, there is not the one characteristic that summarizes what simplicity is (or I don’t know it yet).

Where is the difference between both?

Something that is easy for a specific person in a specific situation can be very complex and thus difficult to comprehend for everyone else. In this case, the fokus is on the creation process for that person in that context.

In the case of simplicity (meaning the opposite of complex), the creation process may well be much harder. However, the result is something that is easy for everyone to follow - and therefore simple.

To come back to the picture in the beginning: The ‘super simple code’ at the beginning is something completely different than the ‘super simple code’ at the end. But that’s just my personal opinion 😀

Webinar: Scaling software development as a SaaS company without becoming consumed in the growth process.

The webinar addressed exactly the pain points that are occurring as we grow. With an ever-increasing number of employees on the Dev & Product team, we've had to find out for ourselves how difficult it is to set up a sensible structure that brings out the maximum efficiency and performance in everyone, while also leading to a healthy working atmosphere.
Pascal von Briel, Co-Founder & CPO @ Exporto GmbH