beanz Magazine

Making the Leap with Coding Challenges

Tim Wilson on Flickr

How daily coding puzzles with constant feedback can be a useful tool to help students master text-based languages.

Each spring, my 7th grade classes make a sizeable leap. They transition from programming in graphical languages like Scratch or Blockly to the text-based languages, JavaScript and Python. Some students are eager and adept with the new languages, but for others this transition can be a bit bumpy. Text-based languages are more unforgiving with both syntax and structure than graphical ones. An omitted semicolon or misspelled parameter can bring their whole program to a standstill. Needless to say, this can be an adjustment. However, I have found that short programming challenges are one indispensable tool in helping students navigate the world of consoles and compilers.

While observing my 7th grade students during a recent JavaScript coding challenge, I admit I felt a bit like a sociologist. Some students were loners, focused solely on their own screens, while others made small talk and peered at their friends’ code quickly grabbing ideas. One savvy student consulted Stack Overflow, as another made an excuse to wander and sneak a glimpse at answers. A few, with public exasperation, gave up entirely. I learned quite a bit watching how information would flow around the room and how solutions and frustrations tended to bubble up.

One of the factors that make puzzle-like challenges effective is consistent and predictable feedback. In his seminal book on decision making, Thinking Fast and Slow, Nobel Laureate Daniel Kahneman makes the case that people who seem to have mastered a skill and operate seemingly on intuition got there through repetition. However, Kahneman also makes the claim that another important factor in developing intuition is consistently predictable feedback. The faster and more consistent the feedback, the better it can nudge a student towards mastery.

Unlike a typo in an essay, which can take a week or more to be returned to a student, an error message thrown by a programming language gives swift feedback. However, if a program gets too large, a student can find themselves well into the weeds before learning basic skills. Short online challenges are the right fit for my young learners because they don’t allow the student to get too far ahead before providing feedback.

As a teacher, I have to also be cautious in how I deal with students who begin to feel defeated. The goal is to have them struggle, but also feel that the task is not outside their capability. This is where the students guiding each other comes in. As students begin to pool information, I remind them that I encourage helping, but not plagiarizing. If they are helping a friend through writing a tough function, they have to explain why the answer works. I also frequently find myself sitting with a student asking some very leading questions, but always stopping short of solving it for them. At the end of the day, if a student tried but came up short, very frequently they return the next day more determined.

While building up to a large web application is the goal of our JavaScript unit, it really is the daily puzzles that consistently make students better at programming the syntax and logic of the language. Over time, the commands become easier to recall and the cries of “I don’t get this” become less frequent. The students who this week are struggling with top-down design haven’t noticed that they are now effortlessly writing functions with multiple parameters. By giving them small but manageable challenges, they have moved something that used to be frustrating into second nature without really noticing.

Learn More CS Principles course

Other Useful Challenges

Also In The June 2018 Issue

Logic puzzles help develop reasoning skills useful for programming, computer science, and anything you might do.

Find perfect and fun gifts for your loved ones that teach STEAM concepts and skills.

From light-up bow-ties to conductive thread, you’ll be the life of the party with this STEAM-inspired gear.

A free online test service reveals how much personal data your web browser is giving away.

Add more tools to your command line arsenal, including running mini-scripts and making backup copies.

Use switches to take your robotic creations to the next level.

An old classic with a electronic twist, featuring JavaScript and micro:bit.

Create the American flag in SketchUp using this detailed tutorial.

From lasers to supernovas, Berboucha is making science communication a priority.

Code can always be improved. Check out these tips to make you the best programmer you can be!

It’s a programming language unlike any you’ve seen before. Check out this symbolic system designed for mathematical calculations.

New, improved, faster, and sleeker - it’s Scratch 3, your new favourite block language!

Learn about the brilliant algorithm behind all of your GPS devices.

It’s free, comprehensive, and available on-the-go. This cool app helps you master Python faster than ever before.

Open up whole new worlds to explore through these interesting, diverse add-ons.

Links from the bottom of all the October 2018 articles, collected in one place for you to print, share, or bookmark.

Interesting stories about computer science, software programming, and technology for October 2018.