Hacker News new | past | comments | ask | show | jobs | submit login
If you have to learn just one programming language (srinivasan.biz)
35 points by r11t on May 13, 2010 | hide | past | favorite | 36 comments



If you have to learn just one language, and you're forbidden from learning another, you'll mentally hobbled, a technical cripple, like someone who's been forced to express their thoughts using only 5'000 randomly selected words of the English language.

The premise is completely flawed. No single language is enough to "be a programmer". You need other languages, if only to understand what your language does. And you need them because no language is the best tool for every job. Should a plumber choose "just one tool" to do their job with?

if you want to devote all your energies to becoming a proficient and productive programmer and want to learn one powerful, freely available, high level general-purpose language (not domain specific)

If you want to devote all your energies to becoming a proficient and productive programmers, you will need to:

1) Learn at least half a dozen different languages over the course of a few years or more (and by "learn" I mean learn them well enough to do something productive in them).

2) From this, arrive at a set of preferences for which languages you feel most productive in for the tasks which you tend to do.

3) Then, hone those few languages (there's gonna be more than one) to a sharp point.

4) Keep monitoring new language developments and get ready to jump ship if a better language comes along, which replaces one of your current languages favourably.

A one-language programmer is like a one-legged stool.


"The premise is completely flawed. "

Sure,(and I think your "algorithm" is better than the author's for choosing which langauge to "deep dive" into), but the whole point of a Thought Experiment is to work off a "crazy" (by whatever logic) hypothesis to see what kind of thinking results. "If I were to hitch a ride on a light wave what would I see? ". "If I knew I was going to die exactly a year from now what would I choose to do?" etc. The crazy hypothesis is taken as an artificial focus to spur thinking.

That said, the author seems a bit clueless (and I am not defending him or his logic). I just wouldn't dismiss the idea of a thought experiment so easily. So yes, if you could learn only one langauge which one would you learn? ;-)

(HN generally has better commentary than the article under discussion. This effect is particularly marked when theit is about some dumb submission that for some reason sparks great discussion.

My answer (fwiw) - C or Haskell. My biggest (programming) fear is working with dumb people on dumb projects. In the days of Java and scripting languages like Python or Ruby, either would be used (by and large) only for very unusual/interesting projects. Most of my work today is in converting Machine Learning research into workable code. The language used is is irrelevanmt to my clients, so eithr would work.Side projects would tend to be more interesting with either of these.

C would give me more job opportunities and many nice Open Source projects to jump into than Haskell I guess, but Haskell might be more mindbending (and fun). And it has a great community of very bright and nice people.)


He dismisses C because "You probably already know it." and yet it is a post about a single language to learn. That's cloudy thinking.


Well, let's not forget that the pay-off for that particular thought experiment was relativity. :)

I (and possibly others) would probably be a little less cranky about the whole article if he'd followed his steps rigorously and arrived at something interesting. And I don't mean it has to be revolutionary like relativity, but something better than just highlighting his new favorite language.


"Well, let's not forget that the pay-off for that particular thought experiment was relativity. :)"

I agree :-) . But even Einstein didn't know what he would end up with before the thought experiment.

"I (and possibly others) would probably be a little less cranky about the whole article if he'd followed his steps rigorously and arrived at something interesting."

I agree that the article is completely tangled and confused and not worth the time spent reading it. I was just using the question posed (and ignoring the source and the accompanying article) to do some thinking to see if anything interesting results.


It's a bit like "Desert Island Disks": if you are washed up on an island, and by some odd chance you have precisely 10 recordings, and ... A silly game. As you say, the monolingual programmer is unlikely to be proficient. How many professional musicians are competent on exactly one instrument? (Admittedly, they may be professional-grade on one only.)

(Though a one-legged stool, otherwise "a shooting stick", has its uses.)


    if (you_have_to_learn_one_language) {
      make_highly_subjective_claims();
      eliminate_good_candidates_for_specious_reasons(); 
      arrive_at_questionable_conclusion();
    } else {
      broaden_your_understanding_of_programming();
      be_able_to_evaluate_multiple_solutions_for_problem();
    }
The underlying premise is flawed. No one has to learn just one language and anyone who stops at one is limiting themselves to being a journeyman programmer for the rest of their career. At that point they should be asking "do I really like programming?" and if not, move along to something else.

A much better question is "If you have to start with just one programming language...".


  (if (you-have-to-learn-one-language)
      (begin
          (make-highly-subjective-claims)
          (eliminate-good-candidates-for-specious-reasons)
          (arive-at-questionable-conclusion))
      (begin
          (broaden-your-understanding-of-programming)
          (be-able-to-evaluate-multiple-solutions-for-problem)))


Ouch, so many side-effects. My scheme instincts are wincing.


    ; Perhaps you would prefer monadic clojure?
    ; We wouldn't want to make it look too alien ;)
    (with-monad state-m
      (defn m-advice [your-brain spurious-advice?] 
        (if spurious-advice? 
          (m-chain (make-highly-subjective-claims
                   eliminate-good-candidates-for-specious-reasons
                   arive-at-questionable-conclusion) your-brain)
          (m-chain ((m-understanding-broadener :programming)
                   be-able-to-evaluate-multiple-solutions-for-problem) your-brain))))


Oddly enough, that did make me feel better. It's strange how encapsulating the side-effects in a state monad can be so soothing.


Of course the premise is flawed. It doesn't stop it from being widespread, however. For many people, one language is enough.

I had teachers who told be that learning one language is enough to learn them all (except for the syntax). I have a colleague who wouldn't use anything but C++ for "serious" projects.

[Edit] Could someone tell me where this comment went wrong?


