java, c++, javascript you can do everything.
If you could only learn three programming languages, which would you choose?
41–50 of 69 posts
Re: If you could only learn three programming languages, which would you choose?
#42Re: If you could only learn three programming languages, which would you choose?
#43java, c++, javascript you can do everything.
Re: If you could only learn three programming languages, which would you choose?
#44It'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?
Re: If you could only learn three programming languages, which would you choose?
#45A 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…
Re: If you could only learn three programming languages, which would you choose?
#46Re: If you could only learn three programming languages, which would you choose?
#47Re: If you could only learn three programming languages, which would you choose?
#48C 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.
Re: If you could only learn three programming languages, which would you choose?
#49Re: If you could only learn three programming languages, which would you choose?
#50Each 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.