How to become in polyglot in 5 hard steps.

With today’s world of programming languages where many languages are better at certain tasks than other’s you’ll find it useful to learn multiple languages over the course of your career (as well as keeping your skill sets current).

Here are some tips I’ve had to learn the hard way:

Step 1: Your second language should be similar to your first

Your brain will confuse a lot of language decisions with computational necessities. Warts from your first language will show more, and syntax will make your head explode.

Step 2: Compare and contrast common task based libraries to get a gist of the differences.

Namely, ORMs, Web Frameworks, Unit testing libraries, Xml reading/writing, Csv reading/writing, Http/REST clients, templating languages, email sending, and I’m sure a few more I’m forgetting. Doing this will not only teach you language specific idioms quickly, it’ll also give your brain a chance to see the similarities and what bits of data are really necessary to do task X or Y.

Step 3: Get involved with the community

Get on mailing lists or better still go to user groups in your area. See what the programmers in that community are obsessed with (I’m looking at you Python and your giant PEP 8 discussion about style), ask foolish questions. Learning a language is a lot about fitting into a community. You may be the determined to bring some concepts from your mother language in, but first learn how to treat your new language as a second mother first.

Step 4: Write several simplistic projects that replace the common big frameworks.

This is an extension of the last couple steps.  Write a unit test library, an ORM, a web framework, rest library, etc, make them simple enough to just work barely, but focus on what you think is a good client API heavily. They will suck, have someone who’s good at that language tell you why it sucks.

Step 5: Learn a third language and a fourth, fifth…

The third should be totally earth shatteringly different and ideally solve some task for you that is hard otherwise in your other languages (this is a great time to learn functional programming). You’ll learn a lot more about programming in general this way. Repeat steps 2 through 4.

About Ryan Svihla

I consider myself a full stack polyglot, and I have been writing a lot of JS and Ruby as of late. Currently, I'm a solutions architect at DataStax
This entry was posted in Learning. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • MBR

    I suppose most of that makes sense if the goal in learning the language is to actually program in it — but I would hate to tell someone not to learn Lisp, Forth, 8008 machine code, Prolog, Smalltalk, Haskell, APL, Occam, or whatever just because they won’t be able to get a job programming in them. Want to wrap your brain around Regex’s – learn (or at least expose yourself to) things like Commit-II, Snobol, Icon, etc. — recursion? – read the Little Lisper, etc. Or pick a language you can actually implement in a few days, like Forth or a tiny dynamically-scoped Lisp. Doing this helps one write better code and libraries, and recognize where your borrowed language features come from, and where they fall short, and to know to ask for more or try and express problems differently.

  • Steve

    For me, step 1 was FORTRAN to ‘C’; and I can’t say that the transition was anything other than liberating (well, it was also very quick — an overnight session with K&R and then straight on to the bug I’d been assigned to fix).

    I’d say that you’re more likely to trip up if as your first step you go from one {;} language to another where the superficially similar appearances are more misleading than helpful — it makes it more difficult to partition idioms to the places they belong. As an extreme example, see Java to JavaScript; but there’s more than enough ‘C’ code out there in files labelled `something.cpp`, written by programmers of a certain age, to make the point.

  • Pingback: Articles for 2014-feb-12 | Readings for a day()