Sunday, August 22, 2010

My First Day With Node.js

Today I spent a good number of hours playing with node.js the hip new concurrent evented javascript server that runs on Google's V8 javascript server.

I've been meaning to play with it for a while given its recent popularity and a couple of weeks ago I casually committed to taking part in the Node Knockout(a node.js event inspired by the Rails Rumble) next weekend. Competitions like this are a good way for me to convince myself to learn new stuff and they're fun. The first Rails project I spent a decent amount of time thinking about was for the Rails Rumble a couple of years ago.

So far playing with node has been quite entertaining. I've managed to set up a tcp/ip server running chat and some minor interactiveness in a few hours, with most of those hours having been taking up with upgrading my javascript skills to deal with more complex things than some fancy browser manipulation. I haven't done any serious load testing but it performed well and took up minimal resources under my very basic attempt at hitting it with a few users trying to spam each other.

One of the big issues I initially had was getting stuff to split into separate files nicely instead of massive scripts running the entire system. But that turned out to be relatively straight forward to fix once I got a better idea of what was going where and a handle on module system that node provides.

My biggest rant about node and to a certain degree JavaScript so far today has been the lack of sensibly descriptive naming in a lot of the code floating around. It certainly didn't help my initial understanding that the example chat app had server.js and fu.js with the server initialization occurring fu.js. It reminds me how much I love that the Ruby community has favoured very descriptive names for things.

So far I've enjoyed the change in headspace as well as doing some "serious" programming with JavaScript for a change. I certainly think most people will find their Javascript skills will improve from spending some time with node.js. Hopefully a couple more evenings and I'll have learned enough to not completely embarrass myself during the node knockout. At least there's not going to be any insane last minute problems getting the server setup right.


Unknown said...

Head hunters in India
Head hunters in Bangalore
Consultany in Bangalore
Serviced Apartments in Bangalore
SEO Services in Bangalore
SEO Services in India

7ooyg75r7u said...

If might have} the choice of half in} European roulette or American then you should to} at all times go for European as the house edge is lower, that means the 온라인카지노 probabilites of you profitable are larger. We also wish to see tables the place the croupier speaks in Malay versus English. Auto-roulette is an efficient option too, these who|for many who|for people who} prefer their reside casino motion to be croupier-free. One of the first and still in style all over the the} world,French rouletteis considered the ancestor of European and American roulette. The guidelines of French roulette had been formed a few centuries ago and during this time didn’t change lots. The goal of the sport is to guess the quantity from zero to 36 that can seem on the roulette wheel.