Friday, December 12, 2014

Programming Pupils

CODE OF CONDUCT: Busy day at MPA! We worked on CJ's custom Nerf gun some more, had a 'campus' clean up, braved the throngs at Costco, tackled some science homework, and then came home and had lots of fun learning more about coding! 

Thanks to an ad on Facebook, believe it or not, a couple of days ago I learned about Code.org's "Hour of Code" educational campaign.  Here's a short promotional video all about it: http://youtu.be/FC5FbmsH4fw
Founded in 2013, Code.org  is a non-profit dedicated to expanding participation in computer science by making it available in more schools, and increasing participation by women and underrepresented students of color. Impressively, some 59 million students have already tried the Hour of Code. Today, it was our turn!

I used Code.org's lesson plan called "The Drawing Machine" to get things rolling. The lesson was intended to help prepare us to program Anna and Elsa from Disney's "Frozen" in the Hour of Code activity.

We started off by talking about what a computer is - and isn't. I pointed out to the kids that the box on the floor (hard drive) of my computer was nothing but bolts, conductors, electronics all sitting there, unthinking and undirected. Without a program, which requires a programmer (or coder), a computer is just a fancy paperweight. 

Using Code.org's educator's guidelines, we talked about how a program is a set of instructions. But it's not just *any* instructions - it's broken down step-by-step, they have to be in the right order, and they have to be specific, detailed, precise. Using the right words/language is key.

Then, we were ready to launch into the Drawing Machine activity, where one student would be the programmer, using only specific instructions, to 'program' Student 2, who would be the computer, and execute those instructions. Sounds simple, right? ...

The programmer was limited to phrases like 'move forward' or 'move back' 5 inches, and turn right or turn left, and they could include the number of degrees to turn (45, 60, 90, or 120), but that's it. 

Annabelle was the computer first ...
and CJ was the programmer. 
He started using too many words and going off script, to which Annabelle replied, 'Does not compute!!"

Eventually, they got on track, and using CJ's program, she drew a square.
Then, they switched roles. Annabelle chose a bit tricker shape for CJ to draw. Her instructions were OK at first ...
but that third angle proved problematic, as you can see by Computer CJ's final drawing (in blue).
That acticity complete, we were ready to move on to a *real* computer challenge, the Hour of Code Frozen exercise!

It was a total of 20 steps, each using block-based coding, each building in complexity.
We started by drawing a simple box (just like CJ and Annabelle had done) ...
, and worked our way through more and more complex instructions. Concepts of repeat blocks, loops and functions were introduced, as was efficiency in programming.

Eventually, we were doing thing like drawing Anna 
skating 10 squares (with 36 degree turns between each of the squares) to make a snowflake. you can see our program work by following this link: http://studio.code.org/c/51803772

The kids were also successful in making a program that made Elsa carve out a multi-colored snowflake by skating back and forth 100 pixels, with 4 degrees between each line, for a full 360 degrees. That program is here: http://studio.code.org/c/50197953

The kids also had Elsa making 'doughnuts" out of circles and a function command called create circle: http://studio.code.org/c/53005797

After the kids finished their hour of coding, the Web site referred us to a page featuring ways to go beyond and learn more (http://code.org/learn/beyond). They definitely look like great resources we'll be using in the days and weeks to come!

I liked the fact that the interface let us know if our program could have been shorter or more efficient. (When your programmers want their snowflakes to be colorful, it takes more lines of code!)
After the kids completed the 20 steps, they earned a certificate - cool!
All in all, it was a wonderful, educational endeavor, and we'll absolutely be back for more. Big thanks to Code.Org for making it possible!

NEWSY: This morning, the kids worked through a couple of Time for Kids issues. One had a cover story about a toy sharing business, one of which is Pley, a LEGO-sharing subscription business. It also mentioned Yerdle, an app for giving and getting used items (it encompasses more than toys and looks very intriguing!). 

There was also an article about Catalonia, in northeastern Spain, and its recent vote regarding seceding from Spain (81 percent were in favor of independence, but Spain courts have ruled the vote unconstitutional). There were stories about poppies planted to honor WWI soldiers in England, bats' communication, sweet potatoes, Asia-Pacific Economic Cooperation meetings, a look at past pilgrims, and a story about a deadly infection attacking salamanders. 

They also read a "TFK Extra!" supplement that was all about the NFL's Play 60 Challenge, a campaign to get kids to commit to being active at least 60 minutes a day. It was full of ideas to "jumpstart your play." I especially liked one bit of advice it included - "Ditch the Wrappers," encouraging kids to choose snacks (vegetables or fruit) that don't come in wrappers.

LEFT COAST LAUNCH: A little after 7 p.m. our time, we tuned into Spaceflightnow.com to watch live coverage of the countdown and launch from Vandenberg Air Force Base of a United Launch Alliance Atlas 5 rocket on the NROL-35 mission with a classified payload for the National Reconnaissance Office. 

The mission is super duper top secret. It sure had an interesting mission patch!


BREAKFAST: CJ starts his day checking on his nutcracker collection. This morning, he mused over whether or not the largest nutcracker would be able to 'eat' the smallest one. The answer? Probably.

1 comment:

  1. I have often used the "programmer-computer" method to debug programs. It's especially useful when access to a computer is limited. Just be sure that the author of the program is acting as the computer.

    ReplyDelete