The Importance of Pseudocode

David Little
3 min readApr 30, 2021

Pseudocode
“ A notation resembling a simplified programming language, used in program design.”

That is the shortest definition I could find that covers the basic idea and nothing more. There are plenty of other definitions, some of which are far, far more detailed than the one I have presented here, but that seem to get lost in their own complexity. The mere use of the word ‘code’ in the name and definitions can make it seem as if this is yet another language to learn, but the reality is much different. Working with pseudocode is more like working with markers on a whiteboard before walking into the shop and cutting up a bunch of wood to build something. You want to plan that something out first. Pseudocode is the markers on the whiteboard.

First thing to point out, pseudocode is NOT code. You cannot compile it or even run it as a script. It is, however, logical in its use. You can use it to spell out, in detail, what it is that you wish to accomplish. It can be used to find holes in your thought process as well as provide insight into the process that you are trying to create or even inspire you to go in a completely different direction. A direction that you might not have even seen if you dove right into coding. Usually, the act of coding is like putting on blinders. You have a path that you want to go down and once you start down that path you do your level best to stay on it. Pseudocode can help take the blinders off so you can see the entire canyon before choosing what path to use to get to the bottom.

As open as I have painted it to be used, there are some guidelines that should be practiced when using it. The first is, even though it is not code, you should write it as though it is. Not the syntax of any specific language but the terminology. Be sure to spell out things like IF, THEN, and ELSE, in your pseudocode. It is the logic that you will be using so don’t skip it. Using it can also help point out any potential logical pitfalls in your program design. Do use indentation as well, for much the same reason. I have read other descriptions that would go further than this but I see these two rules as the important ones to remember and practice.

Best thing to do next is to show an example. I will do so with the mundane, maybe even archaic task (these days anyway), of sharpening a pencil. Not a mechanical pencil, but wood. Not in an electric sharpener, but mechanical.

Feh! No! This is far too simplified a description for our purposes! Your pseudocode should be far more detailed, covering each and every step of the process to be coded.

Now that’s more like it. You could even go further than this, say as a form of error correction you could do other verifications such as whether or not you are holding a pencil, a crayon, pen or other item that might be in the pencil case, etc…

However far you choose to take it I hope that the importance of pseudocode is now something that you value and will use with future coding projects.

--

--