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

Code.org CS Principles course

https://studio.code.org/courses/csp

Other Useful Challenges

Codingbat.com
codewars.com

Also In The June 2018 Issue

Code up your digital turtle mascot and watch him dash around the screen in this simple Python coding activity.

A phone and tablet app exposes the invisible waves that connect our computers.

How AI technology is helping fans keep the magic alive for one more chapter.

Use Scratch to become the architect of your very own digital metropolis.

Use SketchUp to create dizzying patterns and shapes, Escher-style.

Whiz around your computer’s folders and modify files at lightning speed like a pro.

Use micro:bit and cardboard to create a Jedi knight that sounds the alarm when evil approaches!

Learn about the infamous Enigma machine and how its “unbreakable” code was finally defeated.

Take your 3D-printed gizmos to the next level with harder, sleeker, and stronger material.

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

Scientists draw inspiration from nature to create remarkable specialized robots.

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

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