
Ask HN: Learn another programming language - aaossa
Hi HN. I want to know how do you learn more programming languages. When I want to learn a new one I only find really basic pages, with stuff like int, strings, etc.. And if I try to learn with a personal project sometimes I have a bad time with code I can&#x27;t understand. What I mean is that I know language A, but I want to learn B too, so I know how to program, but not in that language. Thanks!
======
jardaroh
What I do is I look at either a new project I would like to do or an existing
one I would like to refactor heavily. Every time I go over what the feature
requirements will be and find a language, framework and libraries that will
suit the project.

Sometimes I end up rewriting/refactoring from one language into another. This
is great approach to learning a new language. However, consider that languages
has different idioms, make sure you try to learn the best approaches in your
selected language and refactor for those idioms. For example, it is generally
a bad idea to write python like you would write C, etc.

If you do not have a project that would be interesting to refactor, take any
other idea you have laying around do write that in your selected new language.

In the end, it is better to learn by doing.

------
ato42
For me, the hardest part is not about learning the syntax of a new language
(you can easily have a preview with resources like Learn X in Y minutes and
then make analogies with others). The tough part is understanding the
philosophy of the language and the kind of problems it's aimed to solve. I
generally learn new languages when I try to solve problems i've never been in
front of, and usually the docs help me a lot.

