Pseudo-code

Pseudo-code

Becoming a better programmer is the dream of every developer. The ability to write pseudo-codes is one of the skills every developer must have to be a better programmer because it helps in breaking down problems, and it gives a clearer understanding of the problem at hand.

What is pseudo-code

According to Wikipedia, pseudo-code is a plain language description of the steps in an algorithm or another system. In other words it is an artificial code that helps developers develop algorithms. It can be seen as an informal way of solving programming problems. The main purpose of writing pseudo-code is to give the developer or anyone who will come across the problem the developer is trying to solve a clearer understanding of what is going on.

What are the benefits of writing pseudo-codes

It is easier for people to understand pseudo-code; whether you are a programmer or not it's super easier for you to read and understand pseudo-code than real codes. It is a problem solving process, it helps in presenting problems in a simple way. It is easy to convert pseudo-codes to real codes. Let say you want to write a pseudo-code for a python function that calculates the average of a list of numbers (mean), since there is no conventional way of writing pseudo-code, but it must be written in a way that is easily convertable to real codes we will start by defining what our program does.

This is a function that calculates the mean of a given list of numbers

def function mean(values):
    return summation of 
    values / length of 
    values
function mean ([values]) where values is list of numbers.

You should consider writing pseudo-codes as a developer, it helps in problem solving.