I thought this was about programming languages before I saw it was from BBC, making me ask - what is the best way to learn a new programming language?<p>I'm guessing the answer is making small things, but what exactly? I've made so many to do list apps I don't know what to do with them
When learning, motivation is first, everything else follows.<p>At some point I felt the drive to move on from Python as my main language. There was no question of “how”: when I needed or wanted to build <i>anything</i>, I would simply go with Go (later TypeScript) and plow on. It is hard to pinpoint exactly what motivated that drive, but I think it was probably curiosity after seeing examples in other languages, wanting to be more competitive, and—let’s be honest—the basic desire to feel a little cooler in the eyes of peers.<p>Be mindful of second-order volition here. Like when someone says “I want to quit %BAD_HABIT%”, what they really say is “I want to want to quit %BAD_HABIT”—if they really wanted to quit, they would have already done it. Similarly, if you want to learn a programming language, you are all set (unless it is so esoteric that there are no suitable resources or references, which never happens), but if you want to want to learn a programming language then what you need is some lateral move (tricking yourself, putting yourself in some situation, etc.) that makes you actually want to learn it.<p>These days learning a new programming language is a more sketchy question, because LLMs drain a few major sources of motivation: you can hardly feel cool for knowing how to program in a new language, because anyone would rightfully assume it was written with an LLM; you increasingly do not actually need to know a language, because a model writes everything for you; the competitive advantage is decreasing. Unlike speaking some human language, there is no society of native speakers that would accept you more or treat you better thanks to you speaking their language.
> I'm guessing the answer is making small things, but what exactly? I've made so many to do list apps I don't know what to do with them<p>My favorite way has always been to not just build small things, but build small useful things. There is always something that could be better, and there is always a subset of languages best for the task at hand. If it's a CLI, then a language that can compile to binary tends to be best (for me at least), so that already limits the languages somewhat. Then depending on what the task is, it might make sense to learn a new language for it.<p>Then naturally over the years I've picked up 10-15 languages this way, by just following what each language seems best at, and not being afraid of spending 2-3 weeks writing something basic.<p>Then for each language you learn, next one gets a lot easier, especially when most mainstream languages today are Algol-like languages and more similar to each other than different.
As any language, the core is "why" do you want to learn it. Is it to add it to a list and that's it? Then you might struggle by creating todo lists or play pretend on Duolingo.<p>On the other hand, if you do have a goal in mind try to do tiny bits of that.<p>My goal for natural languages is always connecting with another culture at a deeper level than just using English. If that's the case, you get someone to talk/write to and slowly do it. It won't be instantaneous or dopamine fueled but after a few years you might realise that you've been chatting with someone completely in their language without major hiccups.<p>For programming languages, I understand that filling a CV is tantalising and useful, so you've got to come up with projects and things you'd actually like to be doing with such a language.<p>You could say you want to pick up COBOL for a future job, well figure out what would make sense to use it for and go with that.<p>And if you really cannot think of anything, then you can fall back to make something up: make a game with such a language (even better if it is not meant for games), automate something, recreate a small tool which you find frustrating. And even if after you have read this and still cannot find a thing which gets you, maybe learning this language is not within your current interests and you might start considering to move on.
Make things that require you to use the parts of the language you don't have a strong grasp on yet, so as to get to know those better. Sorting algos, data structures, a kanren, and a library website would be a good variety pack. And aside from that, reading codebases is also important. Read the code of your CPAN equivalent, your Alexandria equivalent, your Spring equivalent, and your SDL equivalent.
Create something you actually need, or port something you already created in another language.<p>I needed a tool to get the contents of a remote zip file without downloading the whole file. I wanted to learn Go, so I created the tool with Go, then I ported it to Rust when I wanted to learn Rust.
Writing one from scratch gives a lot of understanding to how it works under the hood and in the process you learn right phraseology and treat all languages as computational fronteds.