Pseudocode is the non-compilable text written in plain English within a programmers code and is mainly used to annotate logic or algorithms and wrote informative text.
Here are some examples of Pseudocode in action
- Annotate logic
// if player collides with enemy
// destroy player
- Write informative text
// This method destroys the player when hit by an enemy
At Mooski Games, we use Pseudocode to:
- improve the readability of the code between team members;
- design or validate the implementation of an algorithm; and
- document and explain what the code is doing.
Our best practices for Pseudocode at Mooski Games are:
- Use control structure and proper naming conventions
- Keep it simple and concise
- One statement per line
- Remove any unnecessary Pseudocode when no longer required.