Rainy Days and Secret Decoders.. Testing GitHub as Blogging Platform
My daughter likes to play post office. She likes to exchange letters with me using a toy mailbox. Its a great way for her to practice her hand writing.. and she doesn't even know it. She and I built a new mailbox to exchange messages today. Sometimes she likes to encode her messages using an en/decoder card she got somewhere along the line. It being a terribly gray and rainy day, we decided to write a program to encode/decode messages. I had already taught her to play tic-tac-toe using row-column coordinates. We computer geeks know that row/column structure to be a "matrix" in computer science terms. I've also given her a lesson or two on Logo - an educational programming language. (Please understand that she had been asking me to teach her to program - "like what you do at work, Daddy." I'm not, necessarily, trying build a super-nerd so that I can live vicariously through her nerdy accomplishments.. although worse things could happen to a person. :) Anyway...
This de/encoder simply shifts letters by one, but to make a fully working program there was quite a bit for a 6 year old to take in. I threw a lot at her and with no introduction - functions, hash maps, and variables. Forget the UI/HTML glue needed to drive it! Needless to say, most of it went over her head but conceptually, she understood that we were taking each letter and doing a lookup to return its encoded/decoded form. She helped type in the "cipher" which was just a map from letter to encoded letter. Regardless of what she may have learned, she loved the end result and has already requested a "print encoded message feature." (Only then did it feel like a program " at work". :) We'll revisit this one agains sometime soon..The end result is a simple web app - nothing more than some HTML and some Javascript. You can view/run it here:
http://dl.dropbox.com/u/261443/www/SecretDecoder/decoder.html
Rainy days and secret decoders.. and treasured moments.
blog comments powered by Disqus