Kids and Code: Where to start?

Though I am a software developer, I am not a born educator so when my children demonstrated a spark of interest in learning how to program a computer, I turned to the internet and searched for resources appropriate to their age and personalities.

I performed my first search several years ago and the results were less than encouraging. I found a few books aimed at an audience much older than my children were at the time, a few antiquated programs that oftentimes did not install correctly on my home computer, and very little else. Much has changed with every year adding more exciting options to the mix. Here are a few of the options I would have been glad to find back then and may yet be making use of.

Please note that while I may not have personally tried all of these and cannot vouch for their suitability or effectiveness, I do like what I’ve heard and seen so far. I’ve tried to organize the list by age but here again, your individual mileage may vary as every child is unique. I provide some links to online resources but I strongly encourage you to search for more as there are often several excellent sites out there dealing with the same topic. Finally, I’ve deliberately kept the links visible so this list could be printed and remain useful.

How to train your Robot: http://drtechniko.com

Dr. Techniko developed a “programming language” that 5 – 7 year old children can master and write their own program with. It involves no computer and no typing. The programmer uses a series of pre-defined symbols to program their “robot” to perform a certain task. Too bad my own children are too old for this. Looks like fun!

The only requirement is the information from the web site, a goal to accomplish and a patient and willing robot (parent). :)

Scratch: http://scratch.mit.edu

Scratch is a simple drag-and-drop language designed to enable children to create their own interactive stories, games, and art. It has a healthy online community and a huge amount of resources. It is free and can be downloaded from the web site.

LOGO:

I remember learning LOGO as a child and was pleasantly surprised to see that this lovely language still exists though some of the web sites are a bit dated. LOGO is primarily a geometric shape drawing language.

The list of LOGO commands can be found at http://mia.openworldlearning.org/voctable.htm though much of the rest of this web site is not publicly accessible. There is a nice editor to type your programs into at http://learninglogo.com.

LEGO Mindstorms NXT: http://education.lego.com/en-us/preschool-and-school/upper-primary/8plus-mindstorms-education

LEGO’s Mindstorms NXT line of programmable robot controllers is an amazing though unfortunately expensive teaching tool. Out of the box, I was a bit dismayed to see that the controller comes with very little in terms of instructions or sample projects but there is a large amount of material online. This means that once your child has happily torn the wrapping paper off the box, the next stop will be the computer to find something to build with the kit.

LEGO recommends this for children 8 and older. Access to the internet is necessary in order to read up on how to program the controller and to research all the neat creations that can be built.

Alice: http://www.alice.org

Alice is an object-oriented language used for creating 3-D animated stories, videos or games. It uses a drag-and-drop development environment to avoid unwieldy syntax or complex development tools found in other languages. Alice also has a very active online community.

Targeted to children in middle grade and up, Alice is freeware and can be downloaded from the web-site.

Computer Science Unplugged: http://csunplugged.org

Computer Science Unplugged is a series of interactive group activities that teach computer science concepts without the use of a computer. Aimed at the 5 to 12 year-old group, all you need is a small group of willing participants and someone to lead the activity.

Phrogram: http://phrogram.com

Phrogram is a Visual-Basic-like language that doesn’t attempt to shield the programmer from syntax or the complexity of development tools. Indeed, combined with the appropriate extension libraries, Phrogram applications can be written to access a database, do complex mathematical calculations or read and write to a file on disk. Aimed at the more sophisticated programmer, Phrogram can be downloaded from the web site for a reasonable fee.

Codecademy: http://www.codecademy.com

Codecademy is an excellent web-based resource for learning web-based development languages and tools such as JavaScript, HTML, CSS, Python and more. It goes through material in a gradual manner. This web site is suitable for anyone who doesn’t require animated characters leading them through their training as if it were a game. A browser is all you need to get started. I know several adults who have learned programming through Codecademy.

Microsoft XNA Game Studio 4.0: Learn Programming Now! http://www.microsoft.com/learning/en/us/Book.aspx?ID=14907&locale=en-us

Though not strictly an online resource, this is an excellent book by Rob Miles (Microsoft Press) that teaches a beginner the basics of the C# language and the XNA framework in order to develop games for the XBox platform.

My son devoured the previous edition of this book when he was 10 years old. He read cover-to-cover and tried the first few examples on his own. Then, over spring-break that year, the two of us sat down and went through the remaining exercises till he had a working game and an reasonable grasp of object-oriented programming.

A Windows 7 computer is required. Visual Studio Express and the XNA Framework can be downloaded for free. Access to an XBox 360 makes the end result more exciting but is not required.

Coursera: https://www.coursera.org

