10 Minute Vim!

Learn That New Programming Language The Start-Up Way

· Read in about 5 min · (901 Words)

I have a method I use for rapidly learning new programming languages that I wanted to share because I have not really seen it documented anywhere else. This technique is not for the faint of heart, but it is a lot of fun. Many of you old hands and graybeards probably already do this, but for those that don't, you have got to give it a shot at least once. You'll never be the same. And no, I am not talking about Project Euler, although that has its place.

First, do a bit of research, and get your hands on the best book on the language you can find. Second, research the language, and pick a project to which it is well suited. For example, to learn Clojure, I decided to re-write an old php project from scratch that I was well familiar with. (This also gives me the neat data point of seeing how much smaller the project is in Clojure) Try not to be too ambitious here, you want something you could pull off in your current go-to language.

Start the project, and work under a dozen hours on it, bashing your way through the first pains of installing the language/framework (my least favorite part), and getting a basic proof of concept together. If it's a web site, think "hello world" coming out of your database of choice. Tell all your friends what you are going to make, and when it is launching. Make sure the launch date is ambitious. Start to read the book splitting your time roughly 25/75 between reading and programming, using what you read to provide you with "ammunition" for your project. Do this in as short a loop as possible, so the reading and programming are never far apart.

Since you will be fighting through real problems, the reading is a hundred times more interesting. Almost every page you will have to stop yourself from shouting, "OF COURSE!" out loud at the book, because you have just discovered something that is an extremely real pain point to you. You may find yourself laughing more than once in sheer delight because you anticipated a part of the language correctly, and just found the syntax for it. If that is not happening, you probably need to adjust the ratio of programming to reading. You want to find that sweet spot of just barely learning what you need to succeed, and constantly being "saved" by reading that last tidbit last night. If even the simplest things take unpleasantly long, perhaps more reading. If the reading is dragging too much, try more programming. When you hit that sweet spot, the programming is an exhilarating rush, and the reading is actually fun. If none of these happen, perhaps you are learning a language that does not really teach you anything new, just a different syntax for the same thing you are used to doing, in which case, ask yourself why you are learning that language. There are plenty out there that will blow your mind.

Don't forget that deadline either, your friends and family are waiting, remember? Hustle is the name of the game here, and don't worry, you'll make tons of mistakes, and you'll never forget a single one. Who cares? (No one will ever know but you!) If experience is learning from a lot of mistakes, you'll be the most experienced person around!

When that deadline looms, don't give up! Step up your game, slash the second-best features, and race for the finish. If you are way off your mark, you can consider pushing the date back, but still deliver something on your original date. Once you are done, unwind for a few months, take it easy, then repeat. After a couple of those iterations you will be seriously more experienced in a wide variety of languages, and you will find yourself much more confident in your language-that-pays.

Do this a couple of times and you'll not only get better at that language, you'll get better at all of them. You will start to see the underlying concepts that cause languages to be written the way they are. The language families will start to run together, and you will develop the intuition of what you need to do with just the trivial task of remembering (or looking up) the syntax. Your programming skill will move to a higher plane of abstraction, and you will think outside the specific language. The language just becomes an implementation detail, just words that tell the compiler or interpreter what you mean. Reading other people's code will become significantly easier, and you will find learning a new language is almost faster reading the masters' code on github than with a book at all.

TL;DR Don't let what little time you have discourage you. A few minutes a day sneaking in one more function is better than a few minutes a day moping in front of the TV wishing you had more time for programming. I understand not everyone can put in "this kind of time" (or energy) into side projects. Heck, plenty of times I cannot either. Sometimes, you only have a few hours a month on the good months. That's fine. Take that date, stretch it out to the end of the year. Slip in that reading on the ride home, or at lunch. Make every moment you spend on it count.

steve shogren

software developer, manager, author, speaker

my books:

posts for: