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.
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.
Part of me hates to say this, but I'd put Javascript high on your list. It's a practical and widely useful language.
- Kotlin/Swift/Dart for mobile frontend
- C/Rust for system programming
- JS for web frontend
- ... (fill the blanks with your personal interest)
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.
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.
Once you're up to speed you can decide whether to take the training wheels off
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!
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.
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.
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…
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.
Since you know python, I’d recommend these two 1. Go (compiled, typed, simple, fast) 2. Elixir (functional, interpreted, distributed, elegant)
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.
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.)