Pseu-Pseu-Pseudo…Code
No, it’s not a follow up to Phil Collins’s hit, “Sussudio”.
It’s using English to solve your problem before you attempt solving it with code. For example, if you were attempting to solve how to calculate the tax on a product you might type something like this:
In this way, you can work out what you need to solve without having to code anything.
A common mistake by those new to programming is to immediately attempt to code out the solution. This is rarely the best course of action.
Writing things out in English (or your native language) may seem like a waste of time but it can reduce the time it takes to solve a problem exponentially.
Pseudo code helps you to define what the actual problem is. It also helps to break the problem up into smaller parts, allowing you to solve one section at a time. You don’t need to attempt to solve the problem in 1 line.
Here’s another example using an if statement:
Another benefit of pseudo code is that when you get stuck (and you will), it will be easy for others to see what you are trying to accomplish and easier for them to help you.