- Understanding why and when we use pseudocode
- Seeing several examples of pseudocode processes
- Solving a code challenge using pseudocode
pseudocode
: a language agnostic process for approaching coding challenges, debugging, and problem solving
An alien just landed outside your house and they need to drive back to their ship. They've never seen a car before (they've never even heard the word "car"!). Explain to them how to get into your car and drive it. Be as specific as possible!
You just pseudocoded! Whoa! Pseudocoding is the process of writing out the steps to solve a problem in human words - no code! Solid pseudocode includes small, specific steps that do not contain any code terms or syntax. The structure of pseudocode will differe depending on each person's individual process, but here is one structure you may choose to use:
// goal:
// input:
// output:
// steps:
// questions I have:
Let's look at this challenge together. As the instructor models their pseudocode, take notes on their process.
- Decide who is Partner 1 and who is Partner 2.
- Open up this code wars challenge and take a minute to read the prompt.
- After you've read the prompt, have Partner 1 start pseudocoding. Partner 2 should be watching close and ensuring that
Partner 1 is only using human words (no code!). - After 5 minutes, switch roles and try this challenge!
- Be ready to share when we come back as a whole group.
- Let's see some of your pseudocode! Drop your pseudocode into the slack lesson thread.
- What are some of your takeaways about pseudocoding?
- What are some benefits to pseudocoding? Any drawbacks?
- What similarities existed between how BE and FE students approached pseudocoding? Any differences?
- What will be easy/difficult about implementing pseudocoding into your daily practice?
Students could actually solve one of the problems and share their solutions across programs so that FE and BE students get exposure to a different language.