Making Good Software

A blog by Alberto G (Alberto Gutierrez)

Written by Alberto G

May 10th, 2009 at 3:06 pm

The pyramid of code quality (Part II), the 3 different types of codes.

with 6 comments

Pyramid Shapes. (Types of code)

Based on the previous article, we have seen that the code can be seen as pyramid where its base is formed by the characteristics that make the code robust and future-proof and the apex is represented by the amount of functionality and reliability of the code.

The shape of the pyramid can tell us a lot about the code behind it, there are three different types of pyramid shape or what is the same three different types of code:

1.-Code that needs refactor. The column pyramid.

This pyramid base size is too small for its height, the stability of the pyramid is at danger. This means that the code created to implement the specified inputs is not good enough to ensure the reliability of the software, it is also likely that when will like to make changes to the code they will be much complicated, unreliable and slow.

This code is typical from junior developers, developments under high pressure and unmotivated developers.

2.-Code that is fine as it is. The balanced pyramid.

This pyramid base has a good proportioned size for its high. The code is fine as it is, that’s we every single development should aim for.

This is the hardest code to obtain, it requires time, good leadership and good developers.

3.-Over engineered code. The flat pyramid.

This pyramid base size is bigger than necessary for its height. The code is 0ver engineered, is has more complexity than necessary.

This code is typical from senior developers when trying to create solutions too much flexible.

How to measure the dimensions of the code pyramid?

Unfortunately there isn’t any scientific approach to measure the testability, readability, extensibility and atomicity of the code, we can only draw a mental picture of the different vertex of the pyramid based on our own experience and then decide which one of the diferent three types of shape it is.