Attacking the modern JavaScript world

Learning all the JavaScript libraries that have come out in the past two years is hard work.

I attacked the modern Javascript approach through first focusing on functional programming.

1) Python + functional programming in Python

Python is hardly a pure functional language, but it’s lovely and simple and has all the core concepts including list comprehensions. This leads you on to…

2) Haskell

If you want to find a pure functional solution to a Python problem, first search for the Haskell one and translate it. Then read Learn You a Haskell which was the funniest programming book I ever read and almost, almost taught me about monads (I had it for a second, then tried to explain it in Python and all was lost)

Now you can relax cause the hard bit is done.

3) Read Javascript the Good Parts

Only pay attention to the functional programming bits. Suddenly mentions of currying aren’t so scary.

4) Work your way through the funfunfunction videos

The funfunfunction videos are brilliant, especially the functional playlist and for added bonus he has videos where he works through the first few chapters of Learn You a Haskell.

Then you’ve got map, reduce, filter all completely under control. Now immutability makes more sense, arrow functions don’t look so strange, promises are just friendly monads really and we all love those.

Now you’ve got Immutable.js, lodash, underscore all reasonable to understand.

React’s moaning about state and pure functions makes reasonable sense.

5) Following the Meteor + React tutorial

Babel really isn’t that hard, the Meteor + React tutorial got that all working without me really noticing. Then, holy moly you’re all reacted up, with JSX and pure sweet smelling functions.

6) Linting

Follow some of Dan Abramov’s excellent blog posts such as about getting eslint working in Sublime Text.

Yeah that’s as far as I’ve got, but adding in Redux to this mix doesn’t seem so scary, at least I understand the language now. Angular will just have to wait.