Strangely Consistent

Theory, practice, and languages, braided together

Talking to my 14yo self

Not having access to time travel, it's nevertheless nice to sometimes meet people who seem to be on similar life paths, but later or earlier on the track.

Last week I chanced upon a 14yo boy who spent his days with a laptop, but only playing games and watching YouTube vieos about games. Somehow he hadn't started into programming. So I decided to show him some stuff. I spent an evening showing nice Perl 6 features, and we ended up talking about which languages to look into.

On my way back home from vacation, I wrote him an email to summarize what we had talked about. I thought I'd share it with you.

If you're wondering why I start out mentioning C++ and Pascal explicitly — that does seem rather odd, doesn't it? — it's because he had heard about them before and was wondering whether they were any good.

I just wanted to mostly repeat in an email the various pieces of advice I left you with a few evenings ago.

First off: programming is pretty great. You make computers do whatever you want. If you learn it well enough, you will have a place on the job market. If you become excellent at it, people will pay you well. That's not so bad.

It's up to you to find the language or languages you prefer. But I can give some tips and pointers.

C++ is very important in some parts of the industry. It's fast and well-established. But. It is not a beautiful language. It's not a good beginner language. It's not a language that people grow to love.

Pascal was used for a long time in education. Java eventually supplanted it. Pascal was very clean and simple for its time. I believe today Pascal is a bit old and uninteresting. Doing Java or C# is much preferable.

I believe you would do well to find one language each out of the following categories:

The problem-solving languages are sometimes known as "scripting languages". Perl, PHP, Ruby, Python, Lua, and others are in this category. Learn them well, and you will be able to solve a whole host of problems in no more than 20 lines of code, which you can write in 10 minutes. Here's a guy who wants to know when Friday the 13th occurs in the next five years: Nine lines of Perl code, and he gets the answer. That's highly useful.

Today in 2012, the industrial languages are C# and Java. Many people learn these at school and then go out and use them in their professional life. They are a little bit boring but they are very wide-spread, and knowing at least one of them is useful in today's world. Programs will be longer and less elegant than in the problem-solving languages, but there is more demand for these languages. I find I often "think" in the shorter scripting languages and then just translate to these industrial ones. Also, learning C well pays off because then you better understand how a computer works, and you will write more efficient Java or C# for it. (C pointers are unnatural at first, and your programs will segfault, even though most OSes survive that nowadays. It's trading away safety for speed.)

Finally, the magical languages are the ones that change the way you think about computers and programming. The ones in the LISP family are magical languages. Common Lisp is more established (for a LISP) but Scheme is cleaner and more minimal. LISPs are written in themselves, which is way cool. They call this "metacircularity". Means you can change anything you want. Don't mind the people who joke about all the parentheses, they don't get it. Smalltalk is another magical language. I'd recommend Squeak as a great learning environment. It's completely reflective, which again means you can find and change anything.

A few further points of possible interest:

I could start listing books, but it's easier just to link to something like

Good luck!