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:
- Problem-solving languages
- Industrial languages
- Magical languages
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: http://blogs.perl.org/users/sawyer_x/2012/07/yet-another-friday-the-13th.html#comment-175266. 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:
JavaScript won't go away anytime soon. It is the language of the web. It's not perfect, but it's good enough. Learn it.
Perl people like me don't always think highly of PHP, but the fact remains that a many web applications today run on it. And it's not so hard to learn. My advice is learn it, but also try and learn why Perl is a better long-term alternative. ☺
Forth and Prolog are both candidates for the magical languages category. Maybe check them out. Languages in the APL family are bordering on magical, taking a "calculator approach" to solving problems. The modern APL languages are called J and K.
It doesn't really matter if you pick up Python or Ruby or Perl. They are all very decent scripting languages. Syntax debates over whether curly braces or 'do' blocks or indentation are better are mostly a waste of time.
It's completely OK to goof off for 10 years and just write whatever the heck you feel like. Get real programming experience. After 10 years, you can start to think about why some things work better than others.
Linux is generally a nicer programmer environment than Windows.
Check out Rosetta Code for a nice-and-easy way to compare different languages and their solutions to problems. Also has a nice collection of problems. :)
You will learn faster if you go online and talk with other programmers. IRC is nice for that. I'm always on irc.freenode.net if you need something. Find a community you like, learn from them, and learn to ask good questions so people will help you .
I could start listing books, but it's easier just to link to something like http://stackoverflow.com/questions/194812/list-of-freely-available-programming-books.
Good luck!