Home I Did #Hourofcode; Here’s What I Learned

I Did #Hourofcode; Here’s What I Learned

My grade school experience with computer classes didn’t expand far beyond Spooky the Ghost teaching me how to type and clipping Word Art onto Powerpoint slideshows. Now it seems as though every education initiative includes computer science to get kids geared up for coding and programming for the future.

It’s clear that the Zeitgeist has determined knowing how to code is the new factor for success. Your kid takes violin? Well my kid built her own website.

Hour of Code is an engineering and programming initiative born from Computer Science Education Week, which took place December 9-15, 2013. Backed by the likes of President Obama and Mark Zuckerberg, this program encourages students and educators to include one hour of coding education per day through various tutorials.  Many of those tutorials can be found on the Computer Science Education Week website.

See also: How Coding Went Mainstream

Hour of Code hopes to encourage further coding exploration. As someone who’d never touched a serious line of code and was terrified by stories of my peers dropping university programming courses left and right, I figured I’d be the perfect candidate for an hour of code. So I grabbed a cup of tea and sat down with Code.org’s tutorial on how to “Write your first computer program.”

The tutorial, which features familiar characters from Angry Birds and Plants Vs Zombies, could easily be mistaken for just another computer game. The goal for each of the 20 puzzles in this program is to get your character from point A to point B. Different commands like “move forward” and “turn right” that you link together direct the path your character takes.

These commands represent lines of code, which you can see at any time by pressing a “Show Code” button. Get your character successfully to point B using the right number of commands and you’ve solved the puzzle.

As you complete each stage, the puzzles and commands grow more complex. Zuckerberg, NBA player Chris Bosh and Bill Gates appear in videos to introduce new commands like repeat-loops, if-statements, and conditionals. These commands let you issue more compact instructions that avoid repetition (i.e., “move forward three times” instead of “move forward, move forward, move forward”) and allow your character to follow more complex patterns.

Puzzles 1-10: Got This

See also: Why Programming Is The Core Skill Of The 21st Century

My ego inflated as I attached one block to another block for a grand total of two blocks in the first few puzzles. “Move forward” plus “Move forward”? I can totally do this. The complexity of the beginning levels were as difficult as counting the spaces from Point A to Point B and then just connecting the appropriate instruction blocks together. The angry bird’s Aheeyah war cry accompanied by the green pig’s soft poof of defeat was more than enough incentive to move forward.

The “Show Code” button on the puzzle page sat small in the top right corner—I pressed it occasionally out of curiosity and a desire to associate the bird’s movements with the actual lines of code. For example, pressing the Show Code button on a “Turn Left” will reveal the line as “turnLeft();”.

But that was about it. Otherwise, the tutorials didn’t present much actual code in a way that made much sense to a novice like me, which I found confusing. It was a coding game, so where was all the code? The initial puzzles felt more like a normal computer game and not a code-related one. Then I advanced further.

Puzzles 11-14: Why Is This Taking Me So Long?

You get new blocks and commands in the middle section of the coding tutorial. By putting one or more blocks into the larger “Repeat Until” block, the commands inside the bigger block will repeat until the angry bird hits a wall or reaches its goal.

Things started to get a bit stickier here. Because I could insert simple commands into other commands, the tutorial began to restrict the number of blocks I could use in each puzzle. For example, in the beginning stages where I could use four “Move Forward” blocks to advance four times, I now had to use two blocks; “Move Forward” inside a “Repeat Until” command.

Then the scenarios switched to Plants vs, Zombies, and in came an even more frightening option—”If” statements. The idea of the If statement as presented was simple enough—if it’s raining outside, then I need to wear a jacket. If the zombie sees a path to the left, then he’ll turn left. But it introduced a level of complexity I found hard to get my head around.

Puzzles 15-20: Help, Please

By puzzle 15 I was officially stumped. The numerous possibilities of “Turn Left/Right” inside “Repeat Until” inside “If Path ‘Turns Left/Right’” was just too meta for me. The more complicated the possible combinations of blocks became, the more I overthought truly simple actions and commands. I just could not get the zombie to the plant without wrong turns, running into walls, or exceeding the number of allowed blocks.

So I sought the help of a fellow ReadWriter with more coding knowledge and less Angry Birds fatigue to help me complete what had for me become “Couple of Hours of Code.”

In working through the last few puzzles, I realized that the blocks of code needed to be parsed out and thought about individually first, and then put together as a whole command. Sure, I know that’s the whole point of the exercise. But it’s harder to get that straight when you have just four commands to lead your zombie through a trap-infested labyrinth. The game is truly not as simple as it seems.

Code.org’s coding tutorial is delightfully challenging. It is fun in all the aspects of a computer game, but difficult enough to make you sit and really think about how commands and series of actions affect each other. What I gained most of all were some foundational coding concepts. For coding-novice adults and children alike, learning and understanding language like “Repeat commands” and “If statements” is a valuable start. 

In order to get a clearer idea of what code actually does from this tutorial, you probably ought to take the time to open the “Show Code” options and see how the lines affect the character’s movements.

Will every single student need to know the ins and outs of coding to find a career in the future? I can’t say. But Code.org’s program for Hour of Code does give its participants a headstart in algorithmic thinking. You learn that organizing simple commands in certain ways can lead to complex behavior—in this case, by making a character move the way you want it to. That may not be “real” coding, but it’s certainly a conceptual foundation for further exploration.

About ReadWrite’s Editorial Process

The ReadWrite Editorial policy involves closely monitoring the tech industry for major developments, new product launches, AI breakthroughs, video game releases and other newsworthy events. Editors assign relevant stories to staff writers or freelance contributors with expertise in each particular topic area. Before publication, articles go through a rigorous round of editing for accuracy, clarity, and to ensure adherence to ReadWrite's style guidelines.

Get the biggest tech headlines of the day delivered to your inbox

    By signing up, you agree to our Terms and Privacy Policy. Unsubscribe anytime.

    Tech News

    Explore the latest in tech with our Tech News. We cut through the noise for concise, relevant updates, keeping you informed about the rapidly evolving tech landscape with curated content that separates signal from noise.

    In-Depth Tech Stories

    Explore tech impact in In-Depth Stories. Narrative data journalism offers comprehensive analyses, revealing stories behind data. Understand industry trends for a deeper perspective on tech's intricate relationships with society.

    Expert Reviews

    Empower decisions with Expert Reviews, merging industry expertise and insightful analysis. Delve into tech intricacies, get the best deals, and stay ahead with our trustworthy guide to navigating the ever-changing tech market.