Bridging the Gaps in STEM Preparation

Code Hopper Extensions

 

Extensions for Code Hopper

In addition to making your own commands, here are some other extensions you can do to helps kids “think like a programmer”

 
Dice.png

Random Number Generation

  • Use a die and replace a question tile with a number question e.g. "Did you get a 3?"

  • Or combine the die with shapes and a die with numbers, The corresponding questions would be something like "Did you roll a 3?" and "Did you roll a triangle?"

    NOTE: Going through the same sequence multiple times shows the power of this structure: Each time through is different with one or more random elements.

container.png

Variables

  1. Give kids a container (e.g. cup, bag, jar, bowl, tray) before they start the sequence. It can start off empty or with a random number of "tokens" -- rocks, chips, etc.

  2. Create action commands so they change the number of tokens in some way: e.g. “Add 3”, “Subtract 1”, “Add a random number” (as determined by the die). As their math skills improve, actions like “Multiply by 2” can be used.

  3. Modify the repeat commands to use the number in the cup instead of a set number: e.g. “Repeat number in cup”. Additional experiences:

    A: Infinite loops (and how to fix them)

    B: Skipped loops

    C: Using =, <, >, <= and >= in the condition

Code.png

Transition to Code

You can these in any order and combination:

  • The cup is replaced by X

  • Actions are replaced by commands like print, draw, etc

  • Conditionals are replaced with if-then

  • Repeat is replaced with for loops (for counting) or while loops 

When they start actual computer programming and run into a bug, this is a great model refer back to (and maybe recreate as a flowchart) to help them troubleshoot their logic.

Many of my java programming students (and my boss and myself) "act out" our logic to find the bug. — Because “Computers are stupid. They only do what you tell them to do.”

From a technology teacher in Brooklyn school:

Today I used it with 2nd graders who took turns changing a sequence and following it. My gifted 5th grade class made loops. Then an occupational therapist who passed by said she'd like to use it for teaching following directions, so we're doing that now. All on day one!