Signs of Triviality

Opinions, mostly my own, on the importance of being and other things.
[homepage] [index] [jschauma@netmeister.org] [@jschauma] [RSS]

Learning Programming Languages for Fun and Profit

a turtle on a skateboardDesperately in need of a way to wile away the many hours of my ample spare time in between my "normal" job, my teaching a graduate level class in UNIX programming, and my newly extended family, I decided I'd like to pick up a new programming language. Here's why.

Programming is a weird activity. It's simultaneously dull and exciting, repetitive and creative, equally deeply frustrating and satisfying. You can spend hours crafting Something from Nothing, or just banging your head against the wall trying to find a bug. It takes a long time and lots of practice to become familiar in one programming language, and once you've done so, you're likely to turn it into your favorite hammer. But only by understanding underlying general programming principles (not language syntax!) and applying them using different tools do you actually move beyond a certain level of expertise. (This point is well articulated in this article called "Become a Good Programmer in Six Really Hard Steps".)

Some people learn a new programming language because it would be a valuable skill, allowing them to presumably demand higher salaries. Others learn a new programming language because they have to -- their job requires them to, for example in order to take over an old project. Yet other people might learn a new programming language because they have a specific problem to solve that requires a specific tool (implying sufficient self-analysis and enlightenment to have realized that that problem does not in fact look like a nail after all). Finally, some people do it for... fun. They actually enjoy learning a new way of looking at things or have an academic interest, possibly doing research in this area.

For me, the main reason is probably "fun", but I don't think that has been obvious to me. In the last couple of months, I started to realize that I'm getting rusty, that my skills are in danger of becoming dull, that I might miss knowledge of one or another programming language that other people might know or that in some areas of the industry are, if not assumed or required at least desired. More and more job postings, job applicants' resumes and industry presentations included references to programming languages that I have no knowledge of whatsoever.

Now this might sound like the "for profit" argument, but I've come to realize that I don't think I care so much about having skills that are marketable, but that industry development, research, and projects have reached a critical mass making it obvious to me that I'm simply missing out on something that sounds exciting, that would help me become better at what I spend a significant amount of time on -- which isn't necessarily actually writing code, but understanding code, program structure, and software architecture.

WTF is this shit?At Yahoo!, the predominant programming language in the systems area is Perl (in most other areas, we use PHP, Java and C++). As far as I understand it, Perl's single most important lesson is how TMTOWTDI is a Terrible Thing and that no two people can write code to do the same thing in a manner that lets others not go "WTF?!". Nevertheless, I've gotten (much too) comfortable reading and writing it. Likewise, my appreciation of Taco Bell Programming combined with a frequent need for the lowest common denominator and portability without assumptions has led me to treat most of my problems as bourne-shell'able nails. But I'm missing epiphanies.

My 4-year old daughter is trilingual (English, German, Spanish) -- she switches languages and, more interesting, language constructs without hesitation, but inevitably you notice her phrasing a sentence in one language using the rules of another. Noticing this is a delight. It gives me insights into and appreciation of how these languages (and her brain) work. The same holds for programming languages: learning another language allows you to more consciously understand (and then apply) the rules of what you've been using unconsciously for years.

Calvin and HobbesI remember the first time I fully understood and appreciated function pointers; when I started using iterators without consciously forcing myself to think about it; when exceptions became objects rather than "errors". Knowing some of these and many other features in one language allowed me to create more stable, reliable, readable, usable and re-usable code in other languages. This advancement is what I am currently missing; my day-to-day work does not require me to expand my horizon in the area of programming languages, but just because I don't get paid to crank out code doesn't mean I should let that part of my brain get dull.

So yes, I want to learn new programming languages for "fun", knowing the "profit" will (also) be in the deepened understanding of what I already (think I) know. And so the choice of what language(s) to try to pick up next is easy. :-)

More on that... soon.

September 25, 2011


[Teaching "Advanced Programming in the UNIX Environment"] [index] [Go Lisp!]