Pseudocode (Blocks)

Written pseudocode detailing a planned project with highlights


Pseudocode is an informal way of writing your computer instructions in plain English so it's readable by anyone who understands the problem. That's why it has the pseudo- prefix. It's like programming because it is a series of actions or commands within your project but it isn't in an actual programming language. It is in your everyday language so that you can use it to plan and organize your project.

Any time you write a project, you should plan that project in your engineering notebook, starting with its pseudocode.
Here is a simple procedure to follow for using pseudocode when planning a project:
  • Decompose the project into smaller parts and decide what each part of the project needs to do to reach the goal.
    • The goal is any end state that you want your project to reach. It is the outcome after the project is run.
  • For each part, write a line of pseudocode that explains generally what that part of the project does. Make sure to keep the parts in the correct order.
    • For example, one line of this pseudocode is to have my robot move in a square. Underneath that line of pseudocode is another line to say that during that action, the robot should play a sound.
    • Note: You do not need a line of pseudocode for each block. Instead, you should use pseudocode to explain each part of your project.
  • Open VEXcode V5 Blocks and enter your lines of pseudocode as comments within the comment block.
  • Then add blocks between your pseudocode comments. The blocks should accomplish each part of your planned project.
  • Test your project. Use your pseudocode as a diagnostic guide to see if any part of your project needs debugging.
    • If some part of your project didn't work as planned, identify which part that was by comparing your pseudocode displayed in the comment blocks to what your robot actually did.
  • If you have difficulties or unexpected programming situations while debugging your project, you can add additional pseudocode to explain smaller details within the parts of your project.
    • That additional pseudocode might explain a new block or how the block works.