Skip to content

Ask HN: Motivating projects to learn functional programming languages?

7 pointspuffythefish4 comments
On HN

I've always wanted to learn a language like Haskell, Lisp, Erlang, etc., but I've never been able to motivate myself beyond the first few examples because I haven't found a way to apply it. I've found that the best way I learn is to pick up a project and learn the language/tools/API as I go along — it's strange, but it's much easier for me to lose myself working on a project than an academic exercise. I start putting all the pieces together and eventually everything just "clicks"; I reach an epiphany and can start thinking in the language.

Can anyone else relate to this? How do you learn less "practical" languages like these?

Comments

I can relate partially to this. To learn a language fully you need to work on a fairly good size project and one morning you will have 'flow'. It is similar to learning a human language. You need to get to the point where you 'think' in the language and you stop flipping through a fat reference book or jumping from website to website for information.

However, I go a bit different:

(01) I try to go over all the basics and repeat simple exercises from other language books. I do the for loops arrays operators etc ... etc. I spend a lot of time here in order to remember the syntax. I hate syntax mistakes so the earlier I get proficient the better.

(02) Objects and functions break in easily

(03) The web stuff and libraries

(04) Project here. Get your last epiphany and repeat it in Lisp!

I am going through Clojure at the moment and I had to introduce an additional step to the above, an UNLEARN stage, to change my thinking to functional! Current 'epiphany project', type in Clojure code in a textbox, parse with javascript and print the results. I am at 'Hello World' :).

Take a look at the FluidDB Weekend of Code[1] and pick a language that nobody's done yet, build a little library implementing their API in that language, and you'll end up with two new cutting-edge skills. (And a free book).

[1] http://blogs.fluidinfo.com/fluidDB/2009/09/17/fluiddb-weeken...

I learned scheme through SICP, so I guess I can't relate. However, there is tremendous value in being able to do practical things with a language. While SICP is fun, it won't ever teach you how to use push JSON from one HTTP server to another.

I disagree that these languages are impractical, though.

writing a chat bot is a good hello world to erlang, they are also useful and quite fun.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.