To Pseudocode or not to Pseudocode, that is the question.

Rose Owen
3 min readMay 13, 2021

Pseudocode is steps you write out in words before turning it into code. When you start out you won’t be expected to know everything about coding and using pseudocode is going to help break things down to be able to work out each step you will take to turn this code into a masterpiece.

Here’s an example: Make a program that you can speed up and slow down, you can’t go below 0 and if you are at 0, write out “you need to speed up!”, When you go over 30, have it write out “slow down!”.

Let’s break it down and write in some pseudocode to make it easier. Make a program that you can speed up and slow down, so that is saying we need at least 2 inputs.

The // at the start of the line tells the program to ignore it, it’s how we can comment on things to make it easier to work out what it does.

Next, you can’t go below 0, so we will want to check if speed is less than 0 and if so keep it at 0.

If you are at 0, write out “you need to speed up!”, this one we can just leave as is since it conveys exactly what we want.

lastly, When you go over 30, have it write out “slow down!”, so we want to check if speed is greater than 30 and if so write out “slow down!”

This is what you want, it’s clear what each step is doing and it’s not vague on what is happening.

Next, let’s turn this into code, at a glance all we will need is 4–5 if statements, a speed Variable, and 2 inputs.

A daunting task made Super Simple.

Pseudocode will make things easier for you and your team to be able to write out code and work out what still needs to be done. Just make sure it’s not too generalized or vague, but not too over the top.

--

--