I had teachers who told be that learning one language is enough to learn them all (except for the syntax).

That sounds like typical academia-speak (assuming you mean to say they were implying all general-purpose languages are essentially interchangeable by Turing-completeness). But if you're going to go down that road, you might as well go all the way and just program Turing machines. Believe me, if you thought assembler on real processor was low-level, nothing beats directly programming a universal Turing machine.


They were actually saying that learning Fortran is enough to understand all the important concepts. It was not about Turing completeness. They actually thought that languages are all more or less the same. Maybe they knew about exceptions, like Prolog, but didn't mention them because of their perceived irrelevance. "They" are quite rare among professors, but they do exist.

Sometimes, it is the course, not the professor, which implies that Fortran is enough. Such a course made me study algorithms. The syntax was some sort of Pascal. The semantic was first order and imperative. And because no compiler existed for such a language, they acted as if the thing was "language independent".


  if (false) {
     self.the_one_language_I_should_learn = "the best one";
  } else {
     delete(self.the_one_language_I_should_learn);
     while (self.could_improve) {
        self.programming_skills_and_insights_struggled_with++
     }
  }


He lost me when he started talking about JavaScript and implied it is obsoleted by GWT.


He lost me a bit earlier:

"I will eliminate Lua for the same reason [is not a general purpose language], though it has found a niche in the gaming community."

wat?

And then on a comment he says: "I should have written more about Prolog, Lua"

And proceeds not to write more about Lua, only Prolog.


I'm learning C# so I've got a little bias but the author says that C# never really took off? He doesn't even list it as failing one of his criteria. He says in the comments later he bases it off of it's listing here http://www.tiobe.com/index.php/content/paperinfo/tpci/index..... Baloney I say.


I'm not a big fan of C# but I have to agree. Even in the TIOBE index it may only have ~4% but that still makes it the _7th most popular language_.

He ends up with Scala, which according to TIOBE is 27th with 0.433%.

Interesting read, but clearly this is making the solution fit the data more than the other way around on the original author's part.


This is pretty much what I came here to say.

>I will rule out C#. C# never really took off

"I don't use C# so it's not the best language ever."


I didn't understand his reasons for eliminating Haskell and OCaml. It's not even that his reasons were subjective like with a lot of the other languages — he just didn't offer any. He names a bunch of things Scala can do that they can also do and then goes, "So I'm eliminating Haskell and OCaml." Like, does he not realize those languages can do monads and XML processing?


Wow, that dude is going to get flamed. Maybe he'll win a prize for pissing off the most advocates of different languages in one go?


I'd pick Javascript.

Code and reach is all I need to be rich.


You know what language is pretty good that no one would ever pick? Actionscript. It's like javascript but it has strong types (if you want them) and a decent toolset. Of course, everyone hates flash now...


I've worked with it, I hate it. I hate strong typing, after ten years in the corporate life I learned to hate java, c#, etc.

Thanks, but I am more than happy with JS as it is.

And node.js is coming along sweet on the server.


Haxe is even better. Very similar to Actionscript but with more comprehensive type inference and generics, to be brief.


He eliminates Smalltalk because of speed but leaves in Ruby? Ummmmmmm. What?


No, he does eventually get around to eliminating Ruby on those grounds: "So I am eliminating Python and Ruby, primarily for #2". I don't quite understand why you have to read so far into the article to get to that conclusion, though.


Agree. Even though I'm a huge Ruby fan, that part still left me scratching my head.


Follow this author's advice unless you need a job.


Yeah really... Haskell and Scala? Unless your job is posting on Reddit all day about these languages, good luck...


I will eliminate Lua [because it is not a general purpose language]

Umm... what? It's really hard to take anything from this article seriously after reading that. Other gems include ruling out Clojure purely on the basis of syntax, Objective C because "it is mainly used in Mac OSX and iphone software" and Javascript "mainly for the same reason we don’t program in assembly any more — availability of highly optimizing compilers".


If I had to learn 1 language, I would go to Monster, Dice, whatever job site and search- On Monster.com looks like java is the big winner in Houston Tx, followed by C++, C#, VB, and javascript. Lua and scala are pretty much a great way to be unemployed in this city.

Job Search Sorry there are 0 scala jobs

Job SearchPer page Previous 1 2 3 4 Next 85 c# jobs in Houston, TX

Job SearchPer page Previous 12345 Next 120 java jobs in Houston, TX

Job SearchPer page Previous 1 Next 6 objective c jobs in Houston, TX

Job SearchPer page Previous 1 2 3 4 Next 90 C++ jobs in Houston, TX

Job SearchPer page Previous 1 2 Next 30 php jobs in Houston, TX

Job SearchPer page Previous 1 2 3 Next 73 VB jobs in Houston, TX

Job SearchPer page Previous 1 Next 1 Lua jobs in Houston, TX

Job SearchPer page Previous 1 2 3 Next 65 javascript jobs in Houston, TX

Either way, why would you want to limit yourself to just one- even if its just for the sake of argument?


I like to think of programming languages as tools. You should always pick the right tool for the job. Otherwise, someday you will pick up your hammer and realize not everything is a nail.

Language design is all about trade-offs. Some languages are better at string processing, some make it easy to write quick scripts, some have good framework support, some have high speed, none has it all.


I think that programming languages are tools which aid the development of programs, but the program itself is really independent of the programming lanauge. I know that I write the same program no matter what the compiler (or assembler).


... then learn the one that everyone around you uses. This often extends to entire fields (genetics, etc).

Of course, it's never true that you have to learn just one language, and you're handicapping yourself if you arbitrarily do.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: