Lots of different techniques. 1. Write a program in the language that I've done before just to get familiar with the tooling. My go to for years was a better Eliza clone. From 1991-2008, I wrote it in AppleSoft Basic, GW Basic,HyperCard, VMS DCL, Visual Basic, C#, PHP, and JavaScript. 2. On the job. I hate hobby side projects. I'm not creative enough to come up with anything interesting and I feel like it's a waste o…
Ask HN: What is your best way to learn a new programming language?
11–20 of 45 posts
Re: Ask HN: What is your best way to learn a new programming language?
#12Usually I’d suggest picking up a small project and shuffling between books and working on that project. Say read about the language fundamentals and then try to build up from there. However this doesn’t really work when you’re switching to a different paradigm. When I switched to Haskell, I realized that even the way you think about things must change and diving into a project just isn’t the way to do this. You’ll ke…
Re: Ask HN: What is your best way to learn a new programming language?
#13Watch YouTube videos
Re: Ask HN: What is your best way to learn a new programming language?
#14Yes. I usually do one or several projects to learn how a new language works. The projects I do depend on the language. I hate reading books and even moreso watching videos about a specific programming language, but thats prolly just my ADSD self. Here's a project I'd do for Swift. 1. Write a chat server / client. (this will quickly let you see how async/threads/channels works and how good the networking libs are). Yo…
Re: Ask HN: What is your best way to learn a new programming language?
#15Read the docs, read good code, build things, stackoverflow, ship.
I guess I should start reading the docs because sometimes the answer I find Googling is already present in the docs :)
Re: Ask HN: What is your best way to learn a new programming language?
#16I had the same question when I wanted to learn C++. I was already quite practiced at Java and had written C and had read books on C++ off and on for years, but I still could not program in C++. So I got a copy of Stroustrup "The C++ Programming Language" and started to do his exercises, but the author clearly had never done them himself, some were quite long and tedious and did not teach me anything (never put exerci…
Re: Ask HN: What is your best way to learn a new programming language?
#17I had the same question when I wanted to learn C++. I was already quite practiced at Java and had written C and had read books on C++ off and on for years, but I still could not program in C++. So I got a copy of Stroustrup "The C++ Programming Language" and started to do his exercises, but the author clearly had never done them himself, some were quite long and tedious and did not teach me anything (never put exerci…
This is what I've done in my admittedly small time of programming. I have Learn Python the Hard Way and whenever I'm in between my personal projects, I grab one of the beginning chapters and just redo it. Rote memorization is not easy for me, but the more I do something over and over, the more engrained it is and the easier it is for me to recall and build on later for different things.
Re: Ask HN: What is your best way to learn a new programming language?
#18Re: Ask HN: What is your best way to learn a new programming language?
#19Re: Ask HN: What is your best way to learn a new programming language?
#20For me I have a couple:
1) A nonlexical phrase extractor. Read in a lexicon of words, read in a narrative document, subtract words from the lexicon from the document, collect all remaining strings with word length > 2. Voila, most of them will be names of people.
2) Build an on disk bloom filter. Pretty straightforward, the most complicated part is finding suitable hash functions and figuring out how the local mmap library works and working out the arithmetic for bit flipping amongst a big array of bytes.
Neither of these are very complicated or require lots of work to set up. But when you're done you'll know most of the operators, how to read in and write out things, how to interact with the standard library, control flow and so on. I can usually hammer both of these out in an afternoon.
A few people I know have more advanced "simple" projects, like ones that require figuring out the local threading system, sockets and so on: e.g. write a simple web server. It kind of depends on what kind of work you generally do.