A CS student here. My school is teaching only Java, and I figured I should pick up another language on my own. What would you say is the best programming language to learn right now in this market?

- 10,635
- 4
- 24
- 54

- 25
- 2
-
3I'm not sure that there exists a "best programming language". What are your goals? – Ben I. Jan 24 '22 at 05:31
-
4Most ppl start with [blub](http://www.paulgraham.com/avg.html). Most ppl dont know they are starting with blub. That's the mechanism that ensures why most start and stay with blub – Rusi Jan 24 '22 at 07:12
-
See [TIOBE Index](https://www.tiobe.com/tiobe-index/). Note it does not cover applications like databases and technologies like containers but probably should. Also I program in Prolog which is [homoiconic](https://en.wikipedia.org/wiki/Homoiconicity); once you use this feature you really don't want to touch another language that does not have it. – Guy Coder Jan 24 '22 at 08:41
-
Chose a language that will maximize learning. Not one that you will see on a job advert. By doing this you will get to your goal quicker. – ctrl-alt-delor Jan 24 '22 at 13:57
-
@Rusi thanks, that explains a lot. I think I will have another look at LISP. I learnt a lot from it last time, but now realise that there is a lot more to learn. – ctrl-alt-delor Jan 24 '22 at 14:18
-
@ctrl-alt-delor, note that the varieties of LISP are quite different. The linked article recommends Common Lisp. Scheme is quite different in some important ways. LISP is a family of languages, not a language. – Buffy Jan 24 '22 at 14:21
-
@ctrl-alt-delor Beware! Its easier to get Paul Graham wrong than right. To wit: Its easier to see lisp as a *technology* than as an *idea*. PG himself adumbrates it with the quip: *When people tell me that lisp is obsolete I ask them if quicksort -- same age as lisp -- is obsolete.* – Rusi Jan 24 '22 at 14:26
-
2Beware! The second language is the hardest! Because you learned Java first, you will have unknowingly acquired a prejudice for Java. You will think that the way Java works is The Natural Way. You will think that the patterns used by Java programmers are The Natural Way. Your next language will seem strange—wrong even. But there are many ways, which is part of the reason why there are many languages. – Solomon Slow Jan 24 '22 at 15:17
-
1@ctrl-alt-delor, In another essay, Mr. Graham argued that the evolution of modern programming languages is converging on LISP-equivalence. You may find less novelty in LISP today than a programmer from twenty or thirty years ago would have found. – Solomon Slow Jan 24 '22 at 15:27
-
At what level are you studying currently? High School or University? If university, are you a first-year?? Note that there is a good chance to reopen this if you say a bit more about your needs and goals. – Buffy Jan 24 '22 at 16:10
-
This question has been closed. OP, please edit it to provide more detail. *What are your goals?* – Ben I. Jan 24 '22 at 16:16
-
Your school only teaches Java? Sounds like a lousy school (unless it's a high school or grade school). – Ellen Spertus Jan 26 '22 at 18:52
3 Answers
One of each kind, doesn't matter what it's called.
If you understand the concept of a language, you can learn a new syntax in a couple of weeks; i.e. if you already know Perl and Python, learning Ruby probably won't really expand your expertise even if Ruby devs might be the most sought after and highest paid (just, an example, I have no idea who actually is paid the most). Now if you'd instead learn Lisp, you can add 'functional programming' to your list of skills. It will make picking up Haskell much easier. Not that you'd need either of the two in real life (probably) but you now have a better understanding of programming as a whole and more skills to advertise.
If I were in charge of hiring, I'd be looking for a 'Web developer' not a Django or a Ruby-on-Rails dev. It's easier to teach a new framework than a concept.
So here is a list of things which I would suggest you are able to cover:
- something that is fast to write
- something that is fast to execute
- something for databases
- something that can be read by a shell
- something functional
- something for desktop GUIs
- something for the internet
- something that can render nice images or games
- something for microcontrollers
- something to create mobile apps
- something describing hardware
- something to show off to the nerds like brainfuck-2D ;)
This list is highly subjective, off the top of my head, and by no means complete (but a good starting point). However, there are a lot of people who get by perfectly fine with only one language. Also one language can cover more than one of the points of that list. If you really want, you can do all you shell-scripting with CSS.
-
3To be fair, I have yet to meet any fresh graduate (or even experienced dev) who actually knows "one of each of these kinds". Don't get me wrong, it's a good list, but a student will need to pick and specialize a bit. (which sort of brings them back to square one - should they learn verilog or Java+android, with an answer of "whatever you see yourself liking more"). – xLeitix Jan 24 '22 at 15:01
-
I'm missing the mobile app part, but other than that I could check all those after graduating but I went from CS BSc to computer engineering MSc and hat a lot of jobs on the side. – Max Jan 24 '22 at 16:00
-
1So my list would be something like: Ruby, C++, PostgreSQL, bash, Haskell, qt, RoR, Ogre, C, --, Verilog/VHDL, Piet. – Max Jan 24 '22 at 16:01
There is no "best" second language for everyone. It depends on your goals. If you are only interested in future employment as a developer then one of the languages on the most popular (in industry) list is what you want. Both C and Python are quite hot at the moment, as is Javascript.
But if your interest is more towards a complete understanding of computer science and, in particular, a deep understanding of languages, then you may want a language that is specifically quite different from what you already know. A member of the LISP family would be a good choice because it uses a different paradigm requiring different thought patterns. You can save niche languages for later (brainfuck). C is also quite different from Java, though the low level syntax is similar. But, it, too, requires a different way of thinking about how you conceptualize the solution of a complex problem. For this purpose, both Python and Ruby are a bit too close to Java to stretch your mental models sufficiently and you are likely to program either just like you would program Java. You can't do that with C or any LISP variant.
So, the requirements for the job market and for a deep education are quite different.
Any undergraduate program in CS is likely to require you to learn an assembly language at some point. A big step would be to teach yourself MIX from The Art of Computer Programming by Knuth. It is a fairly generalized assembly language that has simulators available.

- 35,808
- 10
- 62
- 115
My school is teaching only Java, and I figured I should pick up another language on my own.
Good thinking!
What would you say is the best programming language to learn right now in this market?
Depends on what "this market" is for you. If you want to go into robotics, then maybe C? If you want to go into Web development, then Javascript. Data science or analytics? Python, R, or Julia. DevOps? Ruby or Go. Computer graphics or gaming? C++. You see where I am going with this?
That said, it does not matter. Any second language you learn will help your understanding and market value, and what is most sought-after now may not be so hot anymore when you graduate. What you should mostly be looking for at this point of your career is to broaden your horizon. If you already know Java, then learning C# is quick but also sort of useless, since you will mostly find similar concepts used via a similar syntax. What you should be looking for instead are languages that teach you something new - functional programming, logic-oriented programming, or programming close to the hardware are probably the highest-gain ones (for a more complete list see Max' answer). Which of those is "most important" again depends on where you see yourself going in your career.

- 101
- 2