<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <channel>
    
    <title>Rawkes &#45; Captain&apos;s Blog</title>
    <link>http://rawkes.com/</link>
    <description></description>
    <dc:language>en</dc:language>
    <dc:creator>rob.hawkes@gmail.com</dc:creator>
    <dc:rights>Copyright 2012</dc:rights>
    <dc:date>2012-01-27T20:21:13+00:00</dc:date>
    

    <item>
      <title>Help me find places to work and people to see in New York City</title>
      <link>http://rawkes.com/blog/2012/01/27/help-me-find-places-to-work-and-people-to-see-in-new-york-city</link>
      <guid>http://rawkes.com/blog/2012/01/27/help-me-find-places-to-work-and-people-to-see-in-new-york-city</guid>
      <content:encoded><![CDATA[<p><em>I'll be in NYC in mid-March and I'd love to find somewhere to work for a few days and some people to meet up with while I'm out there. Can you help?</em></p>

<figure>
<a href="http://www.flickr.com/photos/jliba/4049957908/" title="You Will Never Forget. by Josh Liba, on Flickr"><img src="http://farm4.staticflickr.com/3513/4049957908_9e02b150c7_z.jpg" width="620" alt="You Will Never Forget."></a>
</figure>

<p>Looks like I'll be out in NYC this March for the first time ever and I'm really looking forward to seeing the city. However, I'll be working while I'm out there (at least through the day) so where is the best place to get that done? Some standard options include frequenting cafes but I'd also like to explore options like co-working spaces and any friendly offices that someone has a spare desk at.</p>

<p>I'd also like to meet up with anyone out there who'd be kind enough to show me some of the sights and/or talk about the Web and gaming. I'd also love to use this opportunity to do an evening talk or two if there are any local events happening mid-March. I'm basically open to anything really!</p>

<p>Oh, and where is a good area of the city to stay?</p>

<p>Let me know if you or anyone you know might be able to help me make my stay in NYC a fun one.</p>]]></content:encoded>
      <dc:subject></dc:subject>
      <dc:date>2012-01-27T20:21:13+00:00</dc:date>
    </item>

    <item>
      <title>Rawkes Weekly: 3rd January 2012</title>
      <link>http://rawkes.com/blog/2012/01/03/rawkes-weekly-3rd-january-2012</link>
      <guid>http://rawkes.com/blog/2012/01/03/rawkes-weekly-3rd-january-2012</guid>
      <content:encoded><![CDATA[<p><em>The twelth instalment of the all-new Rawkes Weekly. In it I go over recent events and give you some of my favourite links related to Web development and general geekery.</em></p>

<p>What better way to bring in the new year than with a fantastic Rawkes Weekly. It's been a pretty quiet fortnight since the last update, I certainly enjoyed the time off.</p>

<p>Yesterday I took the time to <a href="http://rawkes.com/blog/2012/01/02/2011-full-of-surprise-relief-and-general-awesomeness">write about 2011 and all the crazy things that happened</a> within it. Needless to say that 2012 is going to be mental if last year was anything to go by!</p>

<p>In other news, <a href="http://www.misfitgeek.com/2011/12/serving-apps-from-github/">GitHub now serve .webapp manifest files</a> with the correct content-type, meaning you can host your Mozilla Labs app or game using GitHub pages! The first game hosted using this method is <a href="https://apps-preview.mozilla.org/en-US/apps/app/marblesoccer/">MarbleSoccer</a>.</p>

<p>Some great news just before the festive break was that <a href="http://blog.mozilla.com/blog/2011/12/20/mozilla-and-google-sign-new-agreement-for-default-search-in-firefox/">Mozilla and Google have renewed their search deal</a>. 2012 is going to be a great year for the Web now that this is out of the way!</p>

<p>And on the open Web game development scene I was interviewed for an article for .net magazine about <a href="http://www.netmagazine.com/news/online-gaming-move-web-standards-111655">Mozilla's position on open Web games</a>. It's worth a read.</p>

<h2>Links of the week</h2>

<ul>
<li><a href="https://github.com/lloyd/node-compute-cluster">node-compute-cluster</a>

<ul>
<li>This Node.js library allows you to distribute computation across multiple processes. I'm fascinated by all the multi-process stuff happening in Node right now.</li>
</ul></li>
<li><a href="http://www.schillmania.com/projects/soundmanager2/demo/360-player/canvas-visualization.html">360° MP3 player UI demo: Javascript + Canvas</a>

<ul>
<li>I love this radial visualisation of audio data using HTML5 canvas. It's a shame that the audio data isn't grabbed using HTML5 though, I'd love to see that put into this demo.</li>
</ul></li>
<li><a href="http://ender.no.de/">Ender</a>

<ul>
<li>Described as the no-library library, Ender is effectively NPM for front-end JavaScript libraries like jQuery.</li>
</ul></li>
<li><a href="http://isaach.com/2011/08/about-mention-constellations.html">About the @mention constellations</a>

<ul>
<li>An insight into a beautiful data visualisation of 10 minutes of conversation on Twitter. I can't believe how many tweets there are!</li>
</ul></li>
<li><a href="http://hacks.mozilla.org/2011/12/faster-canvas-pixel-manipulation-with-typed-arrays/">Faster Canvas Pixel Manipulation with Typed Arrays</a>

<ul>
<li>Andrew Baker walks you through how to manipulate pixels in canvas as fast as possible using Typed Arrays.</li>
</ul></li>
<li><a href="http://www.w3.org/2009/dap/wiki/ServiceDiscoveryComparison">Service Discovery Comparison</a>

<ul>
<li>I didn't realise quite how many methods of service discovery were out there. I'm massively interested in mDNS/zeroconf and the possibilities that it brings for open Web games.</li>
</ul></li>
<li><a href="http://travis-ci.org/">Travis CI</a>

<ul>
<li>I've seen a lot of continuous integration services around lately but the cool kid on the block seems to be Travis CI. I'd love to try out CI myself.</li>
</ul></li>
<li><a href="http://dochub.io/">Dochub</a>

<ul>
<li>Ever wanted instant search on MDN? If so then look no further than Dochub. I'm intrigued to see how this little service progresses.</li>
</ul></li>
<li><a href="http://dailyjs.com/2011/12/08/mocha/">Testing with Mocha</a>

<ul>
<li>I'm currently giving test-driven development a try on the re-write of Rawkets. So far I'm really enjoying Mocha as the platform of choice for writing my tests for Node.js and the browser.</li>
</ul></li>
<li><a href="http://www.josscrowcroft.com/demos/motioncaptcha/">MotionCAPTCHA</a>

<ul>
<li>This is like normal CAPTCHA but instead of typing stuff you draw something. I love the concept but I worry about the accessibility of drawing specific shapes.</li>
</ul></li>
<li><a href="https://twitter.com/#!/humphd/statuses/144817968629555200">Quake 3 demo with the Mouse Lock API</a>

<ul>
<li>Brandon Jones has updated his Quake 3 WebGL demo with support for the Mouse Lock API. No more sub-par mouse interaction disrupting the experience!</li>
</ul></li>
</ul>

<h2>Track of the week</h2>

<p><a href="http://grooveshark.com/s/Let+The+Sunshine/3Za3la?src=5">Let The Sunshine</a> <em>by Labrinth</em>. This kind of music isn't usually my cup of tea but I've really grown to like it recently.</p>

<figure><object width="620" height="40" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="gsSong3152328753" name="gsSong3152328753"><param name="movie" value="http://grooveshark.com/songWidget.swf" /><param name="wmode" value="window" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="hostname=cowbell.grooveshark.com&songIDs=31523287&style=metal&p=0" /><object type="application/x-shockwave-flash" data="http://grooveshark.com/songWidget.swf" width="620" height="40"><param name="wmode" value="window" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="hostname=cowbell.grooveshark.com&songIDs=31523287&style=metal&p=0" /><span>Let The Sunshine by <a href="http://grooveshark.com/artist/Labrinth/1554313" title="Labrinth">Labrinth</a> on Grooveshark</span></object></object></figure>]]></content:encoded>
      <dc:subject></dc:subject>
      <dc:date>2012-01-03T14:29:54+00:00</dc:date>
    </item>

    <item>
      <title>2011: Full of surprise, relief and general awesomeness</title>
      <link>http://rawkes.com/blog/2012/01/02/2011-full-of-surprise-relief-and-general-awesomeness</link>
      <guid>http://rawkes.com/blog/2012/01/02/2011-full-of-surprise-relief-and-general-awesomeness</guid>
      <content:encoded><![CDATA[<p><em>In this entry I take a look back at my favourite events that occurred in my life and the Web community during 2011. There were certainly enough to choose from!</em></p>

<p><a href="http://rawkes.com/blog/2011/01/02/2010-mind-blowingly-mental">This time last year</a> I had enough trouble working out where to start when rounding up 2010. So how on earth am I meant to start the best bits of 2011 when it was easily the most insane year of my life, ever? And how the hell do you follow the <a href="http://rawkes.com/lab/google-balls-logo">Google balls phenomenon</a>?</p>

<p>As always, please excuse the self indulgent nature of this yearly round-up. It is one of the only moment where I can truly reflect on everything that has been achieved in the space of a single, eye-blinkingly-quick year.</p>

<h2>Notable events in 2011</h2>

<p>In all honesty I can barely remember the first part of 2011 as it was spent mostly with my head down working, writing, and travelling. The second half is still a little blurry as well but I'll try my best to round it all up nicely.</p>

<h3>Publishing my first book</h3>

<p>Finishing <a href="http://rawkes.com/foundationcanvas">Foundation HTML5 Canvas</a> was massively relieving, particularly because I wrote it while in my final year at university so I was pretty drained when I submitted the final chapter in March. I still can't believe that I actually wrote an entire book by myself, all 75,000+ words and 358 pages of it!</p>

<figure><img src="http://rawkes.com/media/images/FoundationCanvas_Finished.jpeg" alt="Final manuscripts for Foundation HTML5 Canvas" /></figure>

<p>Writing it was really only half the battle, my half of the battle. What really made me happy was seeing the physical book in the hands of other developers, especially the ones who were on the other side of the world and who I didn't know. It's a surreal feeling knowing that someone many thousands of miles away is holding and reading something that you poured months of your life into.</p>

<figure><img src="http://rawkes.com/media/images/276294187.jpg" alt="First sighting of Foundation HTML5 Canvas" /></figure>

<p>Since publication I've received two royalty statements from Apress which outline how many copies have been sold and how big the pile of money is for me to dive into. Needless to say that you need a degree to work out these statements (they have a 6-page FAQ for one page of statement) but it's my understanding that at the year end about 1,250 <em>physical</em> copies of the book have been bought. Now back in 2010 I said that I wanted 500 copies of the book to be bought, so when combined with digital sales and online subscription services (like Safari Books) the number of people with a copy of the book <em>far</em> surpasses my wildest expectations. Mind-blowing.</p>

<p>One moment related to the book that particularly stands out was when a nice lady approached me at a conference in San Francisco and asked me if I was the guy who wrote Foundation HTML5 Canvas. Just that alone was enough to make the whole writing process worthwhile but she then proceeded to tell me how much she enjoyed the book and how much it has helped her. I must say that hearing those words from someone I've never met before in a country thousands of miles from home was quite overwhelming. I absolutely love hearing from people that have taken the time to read the book.</p>

<h3>Getting a job at Mozilla</h3>

<p>If having the opportunity to write a book wasn't enough I then received the chance to work for Mozilla. To this day I still don't quite understand how I managed to land the job, <a href="http://rawkes.com/blog/2011/03/25/becoming-a-mozilla-technical-evangelist">but I did</a>!</p>

<p>It all start back in December of 2010 when I was given the chance to <a href="http://rawkes.com/blog/2010/12/09/video-of-the-rawkets-talk-at-mozilla-labs-game-on-10">talk about my multiplayer HTML5 game Rawkets</a> at Mozilla's Game On event. As a result of that talk and a <a href="http://rawkes.com/blog/2010/12/17/where-next">blog post I wrote about my future plans</a> I was pointed in the direction of an opening at Mozilla that seemed to have my name written on it, so I applied. I still find it funny when I think back to the moment that I realised that people could be employed to experiment with and talk about cool Web technologies.</p>

<figure><img src="http://rawkes.com/media/becoming-a-mozilla-technical-evangelist/graffiti-plane.jpg" alt="My plane to Mozilla's headquarters was covered in graffiti" /></figure>

<p>Fast forward a few weeks and I was flown out to Mozilla's headquarters in Mountain View, California for an interview. I don't know what was more exciting, the interview or flying on a plane covered in graffiti. I jest, the interview was obviously more exciting (but the plane <em>was</em> cool).</p>

<p>Fast forward a couple more weeks and a few phone interviews and I heard the words that I'd been hoping for, I'd been offered the job. I'm not even going to try to describe that feeling but I'm pretty sure I stood up and walked around the house before sitting down again to make sure that I really heard those words.</p>

<figure><img src="http://farm7.staticflickr.com/6018/5953927524_bf25f3cbb7_z.jpg" alt="My Mozilla business card" /></figure>

<p>Make no mistake, getting the job as a Technical Evangelist at Mozilla is by far the most proudest moment of my entire life. Full stop. End. Finito. It set the scene for the rest of the year and will continue to do so for many more to come.</p>

<h3>Finishing my university degree</h3>

<p>I still don't quite understand how I managed to fit in my final year of university alongside writing a book and interviewing for the job at Mozilla. What I do know is that I wouldn't have been able to do it without the unending support from my lovely lady-friend <a href="http://twitter.com/lizzyrobins">Lizzy Robins</a>.</p>

<figure><img src="http://farm7.staticflickr.com/6227/6405956865_1ae6895d1c_z.jpg" alt="My degree from Bournemouth University" /></figure>

<p>What rounded off the year nicely was <a href="http://rawkes.com/blog/2011/11/28/rob-hawkes-first-class-graduate-and-brilliant-newcomer-of-the-year">achieving a first class level degree</a>, it really was the cherry on top of the cake and made the past 3 years feel all the more worthwhile.</p>

<figure><img src="http://farm7.static.flickr.com/6174/6216347361_5606fd7071_z.jpg" alt="The moment Twitter lost Steve Jobs" /></figure>

<p>My final year of university also saw the release of <a href="http://rawkets.com/">Rawkets</a> as well as the publication of <a href="http://rawkes.com/blog/2011/05/05/people-love-a-good-smooch-on-a-balcony">my research into Twitter sentiment analysis</a>. I was amazed to see just how profound Twitter sentiment analysis can be when applied to global events like the passing of Steve Jobs. Truly awe-inspiring stuff.</p>

<h3>Moving into a flat with Lizzy</h3>

<p>My favourite non-Web moment of the year was moving into my first proper flat with Lizzy. I've really enjoyed settling down with her and the view from our place is beautiful, albeit only a &quot;glimpse&quot; (the words of the estate agent). There's something about being just a few minutes walk from an 8-mile beach that's good for the soul.</p>

<figure><img src="http://farm8.staticflickr.com/7016/6620495311_5821e140cd_b.jpg" alt="The "sea glimpse" from my flat" /></figure>

<h3>Speaking and travelling</h3>

<p>The second half of the year flew by equally as quickly as the first, especially because my 3-year university degree was over and I'd started working full-time at Mozilla. Part of my job includes travelling in and out of the UK to give talks and meet awesome people and doing that accounted for a large chunk of the past 6 months.</p>

<p>I won't list <a href="http://rawkes.com/speaking">everywhere that I've been to and spoken</a> this year but here are a few of my favourites. It's safe to say that I've travelled more in the past 6 months than I have in my entire life!</p>

<p><strong>Heart &amp; Sole</strong></p>

<p>Back in January I spoke at the inaugural Heart &amp; Sole event in the UK. I had an awesome time <a href="http://www.slideshare.net/robhawkes/heart-sole-an-introduction-to-canvas">talking about HTML5 canvas</a> and the venue was absolutely stunning, particularly the view from the 150-metre high viewing deck.</p>

<figure><img src="http://farm6.staticflickr.com/5214/5430893371_274be13b01_z.jpg" alt="Speaking at Heart & Sole" /></figure>

<p><strong>State of the Browser</strong></p>

<p>In March I spoke about canvas at State of the Browser in the UK. What was special about this event for me is that it was the first time I spoke about my new job at Mozilla in public, which was made even sweeter by the Mozilla employees who were in the room at the time.</p>

<figure><img src="http://farm6.staticflickr.com/5019/5544288592_02de8cbd39_z.jpg" alt="Speaking at State of the Browser" /></figure>

<p><strong>SF HTML5 &amp; Google Tech Talk</strong></p>

<p>In July I was invited to give a talk at the San Francisco HTML5 User Group about the state of HTML5 gaming <a href="http://rawkes.com/blog/2011/07/16/html5-gaming-at-sf-html5-and-google">as well as another talk later the same week</a> at the Google Mountain View headquarters about Rawkets.</p>

<p>Being able to speak in San Francisco was an awesome experience and very different to speaking in the UK. As for the Google talk, I can barely describe the geeky sense of epicness that I felt when talking at their headquarters in front of engineers <em>way</em> more intelligent than myself.</p>

<p><strong>ASSEMBLY</strong></p>

<p>It's safe to say that I have never experienced anything like ASSEMBLY in Finland this August, I'm fully confident that the Finnish geeks and gamers are absolutely insane (in a really good way). I really enjoyed giving a talk about <a href="http://rawkes.com/blog/2011/08/06/browserscene-creating-demos-on-the-web">creating visualisations with new Web technologies</a>, meeting <em>the</em> mr.doob, and generally taking in the atmosphere.</p>

<figure><img src="http://farm7.staticflickr.com/6133/6012414460_087ebb9a63_z.jpg" alt="ASSEMBLY 2011" /></figure>

<p><strong>onGameStart</strong></p>

<p>Being invited to <a href="http://rawkes.com/blog/2011/09/23/a-look-inside-rawkets-ongamestart-2011">attend and speak at</a> the first large-scale HTML5 gaming conference in the world this September was pretty special. I had great fun catching up with old friends and making a whole bunch of new ones. The developers in Poland are pretty awesome I have to say.</p>

<p><strong>Web Developer Conference</strong></p>

<p>Another event that was personal to me was WDC in the UK. It was at this event the previous year that I decided that I wanted to start speaking in public more, so being invited to speak at this year's event was pretty special. I <a href="http://www.slideshare.net/robhawkes/tomorrows-web-and-future-technologies-wdc2011">talked about all the future Web technologies</a> that developers should be keeping an eye on, with the WebVibrator API going down particularly well. No idea why!</p>

<h3>Winning at the .net awards</h3>

<p>In November I was fortunate enough to be nominated and chosen as the winner for Brilliant Newcomer of the Year at the .net awards. I've not really got much to say <a href="http://rawkes.com/blog/2011/11/28/rob-hawkes-first-class-graduate-and-brilliant-newcomer-of-the-year">that I haven't already</a> apart from thank you to those who nominated and voted for me. I'm mega-chuffed to be in this position.</p>

<h3>Celebrating 3 wonderful years with Lizzy</h3>

<p>This past December I celebrated 3 years with Lizzy, without whom I would have achieved practically nothing this year. I'm so happy to be with her and I owe her so much. I look forward to our future together.</p>

<h3>Playing with awesome technologies</h3>

<p>In 2011 I was massively surprised by the sheer amount of amazing technologies that were starting to see the light of day. I was particularly interested in how the open Web gaming industry was coming on leaps and bounds.</p>

<p>The follow are by far my favourite technologies that I played with this past year:</p>

<ul>
<li>Gamepad API</li>
<li>Mouse Lock API</li>
<li>Open Web Apps</li>
<li>WebSockets</li>
<li>Node.js</li>
</ul>

<h2>Goals from 2010</h2>

<p>So did I meet <a href="http://rawkes.com/blog/2011/01/02/2010-mind-blowingly-mental">my goals from 2010</a>? Let's find out.</p>

<h3>Improve my public speaking</h3>

<p>Yes, yes and yes. Mainly as a result of my job at Mozilla although I'd still. 2011 has been a massive year for improving my confidence and abilities in regard to speaking in public.</p>

<h3>Release the beta version of Rawkets and gain a base of 500 players</h3>

<p>Ish. I certainly <a href="http://rawkets.com">released Rawkets</a> but I never counted the amount of regular players and I'm confident that it would be no where near 500 people. Maybe 5.</p>

<h3>Sell 500 copies of my book on HTML5 canvas</h3>

<p>Yes, and then some. 500 would have made be incredibly happy but I had to settle with a measly 1,250 in the end.</p>

<h3>Find a source of income that allows me to continue experimenting</h3>

<p>Yes, although not where I expected it. I can safely say that I never considered a role of Technical Evangelist with a large player in the Web scene. I'm still counting the Mozilla job as meeting this goal though, so there!</p>

<h2>Wishes and predictions for 2012</h2>

<p>I don't do resolutions and I've given up on trying to guess exactly what will happen so instead I'm going to state a few wishes and rough predictions for the following year.</p>

<h3>Improvements in open game development on the Web</h3>

<p>If this past year is anything to go by then 2012 will be a good year for open game development using Web technologies. I'd love to see the industry gather more steam and for some high-profile success stories to arise.</p>

<h3>More praise and focus for hidden talent</h3>

<p>It's <a href="http://rawkes.com/blog/2011/12/16/lets-start-recognising-the-hidden-gems-within-our-community">no secret</a> that I want hidden talent within the Web industry to be highlighted more. I'd love for 2012 to be the year when some viable solutions to this start to see the light of day.</p>

<h3>Foundation HTML5 Canvas to be stocked in educational libraries</h3>

<p>This is a much more personal wish but I aim to get Foundation HTML5 Canvas stocked in libraries at universities and colleges within the UK. Keeping up-to-date with the latest technologies is notoriously hard in education and I'm hoping this will help students get their first footing with animation and graphics with HTML5 and JavaScript.</p>

<h3>Relaunch Rawkes with a better focus on content</h3>

<p>I hope that 2012 will be the year that Rawkes gets updated with a much better focus on the content and the people that use it. This wish is already in the early stages of development and I'm confident that it will start bearing fruit very soon indeed.</p>

<figure><img src="http://farm8.staticflickr.com/7022/6621037123_8e7207bb94_z.jpg" alt="Rawkes redesign" /></figure>

<h2>Some interesting facts about 2011</h2>

<p>As always, here are a few facts and figures about the past year. I've added a +/- comparison to the previous year on metrics that are similar.</p>

<p><img src="http://rawkes.com/media/images/2011-statistics.png" alt="Statistics from 2011" /></p>]]></content:encoded>
      <dc:subject></dc:subject>
      <dc:date>2012-01-02T17:02:54+00:00</dc:date>
    </item>

    <item>
      <title>Rawkes Weekly: 19th December 2011</title>
      <link>http://rawkes.com/blog/2011/12/19/rawkes-weekly-19th-december-2011</link>
      <guid>http://rawkes.com/blog/2011/12/19/rawkes-weekly-19th-december-2011</guid>
      <content:encoded><![CDATA[<p><em>The eleventh instalment of the all-new Rawkes Weekly. In it I go over recent events and give you some of my favourite links related to Web development and general geekery.</em></p>

<p>It's been a busy time at Mozilla since the last update. The biggest news being that we launched the <a href="http://hacks.mozilla.org/2011/12/mozilla-labs-apps-preview/">developer preview of the Mozilla Labs Apps project</a>. This project is our vision of how applications should be on the Web; open and distributed. You should definitely read the announcement and the documentation, the functionality promised is mouth-watering.</p>

<p>Since the apps announcement I posted on the Mozilla Hacks blog about <a href="http://hacks.mozilla.org/2011/12/mozilla-labs-apps-preview/">how gaming relates to our work with apps</a>. In the post I detail all the APIs and functionality that we're working on at Mozilla that will directly benefit game developers.</p>

<p>I also wrote about <a href="http://rawkes.com/blog/2011/12/16/lets-start-recognising-the-hidden-gems-within-our-community">ways that we can recognise the young and hidden talent within our community</a>. It's an issue that I think deserves some time and effort to solve.</p>

<h2>Links of the week</h2>

<ul>
<li><a href="http://blog.nodejs.org/2011/11/25/node-v0-6-3/">Node.js now includes NPM</a>

<ul>
<li>Node Package Manager is now included within the latest 0.6 builds of Node. This is a logical and practical step, I like it.</li>
</ul></li>
<li><a href="http://blog.mozilla.com/devtools/2011/05/25/the-relationship-between-firebug-and-mozilla-developer-tools/">The Relationship Between Firebug and Mozilla Developer Tools</a>

<ul>
<li>The question about the relationship between Firebug and Mozilla's own Developer Tools comes up time and time again. Hopefully this post by the Developer Tools team will help make things clear.</li>
</ul></li>
<li><a href="http://cnn-ecosphere.com">CNN Ecosphere</a>

<ul>
<li>Pretty WebGL visualisation of tweets about the COP17 Conference. Just a pretty WebGL visualisation would have been enough for me!</li>
</ul></li>
<li><a href="http://blog.cenizal.com/?p=119">Blis - A blitted isometric system for AS3</a>

<ul>
<li>This is a fascinating method of collision detection in games by giving every game object a different colour value. So simple, yet so clever.</li>
</ul></li>
<li><a href="http://johnhammink.blogspot.com/2011/11/lets-have-look-at-some-recently-landed.html">Let's have a look at some recently landed Web APIs for Firefox</a>

<ul>
<li>WebAPIs are something I absolutely can't wait to see cross-browser. In the meantime, this post by John Hammink gives an overview of the WebAPIs that have already landed in Firefox.</li>
</ul></li>
<li><a href="http://glsl.heroku.com/">GLSL Sandbox Gallery</a>

<ul>
<li>Anything to do with WebGL still blows my mind. This site lets you add your own GLSL code and share it with the rest of the community, all with a nice visual preview.</li>
</ul></li>
<li><a href="http://dnssd.me/">DNS Service Discovery browser extension</a>

<ul>
<li>This Firefox and Chrome extension is absolutely amazing. In a nutshell it allows you to access services on the local network or the Internet that have been broadcast using multicast DNS, like Apple's Bonjour technology. Imagine using this to look for local HTML5 game servers within the browser.</li>
</ul></li>
<li><a href="https://github.com/agnat/node_mdns">node_mdsns</a>

<ul>
<li>This Node.js package allows for multicast DNS/zeroconf/Bonjour service discovery and broadcast. Coupled with the browser extension above there really is nothing holding you back from creating services with Node.js that you can discover within the browser. Very cool!</li>
</ul></li>
<li><a href="http://paulrouget.com/bgvideo/">Fun with <code>&lt;video&gt;</code> and <code>&lt;canvas&gt;</code></a>

<ul>
<li>This little demo changes the colour of a page background based on what is showing in the video. I've seen something like this before, however this implementation seems neater and prettier.</li>
</ul></li>
<li><a href="http://movethewebforward.org/">Move The Web Forward</a>

<ul>
<li>Described as a &quot;guide to getting involved with standards and browser development.&quot; Definitely worth a read.</li>
</ul></li>
<li><a href="http://blog.jilion.com/2011/11/29/sublimevideo-unleashed">SublimeVideo Unleashed!</a>

<ul>
<li>HTML5 video UI service SublimeVideo has unleashed its offering to everyone. It's such a well-designed experience and one that should be considered if you're hosting your own HTML5 videos.</li>
</ul></li>
<li><a href="http://developer.spotify.com/en/spotify-apps-api/resources/">Spotify developer resources</a>

<ul>
<li>Guidelines and documentation for the Spotify Apps JavaScript API. I'm yet to play with this yet but I'm excited to see what apps come out of it.</li>
</ul></li>
</ul>

<h2>Track of the week</h2>

<p><a href="http://grooveshark.com/s/One+Logistics+Remix+/3517NS?src=5">One (Logistics Remix)</a> <em>by Sky Ferreira</em>. A bit poppy, but oh so awesome once you get into it.</p>

<p><figure><object width="620" height="40" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="gsSong2681030660" name="gsSong2681030660"><param name="movie" value="http://grooveshark.com/songWidget.swf" /><param name="wmode" value="window" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="hostname=cowbell.grooveshark.com&songIDs=26810306&style=metal&p=0" /><object type="application/x-shockwave-flash" data="http://grooveshark.com/songWidget.swf" width="620" height="40"><param name="wmode" value="window" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="hostname=cowbell.grooveshark.com&songIDs=26810306&style=metal&p=0" /><span>One (Logistics Remix) by <a href="http://grooveshark.com/artist/Sky+Ferreira/1369502" title="Sky Ferreira">Sky Ferreira</a> on Grooveshark</span></object></object>
</figure></p>]]></content:encoded>
      <dc:subject></dc:subject>
      <dc:date>2011-12-19T16:04:28+00:00</dc:date>
    </item>

    <item>
      <title>Let&#8217;s start recognising the hidden gems within our community</title>
      <link>http://rawkes.com/blog/2011/12/16/lets-start-recognising-the-hidden-gems-within-our-community</link>
      <guid>http://rawkes.com/blog/2011/12/16/lets-start-recognising-the-hidden-gems-within-our-community</guid>
      <content:encoded><![CDATA[<p><em>We need to stop rewarding the same people and instead focus on the young, hidden talent within our community. In this entry I explore this issue and highlight a couple of potential solutions.</em></p>

<p><em>Disclaimer: Although I talk about young people a lot I believe these problem and solution applies to people of any age. My intention is not to skew focus on young people but rather focus on people who are hidden within the community and don't have the opportunities to be rewarded. My focus on young people is merely from personal experience and the fact that young people generally don't have the same opportunity as those who are older (life experience, income, age-restrictions, etc).</em></p>

<p>It's no secret that the majority of award ceremonies in our industry are won by the people who are most well-known. It's just reality really, you can't nominate and vote for someone that you don't know, can you?</p>

<p>The problem with this is that there are a whole swath of talented individuals who just aren't getting the recognition that they deserve. It's mainly young people, and it's mainly because they're relatively unknown within the industry. I don't think that it's right to reward the loudest most prominent people and affectively ignore those without a voice.</p>

<p>Even just 2 years ago I would never have had the opportunity to win Brilliant Newcomer at the .net awards, but that is <a href="http://rawkes.com/blog/2011/11/28/rob-hawkes-first-class-graduate-and-brilliant-newcomer-of-the-year">exactly what happened last month</a>. </p>

<p>So why did I win this award now and not then? Well, partly because I've done a lot of well-publicised work in the last year, but mainly because I've been very vocal and deliberately trying to get myself in front of people within this industry. Not because I want to win awards but rather because it's my job and it's the only way I've been able to achieve one of my never-ending goals in life, sharing my knowledge with others.</p>

<p>If I hadn't been active at getting myself recognised within this industry I am under no doubt that I would not have won the award. In fact, I probably wouldn't have even been nominated in the first place! We're very good at recognising the people who are already well-known and vocal, but we're shockingly bad at recognising those who aren't so vocal and who might not have the ability to put themselves in front of the right crowds.</p>

<p>This has made me come to the conclusion that we need to start actively searching out these hidden gems within our community and also celebrating our young talent. I'd much rather read about someone new and exciting within this industry than read about another award that well-known Person X has won (although, I'm sure Person X deserved it). And by constantly highlighting the same well-known people we're systematically preventing the new talent from rising up and sharing the spotlight that we're encouraging them to aim for.</p>

<p>Now this is all well and good highlighting the issue, but it's an obvious one and I'm certainly not the first to be vocal about it &mdash; we need to be proactive about it.</p>

<h2>What can be done about it?</h2>

<p>After speaking to a friend of mine we've come up with a couple of potential solutions to the problem. Neither are simple but both can be achieved if someone truly passionate about the issue gets involved.</p>

<h3>Creating a new type of awards ceremony</h3>

<p>One avenue to explore is that of creating a new type of awards ceremony, one that solely focuses on the young and hidden talent within our community.</p>

<p>The problem with this idea is that this young and hidden talent is hard to find, that's kind of what happens when something is hidden. However, there is a potential solution to that problem. Neutral talent scouts.</p>

<p>These scouts, recruited by the awards panel, will scour their local communities and events for young and hidden talent. Anyone that is found to be showing initiative and skill will be put forward for nomination in the next awards. These scouts could be anyone from teachers, speakers, other young people, to anyone else with deep connections within the Web community.</p>

<p>What is nice about this concept is that the nomination process is no longer about who gets the most votes. Instead, the nomination process is about who in their local communities the scouts believe have shown the necessary qualities for nomination.</p>

<p>I truly believe that the only way awards ceremonies are going to improve is if the concept of public nomination, while a nice idea, is removed entirely. It is exactly the cause of the problems within these kinds of ceremonies, and the same is the case when a panel of judges selects people at a single point in the year. These methods just don't work.</p>

<p>Now, the scouts idea still isn't ideal but it's certainly a start. We'd still have to work out how to choose these people and how to make sure nomination is fair for all.</p>

<p>We also still need to work out how the voting process works. I believe that the public should definitely vote for these awards but I don't necessarily believe that the public should be part of the selection process.</p>

<p>In all, we can certainly do something to improve awards ceremonies but I don't think we'll ever be able to truly remove the biased nature of recognising the loudest people within the community.</p>

<p>We need something that isn't a one-off event. Something more regular. Something that can reward every talented person within this community instead of just one. With that comes the next solution.</p>

<h3>Our Community Is Awesome (.com)</h3>

<p>Ok, so that isn't a real name but hopefully you get the idea. It would be a website the celebrates all the talented people within our community who are doing awesome things.</p>

<p>How the website finds out about these people is still up for the discussion but I've had a few ideas:</p>

<ul>
<li>A scout system like the one I described for the award ceremonies</li>
<li>User-submissions</li>
<li>An automated system</li>
</ul>

<p>All three have their pros and cons. The scout system means that little to no moderation will have to be done before highlighting someone on the website, however people could still be missed if they aren't seen by the scouts.</p>

<p>The user-submissions are a good idea because anyone who knows about the website can submit a friend or colleague that they feel deserves recognition. However this method will require extensive moderation and will leave people out who don't have friends who know about the website.</p>

<p>My favourite idea is to create an automated system of highlighting awesome people within this community. Perhaps this is my favourite because I like impossible tasks, who knows.</p>

<p>The general idea for the automated system would be to initially scrape the large creative outlets (Dribbble, Forrst, etc) for young and relatively unknown people. The system would then generate a daily report of the most interesting people and work.</p>

<p>This type of system would still leave out a lot of people (anyone who doesn't use the services it scrapes) so, until I learn how to create self-learning machines, perhaps combining this solution with one of the other two will be a good compromise for the time being.</p>

<p>I think that having <em>something</em> working and doing something good is better than having nothing at all. We can always improve upon the procedure over time.</p>

<h2>So what next?</h2>

<p>These are just ideas right now, nothing more. I know that myself and a few of my friends would love to see something like this, as I'm sure many others in the community would.</p>

<p>I'd love to hear about any similar projects around (I'm sure I'm not the first to come up with these ideas) and I'd also be interested to hear your opinions on the solutions raised in this entry.</p>

<p>Hopefully we can make 2012 the year that we put our egos aside and celebrate how amazing our community really is. Are you with me?</p>
]]></content:encoded>
      <dc:subject></dc:subject>
      <dc:date>2011-12-16T17:24:41+00:00</dc:date>
    </item>

    <item>
      <title>Gamepad API demo in Firefox and Chrome</title>
      <link>http://rawkes.com/blog/2011/12/14/gamepad-api-demo-in-firefox-and-chrome</link>
      <guid>http://rawkes.com/blog/2011/12/14/gamepad-api-demo-in-firefox-and-chrome</guid>
      <content:encoded><![CDATA[<p>I've recently been playing with the <a href="http://hacks.mozilla.org/2011/12/paving-the-way-for-open-games-on-the-web-with-the-gamepad-and-mouse-lock-apis/">Gamepad API</a> and implementing it in <a href="http://rawkets.com">Rawkets</a> (gamepad stuff isn't online yet, sorry!). Up until a few days ago this was a Firefox-only feature but I'm glad to say that builds of Chrome are now out with gamepad support. Here is a quick video of Rawkets with the Gamepad API working in Firefox and Chrome.</p>

<p>I'm looking forward to this functionality maturing and getting supported by the other browsers. For now you can play with this today in <a href="http://hacks.mozilla.org/2011/12/paving-the-way-for-open-games-on-the-web-with-the-gamepad-and-mouse-lock-apis/">experimental Nightly builds of Firefox</a> or download the Chrome Dev build for Windows support, or Chrome Canary for Mac support (Linux coming soon).</p>

<p><figure><iframe src="http://player.vimeo.com/video/33668443" width="621" height="415" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></figure></p>]]></content:encoded>
      <dc:subject></dc:subject>
      <dc:date>2011-12-14T17:12:50+00:00</dc:date>
    </item>

    <item>
      <title>Rawkes Weekly: 12th December 2011</title>
      <link>http://rawkes.com/blog/2011/12/12/rawkes-weekly-12th-december-2011</link>
      <guid>http://rawkes.com/blog/2011/12/12/rawkes-weekly-12th-december-2011</guid>
      <content:encoded><![CDATA[<p><em>The tenth instalment of the all-new Rawkes Weekly. In it I go over recent events and give you some of my favourite links related to Web development and general geekery.</em></p>

<p>Since the last update there has been further progression with the Gamepad and Mouse Lock APIs within Firefox. In fact, there is now <a href="http://hacks.mozilla.org/2011/12/paving-the-way-for-open-games-on-the-web-with-the-gamepad-and-mouse-lock-apis/">an experimental build of the browser</a> that contains both APIs for you to play with.</p>

<p>Also, not long ago I started integrating the Mozilla <a href="http://apps.mozillalabs.com">Open Web Apps API</a>, Gamepad API, and Full Screen API into Rawkets. This is the future, people!</p>

<p><figure><a href="http://www.flickr.com/photos/robhawkes/6498005519/" title="Rawkets Web app by robhawkes, on Flickr"><img src="http://farm8.staticflickr.com/7026/6498005519_c679d47fe2_z.jpg" width="620" alt="Rawkets Web app"></a></figure></p>

<p>The coolest thing about the Open Web Apps API is that it allows players to install the game (or any Website with an application manifest file) as a native OS app with a desktop/dock icon and no browser UI.</p>

<h2>Links of the week</h2>

<ul>
<li><a href="http://fhtr.org/">Ilmari Heikkinen</a>

<ul>
<li>Ilmari is part of the developer relation team at Google and part-time experimenter. His website contains some awesome examples of HTML5 and JavaScript; particularly <a href="http://fhtr.org/runfield/runfield/">Runfield</a> and <a href="http://glimr.rubyforge.org/cake/missile_fleet.html">Missile Fleet</a>.</li>
</ul></li>
<li><a href="https://github.com/LearnBoost/socket.io/wiki/Socket.IO-and-firewall-software">Socket.IO and firewall software</a>

<ul>
<li>Useful research into the issues surrounding WebSockets and firewalls. Turns out there isn't such a problem so long as you're aware of the issue use the right ports.</li>
</ul></li>
<li><a href="https://github.com/toji/building-the-game">Building the Game</a>

<ul>
<li>Source code and tutorials for Brandon Jones' series on building a game with WebGL.</li>
</ul></li>
<li><a href="http://blog.nodejitsu.com/introducing-flatiron">Introducing Flatiron</a>

<ul>
<li>Yet another interesting initiative from the guys at Nodejitsu to make Node.js development a little easier.</li>
</ul></li>
<li><a href="https://docs.google.com/document/pub?id=1fs1hpZvP05ViEWtaLSmNQUV_PW2jCWS5Oe2GAdBKgl0&amp;pli=1">Report from the W3C Games Community Group Summit Nov 2011</a>

<ul>
<li>Just after New Game Conference the W3C Games Community Group met up in San Francisco to discuss the state of creating games with open Web technologies. This report is the result of that meeting.</li>
</ul></li>
<li><a href="http://gamelab.bocoup.com/">HTML5 Game Lab</a>

<ul>
<li>This partnership between Bocoup and Atlas Ventures aims to fund projects related to the open Web games industry.</li>
</ul></li>
<li><a href="http://hacks.mozilla.org/2011/11/developer-tools-in-firefox-aurora-10/">Developer Tools in Firefox Aurora 10</a>

<ul>
<li>We're working hard at Mozilla to bring built-in developer tools to Firefox. Right now they are pretty damn awesome and this post highlights what can be done with them.</li>
</ul></li>
<li><a href="https://github.com/idflood/ThreeNodes.js">ThreeNodes.js</a>

<ul>
<li>This is apparently a vvvv clone for JavaScript, HTML and WebGL. I don't really know what that means but it looks amazing!</li>
</ul></li>
<li><a href="http://www.scirra.com/blog/58/html5-2d-gaming-performance-analysis?">HTML5 2D gaming performance analysis</a>

<ul>
<li>The guys at Scirra have taken the time to do some performance tests on HTML5 canvas and WebGL. The results are interesting.</li>
</ul></li>
<li><a href="https://github.com/mbrevoort/probe.io">Probe.io</a>

<ul>
<li>A little tool that visualises the various transport platforms that Socket.IO supports. The aim is to help you determine which transports to support in your application.</li>
</ul></li>
</ul>

<h2>Track of the week</h2>

<p><a href="http://grooveshark.com/s/Unlike+Me/30p71u?src=5">Unlike Me</a> <em>by Kate Havnevik</em>. I'm a massive fan on Imogen Heap, and that combined with the new Spotify resulted in me finding out about Kate Havnevik. Such soothing music.</p>

<p><figure><object width="620" height="40" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="gsSong19356789" name="gsSong19356789"><param name="movie" value="http://grooveshark.com/songWidget.swf" /><param name="wmode" value="window" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="hostname=cowbell.grooveshark.com&songIDs=1935678&style=metal&p=0" /><object type="application/x-shockwave-flash" data="http://grooveshark.com/songWidget.swf" width="620" height="40"><param name="wmode" value="window" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="hostname=cowbell.grooveshark.com&songIDs=1935678&style=metal&p=0" /><span>Unlike Me by <a href="http://grooveshark.com/artist/Kate+Havnevik/2155" title="Kate Havnevik">Kate Havnevik</a> on Grooveshark</span></object></object></figure></p>]]></content:encoded>
      <dc:subject></dc:subject>
      <dc:date>2011-12-12T11:32:06+00:00</dc:date>
    </item>

    <item>
      <title>Embedding and running Node.js within a Firefox XUL extension</title>
      <link>http://rawkes.com/blog/2011/12/05/running-node.js-from-within-a-firefox-xul-extension</link>
      <guid>http://rawkes.com/blog/2011/12/05/running-node.js-from-within-a-firefox-xul-extension</guid>
      <content:encoded><![CDATA[<p><em>I'm currently working on a little extension for Firefox that discovers and hosts local Node.js game servers across LAN. This entry shows the code behind running a bundled Node.js executable from within the extension.</em></p>

<p><em>I'll be assuming some experience with Firefox extension development, or at least <a href="http://blog.mozilla.com/addons/2009/01/28/how-to-develop-a-firefox-extension/">the ability to follow this tutorial</a>.</em></p>

<p>Being able to run Node.js within a Firefox extension is integral to my concept working. The idea is that anyone with this extension installed will have the ability to run a local <a href="http://rawkets.com">Rawkets</a> game server. So how do you run Node.js within an extension then?</p>

<h2>Discovering nsIProcess</h2>

<p>I didn't know where to start. I'd previously had some experience with bundling NPAPI plugins within a Firefox extension and assumed I'd need to build a plugin to run executable programs like Node.js. Fortunately I was wrong, there is a wonderfully simple interface called <a href="https://developer.mozilla.org/en/nsIProcess"><code>nsIProcess</code></a> that sits within Firefox and allows you to run a binary executable.</p>

<p><code>nsIProcess</code> has three methods in particular that you'll need; <a href="https://developer.mozilla.org/en/nsIProcess#init()"><code>init()</code></a>, <a href="https://developer.mozilla.org/en/nsIProcess#runAsync()"><code>runAsync()</code></a> and <a href="https://developer.mozilla.org/en/nsIProcess#kill()"><code>kill()</code></a>. They allow you to initialise your Node.js process, run it asynchronously, and kill it, respectively.</p>

<h2>Bundling the Node.js executable</h2>

<p>Before you can run Node.js you need to bundle the executable within your extension. The way you can this is to <a href="http://nodejs.org/#download">download and unpack the Node.js source</a> then run the following commands within the terminal:</p>

<pre><code>cd REPLACE_WITH_PATH_TO_THE_NODE_SOURCE_DIRECTORY
./configure
make
</code></pre>

<p><strong>Do not</strong> run <code>make install</code> as you'll install the executable to your computer and overwrite any version of Node.js that you currently have installed.</p>

<p>Once the <code>make</code> process is complete you'll see a little note in the terminal output that states where the executable was placed. For me this was within the <code>build/default/</code> directory within the Node.js source you just downloaded and unpacked.</p>

<p>The final step is to create a directory within your extension called <code>components</code> (or whatever else you see fit) and copy the <code>node</code> executable (it's just called node, no extension) from the <code>build/default</code> directory.</p>

<p><em>Note: You'll probably need to <a href="https://developer.mozilla.org/en/Install_Manifests#unpack">set the <code>unpack</code> flag to true</a> within your <code>install.rdf</code> manifest file to make sure the Node.js executable is unpacked on the user's machine.</em></p>

<h2>Initialising the Node.js process</h2>

<p>Now that the Node.js executable is bundled you can set it up within your extension.</p>

<p>Copy the following code within your extension:</p>

<pre><code>(function() {
    // Create an nsILocalFile for the Node executable
    var file = Components.classes[&quot;@mozilla.org/file/local;1&quot;].createInstance(Components.interfaces.nsILocalFile);  
    file.initWithPath(&quot;REPLACE_WITH_ABS_PATH_TO_NODE_EXECUTABLE&quot;);

    // Check for Node executable
    if (!file.exists()) {
        // Node executable is missing
        return;
    };

    // Create an nsIProcess to manage the Node executable
    var process = Components.classes[&quot;@mozilla.org/process/util;1&quot;].createInstance(Components.interfaces.nsIProcess);
    process.init(file);
})();
</code></pre>

<p>The first line initialises the <code>file</code> variable as an instance of the <a href="https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsILocalFile"><code>nsILocalFile</code></a> interface. You'll be using this to grab the file of the Node.js executable.</p>

<p>On the second line you call the <code>initWithPath()</code> method of <code>nsILocalFile</code> and pass it a string defining the absolute path of the Node.js executable within your plugin.</p>

<p>The following <code>if</code> conditional statement checks to see that the executable was found and actually exists.</p>

<p>Lastly, you set the <code>process</code> variable as an instance of the <code>nsIProcess</code> interface that I mentioned earlier and call the <code>init()</code> method with the executable (referenced via <code>file</code>) as the only argument.</p>

<h2>Running and monitoring the process</h2>

<p>After initialising the Node.js process you're ready to run it.</p>

<p>Add the following code under <code>process.init(file)</code>:</p>

<pre><code>var ObserverHandler = {
    // subject refers to the process nsIProcess object
    observe: function(subject, topic, data) {
        switch (topic) {
            // Process has finished running and closed
            case &quot;process-finished&quot;:
                break;
            // Process failed to run
            case &quot;process-failed&quot;:
                break;
        };
    }
};    

// Run the Node process and observe for any changes
var args = [&quot;REPLACE_WITH_ABS_PATH_TO_NODE_SCRIPT&quot;];
process.runAsync(args, args.length, ObserverHandler);
</code></pre>

<p>There are two things happening here. Let's ignore the <code>ObserverHandler</code> for now and concentrate on the last two lines.</p>

<p>The first of those two lines defines an <code>args</code> variable as an array of strings. This array contains all of the command-line arguments that you want to pass to the Node.js process when you run it. In your case you want to run a Node.js script so just add one string to the array that is the absolute path to a script you've already put together.</p>

<p>The second of the lines calls the <code>runAsync()</code> method of the <code>nsIProcess</code> interface that I described earlier and actually runs the process. The first two arguments passed to this method are the array of arguments you want to pass to the Node.js process and the number of those arguments. The third argument is a <a href="https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIObserver"><code>nsIObserver</code></a> interface that will receive notifications about the process, which we'll touch on now.</p>

<p>Your <code>nsIObserver</code> interface is the <code>ObserverHandler</code> object that is defined above the call to <code>runAsync()</code>. It has one method named <code>observe()</code> that is called whenever it receives a notification. This method receives three parameters; <code>subject</code>, <code>topic</code>, and <code>data</code>. They are <a href="https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIObserver#Parameters">described in detail</a> on the <code>nsIObserve</code> documentation. For now, you're only interested in the <code>topic</code> parameter.</p>

<p>A simple <code>switch</code> statement checks the <code>topic</code> parameter of any notifications about the process. The only topics available for now are <code>process-finished</code> and <code>process-failed</code>, which occur when the process has finished running and when the process failed to run, respectively.</p>

<p>You won't be using this <code>nsIObserver</code> just yet but it's useful to have here as you'll need it later to deal with issues surrounding the start up and shutdown of the process.</p>

<h2>Testing your handiwork</h2>

<p>If all went well then you should be able to run your extension and have your Node.js script execcuted by the bundled <code>node</code> executable.</p>

<p>You can check to see if this works by either putting a delay in your Node.js script, or keep it running forever, then checking the Activity Monitor application on OS X (or likewise on other operating systems).</p>

<p>Type &quot;node&quot; into the search bar and you should see a Node.js process running from your extension.</p>

<p><img src="http://rawkes.com/media/images/FFNode-ActivityMonitor.png" alt="Node process running within Activity Monitor on OS X" /></p>

<h2>Killing the process</h2>

<p>It's all well and good that you've managed to get Node.js running within your extension (yippee!) but it's kind of running forever (not yippee). To fix this you're going to add some functionality that checks for Firefox shutting down and, if so, kills the Node.js process.</p>

<p><em>Before we continue, you should kill the current Node.js process if it's still running. On OS X you can click on it within the Activity Monitor and then click on the &quot;Quit Process&quot; button at the top left.</em></p>

<p>The first thing to do is include the <a href="https://developer.mozilla.org/en/JavaScript_code_modules/Services.jsm"><code>Services</code></a> module by placing the following line above <code>var file</code>, right at the top of your extension:</p>

<pre><code>// Import Services module (startup and shutdown events)
Components.utils.import(&quot;resource://gre/modules/Services.jsm&quot;);
</code></pre>

<p>This module gives you access to a whole bunch of functionality, however all you're interested in at the moment is it's <code>obs</code> property that acts as a reference to the <a href="https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIObserverService"><code>nsIObserverService</code></a> interface.</p>

<p>Add the following code to the bottom of the extension, just below the call to <code>runAsync()</code>:</p>

<pre><code>Services.obs.addObserver(ObserverHandler, &quot;quit-application-granted&quot;, false);
</code></pre>

<p>This will add a listener for the <a href="https://developer.mozilla.org/en/Observer_Notifications#Application_shutdown"><code>quit-application-granted</code></a> event (that is fired just before Firefox closes) and will use the <code>ObserverHandler</code> object you created earlier to handle it.</p>

<p>Finally, add the <code>quit-application-granted</code> handler to the <code>ObserverHandler</code> <code>switch</code> statement and set it to run the <code>kill()</code> method of the Node.js process:</p>

<pre><code>var ObserverHandler = {
    // subject refers to the process nsIProcess object
    observe: function(subject, topic, data) {
        switch (topic) {
            // Process has finished running and closed
            case &quot;process-finished&quot;:
                break;
            // Process failed to run
            case &quot;process-failed&quot;:
                break;
            case &quot;quit-application-granted&quot;:
                // Shut down any Node.js processes
                process.kill();
                break;
        };
    }
}; 
</code></pre>

<p>This will kill the process when Firefox quits. I wouldn't rely on this to kill the process all the time as it won't run if the browser crashes (as if) or if the extension is uninstalled. I'll let you add in that extra functionality.</p>

<h2>Testing it all one last time</h2>

<p>Now if you run Firefox the Node.js process will be created (yippee!) and if you quit Firefox the process will be killed (double yippee!).</p>

<p><figure><iframe src="http://player.vimeo.com/video/33109409" width="619" height="302" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></figure></p>

<p>If this isn't the case then you have a problem and I would dig around the Error Console (Shift-Cmd+J) to check for obvious issues.</p>

<h2>Doing this in Chrome</h2>

<p><a href="http://twitter.com/robhawkes">Please get in touch</a> if you know how to do this within a Chrome extension, I'm yet to look into that and would love to know for future reference.</p>

<h2>Working extension and code download</h2>

<p>The <a href="https://github.com/robhawkes/node-extension">full code as a working Firefox extension</a> is up on Github. Feel free to download it, fork it, and generally do whatever you want with it.</p>]]></content:encoded>
      <dc:subject></dc:subject>
      <dc:date>2011-12-05T10:00:30+00:00</dc:date>
    </item>

    <item>
      <title>Paving the way for open games on the Web with the Gamepad and Mouse Lock APIs</title>
      <link>http://rawkes.com/blog/2011/12/04/paving-the-way-for-open-games-on-the-web-with-the-gamepad-and-mouse-lock-ap</link>
      <guid>http://rawkes.com/blog/2011/12/04/paving-the-way-for-open-games-on-the-web-with-the-gamepad-and-mouse-lock-ap</guid>
      <content:encoded><![CDATA[<p><em>I recently <a href="http://hacks.mozilla.org/2011/12/paving-the-way-for-open-games-on-the-web-with-the-gamepad-and-mouse-lock-apis/">wrote a post on the Mozilla Hacks blog</a> about two new APIs that are paving the way for high quality games on the Web.</em></p>

<blockquote>
<p>The Web is proving to be a valuable and capable platform for games, particularly those produced using open technologies baked into the browser. These HTML and JavaScript games are beginning to shine, all thanks to the amazing APIs and functionality that come with Firefox and other modern browsers.</p>
</blockquote>
<blockquote>
<p>The Gamepad and Mouse Lock APIs are just two of the new additions coming to Firefox that are going to help mature this platform. We’ll be posting more about them as they develop but let’s take a quick look at them today.</p>
</blockquote>

<p>I've included a video of the Gamepad API below, but definitely <a href="http://hacks.mozilla.org/2011/12/paving-the-way-for-open-games-on-the-web-with-the-gamepad-and-mouse-lock-apis/">read more about these APIs</a> on the Mozilla Hacks blog and download the experimental builds of Firefox to play for yourself.</p>

<p><figure><iframe src="http://player.vimeo.com/video/31906995" width="620" height="349" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></figure></p>]]></content:encoded>
      <dc:subject></dc:subject>
      <dc:date>2011-12-04T11:43:10+00:00</dc:date>
    </item>

    <item>
      <title>Rawkes Weekly: 1st December 2011</title>
      <link>http://rawkes.com/blog/2011/12/01/rawkes-weekly-1st-december-2011</link>
      <guid>http://rawkes.com/blog/2011/12/01/rawkes-weekly-1st-december-2011</guid>
      <content:encoded><![CDATA[<p><em>The ninth instalment of the all-new Rawkes Weekly. In it I go over recent events and give you some of my favourite links related to Web development and general geekery.</em></p>

<p>At the beginning of November I attended <a href="http://www.newgameconf.com/">New Game Conference</a>, North America's first HTML5 game conference. It was organised by Bocoup and Google and was a resounding success, it even had great WiFi! The only downer to the trip was that I got hit in the head by falling hand luggage on the plane, again&hellip;</p>

<p>The <a href="http://lanyrd.com/2011/newgameconf/">videos from New Game</a> are online now. I'd definitely check out <a href="http://lanyrd.com/2011/newgameconf/skwzy/">Richard Hilleman's keynote</a>, his experience at EA and general thoughts are exactly what the open Web gaming industry needs to hear.</p>

<p>Just after New Game was <a href="https://mozillafestival.org">Mozilla Festival London</a>, where I put on a <a href="http://rawkes.com/blog/2011/11/06/creating-a-real-time-multiplayer-game-with-websockets-and-node.js">multiplayer HTML5 gaming workshop</a>.</p>

<p>More recently I've been playing with the brand new and terribly awesome <a href="https://wiki.mozilla.org/GamepadAPI">Gamepad API</a> in Firefox. Check out this <a href="http://vimeo.com/31862418">little demo I made</a>, the possibilities are endless!</p>

<h2>Links of the week</h2>

<ul>
<li><a href="http://fieldrunnershtml5.appspot.com/">Fieldrunners HTML5 &amp; WebGL</a>

<ul>
<li>A recent port of the hit iOS game Fieldrunners to HTML5. Unfortunately it doesn't run in Firefox even though Firefox supports all the functionality that the game requires. Still, it's a great example of what kind of games can be made in HTML5.</li>
</ul></li>
<li><a href="http://canvas.fm/">Canvas.fm</a>

<ul>
<li>I <em>love</em> data visualisation. This little web service creates a radial visualisation of tracks on Soundcloud. So beautiful.</li>
</ul></li>
<li><a href="http://www.spielzeugz.de/html5/sticky-thing/">Sticky Thing</a>

<ul>
<li>Totally pointless but utterly addictive HTML5 demo. Bonus points if you can stick it to the top of the window by only throwing it.</li>
</ul></li>
<li><a href="http://benvanik.github.com/WebGL-Inspector/">WebGL Inspector</a>

<ul>
<li>Debug WebGL using this tool, fantastically useful!</li>
</ul></li>
<li><a href="http://www.scoop.it/t/html5-games">HTML5 game resources</a>

<ul>
<li>A whole selection of resources related to HTML5 games, curated by Andrew Wooldridge.</li>
</ul></li>
<li><a href="http://alteredqualia.com/three/examples/webgl_terrain_dynamic.html">Dynamic procedural terrain in three.js</a>

<ul>
<li>A beautiful example of what can be achieved with WebGL.</li>
</ul></li>
<li><a href="https://developers.facebook.com/html5/build/games/">Facebook documentation on HTML5 games</a>

<ul>
<li>Facebook are spending quite a lot of time and effort around HTML5 at the moment. This set of notes and documentation on HTML5 games is full of useful tips and tricks.</li>
</ul></li>
<li><a href="https://wiki.mozilla.org/Platform/IsTheWebReadyForGamingYet">Are we fun yet?</a>

<ul>
<li>This is the page that will be updated with the progress of technologies related to open Web games, particularly within Mozilla.</li>
</ul></li>
<li><a href="http://updates.html5rocks.com/2011/10/Let-Your-Content-Do-the-Talking-Fullscreen-API">Let Your Content Do the Talking: Fullscreen API</a>

<ul>
<li>Overview and tutorial of the new Full Screen API that lets you expand any HTML element outside of the browser dimensions to fill the entire screen.</li>
</ul></li>
<li><a href="http://fleetingfantasy.com/game-list">HTML5 games list from Fleeting Fantasy</a>

<ul>
<li>List of HTML5 games being worked on by members of the #bbg (browser-based gaming) channel on irc.freenode.net.</li>
</ul></li>
<li><a href="http://labs.hyperandroid.com/">HyperAndroid's coding experiments</a>

<ul>
<li>Awesome selection of HTML5, JavaScript and CSS3 experiments.</li>
</ul></li>
</ul>

<h2>Track of the week</h2>

<p><a href="http://grooveshark.com/s/Landed+Strings+Version+/2vxmgM?src=5">Landed (Strings Version)</a> <em>by Ben Folds</em>. I've always been a fan of Ben Folds but it was only recently that I stumbled across his music again. You should definitely check out the rest of his work.</p>

<figure><object width="620" height="40" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="gsSong12860325" name="gsSong12860325"><param name="movie" value="http://grooveshark.com/songWidget.swf" /><param name="wmode" value="window" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="hostname=cowbell.grooveshark.com&songIDs=1286032&style=metal&p=0" /><!--[if !IE]>--><object type="application/x-shockwave-flash" data="http://grooveshark.com/songWidget.swf" width="620" height="40"><param name="wmode" value="window" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="hostname=cowbell.grooveshark.com&songIDs=1286032&style=metal&p=0" /><span>Landed (Strings Version) by <a href="http://grooveshark.com/artist/Ben+Folds/1837" title="Ben Folds">Ben Folds</a> on Grooveshark</span></object><!--<![endif]--></object></figure>]]></content:encoded>
      <dc:subject></dc:subject>
      <dc:date>2011-12-01T09:07:05+00:00</dc:date>
    </item>

    
    </channel>
</rss>