Coursera is a collection of free university-level online courses. These courses start a pre-defined date, go for a set number of weeks and require assignments and evaluations to the handed in at specific times. A certificate is presented upon successful completion of the course. Great for teens and adults.

For this, you need to be able to dedicate time each week to view the several hours of lecture videos and complete the assignments.

 

Along with the above online or book resources, I also recommend looking at community or library education programs, summer camps and other organizations in your community. A quick search of my community guide shows me the following programs are being offered for a reasonable fee:

  • Summer Day Camps: There’s an animation and Web design session for children 8 – 13 and a LEGO Mindstorms NXT program aimed at children 6 – 10.
  • Weekly sessions: Introduction to programming with Scratch is offered to children 11 – 15. Various robot building sessions using LEGO’s Mindstorms NXT are targeted to children 5 – 16 years old. Java, C++, and web design courses, on the other hand, are offered to the 12 – 16 age group.

And finally, there may be private tutoring companies in your community that offer programming courses. For example, Real Programming 4 Kids offers game programming classes for children of various ages in my community. This particular company has at most a 4:1 student to teacher ratio, ensuring that each child gets a fair amount of individual attention. Organization of this type may exist in your community though they may come with a higher price tag than you’re willing to spend.

While I have highlighted the resources I’m familiar with, there are many more excellent ones out there that have simply not crossed my radar. If you know of them and can recommend them, leave me a comment and I’ll gladly update my list.

How my 12-yr-old son became a C# Programmer

My 12-year old son has been scripting since he was 7 or 8 and writing C# code for about 2 years now. Now for full disclosure, both my husband and I are software developers; my husband writes C++ and Java on the Linux platform but was a long-time Windows developer while I’m a C# .Net developer. We’d thought of eventually showing our son how to program but hadn’t planned on getting him started before he’d even learned long division.

The scripting was a bit of an accident. The PC game my son loved to play came with a full-featured game extension tool for users to develop their own modules and quests. Also included was the ability to write scripts to supplement the existing library with new functionality. It’s always exciting to invent your own modules and see how far you can push the envelope so this quickly became his favourite occupation.

The Copy-Paste Era

At first, his father provided him with a few key scripts that he could hook up to strategic locations and that would trigger a particular behaviour. For example, a “teleporter” script could be hooked up to a particular square in the game. When a character stepped onto the square, they would be “magically” transported elsewhere. But as any parent knows, children have many more hours for play than we parents have for fulfilling all their requests. Tired of waiting for daddy to have free time to write more scripts, my son begged for access to the scripting tool and started copying the scripts he’d already been given and tweaking them to fit the new functionality he wanted. That’s how he realized that programming was fun and not particularly difficult once he understood the logic and the syntax.

The Bounce-Stuff-Around-The-Screen Era

Writing scripts for your favourite game is one thing. But wouldn’t it be even more interesting to write a game of your own from scratch? So father and son sat down together and coded Pong, Asteroids, and other such simple games. At this point, it was mostly my husband coding but explaining what he was doing. This can keep a boy interested only so long and since we’d recently bought an XBox, it made sense to delve into XNA programming next.

My husband bought the wonderfully kid-friendly Learn Programming Now MS XNA Game Studio 3.0 book by Rob Miles (there’s a newer edition out now) and worked through the first few chapters with our son who took to it like a duck to water. Soon, he’d sped through the book and was writing all sorts of games that bounced a lot of objects on the screen.

That kept him occupied for a while but eventually, he realized there was more to the games he liked to play than images moving on a screen. He did not have the words to express what he was looking for but I could tell he wasn’t satisfied with the games he was producing. By then, he could handle simple C# data types, conditional statements and loops and had a basic understanding of classes and inheritance. He also understood XNA sprite batches, timers and the Draw method.

The Era of Enlightenment

I came back from Codemash v2.0.1.2 with the EverCraft Kata Dungeons&Dragons-style game instructions and, on a whim, suggested working on it with him. We’d do it using Red-Green-Refactor Test-Driven Development; an agile technique I’d been introduced to at Codemash and wanted to practice. As a huge D&D fan, I figured it was right down my son’s alley. I wrote the first failing test, he wrote the code to make the test pass and I refactored his code, explaining what I was doing and why. Then we traded places and he wrote a failing test for the functionality I was to implement next.

We spent hours implementing the character class with its hit-points, abilities, and more and by the end of that day, my son’s eyes were shining. Finally, he’d uncovered the missing piece of the puzzle. He now knew how to add substance to his games: that logic that made characters tick and non-visual things happen. We did a few more sessions but that project was abandoned long before we reached the end of the Kata document in favour of the sims-based game he’d been aching to write; the one where a few thing might move on the screen but many of the underlying parameters change as time passes.

