Live data from Hacker News

Ask HN: How do experienced programmers learn new languages?

news.ycombinator.com

1–10 of 21 posts

Re: Ask HN: How do experienced programmers learn new languages?

#2
I think it depends on how different the new language is. If you have a basis in C-style languages, it is often not to hard to move between them syntactically. Nuances might take a bit more time -- for instance, going from C/Java to C#, lambdas, LINQ, and other commonly used components took a bit of time.

When I first took a gander at Erlang, I poked at it, got a bit bored because reading the language wasn't a bit harder. I took some time off, revisited a couple of books and looked at some code and it made more sense.

But, overwhelmingly the way to learn is to find a small project that you are interested in implementing and star there.

There really are two parts to learning a language -- the syntax and the ecosystem/standard libraries. Often, becoming accustomed to the syntax is the easy part, understanding the ecosystem can take more time.

Re: Ask HN: How do experienced programmers learn new languages?

#3
post #2

I think it depends on how different the new language is. If you have a basis in C-style languages, it is often not to hard to move between them syntactically. Nuances might take a bit more time -- for instance, going from C/Java to C#, lambdas, LINQ, and other commonly used components took a bit of time. When I first took a gander at Erlang, I poked at it, got a bit bored because reading the language wasn't a bit har…

I agree 100%. One of my favorite ways to learn a new language is by doing problems from https://projecteuler.net . The mathematical basis of Project Euler seems to map into core language concepts better than many other "getting started" exercises.

Re: Ask HN: How do experienced programmers learn new languages?

#4
Do one or two tutorials, then jump straight into a moderately-sized project. Google profusely but also don't be afraid of hitting the language's manual.

Perhaps most important is to not settle for code that you know is not ideal. If you recognize that a piece of code you've written isn't good, then improve it. If it's still not idea, improve it again. Keep iterating on it. This will necessarily involve focused learning. In fact I think this is the key to picking up a language quickly. But it does require that you not be mentally lazy.

Re: Ask HN: How do experienced programmers learn new languages?

#5
post #4

Do one or two tutorials, then jump straight into a moderately-sized project. Google profusely but also don't be afraid of hitting the language's manual. Perhaps most important is to not settle for code that you know is not ideal. If you recognize that a piece of code you've written isn't good, then improve it. If it's still not idea, improve it again. Keep iterating on it. This will necessarily involve focused learni…

[deleted]

Re: Ask HN: How do experienced programmers learn new languages?

#6
Many languages have a few "killer" features/libs/uses. I often start with a project that uses one of them. Eg:

ruby => rails

python => nltk,django,opencv,scipy

c++ => opengl,opencv

java => opencv

js => node,angular,ember

clojure => overtone

That way you learn the language and some specific good use cases of it.

Re: Ask HN: How do experienced programmers learn new languages?

#7
I fiddle with some tutorials, get frustrated with readability / pacing / coverage of core concepts, then knock out a project or three with the help of Google, StackOverflow, and the docs for the language and any libraries that seemed relevant at the time.

Across, I don't know, 20-25 languages at this point? Although I only actively use 3-5, depending on how you want to define actively.

Re: Ask HN: How do experienced programmers learn new languages?

#9
This was taught to me in college a decade.

"Programming language is just a syntax, the core logic of getting things done is already available in your brain."

Here is what i'd do

A) Remember what you already learnt from your favorite language

  1] Syntax

  2] Libraries

  3] Reference Documentation

  4] Organizing your code

  5] Building / Running Programs

  6] Deploying code to farms of servers (if you are interested in sysops, explore this as well)
B) Once you get a hang of basic syntax, start with Examples and keep making progress.

C) Pick a simple task, from what you have already solved before. Program it in the new language by expanding your skills towards 2-5 points and you are done !

Re: Ask HN: How do experienced programmers learn new languages?

#10
Think of something you want to write in that language; this is the only thing that really works for me.

Tutorials and canned examples are ok, but if it's not something I actually want then I'm not really learning much.

And if you can't do anything useful in the language you want to learn, then ask yourself why you want to learn it?

Or take something relatively simple, and code it in whatever language. I did this a while back, and wrote a port scanner in c, java, perl, and python.

Post reply on HN