Jack Of All Languages, Master Of None

Mastering a programming language takes a long time. The only way to do it is to read and write lots of code — lots of different kinds of code so you have to learn every feature of the language. Doing tutorials and following toy examples in books gives you an idea of what a language looks like, but it’s a long way from mastery. Learning to program probably takes ten years. Mastering a programming language shouldn’t take that long, but it takes longer than a few late nights.




A lot of programmers are language dilettantes: they have played with a lot of languages but haven’t mastered one. Some of them are amateurs who don’t have to make a living writing code. Some are paralyzed by too many choices. It’s easy to think you’re missing something when you see articles about Haskell, Erlang, F#, Ocaml every day. It’s easy to think you’ve already missed something when languages you never learned are revived: Scheme, Lisp, Forth, Smalltalk, and Prolog, for example. Where to start? Which language will be best for getting a job? Which is most fun? Most interesting? Most cool?If you program for a living you probably don’t get to pick the languages or tools for your projects. Where’s the fun in mastering Java or Visual Basic or whatever language you have to use at work? It’s no wonder programmers prowl the web reading about Ruby, or try to get some version of Lisp to run when they should be working. The curiosity and restlessness that makes playing with a new language fun also makes programmers lose interest quickly. Just like people upgrading cell phones and digital cameras before they how to use all of the features, programmers lose interest in languages before they have mastered them.

One way to stay interested in a language long enough to master it is to work with programmers who are already experts, on a real project. Work at becoming an expert, not just good enough to do the job. Play with the parts of the language you don’t understand and figure out ways to use those parts in your work. Memorize operator precedence and scoping rules so you don’t have to look them up or write clunky code to protect yourself. Read the source code for the standard libraries. Take charge of some broken or badly-written code, figure it out, then refactor it. Look at other languages to find ideas you can apply to your own work: functional programming, generics, parallelism.

I’ll go out on a limb and recommend two languages worthy of mastery. They aren’t the only or necessarily the best, but I think it’s more important to master any language than to fuss too much over which one.C. There is plenty of sample code (good and bad), lots of programmers know C. Quite a few useful languages are based on C or have C-like syntax: C++, Java, C#, JavaScript, PHP to name a few. One of the all-time best programming books is The C Programming Language, also known as K & R. If you don’t use C at work you can participate in an open source project that uses C. Career-wise C++ is probably a better choice, but mastering C++ is a lot harder, and requires a mastery of C anyway, so start with C.

Another C book I learned from is Expert C Programming.SQL. Few programmers bother to master SQL even though they use it all the time. It may not be a “real” programming language but it’s worth mastering SQL and the relational database model. Once you understand relations and start thinking in terms of sets you will be able to solve all kinds of problems efficiently. Databases are everywhere, but if programmers learn about them at all it’s only enough to use them to persist objects into. A good book to start with is Database in Depth: Relational Theory for Practitioners. Hone your SQL skills with Joe Celko’s SQL for Smarties: Advanced SQL Programming.I could have listed several other languages (Python, Ruby, JavaScript) but it’s harder for most programmers to find real projects using those languages. I usually recommend Python to people who want to learn how to program.

3 comments ↓

#1 Penguin Pete on 06.22.07 at 6:00 pm

Well, you’ve certainly gotten off to a nice start here. Only four posts in and you’re a staple of SB sites already! I’ll be adding you.

On topic, I am resigned to forever being a jack-of-all languages and master of none. Mainly because code just isn’t my main forte; the most coding I do is web design, where basically you don’t need to master languages as much as you need a scattering of many languages. I agree that ten years is about right for *mastery* (in C, I come closest) but look at web design over the past ten years – I’ve had to learn one new language or platform per year just to keep up! By the time I’ve mastered those, half of them will be dead.

Slashdot today has an interesting comment on this note:
http://ask.slashdot.org/article.pl?sid=07/06/22/1526234&from=rss

…when teachers shy away from teaching anything but proprietary languages, they’re working against code mastery. Trying to channel everybody into Visual ‘sick and .NET – who’s going to learn anything worth remembering five years from now that way?

#2 dilettantes | Media for news on 01.08.08 at 5:34 am

[...] Jack Of All Languages, Master Of None: Dilettante Programming [...]

#3 People who make me feel inadeuqate - LinLog on 02.04.08 at 8:24 pm

[...] energy…another 6 hours in the day.On the up side, working with Jeremy did inspire me to take the advice of the Typical Programmer:Few programmers bother to master SQL even though they use it all the time. It may not be a [...]