HACKER Q&A
📣 alexmolas

Should I learn more languages?


Hello!

I've programming in Python for the last 7 years, both professionally and for side projects. I would say that now my skills in Python are pretty good. However, Python is the only language that I know, and I'm wondering if this is this a problem and if it can damage my career.

Should I focus now on learning new languages instead of getting more proficient at Python?

Thank you very much for your help :)

Edit: I know also some SQL.


  👤 specialdragon Accepted Answer ✓
If your experience has been entirely Python then a compiled language is the way to go.

SOLID principles still apply, but I've found multi-threaded applications to be more sensible in compiled languages.

More SQL is valid, up to a point. Make sure you're familiar with the basic syntax for SELECT, UPDATE, DELETE.

After a compiled language, try a different scripting language: JS, Ruby, PHP. JS is interesting because it's browser based. Ruby is interesting because of its ActiveRecord layer. PHP is interesting because of its legacy, and where it's going syntactically.

I wouldn't stop there either. Once you've done the above, write a Domain Specific Language on top of one you're familiar with. I wrote my first one on top of C#.

Write a terminal only application, and then extend it to be visual. Does it have to be HTML? Write a flashcard program, there are so few about.

In my experience, Ruby was good for prototyping, and then JRuby for performance. Python was good for quick science and then R, C or C++ for performance. PHP was good for prototyping websites, and then you switch it to become the view layer with API support for scaling.

Once you've done the above, try an esoteric language such as Piet.

Definitely learn a new language.


👤 flippinburgers
You should pick up a language that has different concepts than python. Probably a compiled language with the ability to run things in parallel. Golang comes to mind. It isn't super challenging to pick up and it can be a gateway to other more complex languages.

👤 sokoloff
I try to pick a different language each year (around this time usually), do some basic exercises and play around with it and then use it to solve Advent of Code problems in that language. I've been doing this for many years and find the expansion to be pleasurable and to give me better perspective even when using the same old language for regular work.

https://adventofcode.com/

Part of me hates to say this, but I'd put Javascript high on your list. It's a practical and widely useful language.


👤 anta40
I'd say learn another 1 or 2 languages, but not to repeat what you can solve with Python, e.g:

- Kotlin/Swift/Dart for mobile frontend

- C/Rust for system programming

- JS for web frontend

- ... (fill the blanks with your personal interest)


👤 johnthuss
For professional purposes, you might not need to know more (except SQL perhaps). But I would encourage you to also learn a statically typed language, like Swift or Kotlin or Go.

👤 rramadass
The answer to your question is actually much more nuanced than one would expect it to be. I have wrestled with it myself and have come to the following conclusions;

