Pseudocode for Pseudo-Success
By: Jomarie Polanco
Tags: Pseudocode, Ruby on Rails, Coding, Software Development, Flatiron School

When I first decided to pursue a career as a software developer, I dove head first into a sea of complete unknowns. I learned as much as I could, but after a while, the only way to continue learning was to start building apps. In my head, I could see what I wanted to be able to do, but I still didn’t (and still sometimes don’t) have the ability to put those thoughts into my Text Editor. I decided to take a page from the book of my sales days and write out a script of what I, ideally, would want to happen. I didn’t know it at the time, but what I was doing was starting to write pseudocode.

Pseudocode is a tool used by programmers that helps design their solution before writing out the application in their program language of choice. It’s basically a script of what you expect to happen in the functionality and logic of your application. I have found that writing pseudocode not only makes creating an application less daunting, but it also helps me write code faster, and in a more efficient way.

Why write Pseudocode?

As a salesperson, I always had my script in front of me when I made my calls; I never followed it exactly, but it was my safety net when a call started to go awry or I needed to bring the conversation back to the task at hand. My script was my game plan; it hit every point I would ideally want to hit on a perfect call, but most importantly, whenever I got lost in conversation on a call, it brought me back.

As a programmer, pseudocode is your script. It’s a game plan for the task at hand, with distinct language that informs you, as the developer, what you want to achieve and how you want to achieve it.

When you don’t pseudocode…

Having a game plan sets you up for success. It is so easy to get lost in an error or in a random function you’re working on, that you might forget what the goal of what you are working on is. With pseudocode, you can get very specific as well as get really big picture; it’s the best of both worlds!

As much as diving right into coding seems like more fun, writing out pseudocode first actually makes you a better coder. There’s less debugging, less head scratching, and more productivity.

When you do pseudocode…

How to write Pseudocode?

Alright, let’s get to the good stuff. Writing out pseudocode might feel foreign at first. When starting out, just writing out comments in plain english works. As long as you are creating a plan for how you will tackle the problem at hand, you are well on your way to writing great pseudocode!

Here are the questions to ask yourself:

What is the problem

What problem are you trying to solve? WRITE IT OUT! Type it out; whatever feels good to you. Make sure you know what you’re actually trying to solve.

The problem we’re trying to solve

What output would solve the problem

What do you have to return or see that would constitute this problem being solved? Depending on what you are building out, whether it’s a whole data structure, a web page, a little function or method, what would you need to see returned that will answer the problem? Do you need an array, a specific instance, etc? You’re going to get tired of this by the end of this article, but WRITE IT OUT!

What procedures would help fix that problem