Pseudocode — Why It’s So Important

Pseudocode is used to explain what your lines of code are meant to do. It is best practice to always use pseudocode when coding. Typing out your pseudocode, before your actual code, helps keep you on track with your coding task.

So Why is Pseudocode So Important?

If your code is to be shared with a team, or if you come back to your code to check on a possible error, it’s much easier to find your block of code if you used pseudocode. This is why most seasoned coders always use pseudocode.

Pseudocode is written in a format just as you would write your spoken language.

When writing your pseudocode in Visual Studio, or your code editor of choice, you begin each line of pseudocode with a double forward slash ‘//’. The ‘//’ lets the editor know that the current line with the ‘//’ is only a comment or pseudocode. The editor knows to ignore commented lines when compiling your code. Below is an example of pseudocode in Visual Studio.

Sample Pseudocode in Visual Studio

Some pseudocode can be cleaned up (deleted) after your code is written. Other pseudocode is best to keep intact for later reference to particular blocks of code. The more you code, the better you will understand which comments/pseudocode to keep, and which to delete.

I hope this article helped you understand what pseudocode is and why you should make it mandatory in your coding/scripting.

Thank you for reading this article. Please like and share my article. To stay connected and not miss my future articles, please follow me on Medium.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
James Hills

James Hills

I am a married father of 5 children. I decided at 13 years of age that I was going to become a Software Developer.