HACKER Q&A
📣 ibobev

How fast you are learning a new programming language?


Despite already knowing a few programming languages, learning a new one for me is still a considerable time investment. I hear that some people could pick up a new one in a matter of 2-3 days. How fast you are learning a new programming language and what are the best practices for fast learning you are employing?


  👤 dgritsko Accepted Answer ✓
It depends on what you mean by "learning". If I'm just looking to get a program to compile and accomplish a relatively straightforward task, I can "learn" enough of a language just by Googling "how do to X" in a few hours. For most languages that I've played around with, this is as far as I get.

However, the process of really understanding what makes a language unique to the point where I can write idiomatic code without needing much assistance (from Google, an IDE, or otherwise) is a much more significant task, and one that almost inherently feels like it needs to take a while. I don't think you can really get around the fact that it requires time to internalize this knowledge. And it's a process that never really ends, you just hit a point of diminishing returns - but there's always more to learn.


👤 sfgweilr4f
I learnt the basics of Lua in a "few" days but realistically it took a week. Good enough to start being able to think-in-lua and using it to solve random problems without constantly referring to "how to loop through a list" or other basics. A week later I started embedding it.

... as well as using it for work... which was actually the entire point of the exercise. Ironically I had enough within two weeks to fulfil work requirements.

Accelerators: pick a bunch of simple projects. Do them and complete them. eg how do I do basic calculations? what does a loop look like? How to sort this file? How to read this CSV and output a formatted JSON? How do I write a snake game? How do I use a sqlite3 database? How to serve HTML? etc.

Specific projects drive your learning of the basics. If I can't play my game of snake then I've missed something. That file isn't sorted yet. etc etc. Specific and measurable. see also: SMART goals.

The issue with this project approach is they won't necessarily give you all the language exposure you will need in the long term. So don't neglect the tutorials if you go the project route. Another thing: the project route can slow you down in some circumstances depending on the peculiarities of the language. Some languages are just painful or assume a lot in terms of libraries and frameworks. Often there's a significant learning curve that is really more about the frameworks and ecosystem rather than the language itself. You'll need to learn the peculiarities of each language's ecosystem.

I've found the "cut-and-paste" approach to projects is NOT the best way for me. I need to write and think about the code in the language I'm learning. YMMV.