DEV Community

Cover image for Technical sophistication(2)-Psuedocode(1)
Shorla
Shorla

Posted on • Updated on

Technical sophistication(2)-Psuedocode(1)

In our journey to technical sophistication, let's talk about one of the most underestimated and under-utilized tool within the tech community-Pseudocode.

What is pseudocode? How does it add to technical sophistication? What are its benefits? This article and the next sets to explain all that. Keep your tea in hand and read.

FreeCodeCamp refers to pseudocode as 'fake code'. Here is the best way to explain what that means:
Computer languauges are written by humans but require syntaxes and rules that must be strictly adhered to for a successful compilation. Humans do not naturally read in computer languages and often make mistakes in following this strict rules. Hence the thought; How can human-techies, write a program that is similar to computer language, flexible and easy to understand? Pseudocode came to save the day. Psuedocode cannot be understood by the computer though.

In very formal terms, Psuedocode is a detailed yet readable description of what a computer program or algorithm must do, expressed in a formally-styled natural languauge rather than in a programming language.

Rules for writing in pseudocode

  1. Capitalize the initial word.
  2. Make one statement per line.
  3. Indentation is very neccessary to show hierarchy.
  4. Keep it simple, short and readable.
  5. write in the naming format not in computer language format.
  6. End multiline structures using END keywords.

Steps to follow when solving a problem in pseudocode

  1. Understand the question: This is the most important part of the process, if the question is understood, half of the problem is solved and you are ready to take up the challenge.
  2. Break the problem down: Smaller tasks help to get the work done. The more smaller tasks you solve, the closer you are to the full solution.
  3. Understand what the function does: The work of a function is to accept data as input, work on it with steps and return output. The more functions you study, the easier it gets.
  4. Indicate what you need to solve the problem.
  5. Document the high-level solution: This is an excellent way to walk it out.
  6. Evaluate and indicate the outcome.
  7. Detail the step for executing the solution.

Congratulations! You are a step closer to being a sophisticated techie.

In the next article, we will get our hands on real life examples and the benefits of Pseudocode with links to practice section. See you there!

Top comments (0)