Learning to Code
This BrainPop video will grab the students' attention of the topic. Tim and Moby can be very informative! After watching the brief video about computer programming, review vocabulary and understanding of the fact that a "computer program" is basically just a series of steps that a computer can follow. (Other vocab from the video include: coding, code, algorithm, function, loop, iterating, bug, conditional statements, variable).
After this, a non-tech way to practice following a sequence is by having a volunteer come up in front of the room. Other students can give a set of directions that the volunteer has to follow. For instance, 1. step left, 2. step right, 3. jump, 4. jump, 5. jump, 6. spin 360 degrees. This can be done whole class or in small groups, with the sequences written on paper or spoken verbally. BrainPop has a worksheet called "Chain Diagram" in which students can give a set of instructions for "putting on your sneakers" and the directions state that if a friend can't follow it, you'll need to 'iterate', or, revise your sequence.
2 Direct Instruction
At first, you can project via SmartBoard or Remote Desktop (I generally use both) to show the students a completed LightBot puzzle. I do not show them how I "think through" the puzzle just yet. But show them that when I click Play, the character moves, jumps and lights up all of the puzzle pieces necessary. They are usually amazed and here some ooh and aahs once he completes it.
3 Guided Practice
Next, I erase the sequence of arrows and jumps that I placed into the puzzle. Starting from scratch, I ask the students what the character needs to do first. Move? Jump? Light up?
I take volunteers to come up and use the Smartboard to place a piece of sequence. Even if the student is incorrect, we leave the mistake so that we can see what went wrong. (The first level is not very difficult so sometimes I intentionally make a mistake in the sequence.)
After a few volunteers, we're ready to hit Play, and watch the character move around the board lighting up the tiles!
4 Independent Practice
After checking for understanding and seeing if there are any questions, I unlock their screens from Remote Desktop and they now have access to their own game of Lightbot to code and play! (Note: if another class was previously using the site, higher levels may be unlocked already. Even if a student tries to play a higher level that they're not ready for, they will be really confused and self-correct to go back to level 1.) The levels really do get progressively more challenging so it is really important they start at level 1. Other levels include things like using a P1 function, and eventually using Loops to create patterns of sequences.
One thing about LightBot is that once students are working independently, I rarely give them any advice or help unless a student is really struggling. Before I step in, I ask other students to come over and help kids who are 'stuck'. Most time, they explain it better to each other than I do!
Five minutes before the bell rings, I ask them to stop playing LightBot in order to review what we laerned using Padlet. Padlet will be used as their 'exit slip' for formative assessment, checking for understanding as the kids are finishing up.
Generally to finish up an activity like this, I would ask them to explain:
"In your own words, describe what coding is."
Padlet is a great way to check for understanding of the topic, whether or not they were actually good at the actual coding itself. Some students take longer than others to grasp the concepts, especially when it comes to functions and loops.
I usually spend about 2-3 class periods exploring coding through LightBot.