Monday, March 30, 2009

Advice to a 13 Year Old Starting Programming

I received an e-mail from a friend recently asking for some advice for his 13 year old son who has taken a strong interest to software engineering. Here is the advice I gave him - take it for what it's worth. :) Note that the advice was tailored to his specific interests.
Welcome to the ranks of the computer addicted. :) It's been 25 years since I made my first "Hello World" program, and I still get a rush when I get something working.

There are so many options out there for learning, that even picking where to point somebody is daunting. On top of that, I like to watch myself type (back when your dad was a kid, it was hear yourself talk ;), so this might be a little long.

That said, based on what your dad said about your interests, I'll give some suggestions, in the following buckets: programming languages, projects, and other stuff (if you don't read anything else, read the "other stuff" :).

Programming Languages

1. Python

Python is my favorite programming language because it has the ability to scale from the simplest utilities to the most complex of applications. It has a very straightforward syntax that is easy to learn and a strong set of included libraries (it's slogan is "Batteries Included").

Check out Snake Wrangling for Kids, a free ebook written for kids wanting to learn Python. After that, Dive Into Python is a great book for moving to the next level.

Python is my go-to programming language for building web applications (using Django), for building desktop applications (using Qt), and for building utilities. It also has a lot of libraries for doing scientific analysis.

2. JavaScript

JavaScript is the client-side (browser) language of the Web. It is also getting some traction on the server side with I would start with simple browser scripting (AJAX) and JSON. You can build awesome applications by mashing up different sites and APIs. For some ideas, take a look at

3. Objective C

Objective C is Apple's default language. It is pretty much the only language for building iPhone apps. Learning Objective C will require learning some C (Objective C is an object oriented extension of C).

4. Scheme

If you really want to push yourself, Scheme is a great start in functional programming languages. It requires thinking about software in a whole different way than procedural languages like Pascal, Python, or C.


1. Web Application

Building a simple web application is a good starting point for diving deeper into something like Facebook. Start by building a simple web application - a little database (music you like or movies you've seen or your mp3 collection :) with a simple UI.

Python is a good choice for programming language. Django or Pylons (I personally like Pylons) are good web frameworks. Sqlite is a good database choice.

2. Web API

Add an API that allows a client to add or modify entries without using the web site. Expose the information from the web application above using a ReSTful service using JSON (JavaScript Object Notation).

3. Facebook App

With a web app and a web API, you are ready to build a Facebook application. Take the application built above and rebuild it using Facebook.

4. iPhone App

You can use the Web API to build an iPhone application that uses the same data. There are open source libraries that will allow you to use your JSON web apis in the iPhone app.

With the FB app and the iPhone app, you'll see how the majority of applications are being architected. It is really just a matter of scale (bigger databases, bigger applications, bigger APIs).

Other Stuff

1. Math

There is only one thing in this bucket, but it is hugely important. Everything about computers is based on math. Graphics is linear algebra and trigonometry. Databases are set theory. Network routing is graph theory. Application performance is written in terms of algebraic functions ("log n", "n", "n squared", "2 to the nth power"). Even determining if a program is correct is very similar to the proofs that are a part of geometry, because both are concerned with logical correctness.

Computer science does not even require computers to study, it is so fundamentally equivalent to math.

There are lots of people out there who slap together programs who don't know much math. You can even make a good living doing it. But the jobs are boring and repetitive.

If you want to solve the interesting problems (which are also the problems that people pay the most to get solutions to), it will require knowing math.

If I could change one thing about my education and career, it would be to have emphasized math more in college and to have pursued jobs that required that math.

Anyway, I apologize this got so long-winded. I hope it is useful for you. If you ever have any questions about anything, feel free to shoot me an e-mail.

And make sure your dad pays you good wages if he turns you and your sister into a development sweat shop. :)


Jason R Briggs said...

Thanks very much for the plug!

Bruce Conrad said...

Great stuff Travis.