A little while back I had to learn a new programming language: Ocaml.
I have decided that reading tutorials is all fine and good, but to really learn a language, you need a decent sized programming task (that at least utilizes some non trivial data structures as well as IO) and you have to force yourself to do this task in the language.
As for me, I attempted a machine learning project (write a decision tree and use it on a few datasets with different representations) in Ocaml. It was a pain in the butt, but the project gave me much more direction on what aspects of the language are most useful, that passively reading tutorials did not give me.
Also, if you want more bite-sized projects to learn a new language with, I used project euler along with learnyouahaskell to learn haskell. I don’t think anyone should learn that particular language any other way.




