In my previous post, I promised you I would give an account of the recent NodeHack event – it was on the 21st May for those who weren’t following. It’s been a few busy days since, but here it is!
I woke up at 7am on Saturday, 21st May 2011 – not something most people normally enjoy doing, myself included. I did not get much sleep, given I had dozed off not more than two hours prior. This has pretty much been my routine for the past few days leading up to NodeHack – a meetup regarding node.js organized by 40 Square Software.
Having gotten ready in a jiffy, I made my way to the office to help my fellow 40 Square mates pack up all the necessities – equipment, food and booze
Minutes later, we were on our way to MindValley HQ, where the event was to be hosted. Upon arriving at Menara Bangsar UOA, where their office is situated, we cleared security and took the elevator all the way up – well, almost. The office is nothing short of breathtaking – without a doubt much better than their previous one. We were taken to their Hall of Awesomeness – where the event was to be held. From beanie bags to dog-shaped chairs, the atmosphere in said hall was far from what you’d expect in a traditional meeting room – which was what I presumed it to be given the presence of a projector, projection board and various audio equipment (equalizers I think). Corporate might give the cold shoulder, but I sure as hell liked it – and I think it would be safe to say that most of the other attendees share the same opinion. Thank you guys and gals at MindValley for the “awesome” space!
People started showing up, one after the other, shortly after 9am. I’m not sure about the exact headcount, but I’ve been told it was estimated at around 50 people – both great and unexpected, given the last minute announcement and that the topic of discussion is still in a relative state of infancy.
The presentation started a little late – about 15 minutes past the proposed start – to allow everyone to settle. The first presenter was Lee Johnson, founder of 40 Square Software and all-round big bossman, upfront to tell us why LAMP is Dead. Lee spoke about his company and what it’s business is all about. He discussed issues faced when using the standard LAMP (Linux Apache MySQL PHP) stack to support a globally distributed system, and his decision to switch to one that was lightweight, flexible and easy to manage – which he believes to be a coupling of node.js and document-oriented databases like CouchDB.
Next up was Ruben Tan, one of our senior engineers at 40 Square Software. His topic of discussion was his experience on moving from PHP to SSJS (Server-Side JavaScript). Having architectured the Painless PHP Framework, Ruben is no stranger to the difficulties that arise as a result of designing complex software. He enlightened us on the trials and tribulations he faced, and continues to do so, porting his framework from PHP to node.js. “Oh globals and asynchronous callbacks in JavaScript, thou art a heartless bitch, a double-edged sword!” he grumbled. Okay, that was an exaggeration – he didn’t really say that – but you get the point.
Finally, it was time for my presentation. I spoke on Key Design Patterns in JavaScript – creational and constructor patterns to name a few – before revealing to the audience the project I was hacking on from a few days before – Shoot Lah!
Shoot Lah! is an arcade-style 2D shooter written in node.js. Like most of the web-based games I’ve seen built on top of HTML and JavaScript, the rendering was done on a canvas object – the difference with Shoot Lah! is that the canvas rendering is done server-side. Yes you read it right, server-side canvas for node.js, how freaking cool is that?
How is this possible you might ask? Learnboost, the company behind Socket.IO (another module used in developing Shoot Lah!) – a node.js module that provides and simplifies realtime communication over HTTP – released node-canvas, built on-top of the Cairo 2D Graphics library. Kudos to them for making this possible!
I’ve uploaded Shoot Lah! on github, fork it @ http://github.com/rajkissu/shoot-lah.git
Right before we adjourned to the main hall for some grub, we brainstormed some ideas to hack on later during the 3 – 4 hour hack session. Some of the cool ideas we came up with were coding a Battleships game, a shared clipboard and setting up node.js to control an AR Drone. We also had some non-techies pitch ideas that they’re working on, and how they’d like help from the tech community in any way possible to spread the message – be it through enhancing their website (*cough* node.js *cough*) or building a standalone application for various mobile devices. One guy spoke about a Million Happy Faces – an initiative to inspire optimism in Malaysians, most of whom he believes are constantly swimming in negativity, a statement that has a lot of truth to it if you ask me.
Lunch was served after the talks – Dominos Pizza, KFC and beer to wash them down with – nom nom nom
Given the time constraint, and lack of experience in node.js on the audience’s part, most of the groups did not get very far into developing the ideas – with the exception of the team working on Battleships. Not a surpise, given that most of them are new to node.js or only interact with it on weekends as a hack toy. No matter, the initial and greater purpose of the meetup – advocating node.js as a viable development tool – had been achieved. The audience expressed great interest in its application, a feeling that I believe most carried back with them at the day’s end.
Tags: 40square, cairo, game, javascript, kl, learnboost, node-canvas, node.js, nodehack, shoot-lah, socket.io, ssjs
My only complaint was that I didn’t manage to finish my mega coleslaw. Damn that was good!