Computer Language is not only used to express your thoughts but also shapes your very thoughts itself. How? By constraining you with specific Syntactic Constructs and limited Computation Models (aka Paradigms eg. Imperative/Functional/Object-Oriented/etc.). Thus you first need to learn one language very well w.r.t. understanding all the different Computation Models expressible using the syntactic constructs of that language. Read the book Concepts, Techniques, and Models of Computer Programming by Peter Van Roy and Seif Haridi(https://www.info.ucl.ac.be/~pvr/book.html) for insights. In your own case since you are already familiar with Python (in my case it is C++), learn how to express the various "Paradigms" using Python itself thus becoming a "True Master" of that language.

Simultaneously, you look at the whole Computing domain, identify the most essential subdomains and learn a few languages which naturally fit into them. This gives you the tools needed to work anywhere on anything and understand what is actually happening thus truly making you an "expert" problem solver. With that in mind i suggest first learning C (and then follow with C++) since it underlies everything i.e. universal glue language, de-facto binary ABI standard etc. Next we see that concurrency is fundamental to all systems today (multicore/multiprocessor/distributed multisystem) and thus we need to learn a language which is explicitly designed for this. Erlang is that language (followed by Elixir).

Approached in the above manner, one need not get lost in the "babel of languages" which is unproductive but one is able to balance actual learning with practical considerations.


👤 Tozen
Yes, you should definitely learn more languages. Don't go crazy, but at least 3. You should probably select languages that will enhance what you already are or would like to do.

From the suggestions that I've seen here and in the professional context, probably Go, as there are many good arguments for it and in general (since no particular goal was given). For someone coming from Python, Go would be easier to learn, offer something different to your present picture, and it would enhance your resume.

Of course, in the non-professional context, you could learn anything. So will give a "shout out" to Vlang (vlang.io). Though in beta, it's a great up and coming language, which is an alternative to Go and C. Vlang would also be a nice addition and smooth transition to or from Go or C.


👤 jimmywetnips
For learning new languages and especially if you're mostly interested in getting a "feel" and not interested in the little thorny bs that comes with a new syntax, I highly suggest buying copilot.

Once you're up to speed you can decide whether to take the training wheels off


👤 graypegg
I've gotten good milage out of messing around with something "different" than what I use professionally. Try something that challenges how you think programming should work.

Some examples I've had some fun with:

Haskell - functional programming will be applicable everywhere, and lazy evaluation will change how you think

Julia - math! Mess around with big sets of data: your country probably publishes big exports of data that you can use for free

Elixir - mess around with OTP and distributed computing

Ruby - delightful syntax, will feel python-y, could try making something in Rails, still the one of the few frameworks where the idea => working prototype cycle can be under 1 day.

Kotlin - statically + strongly typed, try making an android app!


👤 BerislavLopac
Python is said to be the second best programming language for every purpose.

👤 jasfi
Take a look at Nim, it integrates well with Python and can be used for writing high-performance code.

I wrote a web framework with an ORM in Nim: https://github.com/jfilby/nexus. It's based on Jester (https://github.com/dom96/jester), which is a popular Nim standalone web framework.


👤 ozzythecat
I recommend picking up a JVM language. Either Java or Kotlin.

Then I recommend picking up C++.

A lot of people say C++ is dead, but there’s so much reliable software written in it. Once you use JVM and understand garbage collection, then C++ feels like a leap deeper into really having to understand how stack vs heap memory works, thinking about memory management, safety, and performance (passing by copy vs reference).

I think with this trifecta under your belt, you’ll be able to easily expand your tool kit further in the future.


👤 matthewmacleod
Yes. Learning more programming languages is probably the single most powerful thing you can do in terms of expanding your programming skills. Not necessarily because they have different syntax or whatever, but because every programming language comes with its own different ecosystem which makes different choices do to the different constraints they face and priorities they have. Learning a new language makes you a better programmer in all other languages you know.

👤 ioblomov
Most definitely! Your Python skills won’t suffer for it; they’ll likely improve.

SQL and (as much as I despite it on purely esthetic grounds) JavaScript are good practical candidates. After 20+ years in tech, they’re both still as relevant as ever.

Alternatively, as a learning exercise to master the zen equivalence of code and data, try playing with Lisp or any of its variants…

http://www.paulgraham.com/avg.html


👤 jstx1
Yes, and it’s not that hard anyway. Or if it is hard for you then it’s even more important to learn a new language or two.

👤 cafard
This is not an either/or: learning another language may make you more proficient at Python.

You could try C, which is pretty much everywhere out there under the hood. You could try one of the Lisp family. Or you could try one of the functional languages.


👤 roguesherlock
I think it’s always nice to learn about different paradigms of languages.

Since you know python, I’d recommend these two 1. Go (compiled, typed, simple, fast) 2. Elixir (functional, interpreted, distributed, elegant)


👤 throwawayi432
Go: goroutines, channels, cloud native.

Rust: ML-like, borrows, move semantics, easy parallelism & concurrency (in my opinion).

Erlang: fault tolerant, actors, & concurrency.

Scheme: Conjure spells.

Haskell: Burritos and lazy evaluation.

Smalltalk: OOP.


👤 vbilopav
In my opinion it's a waste of time and energy if you're not using it.

👤 nine_k
Yes.

learning another language has two kinds of benefits: tactical and strategic.

The tactical benefit is its immediate use. More opportunities to be hired, easier time doing a side / hobby / fun project.

The strategic benefit is that you start seeing computing differently, get a better picture, and a better set of mental tools. This applies across the board then, enhances all you already know.

My idea of a spectrum of languages to be acquainted with, for strategic purposes, in no particular order:

- SQL: utterly practical, and also an example of a completely declarative language. Learn it well, it's used everywhere, and will stay.

- JavaScript, then Typescript: both utterly practical and widely applicable. JS is simple, similar enough to Python, and shows you the many pitfalls of early language design. Typescript adds a static, gradual type system on top of it, which allows you to work on bigger codebases without drowning in errors. JS / TS have excellent and ergonomic async support, very refreshing after Python.

- Erlang or better Elixir: reasonably practical, shows concurrency via messaging / actor systems, and reasonable bits of functional programming. Small enough to become productive in under a week. Teaches you the design of (highly) concurrent systems which you can then apply anywhere.

- Go: pretty practical, in high demand. So small one can learn it in a weekend. Shows concurrency at a somehow different angle than Elixir. Shows the many compromises that language designers make to keep things simple (but also boring and repetitive).

- Kotlin: pretty practical (and not only for Android development). A good example of a modern strongly-typed language, with many creature comforts and excellent IDE support. Widely uses higher-order functions and other FP stuff without drowning you in the jargon. (One could pick OCaml instead, but it's distinctly less practical.)

- Any Lisp (I'd take Clojure or Scheme): not very practical (few jobs), but shows very well how a program and data are made of the same stuff, how programs can transform programs (metaprogramming), and how complex data and algorithm structures are built form elementary particles, so to say. Shows and explains many idioms and notions which resurface in other languages.

- Haskell: not really practical, but has an immense learning value. It changes the way you think about programming (again). It explains the underpinnings of it in a way Lisp or C can't: if you ever wondered what is the real meaning of null or the semicolon (sequential execution) in other language, it gives you the answers. Again, the insights you gain from learning it even superficially will apply to all your programming practice. A great help if you decide to pick up Rust later.

- C: reasonably practical; a ton of stuff is still written in C. Pretty simple, can be learned in a weekend. Terrible in various ways, but shows you reasonably well how the machine works at lower level. (Still not really well; you need assembly to really appreciate that.) Allows you to connect bits to higher-level languages, or at least understand how it's done. Also shows very well why much of the software if full of vulnerabilities, and makes you appreciate the convenience and safety that high-level languages give you.

(For bonus curiosity points: any RISC assembly, FORTH, XSLT, TCL, Prolog, Q or J or K or APL.)


👤 cc101
I've been programming for over 50 years. If I judge by the past (not necessarily a reliable choice), languages are not that important. They come, and they go. I believe that you'd do well if you could demonstrate that you can easily acquire different languages as needed. Opportunities and careers are unpredictable. You should be able to seize opportunities when they arise. I suspect that you are vulnerable to obsolescence. Being familiar with multiple languages (not necessarily fluent) will likely be of more use that adding a single new language. Good luck.

👤 Ptchd
Learn SQL