
If you have to learn just one programming language - r11t
http://blog.srinivasan.biz/software/if-you-have-to-learn-just-one-programming-language
======
swombat
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.

~~~
plinkplonk
"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.)

~~~
AndrewO
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.

~~~
plinkplonk
"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.

------
AndrewO

        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...".

~~~
shaunxcode

      (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)))

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

~~~
KirinDave

        ; 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))))

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

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

~~~
xenthral
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.

------
Kilimanjaro
I'd pick Javascript.

Code and reach is all I need to be rich.

~~~
mynameishere
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...

~~~
Kilimanjaro
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.

------
sosuke
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....](http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html).
Baloney I say.

~~~
ihumanable
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.

------
chc
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?

------
davidw
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?

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

~~~
kscaldef
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.

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

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

------
Zak
_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".

------
S_A_P
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?

------
Periodic
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.

------
drallison
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).

------
carbocation
... 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.

