Wednesday, March 31, 2010

An Experiment: Teaching My Son How to Code and Test

My son has proven to be a typical millennial kid. Tools like cell phones, texting, using tools like Facebook and Gaia.com are second nature for him. He has been using a computer in one way, shape or form since he was about 3 years old, and his schools have had him making projects using tools like Power Point and HTML for several years.

As I came to see how frequently he was using a computer for social tasks, the thought came to me that he might have some insights as to how to interact with sites and seek to improve them. As a sideline, I do some web development work and write scripts in Perl to handle things like registration forms, payments and the like. As it is, I’m intimately familiar with the axiom “coders shouldn’t be the final arbiters of deciding if their code is good or not” (I don’t mean classic “desk checking” or “unit testing”, every developer needs to do that), but when it comes time for testing the functionality, integration and overall user experience for a site or an application, the final word on whether or not a good result has been met shouldn’t be just the developer to decide that. A dispassionate, third party person should be the one to do that testing. It was with this in mind I thought it would be cool to teach my son how to test. As I started looking at what I might do to help teach him testing, I kept coming back to one thought… “If you have a chance to teach the next generation, don’t just teach him how to test, also teach him how to code!” I figured he might have more fun with the testing aspects if he had some coding skills to compare it with (and use).

Hmmm… am I really the best person to do that? Wouldn’t it be better to have him learn from someone else who may have better development chops? I freely admit half of the reason I was drawn to testing was that I’m not an avid coder. I can do it, and I’ve created test scripts and CGI scripts for many years, but to say that I don’t particularly find coding for the sake of coding fun would be fair. So how could I realistically teach my son how to code in a meaningful manner and in a way that would help set good habits for him?

The answer came when I was listening to Scott Hanselman’s Hanselminutes podcast, specifically listening to his show called “Hello World”. This is the title of a book written by Warren Sande and his 10 year old son, Carter, and is meant to be an introduction to programming in a true and meaningful sense. Scott interviewed Warren and Carter and asked about their methods and how the son was able to go from not knowing programming to a level of high proficiency, and to writing a book that did not dumb down the process or pull any punches. I decided after hearing about this book and approach that my son and I would try to do the same for testing. The challenge is a big one… would it be possible for me to break down the steps of testing, and break down the steps of coding, so that an 8th grader could understand them? Even more, could I do this in a way that an 8th grader would learn and thrive with it? To be honest, I don’t know the answer to this. But we talked it over and he’s willing to give it a try with me (he was really interested when I told him that I’d be willing to share some of the proceeds of my contract work with him if he learned enough to make a meaningful and substantial contribution to new development and testing work that I do… it seems money is a good motivation to a 13 year old :) ).

Thus, we’ve decided to set up shop and start practicing. As the book Hello World is going to be our initial template, we will start out with the language the book uses, which is Python (it has the advantage that it’s not a language I have used very much, so we can both learn the ins and outs of the language together). In addition, we have agreed to set up our sessions so that we work facing each other, laptop to laptop, sharing code snippets and ideas, as well as testing each other’s efforts, critiquing what we see, and filing bugs on each other’s work (borrowing a bit from the Agile approach of peer programming and peer testing, and seriously thinking of introducing a Kanban board while I'm at it :) ).

So, will this effort make my son into an enthusiastic tester and developer? Honestly, I do not know, but what I do know is that it will give my son a better window into the world of what I do. I remember when I was his age, my father did the same for me. My father was a doctor, and he often took me along with him when he had overnight shifts that didn’t interfere with school, and I got to wear scrubs and follow him around and help him with things where it was appropriate for me to do so. While I ultimately decided not to follow in his footsteps, I found the process to be great, and I enjoyed the times I went to work with him and he shared a glimpse into his world with me. It’s my hope that my kids will feel the same way about what I’m doing (this offer, of course, being open to my daughters as well as my son).

This could become quite a grand adventure, so we shall see where this journey leads us.

3 comments:

takimeathead said...

NO FAIR!!! :(

Michael Larsen said...

I'll be posting the results of this experiment here, too. Who knows, perhaps Nick will want to do a little blogging himself (whoa! one step at a time here (LOL!) ).

Unknown said...

Very cool. I would be curious to hear the progress. I am enjoying reading the archive of your blog.