NodeFly Buzz: 365 project with Left Logicâs Remy Sharp
Remy Sharp is the founder and curator of Full Frontal, the UK-based JavaScript conference. He also ran jQuery for Designers, co-authored Introducing HTML5 (adding all the JavaScripty bits) and is one of the curators of HTML5Doctor.com. Whilst heâs not writing articles or running and speaking at conferences, he runs his own development and training company in Brighton called Left Logic. And he built these too: jsbin.com, html5demos.com, remote-tilt.com, responsivepx.com, nodemon, inliner, mit-license.org, snapbird.org and jsconsole.com!
Any of these accomplishments are impressive, but Remy came to our attention when we were poring over our Twitter feed and saw one of his tweets:
âIn the final process of ordering a canvas print of 3 years of 365 photos. Used Node.js to generate the image dynamically from flickr.â
Being the Node.js fiends that we are, we couldnât help but be intrigued, and so we reached out to him.
NodeFly:Â You had us at âUsed Node.js to generate the image dynamically from flickr.â What were you looking to accomplish?
Remy Sharp:Â I started a "365 project" back in 2009 which involved taking one picture each day. Nothing impressive, more of a visual diary. But the end game was to produce a canvas print of the 365 project.
The problem was the logistics of laying out the images - and in ignoring this problem, I ended up completing a full 3 years worth of photos. So I turned to JavaScript to automate the creation of the canvas image to be printed.
NodeFly:Â Â Why did you go with Node.js for this?
Remy Sharp:Â Initially I had written code that would go off to Flickr and load all the images under a specific photo set. Then the images would be drawn on to a canvas element with their size and position calculated. However, because the images were coming from Flickr's domain, it would mean I couldn't export the canvas to a png (due to origin rules).
So I simply moved the JavaScript to the server side, included the Canvas node module and converted the regular images to be requested using the Request module. And now I was able to export the canvas to a png reading for printing.
NodeFly:Â Any particular challenges or advantages to using Node.js?
Remy Sharp:Â The big advantage for me was working around the origin rules that the browser was applying because Flickr weren't adding CORS headers to their images. It was pretty exciting being able to so simply port my browser based code to the server largely unchanged.
NodeFly:Â Do you have any other cool ideas or plans for Node.js?Â
Remy Sharp: Lots! JS Bin is now running on Node.js to allow for techniques I'm calling Code Casting and Remote Rendering. With Code Casting you code on your machine, and viewers can watch the code and output being generated in real-time.  Remote Rendering lets you code in JS Bin on one machine, and with the same URL on any number of remote devices - mobile, tv, etc - update the output in real-time.
For obvious reasons, I'm very interested in the real-time space and using Node.js - but also I've found myself creating utilities using Node.js. For example, I ported my snapbird.org (a Twitter timeline search engine) to the command line using node: https://github.com/remy/twitterlib (though I've yet to add any docs! - it's simple npm install twitterlib to add a "tweets" CLI).
NodeFly:Â With Left Logic, you specialize in web development. What do you think the future holds for Node.js and web development? is it something Left Logic will be utilizing more?
Remy Sharp:Â The last 12 months has included a number of clients that used node.js for our solutions - and as time goes on, I can see us using node more and more for client solutions.
Left Logic is more of a JavaScript house than a pure web dev house, so using node.js is a simple and obvious progression for our business. And certainly we're looking to work with more clients to help them with their solutions - so do get in touch (through our Left Logic Contact Page)! Â
NodeFly:Â Â Thanks for sharing your work with us, and best of luck in future projects!Â
Stoked to tell everyone about an awesome Node.js project? If you know of a person, project, site or app that youthink we should profile, email us at [email protected]!