Computer Literacy Program – Class 3 – Programming

November 13, 2009 at 1:44 am 17 comments

Ryan will do more thorough posts about the curriculum, the activities, and the effectiveness of the program when all the classes are complete on These are just my own personal recaps and memories.

The third Computer Literacy class was on a topic near and dear to my heart– programming! Since we are doing the Computer Literacy Program out of our home, both dogs have been auditing the classes. But this is the first time a dog has helped with a lecture. Our first stab at explaining Logic Gates produced some pretty confused looks, so we elaborated using examples of people in the room. When the kids got a hang of the concept, we used Henry, who managed to squish himself between the students on the couch, as a quiz.

In case you want to administer a self-test in the privacy of your own home, here’s a reminder of what Henry looks like:

Doggie Bath Time - Henry in Wool Sticks Out Tongue

“FALSE!” All the kids yelled.

I was quite proud. Henry, on the other hand, was confused. He couldn’t figure out why I was yelling his name. 🙂

To help demonstrate if statements, loops, variables and algorithms, Ryan had five kids each pick from a deck of cards. With a sixth kid acting as an index variable and another as a boolean flag, we walked through a live-action bubble sort in the living room. In the end all five card-carrying kids were lined up in order.

Neither of those activities were my favorite part of the class though! Each child copied a directory of sample HTM pages containing JavaScript onto their computers. We used those examples to explain some key concepts. However, we also wanted to give the kids the opportunity to tweak code for themselves. Lately, two of the boys have been arguing about which NFL star is better– Larry Fitzgerald or Steve Smith. Their banter inspired a very simple JavaScript example:

Computer Literacy - Original Page

Having seen Larry Fitzgerald play when he was at Pitt, I set the page up to use JavaScript popups to compliment a selection of Larry Fitzgerald (‘BOOYAH! You are smart!’) and berate a selection of Steve Smith (‘WRONG! Larry Fitzgerald RULES!!!!’).

As soon as we started working through the examples in the directory, the kids noticed there was a file named “02SteveSmithVsLarryFitzgerald.htm”, so it built up a bit of a buzz with the boys. Before long, we got to that example. The kids opened it up in their web browser and started selecting.

The boy who liked Larry Fitzgerald was one of the first to click. A popup box declared that he was smart. He got a smug smile on his face, sat back on the couch and waited for his nemesis to react. The boy who favored Steve Smith clicked and was not pleased when a popup announced that he was wrong.

Instantly he looked up at me, “Did you do this?!?”

I nodded and he was even more appalled.

“Did you even LOOK at the stats?!?!”

In a heated tone, he started to detail why Steve Smith was superior to Larry Fitzgerald.

The moment could not have been scripted better! Right then, Ryan swooped in and said, “Well, if you don’t like it– let’s change it!”

Everyone opened the source code into WordPad and [with some hints] found the code that was responsible for the taunts. Then each child typed in what he/she wanted to see (One girl who didn’t like football at all changed both of her prompts to read “Who Cares?!?”). They saved their changes, reopened up the page in Internet Explorer and [with some minor debugging here and there thanks to single quotes or inadvertently erased semi-colons….] each child got to see popups that matched his/her views.

Now the boy who liked Steve Smith was much happier.

Computer Literacy - Khalif's First Program


<SCRIPT Language="JavaScript">
function respondToAnswer(answer)
if (answer=='Smith')
alert('WRONG!  Larry Fitzgerald RULES!!!!');
alert('BOOYAH!  You are smart!');


<SCRIPT Language="JavaScript">
function respondToAnswer(answer)
if (answer=='Smith')

When I was in college and first dabbling in HTML, I remember how exciting it was to refresh a page in Netscape and see a change that I had made. Even if it was something simple like a background color, it was thrilling. I told the browser to do that. That was my doing!

Being able to watch the kids refresh their pages and see their handiwork come to life…

That was my favorite moment of the night.

