What Is the Meaning of Pseudocode?

Save

Pseudocode is an artificial programming language that allows computer programmers to develop logic before executing a particular code. It can be defined as the blueprint of a code, which details a step of actions (or the procedure) and the order in which the steps are to be executed. It can be thought of as a textual representation of a flowchart, reflecting the structural concepts of code.

Background

  • Pseudocode is a type of structured English that defines program algorithms. It allows programs to focus on an algorithms core logic before setting it in formal programming syntax. Pseudocde is not executable on a computer. Instead, it helps a programmer design code before its actual implementation.

Purpose

  • The main purpose of pseudocode is to describe clearly what a code (or program) is supposed to do. It breaks down a code into steps and highlights their sequence of action. Pseudocode allows coders and programmers to dry-run a code to check for errors and inconsistencies before writing it in a programming language.

Rules

  • Pseudocode is composed of sentences, clauses and words. It follows a structured pattern, with statements written in a sequential order. Pseudocode uses selection statements (if, then and if, then, else), and the initial keyword in each statement needs to be capitalized. It requires one statement per sentence, which need to be indented to show code hierarchy.

Example

  • M = 10
    N = 5

    (where M and N are variables)

        IF (M >= N) Then

    Statement 1

    Else

    Statement 2

    END IF

    Statement 3

    According to this example, the condition of M>=N is true (since M is 10 and N is 5), and statement 1 will be executed. The execution of statement 3 follows that.

Advantages

  • Pseudocode makes it easy to implement a program. It is the intermediary step between a formal programming language code and human language, and explains the purpose of a particular code in layman's terms. It is easy to write and requires a simple text editor (Microsoft Word or Notepad) to create pseudocode statements. Pseudocode requires minimal programming knowledge, and has few formal syntax rules. It saves time that is otherwise spent in debugging and testing codes, since it allows programmers to spot and correct errors.

Disadvantages

  • Pseudocode can be lengthy and complicated when coding a complex problem. There are no standardized rules for writing pseudocode and it varies from company to company and individual to individual. Pseudocde offers no visual representation of code, making it difficult to ascertain the validity of certain statements.

References

  • Photo Credit code image by charles taylor from Fotolia.com
Promoted By Zergnet

Comments

You May Also Like

  • Pseudoseizure Disorder

    Pseudoseizure disorder--also known as psychogenic nonepileptic seizures, or PNES--is a neurological disorder in which an individual experiences epileptic-type seizures known as pseudoseizures....

  • Purpose of a Flowchart

    Flowcharts help business managers, CEOs, project managers and organization planners assess the flow of data. Flowcharts are primarily used to help brainstorm...

  • How to Write a Pseudocode Loop

    Pseudocode is a programming shorthand language that uses standard English to represent actual program calls and statements in order to speed up...

  • How to Write Pseudocode With Arrays

    Write and access arrays using pseudocode by declaring or initializing the array, assigning values to its open positions and calling said values...

  • How to Write Pseudocode to Calculate Tax

    Pseudocode is nothing more than a set of steps or a plan on how you will write computer code to complete a...

  • How to Convert Flowcharts to Pseudocode

    To convert flowcharts to pseudocode, you must understand exactly what is described in the flowchart in order to translate it. Flowcharting is...

  • How to Write a Pseudocode in Visual Basic

    Pseudocode stands for "false code." It is lines of statements that are used as a rough first draft of real computer code,...

  • How do I Learn Pseudocode & Flowcharts?

    Pseudocode and flowcharts approximate language that's between your natural language and computer code, and they display the logical flow of a finished...

  • How to Write Methods in Pseudocode

    A method is a set of programming instructions for a computer. For example, a print method is written to print a document...

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

M
Is DIY in your DNA? Become part of our maker community.
Submit Your Work!