New Languages Considered Harmful: "Learning new languages is a waste of time."
duartes.org
duartes.org
If your language of choice is C, and you learn Pascal, then you haven't gained any new concepts. But if your language of choice is C, and you learn Prolog, then you will be exposed to a whole new way of thinking.
My native state of coding is procedural with a sprinkling of OO, mainly to represent families of concrete data types. I find functional programming appealing on an emotional level, and my attempts to learn how to think functionally have changed my native coding habits, even in non-functional languages.
My pragmatic advice is learn enough of a language from a different programming paradigm so you can apply that new way of thinking to your native language.
Aside from the immediate reasons, there's some merit to the mind expansion argument. I think being proficient in at least two languages is indeed important for boosting your ability as a developer. This resembles human language: learning a second one changes the way you think and your perception of the world. The third or fourth, not as much. But it can't be any two languages. If you know Portuguese and Spanish, your mind didn't have to expand much. Likewise, learning VB.net and C# doesn't count.
Is this worth it, from a strictly professional perspective? I have no clue. I've never met a strictly professional programmer who was any good.
[0] This should not be taken to mean that these are the only languages I consider worth learning - they're just the first ones that came to mind.
Scheme yes, maybe not Common Lisp :P
(let ((x 4)) (print x))
instead of (let x 4 (print x))
is part of it. So is the order of arguments.As an aside, the first form of the example you gave is what most Lisps use. CL, Scheme, Emacs and Goo all use this. The second, as far as I know is only used by Arc, which has a more complicated syntax than most Lisps.
I think "enough" is a crucial point here. The author almost seemed to be arguing against switching to a new language every year, which I agree is ridiculous. The idea is to learn some new concepts, not to write significant programs in a new language every year. I only adopt new languages for regular work if they're the pragmatic choice.
However, just as lambdas cannot be directly translated into languages without lambdas, some languages have unique concepts. For example, the German language has a part of speech called the particle that conveys a general feeling into sentences. While the statement "Er wisst das." could be easily translated with a dictionary and knowledge of conjugation rules into "He knows that," adding a particle to make "Er wisst ja das" could be variously translated as "Of course he knows that," "He obviously knows that," "He most definitely knows that," etc.
Another real phenomenon: some of the best programmers in the world still rely entirely on C. [Late edit: "and outperform developers in modern languages"].
I'd also suggest that of the two pathological conditions -- Overdabbling and Underdabbling -- the Underdabblers outnumber the Overdabblers by a huge margin. We just see a lot more of the latter on the Internet, because for many obsessive dabblers the whole point is to brag about it.
You need to find a balance. In the end, I think this essay is much more about that balance than its title suggests.
I'd like to see you defend your argument, that "underdabblers outnumber the overdabblers". Control for talent, please. Clearly there are thousands of VB forms developers out there; let's stick with the people working on interesting problems.
Because, alas, I can't name any talented folks, working on interesting problems, who are obvious under-dabblers. This may be because I have led a sheltered life: Too many of the programmers I know are from MIT, where until recently they inoculated everyone against underdabbling by making them take an entire course on Scheme. I tend to work on open-source stuff that's hosted on Linux, another community where underdabbling is rare and overdabbling is the danger. I read news.yc, which incorporates plenty of dabbling -- much more than I have time for, really, and perhaps more than you have patience for. ;) Finally, I myself am only a programmer because I kept dabbling in software while I was supposed to be working on physics. If I had the personality that found it easy to focus strictly on one thing, I'd be a semiconductor process engineer right now.
Of course, the statements that the original article took such exception to -- the ones like "you should learn a programming language every year" -- are largely intended for the less-talented people that have just been defined out of the discussion. And, again, that's kind of where the original author ends up: "Once you learn one language... oops, make it two languages... no, five! Once you learn five languages, you should definitely stop dabbling!"
From Peter Norvig's "teach Yourself Programming in 10 years"
"Learn at least a half dozen programming languages. Include one language that supports class abstractions (like Java or C++), one that supports functional abstraction (like Lisp or ML), one that supports syntactic abstraction (like Lisp), one that supports declarative specifications (like Prolog or C++ templates), one that supports coroutines (like Icon or Scheme), and one that supports parallelism (like Sisal)."
If you're willing to bide your time and you hope to develop jedi-level expertise eventually, then I think it's still good advice. But again, it will pay off only in the long term.
Likewise, if someone is beating you up after school every day, don't start studying a martial art that will take you 5 years to learn properly. Learn something quick and dirty. But if you want to learn to be a true master of martial arts, it will be a lifelong study and you will likely need to learn at least several styles.
But, as noted, brass knuckles (or a gun) will not cause you to grow up as a person. The martial arts teach patience and poise, which is almost exactly the opposite of a quick fix.
More concretely, Sig Kufferath (who basically carried the Danzan-Ryu torch to mainland USA) apparently beat the hell out of a couple guys who tried to mug him, then got them medical help and sent them flowers in the hospital. (The story may be apocryphal, but I would not have put it past him) Norvig's motives appear similar -- he is an acknowledged Jedi and has little to fear, in general, from helping others to raise their game. Having crossed paths with both guys, I feel reasonably justified in my perception.
HN sometimes makes me think what I wrote, though - a good way for the competition to keep you busy, for example by posting math riddles and stuff.
I thought this was going to be a "let's make fun of this idiot" Reddit-type post, but I was wrong.
I am proficient in about a dozen languages, but only use 3. I go back to the SPS, PL1, Fortran, and COBOL days, and would rather chew razor blades than ever use them again. Today, I use javascript on the client and php on the server; I have yet to find a problem I couldn't solve with them.
In the years in between I discovered BASIC and have found it to be the Swiss army knife of apps. Not the old Dartmouth Basic, and certainly not anything Microsoft bastardized, but there are many other versions that seamlessly integrate with relational data bases that I think are a dream. <laughter dies down>
It's actually reached the point where I "think" in BASIC, design my app, and then sometimes write in in javascript or php.
I certainly wouldn't recommend my approach to someone else, but I think that's the whole point. Use the right tool for the job and get good at it. I see no need to learn new languages just for the purpose of learning something new. If I get "curious" or want to expand my mind, I can think of several hundred app problems waiting to be solved in any language, take your pick.
Thanks, Gustavo Duarte, for the chance to put a little thought into this. Time to xfer control back to work (GO TOs not allowed).
For that reason I often ask people in interviews to tell me about the computer they have at home: what OS does it run and why? And I ask them what they hack in their spare time. That tends to be very revealing.
That's true across all the verticals. Plenty of 2.0 apps are Java --- including large swaths of Google. Careful about myopia. In the end, the problems you work are are far more important than the language, unless you suck. I'd much rather work on a parser/compiler in Java than a report generator in Ruby.
I think it depends on the job you're optimizing for--ruby and python are good choices when optimizing for startup jobs.
+1 for using the dating metaphor for recruiting/finding a job. How often do developers get hit on in the dating world? On dates or even just talking to a girl, I find I quickly steer the topic 'what do you do' to something like 'Heard of Facebook? I want to build stuff like that'
I assume you didn't give them your digits/contact info.
Wow. Can you expand on this? Is it really like that for women when we go ga-ga?
It was also enlightening in the sense that the rejection wasn't about him (he was a Sloan grad, and a nice enough guy), or his idea--it just wasn't a match. I work on unfunded startups, I'm just busy now and didn't care for his idea.
When I had to politely repeat how busy I am, I could suddenly see how being an attractive woman who had to fend off advances could be exhausting, and how easy it would be to stop being polite if you had to do it all the time.
Regardless, the analogy is broken because one case is about what you are and the other is about what someone wants to take from you.
The people who have Ruby slots tend not to keyword screen.
The people who have Java slots do (or, at least, their directors do).
Q: What computer do you have at home
A: I have five.
Q: What OS do they run?
A: All of them. ;-)
I'm a full-time Java programmer now because it pays the bills. But you'd better believe I'm learning other lanaguages on the side, because it's pretty clear that Java 1.) has some serious limitations that other languages don't have, and 2.) is falling out-of-favor as a web development tool to more flexible, less statically-typed, more functional languages.
It's not so much to "open my mind" as it is to keep myself marketable after Java's impending demise.
As someone who is starting to step out of the comfort zone of Java, I agree about marketability. However, Java is not going to disappear, it's firmly entrenched. It's like COBOL. I'm not sure how Sun pulled it off exactly but Java in it's 13 years has spread itself in a lot of corporate systems/applications/backends (some of which may be COBOL). Ruby on Rails and other minority languages are the minority in some companies precisely because the majority don't like the minority ("RoR? We don't use that"). However, there are some rogues in companies who are trying to bring RoR in discretely (I'm trying to be one - developing business cases for RoR adoption on small projects)
EDIT: I just read the article. Maybe it's just that many of the languages I've been learning have had little syntax and no operator precedence quirks (or any operator precedence whatsoever). I also noticed the article made the same comment about COBOL and Java that I did. I really should read these things first. Anyway, I guess as a high school freshman I'm still at the point where learning new languages is really the best I can do.
This is a good point. It is probably not a good use of your time to learn Java and then C# (or similar), or Perl and then Python and Ruby. Sure, there are differences, but basically the languages in the same groups are the same.
If you go for the more "academic" languages, you'll get more return on your learning investment. Recently, I've learned Lisp (this is what started me down the "wait, learning new languages isn't a waste of time!" path), Smalltalk, and OCaml, and I've picked up a lot of good ideas to port to my primary language. (Otherwise, my background before that was C, Perl, and Haskell. All good languages to know :)
But even in your situation, I'd say balance languages with other knowledge that is important. It's easy to play with languages because it's fun, but there's a lot of other important stuff to learn, some of which might make more practical difference to you.
But by all means, learn and have fun. If you're getting a kick out of languages, have at it, especially if you've got plenty of time.
And is one's education supposed to stop?
Plenty of time? No, not the school I go to. What I do have is the syslab, which is full of Linux boxen and a lot of smart people, especially during lunch. Attached to the syslab is a small library (formerly storage closet) of programming-related books, which contains, among other things, multiple copies of ANSI Common Lisp by Paul Graham.
It's a fun high school.
Learning new languages teaches you what you know and most importantly don't know. Coming from a Java working background, I find Ruby on Rails pleasantly abstruse and remarkably concise (which makes it hard to learn, coming from the land of boilerplateness).
I have a long commute on the train and I find that when I am trying to debug/learn - (learning Ruby on Rails) - the time flies by like that. If that isn't a benefit (making time fly by when you're having fun learning), I don't know what is.
I don't want to pretend that I am not learning RoR to be more marketable, and it's a joy to learn RoR, to build little RoR apps that I can use from my iPhone that make my life less stressful/easier.
Because I don't have 2-3 years of experience, I realize that I won't be able to pass a rigorous RoR interview. Especially those at interesting startups. My workaround to this might be by developing one or two Ruby GEMS that add value to the ecosystem (going to RailsConf '08 will help me get my bearings)
Who cares though? I think as long as we're constantly learning, whether it's new programming languages, economics, or snowbaording, it makes life interesting. New skills always seem to come in useful at some point. Make the investment in learning things that interest you and it'll always pay off. Don't let someone else tell you what NOT to learn. That's jut silly. Heck even learning COBOL or FORTRAN would benefit you with a little insight, and might be fun in a retro sort of way.
<sarcasm>
So would gargling Drano.
</sarcasm>
(I always thought about COBOL like this: Let's spend 3 hours getting dressed to go outside and pick up the mail.)
I don't follow the metaphor about COBOL. Although it's syntax can be burdensome, the language is very efficient for the same reasons FORTRAN is: static typing, no dynamic memory allocation, efficient file I/O and the best compilers available. COBOL programs are not necessarily flexible, but the are fast and efficient.
Also COBOL has correct "accounting math", something that almost no other language has as part of the core. In fact I can't think of another language specification that implements fixed-point math as part of the core: usually it's part of an external library and is cumbersome to use.
There are so many different versions of BASIC; it's possible we are visualizing very different versions. I am accustomed to using INFOBASIC dialects as in JBase or IBM'S U2 line. Everything numeric is represented as strings (integers) including dates, times, and decimals, so there is no "typing".
As for efficiency, I used to benchmark like crazy, looking for the slickest algorithms and the best implementations of compilers and I/O routines. Not any more. Hardware has gotten so fast that I am more concerned with human time, not machine time. (Naturally, anything that runs 8 million times per second BETTER be fast.)
These days, I generate most of my code, so the verbosity of COBOL (if I used it) shouldn't be an issue. But it is. I have to drop down to the source so often and I work on the code of others often enough, that I am most concerned with getting the whole job done with the LEAST code. This is where "juniors" fall down the fastest (IMO); there's too many places for things to go wrong.
I know what you're thinking, if this is the case, why not learn even more advanced languages and frameworks with even less code. I dunno.
I guess I've "settled into" what works best for me (as everyone should). Is it the best? Probably not. Am I open to better ways? Probably. But not today. Too busy.
So, can I interest you in some lutefisk?
The bottom line is that you have to use the right tool for the job: it could mean using what you know, learning something new, or even inventing something totally new and original.
That sounds like the argument of a technology major to me rather than a comp. sci or engineer. He totally ignores the fact that many languages are based around the same core principles and if you know those well learning a language is like learning a new word from the dictionary it just happens naturally when it needs to be done.
I don't know many people who learn languages without the intent of ever spending time to do something with them.
this sounds very much like inexperience.
"Doing this is like doing a really bad thing, which by the way you shouldn't do."
One of the things the guy missed is there in plain sight in his essay:
You need to get to know the libraries, struggle with the environment, find or tune a text editor, look for tools, and so on. Most of the effort has to do with housekeeping chores, which are surely not mind-expanding by anyone's measure. If you hope to be productive in the new language, things are even bleaker: proficiency has less to do with the language itself than with the myriad technologies you must master to use it effectively.
Unfortunately, everyday productivity is a lot of housekeeping chores, one after another. While your higher mind is soaring with the architecture astronauts, the rest of your mind had better be editing text efficiently, and running top and netstat, and administering the version control system.
And more than half of the point of learning a new language is to force yourself to experiment with a different tool ecosystem. The point of learning Ruby isn't just to learn Ruby: You get to learn about Rails and Capistrano and the obsessive use of test-driven development and, in my case, git. (If I'd been a kernel hacker, I'd have known about git. I presume the Rails folks learned about git because some kernel hackers, seeking to learn a new language, wandered into the Rails community.) You want to be forced to experiment with different tools because sometimes they're better: git is just a much better tool than Subversion, and don't get me started on CVS. Even when the alternatives aren't better, you become a better technologist by playing with them. If I'd never played with a Java IDE I would have no chance of understanding how Java programmers think. If I'd never actually deployed both Rails and PHP I wouldn't understand why PHP deserved to live. (Yes, it's filled with stupidly broken parts, but it's so easy to deploy, and it's fast, and it's not that hard to comprehend.)
The other thing this guy doesn't seem to understand is that there's a difference between tourism and living in another country. When you "learn a new language every year" that doesn't mean you have to become a pro in your new language. You can visit, kick the tires, read a couple of introductory books, write some simple code, read some code to something more complicated, and then move on. Yes, that means you're a dilettante -- but it's better to be a dilettante than to blindly plug away at the same thing for a decade.
Here's a short talk I wrote on the subject:
hint: look for blub programmer.
BTW, building a web framework using APL. Anyone care to help?
A web-style APL should let you do something like that as tersely as APL lets you compose operations like +.×/ for the inner product.