Entry filed under: Computer Literacy Program, Elizabeth City, JavaScript, Neighborhood Kids, Web Development.

Computer Literacy Program – Class 2 – Hardware Than I Can Adequately Express

17 Comments Add your own

  • 1. gasstationdave  |  November 13, 2009 at 6:27 am


  • 2. Dave  |  November 13, 2009 at 6:30 am

    You guys are doing an awesome thing teaching this class! Keep up the great work. I like the creative and fun exercises you come up with to engage the students.

  • 3. gaugeyagee  |  November 13, 2009 at 2:53 pm

    You’re both amazing! What inspired you two to do this?

  • 4. scienceguy288  |  November 13, 2009 at 6:15 pm

    I work mainly with Mathematica.

    Coding is one of those things where when you do not get the result you want, you can go insane looking for a correction. But once you do, it is rather satisfying.

  • 5. Kristina Rosenbaum  |  November 15, 2009 at 1:06 am

    I remember doing this exact activity by myself at home with QBasic’s Nibbles game, changing the names of the snakes (one was Svetlana and the other was Sven), the alert messages, the colors…it is a very satisfying activity, and a fabulous introduction to coding!

  • 6. Oskar  |  November 18, 2009 at 10:33 am

    Keep up the good work. The children will remember you for ever.

  • 7. geekhiker  |  November 18, 2009 at 3:10 pm

    These posts, and the whole idea, is very cool. When you’re done there, can you come out to CA and try teaching my users all about computers?

  • 8. Code Hound « TGAW  |  November 23, 2009 at 1:01 am

    […] 23, 2009 Last week I mentioned that Henry and Jimmie have been auditing the Computer Literacy classes. Henry is a bred pack animal, so he does fancy being in groups. Here are two shots he snuck into. […]

  • 9. Computer Literacy Program – Class 4 – Software « TGAW  |  November 24, 2009 at 9:24 pm

    […] fourth class for the Computer Literacy Program was on the output of Class 3’s topic. Programming begets Software! To start, Ryan discussed operating systems. He covered the key […]

  • […] The boundaries between the three are sometimes ambiguous which makes it a trickier concept than Class 3’s Logic Gates. Unfortunately there isn’t a good way to explain it involving Henry. : […]

  • 11. Computer Literacy Class – Class 11 – IT Jobs « TGAW  |  December 28, 2009 at 12:05 am

    […] the duties of a Help Desk Technician. They were mini-Web Developers in the Internet class. In the Programming class, Ryan showed the kids an unbeatable Tic Tac Toe game… which they promptly beat. By exposing a […]

  • […] Nintendo’s Mario made an appearance in his third and final class (He previously appeared in Programming and […]

  • 13. Computer Literacy Program – Makeup Classes « TGAW  |  January 15, 2010 at 10:39 am

    […] schools and the Coast Guard Base, we had 11 out of the 12 kids show up. The one big exception was Class 3: Programming. With that class, all the kids showed up, but six of them arrived so late (they missed 1/3 of […]

  • […] and “The Future” had improvement in 100% of their questions as well and “Programming” saw a solid gain with 5 out of its 7 questions […]

  • 15. 6 Year Blogaversary « TGAW  |  March 14, 2012 at 10:32 pm

    […] Computer Literacy Program – Class 3 Programming A recap of my favorite class from the Computer Literacy Program Ryan Somma conducted in Elizabeth City, North Carolina.  In this lesson, the kids got to edit NFL-themed JavaScript! […]

  • 16. A Visit to the Google Manhattan Offices « TGAW  |  July 25, 2012 at 9:25 am

    […] on and we met an employee who had organized a Human Turing machine (which was reminiscent of the Human Bubble Sort Ryan organized with the Neighborhood Kids). One wall sported a safe. Supposedly throughout the […]

  • 17. Suck a one  |  January 15, 2018 at 3:26 pm

    Sorry but, who has more yards?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed

Flickr Photos

3D Printed Products


%d bloggers like this: