Skip to content

Instantly share code, notes, and snippets.

@kaylagordon
Last active July 31, 2023 00:02
Show Gist options
  • Save kaylagordon/42b323121c0fa0aa97154d4f033924cd to your computer and use it in GitHub Desktop.
Save kaylagordon/42b323121c0fa0aa97154d4f033924cd to your computer and use it in GitHub Desktop.

Pseudocoding

Learning Goals

  • Understanding why and when we use pseudocode
  • Seeing several examples of pseudocode processes
  • Solving a code challenge using pseudocode

Vocab

  • pseudocode: a language agnostic process for approaching coding challenges, debugging, and problem solving

Warm Up

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!

Pseudocoding

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: 

Model

Let's look at this challenge together. As the instructor models their pseudocode, take notes on their process.

Activity

  • 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.

Share Out

  • 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?

If this were a full lesson...

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment