68 comments

[ 3.2 ms ] story [ 97.8 ms ] thread
A follow-up to the discussion of the results of similar survey at http://news.ycombinator.com/item?id=1982903

We had a poll for that (http://news.ycombinator.com/item?id=1983229 ), but it diverged a bit into answering "which ELSE three programming languages would you learn" and natural languages discussion.

EDIT: If you choose "Other" from the list, could you please add a comment here saying which language would it be?

EDIT2: live results: https://spreadsheets.google.com/ccc?key=0AgDNp1TM4umedC0zRkR...

I'll sum it up and post the results later.

I'm starting to get annoyed with the way google translates pages based on my ip and then offers to translate them back based on my browser settings. This is sub-optimal.
as always, javascript being neglected. poor old ubiquitous javascript.
Thanks, good point - I guess I should've started with 'Other'.

As for arc-arc-arc answers - one out of 62 so far.

EDIT: I answered to the previous version of the parent.

> javascript being neglected

How come? As far as I can see, JS would be one of the top answers.

No x86 assembly? No F#?
Actually, I thought about including both (along with Fortran and Algol out of respect for the old school), but I had to stop somewhere.

Well, that's what "Other" is for.

Okey, I submitted "other" "other" and "other": F#, LLVM IR, and x86 assembly.
Are programming languages really discrete, though? If you learn Scheme, then write Arc in it, do you now know Arc, or do you still just know Scheme? If you Greenspun in C, do you still only know C, or did you "learn" (half of) Common Lisp?
No, they aren't discrete. This is a silly exercise but fun to play.
You've included many redundant languages while simultaneously excluding several classes of languages. Many of your other decisions seem odd.

C/Pascal/Delphi are not so different from each other. C++/Java/C# are not so different from each other. PHP/Python/Ruby/Perl/Lua/JavaScript/Shell are not so different from each other. Arc/Scheme are not so different from each other.

You've neglected the APL family of languages. You've neglected the Prolog family of languages. You've neglected the Forth family of languages. You've neglected languages in the family of theorem provers, such as Coq, Agda and ATS.

You've also made some other strange choices. Scala and OCaml but not Standard ML? Smalltalk and C++ but not Simula? Groovy, which nobody will remember in three years, but not Fortran, a timeless classic still in wide use today?

And SQL isn't a programming language.

Okay, so SQL isn't a general-purpose programming language. It's not Turing complete, either. But I wouldn't go so far to say it's not a programming language. It's a domain-specific language used for programming. I believe that makes it a programming language. Not one I like too much, but a programming language nevertheless.

(comment deleted)
I agree with some of your points, though I don't think making C/Pascal and Python/PHP groups would be a good decision.

As for languages selection - I considered adding assembly, F#, ML, Fortran, Algol and some others, but I had to stop somewhere. I combined the options in DZone with GitHub top, and added a few other names.

SQL was explicitly requested in the previous discussion, so I added it. Groovy scored above Lisp and ObjC in DZone's survey, so it's in the poll as well.

As far as I checked, there was no stack based language. No Factor, no Forth, no PostScript. I missed that, that's what my "other" stands for.
Also made the strange decision to include a generic "Lisp," as well as Arc, Scheme, and Clojure, but no Common Lisp.
R and language of TeX. They are not on the list.
The images (I assume they're graphs?) are broken for me.
Yes, but it's Google's stuff, and I don't have a direct access to that.

I'll sum it all up and post the results some time later.

It's a bit unclear. Is it assuming I'm starting from knowing no programming languages, or is it asking which three programming languages I would learn in addition to the ones I already know?
And order of importance or order in which one would learn them?
I just picked my choices in alphabetical order - perhaps the results for the three choices should be aggregated.
I was intrigued that my answers for 1,2 & 3 are the most popular. I answered 1:C for simplicity and an an appreciation for where we've come from. 2:Python because i've never felt as free to express as when using python. 3:Javascript because it's practical to learn it.

For others who answered C->Python->Javascript, what were your reasons?

I answered Python->C->Javascript, but I'll pretend I was invited anyway. :) Python because I enjoy it the most -- if I had to be stuck with a single language, Python would be it. Even if it doesn't run the fastest, its library set and readable syntax make it very endearing to me. I picked C next because it's the obvious choice for speed and systems programming. The fact that you can write libraries for use in many other languages in C is also very appealing. Finally, knowing Javascript lets you contribute to the web. It's a great scripting language that I think gets a lot of flack from people that had to use it in the days before great toolkits like jQuery. While I'd like a choice in front-end scripting languages as much as the next guy, I've come to appreciate JS for what it is.
I've chosen C, Python and Lisp: because those aren't languages, but mindsets, that allow freedom of thought and expression.

I am a hobbyist, so I am free to discard anything, that The Man wants to see in a resume. Hence I've never really got into Java (a nice language, turned into the Cobol of our generation -- to all people writting Enterprise: Java's blood is on YOUR hands!) or C++ (if C is a scalpel, then C++ is a chainsaw... while you're drunk... with someone preaching protected attributes and virtual destructors in Fran Drescher's voice).

But C has inherent beauty to it, expressed in terse verses of absolute and utter control.

Python structures my thoughts.

And Lisp is all that is and ever will be.

Amen.

Do you mean if I could only learn three languages that I don't know yet or are you talking about which language I wouldn't want to be without ?
First it's important to note that the importance of programming languages is time sensitive, it depends of current programming language maturity and their related tools: VB was a success mainly because the IDE gave a lot of power to [below] average developers.

In my opinion:

i) C#: It's the most advanced general purpose programming language. ii) Python: Excelent scripting and glue. iii) Javascript: It's the Web!

But for system programming...: i) Assembler ii) C++ iii) Python. It's good for Reverse Engineering too!

Scheme/Python/Javascript (Mainly to be able to do a little bit of everything - and scheme to make you learn to think out of the box)

However, Arc and Haskell are fun to learn.. and you also need some C/C++/Java/C# background otherwise you're not serious right? Then, with this knowledge, it'd be a bit weird not to know Ruby and Perl. And some bash/sed/awk is required to work on a unix box.

Damn, I hate those pick "three programming language" questions.

javascript has way too much in common with scheme. python is practical, but not different enough to really teach you much.

I program in three languages on most days (though not the same three all the time). These artificial constraints are difficult.

java, c++, javascript

you can do everything.

Except maintain anything you just wrote.
so here I have a great IDE, lots of static analysis, continuous integration, automatic dependency management etc... people who say you can't maintain java don't know how to code in it, after 13 years it's clear to me why it's still popular.
Actually I don't think you can do everything in those 3 languages, you should try some functional programming and see the difference by yourself. Sure, all languages are turing equivalent, but some of things that are easy to write in e.g. lisp would be really painful to do in c++/java. Also none of them is suitable for replacing e.g. bash as a scripting language.
give me one example of something I can't do. of course I've done functional programming and sometimes it's nice, but I don't see it as the big advantage many people do. Algorithms and engineering are sometimes hard, actually programming is rarely the difficulty in any project.
Not only am I unable to choose, I can think of nothing else since I've read this.
Well, if this proves anything, it proves that not even three languages cover every problem.

Which is strange. In most other endeavors you'd think being fluent in three similar ways of doing something would be enough.

FWIW, I'd choose Lisp, Javascript, and C. But I'd be writing an assembler as my first project and a database interaction language as my next. And now that I think about it, my database language would look nothing like SQL...

The question needs more context, like" "if you could only... to get a good job" "if you could only... to understand the roots of programming" etc..

For example, to have a better understanding of programming I would chose 3 different paradigms: - an object oriented language. eg: Smalltalk - a logic language. eg: Prolog - a functional language. eg: Haskell

But if I would want to get a good job I would chose Java, C# and Objective-C

Each time one of these "surveys" comes up I am surprised by the number of Python vs Ruby responses. It seems to always be 3 to 1 in favor of Python while I had thought the usage was more like 50/50.
Are you involved in web development? It probably is about equal there, but where I work we have a substantial contingent of people who use Python on top of C or C++ for hardware control or who have switched from Matlab to Python, but I don't think I know a single Ruby user.
Ruby is disproportionately common in web development, and web developers are disproportionately visible on the web.

Anecdotally, I don't personally know anybody using Ruby that isn't at least primarily a web developer, either, but I know several Python users.

c, python, haskell
c, lua, clojure
It would be useful to filter out Arc-Arc-Arc and Foo-Arc-Arc answers, obviously they are irrelevant
Three is a good number.

C needs to be one of them, because everyone writes their libraries in C, and you need to use them and be able to contribute your own libraries. Don't use C for applications, though; there is no performance gain (gluing C libraries together in C is as fast in $foo as it is in C for most values of $foo), and there is a maintainability and expressiveness loss. Libraries are simple enough and small enough in scope that this doesn't matter. Your HR org-chart editor web app? Not so much.

So I use C for libraries that other people need to use, but nothing else. This way, I get code reuse without having to force a "policy decision". Everyone is fine with C and it integrates well with pretty much every other programming language.

After C, you need a language for high-performance but moderately complex applications. This language needs to allow for expressive description of high-level tasks, but it also needs to expose primitives for writing "fast" code. A lot of people choose C++ for this, but I think C++ is a bit too low-level for application development. Most people choose Java or C#. (I hate both, but it's close to the right thing.) I use Haskell; other good options are OCaml, F#, Common Lisp, etc.

I use this class of languages for things like ETL or network-based computation services. The code is a little complex, and it needs to run fast. This family is perfect for that.

The third language you need to know is a "scripting language". This is a loaded term, because scripting sounds like it's not real programming. But this is wrong, making a Perl script to filter your email is just as "real programming" as writing the TCP stack for your OS. If you have a problem you want to solve and you type some stuff into a computer so that it learns how to solve the problem, that's programming.

I use Perl, but obviously there are a lot of options here; Perl, Python, and Ruby are the best choices, followed by Lua, various Scheme implementations, and so on. I picked Perl over Python and Ruby because they all really suck performance-wise, but at least Perl has a great community and a great library repository. It doesn't really matter which you choose, as long as you love it. (My favorite color is green. Yours may not be. Let's not argue about it, though.)

This class of languages, in general, is best for building complex applications where maintainability is the core requirement. Scripting languages give you the tools to design and build incredibly flexible abstractions that let you hide a lot of complexity where appropriate. They also make it really easy to write great tests, and to implement new ideas. Being unafraid to refactor your code and being able to design abstractions to refactor into are the keys to maintainability. And languages like Perl make that really easy.

Lately I've been playing with node.js, which I really like for "quick scripts" that need to be event-driven and need to talk to the network. I'm hesitant to include it in this category, though, because it lacks good namespace support, which makes writing complex apps tough. It also doesn't have a mature toolchain yet. But it is cool and if you have done web programming but haven't done any "scripting", you can get started and start having fun quickly. So do check it out.

(Also worth noting; I've written event-based network services in all three classes of languages. The performance is the same regardless of which you choose! Nothing is slow for IO; the plumbing is all handled in some generic C library and the OS. C is fast, Haskell is fast, Perl is fast, and node is fast.)

Finally, if you do web stuff, you need a fourth language that compiles to Javascript, just because that's how the web works. I think plain Javascript is fine, so I use that, but coffeescript and friends are also cool.

> I picked Perl over Python and Ruby because they all really suck performance-wise, but at least Perl has a great community and a great library repository.

I recently learned that Lua is pretty fast, according to anecdote and shoot-out data. I did not like the syntax, when I last looked at it. But I might change my might. I mostly use Python for this class of things at the moment. Though I could see myself use Haskell more.

We use OCaml at work for your first and second category. (We do interface with C, too.)

Lua's other strong point here is that it has an especially nice C API. Unlike Perl, Python, and Ruby, it was written primarily to script C, with use as a standalone language being secondary.

I prefer Lua to all of those, but that again is a matter of taste.

And yes, Lua is pretty fast, and LuaJIT (http://luajit.org/) is so fast that it's a major outlier among scripting languages.

(comment deleted)
(comment deleted)