- **Epistemic status:** #budding Pseudocode is a method of writing a set of instructions for an [[Algorithm]] in plain English (or your preferred language) to logically approach a problem. It often uses structural programming language conventions, but is meant more for a human to read and not a machine, omitting details like required syntax rules of that language. The purpose is for laying down a plan getting ideas on what the potential solution is without the restriction of the programming language, getting a better perspective on the problem. Let's take a look at an example of pseudocode: **Example: Render a password input** - [[Computer Program]] starts - The component is mounted and checks if prop `type` is set to password - If the prop `type` is not password it throws an error - If the prop `type` is password it renders the input - [[Computer Program]] ends ## Using pseudocode to solve problems 1. **Understand the problem:** If you don't understand the problem and what is being asked to get resolved, you won't be able to arrive to an appropriate solution. Taking time to dig into the details of the problem is one of the most important steps. 2. **Break the problem down:** Breaking the problem down into sub-problems will make it easier on you to tackle each section and solving it. Each bit of progress gets you closer and motivates you. 3. **Sketch out the solutions for each sub-problem:** By laying down a plan for the sub-problem on how it could get done, you start gaining perspective of the overall picture of how the solution will turn out. 4. **Implement solution for each sub-problem:** Start implementing the solution for each sub-problem, revisiting your pseudocode to see if there were any details missed. By iterating on writing pseudocode and actual code, it will give you an accurate picture of all the intricacies. --- ## References - “Pseudocode.” In _Wikipedia_, May 12, 2022. <https://en.wikipedia.org/w/index.php?title=Pseudocode&oldid=1087514476>. - freeCodeCamp.org. “What Is Pseudocode? How to Use Pseudocode to Solve Coding Problems,” July 26, 2021. <https://www.freecodecamp.org/news/what-is-pseudocode-in-programming/>.