Tuesday, July 21, 2015


In a previous post I described how I setup a virtual machine and installed Node.js on it.  The goal was to help a group of Summer student interns get started with both Node.js and Firefox OS app development by working on a web application created by a previous student intern.

That plan didn't work out well, as the application in question did not provide the kind of on ramp to the technologies we wanted to learn that I had hoped it would. Since Node.js is new to both the student interns and me, we all decided to look at the tutorials on NodeSchool, particularly learnyounode.

With node, and thus npm already installed, I added the learnyounode materials to my virtual machine with:
$ sudo npm install -g learnyounode
$ learnyounode
brings up a menu:
with links to instructions for each of the 13 exercises in the tutorial.

I spent the morning working through the first 6 exercises, and created a github repository with my solutions.  I'm setting myself the additional goal of learning to write good clean JavaScript while I'm at it, so I installed JSLint:
$ sudo npm install -g jslint
And made every effort to minimize the number of warnings jslint reports on each of my solutions.  Using JSLint is almost like having an automated Douglas Crockford to look over your coding style, so I feel I'm in pretty good hands as I learn.

Learnyounode is a fabulous tutorial.  It moves you quickly and efficiently toward learning key ideas of important Node.js programming concepts by having you complete a series of well designed exercises.

I'm out of time for today, but the main concept I think I have finally begun to wrap my head around from the first 6 exercises is the concept of a callback, which I had to use in my solution to exercise 6.

No comments:

Post a Comment