Live data from Hacker News

Ask HN: Learning multiple languages vs. mastering one

news.ycombinator.com

1–10 of 137 posts

Ask HN: Learning multiple languages vs. mastering one

#1
Hi All. I am struggling to find/understand the best path to improve my knowledge/skills. I have a decent knowledge/experience in Java and now I am facing the dilemma either mastering Java or looking to other options to extend my programming language tool set mainly looking at: Javascript/Python/Scala/Kotlin/Elixir/Haskell/Swift.

I am interested in distributed system/data engineering and also in finding easily new well payed job. I know it's not possible to learning and master them all in a short time so I would like to pick 2. What I am struggling the most is how well to evaluate the language and get the best from it. Each time I pick one I end up giving up after 2 weeks as I always go back to Java.

The way I evaluate is simply by going to project euler and go through the problems from 1 to 20 then I don't know the next step to take from there. I find myself going through the crazy articles comparing languages and lose focus and give up.

Would be appreciated if you can share how you manage to focus on learning a new language or if it's worth at all learning/moving to a new language.

Update: forgotten also to ask what language do you advice and in 1/2 sentences why. thank you

Re: Ask HN: Learning multiple languages vs. mastering one

#3
post #2

In my experience learning other languages makes you better at the ones you already know. You get exposure to different ideas, paradigms, and tools that you can bring back to your main language. For that reason I'd suggest looking at others.

I agree, especially if the other language uses markedly different paradigms. Like, if you already know Java, learning C# is not going to massively expand your horizons, the languages are too similar.

Instead, you should try something like a functional language (like Haskell or a Lisp variant), or a dynamically typed language (like Python), or a language with a different memory management model (like C, C++ or Rust). It will give you practical skills and expand your horizons on how to solve problems with programming.

Re: Ask HN: Learning multiple languages vs. mastering one

#5
it is worth learning a new language to get a broader perspective on how to write software. you can easily write network services (that can scale later) in java, but not in javascript. you can easily create interactive demos using javascript (with html and css), but not with java.

as for how to stay focused, participate in a hackathon and build something using a new language. i find this helpful as it forces me to learn different features of a language. i don't like to learn a language by following tutorials which treat me like a baby learning to take its first step.

i have little idea about haskell, elixir, kotlin and scala, but here is some advice on the others: javascript: for web dev, interactive demos or quickly writing backend services python: writing scripts, backend for web dev, analyzing data swift: ios apps

Re: Ask HN: Learning multiple languages vs. mastering one

#6
On a diffrent topic, I wrote a bit on depth vs. breadth (but it was more of a book topic than language): https://news.ycombinator.com/item?id=17128854

For programming languages it boils down to: know the abstract stuff across most/many languages, but drill down on a small amount of languages/frameworks to be more productive.

I'd say: get to know Java and Python in-depth, select a few frameworks to know well (as languages by itself aren't the most useful thing when you are developing complete applications without reinventing the wheel). Java and Python have the advantage of a rich legacy, long term development, good cross-platform availability and broad support.

If you are specialising in the direction of high-efficiency or platform-specificity, I'd suggest Java + Elixir or Java + Swift.

I'd regard Scala and Kotlin as "Java-alternatives" for when you want to do Java without doing Java. Same goes for Groovy (and Grails framework). It's not a bad thing but doesn't automatically yield better results or gets you better understanding.

Keep in mind that languages by themselves are only useful if you have a supporting framework and knowledge of abstract programming concepts (which are language-agnostic).

Re: Ask HN: Learning multiple languages vs. mastering one

#7
I used to be a Java dev (6 years ago)...

Over the last year I've been learning JavaScript + React (frontend) and TypeScript + Node.js (backend) for a side project. At times it's great because you can cobble together all these small modules to build something really quickly and other times.... everything gets updating so often and apis change.....oh I'm going to create a new project.... xyz module needs dependency abc...blablabla.

Also JS on the server is synchronous which is not natural for me to write it. I end up using async/await everywhere except for a few places.

So I've been thinking about to concentrating on a more stable eco-system so I can really master it. With that in mind, I've started learning Golang. Great if you're interested in web servers and distributed systems. It makes concurrency easy and it runs fast. Check out this post: https://grisha.org/blog/2017/04/27/simplistic-go-web-app/

For data you could use Python (#1) but I understand Golang is also a respectable in this arena but probably not the best.

Re: Ask HN: Learning multiple languages vs. mastering one

#8
Learn more languages.

Learning other languages increases the breadth and depth of your software development skills. You will start to understand the various commonalities between different toolsets, and learn new ways to improve code in other languages.

If you are having trouble with discipline, pick a project that restricts your language choice. Build a front-end web app using Javascript, or build an iOS app using Swift.

Re: Ask HN: Learning multiple languages vs. mastering one

#9
Don't learn a new language for the sake of learning a new language. Learn it because it solves a particular problem better than your existing skill set.

For example Node.js is good for tiny Web Services/API endpoints using an event-based model. Elixir for writing highly concurrent systems.

Sure, both of these can be done with Java -- since it's a general purpose language, but the result with more focused languages is a more succinct solution.

Re: Ask HN: Learning multiple languages vs. mastering one

#10
I suggest Elm into Haskell.

Elm will give you the ability to do frontend work while familiarizing yourself with functional programming concepts.

Once you're OK with Elm, go to Haskell, which is a great language to get exposed to plenty of radically new programming concepts.

Once you have done that, and considering you have experience in Java, you will have a much broader view of abstraction thinking.

Post reply on HN