And that’s when he started flying solo. Now, I hardly ever see his code but the things he creates have me wondering if I could do half as well.

My learning quest

Early in January, I declared this the “Year of Learning”. The year I would immerse myself in technology and absorb as much as possible in all the areas I don’t yet consider myself knowledgeable enough. This means I have started and will continue to deepen my understanding of various aspects of software development from patterns to new programming language syntax, from modern data stores to effective debugging tools and techniques, from JavaScript and its myriad helper libraries to the intricacies of asynchronous programming.

Strategy Strategy

In order to accomplish this lofty self-improvement goal, I took the plunge and subscribed to PluralSight online training. This amazing library of on-demand videos is now my introductory-level training resource. Apress, O’Reilly and Manning are three great sources for technical books and regularly offer discounts on select eBook titles so I’ll be supplementing the online training with their wares, starting with the small collection of eBooks I purchased in the past year but never got around to reading. These should help flesh out concepts to a higher degree than an online course could ever do. But skills learned and never applied get lost quickly so I’ve also committed to spending more time developing code at home so I could try out interesting techniques and tools I might not otherwise get a chance to use.

How will I measure improvement?

I’ll know I’ve improved when I’m able to read the MSDN Magazine each month without feeling that every article has been written for someone much smarter and knowledgeable than I am.

Measuring Progress

It’s only February and already, I feel I’ve woken up to all sorts of new-to-me concepts and strategies that I can’t wait to put into practice. I must be doing something right!

What next?

Now that I have been at it for almost two months, I’m ready for the next step in the journey and that is to share some of what I’ve learned with others as I go. This is prompting me to dust off my “One Thing I’ve learned Today” series. I’m not aiming to write every day but I’ll post something here as often as I can in the hopes that someday, someone else may find a useful bit of information that will help them along their own journey.

Please join me!

To Learn or not to Learn

(with apologies to Shakespeare)

This week has been rife with opinions on what people should or should not do.

Jeff Atwood started it off by pleading with the world not to learn to code. His rant centers on what he calls the "everyone should learn programming" meme or movement which he claims is growing. His prime example? Mike Bloomberg, mayor of New York City, who tweeted earlier this year of his New Year’s resolution to learn to program via Codecademy.

Bloomberg-vows-to-code

On the strength of that single tweet, Mr. Atwood comes out all guns blazing with the scathing opinion that as a public official whose job description doesn’t encompass writing code, Mr. Bloomberg should stick to the tasks taxpayers are paying him to do and leave software programming to trained professionals.

An interesting position which has caused quite a bit of virtual ink to flow.

Of course, this assumes that Mr. Bloomberg’s intent is to learn and/or program during the work day rather than as a hobby outside of the demands of his employment. I can find no indication of this in the mayor’s tweet.

Perhaps the example wasn’t best chosen so let’s investigate some of the other arguments presented against the populace learning to program.

Apparently, there are "those", an undefined group of people out there, who, we are told, argue that programming is an essential skill that should be taught to our children in school. Our author views this as preposterous in light of the fact that the mayor of New York would unlikely be better suited for his job had he learned about pointers, functions and recursion in school. Strangely enough, in Ontario where I live, as well as in many other constituencies, music, visual arts and physical education are required courses until a child reaches a certain level of high-school education at which time they can choose to continue or veer towards other subjects. I wonder how many of those particular skills have been of direct use to the mayor in his current position?

Ah, perhaps that particular argument wasn’t fully thought out so let’s just move on.

Mr. Atwood proceeds to relate the writing of software as being limited to the solving of a problem. I agree that software can be used in that manner but my 12-year-old son is currently spending all of his spare hours programming his very own game. He is writing many more lines of code than strictly necessary because he’s in the process of learning how to program. "Refactoring", "abstraction", and "inheritance" have recently become part of his regular jargon and he’s even writing tests to ensure his code works according to his very own specifications. He is doing this, not because a tangible problem exists that must be solved, but because he’s curious about how games are built. Best of all, he thinks programming and being able to see his characters move on the screen and do as he directs is great fun!

Perhaps the drive to learn programming shouldn’t be exclusively reserved for the gifted few who, from day one, are capable of producing the most concise and perfect solution to a problem vetted by a third party as truly worth solving.

Scott Hanselman said it best in his rebuttal: "You don’t need to learn to code, you don’t need to be an expert in everything but know that you can learn." Zed Shaw’s insight is also one I can relate to: "If you attach your identity to being a programmer, then changes like ‘everyone can code’ will lead to resentment because you are no longer unique."

I happen to be employed as a software developer though I do take guitar lessons in my spare time. Will I ever use this skill in my day job or steal a session guitarist’s job? Not likely. What are you learning today?