<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[Soviet Canuckistan]]></title>
  <link href="http://canuckistani.ca/atom.xml" rel="self"/>
  <link href="http://canuckistani.ca/"/>
  <updated>2013-01-16T15:37:09-08:00</updated>
  <id>http://canuckistani.ca/</id>
  <author>
    <name><![CDATA[Jeff Griffiths]]></name>
    <email><![CDATA[info@canuckistani.ca]]></email>
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[The Mozilla Projects feed.]]></title>
    <link href="http://canuckistani.ca/blog/2013/01/16/the-mozilla-projects-feed/"/>
    <updated>2013-01-16T13:16:00-08:00</updated>
    <id>http://canuckistani.ca/blog/2013/01/16/the-mozilla-projects-feed</id>
    <content type="html"><![CDATA[<p>Last week I published a post to the Addons blog announcing the <a href="https://blog.mozilla.org/addons/2013/01/08/add-on-sdk-2013-roadmap/">2013 Add-on SDK roadmap</a>. I sweated over it for a few days, finally pushed the publish button in Wordpress on Tuesday afternoon, then waited for it to pop up on PMO.</p>

<p>&#8230;and waited.</p>

<p>&#8230;and <em>waited</em>.</p>

<p>After some investigation I found this bug from last September logged by my fellow AMO blogger Jorge Villalobos:
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=790033">Bug 790033 - Mozilla Add-ons Blog missing from Planet</a></p>

<p>Clearly I <em>completely missed the boat</em> on when the move of the addons blog off of PMO happened, and that&#8217;s a bit embarrassing. I&#8217;m also a little disappointed because I feel like we&#8217;ve lost something for the Addons blog by not being aggregated on PMO. I think for even the brief few seconds when PMO readers scan the posts, there is a value to having our posts in there and visible - that there is an ambient awareness created in the community about what we&#8217;re doing even if you don&#8217;t read every post.</p>

<p>Anyway, this all happened months ago so there is nothing to be done except to say, if you feel like you&#8217;ve been missing out on the state of add-ons at Mozilla, please either <a href="https://blog.mozilla.org/addons/feed/">subscribe directly to our feed</a>, or optionally to the <a href="http://planet.mozilla.org/projects/atom.xml">PMO projects sub-feed</a>. This projects feed is particularly convenient if you care about other things like the Webdev blog, Hacks, <em>Bonjour Mozilla</em>, etc.</p>

<p>I should mention <em>as an aside</em> that I&#8217;m betting this realization about PMO will change my blogging habits, and I expect I&#8217;ll be using <em>this</em> blog for more work-related posts from now on if what I&#8217;m writing about is intended for the PMO audience. I guess the upside of that is I&#8217;ll end up blogging more, without even having made a NY resolution for that. I suppose that means I should look into enabling comments as well.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[10.8's Notification Center sucks]]></title>
    <link href="http://canuckistani.ca/blog/2012/10/28/10-dot-8-notification-center-sucks/"/>
    <updated>2012-10-28T14:53:00-07:00</updated>
    <id>http://canuckistani.ca/blog/2012/10/28/10-dot-8-notification-center-sucks</id>
    <content type="html"><![CDATA[<p>Based on the <a target="_blank" href="https://twitter.com/arturadib/status/261644486784974848">advice of a friend</a> I upgraded 3 laptops to Mountain Lion last night. Once I downloaded the installer and restored the ESD <a target="_blank" href="http://lifehacker.com/5928780/how-to-burn-os-x-mountain-lion-to-a-dvd-or-usb-flash-drive">to a USB key</a>, everything really smoothly. I only have 1 major compatibility issue - my <a target="_blank" href="http://global.focusrite.com/usb-audio-interfaces/vrm-box">Focusrite VRM</a> box is not yet supported.</p>

<p>I of course spent a goodly amount of time poking around the new OS ( as you do&#8230; ). I was particularly interested to see how notification center works. Notifications on OS X have been a <del>cluster&#8230;</del> er, not ideal for a long time, depending on the possible presence of 3rd part app Growl to work at all. In the Jetpack apis we currently fail hard and silent on OS X when Growl isn&#8217;t installed, so add-on developers really can&#8217;t rely notifications working and develop add-on features around them. There are <a target="_blank" href="https://github.com/fwenzel/copy-shorturl/blob/master/lib/simple-notify.js">some</a> <a target="_blank" href="https://github.com/canuckistani/jp-notificationbox">workarounds</a>, but the whole thing is a bit ugly and hacky.</p>

<p>If you are running Firefox on 10.8, any notifications will be sent to Notification Center instead of Growl even if Growl is present and running. For add-ons that use Jetpack&#8217;s apis, this makes things 33% worse, as there are now 3 behaviours that could occur when notify is called:</p>

<ul>
<li>if OS X is &lt; 10.8 and Growl isn&#8217;t installed, the notification is printed to the JS log.</li>
<li>if OS X is &lt; 10.8 and Growl <em>is</em> installed, we see Growl which, give how configurable Growl is, could mean almost anything.</li>
<li>on 10.8 notifications from Firefox are handled by Notification Center, which only displays a notification on-screen if Firefox <em>isn&#8217;t</em> focused.</li>
</ul>


<p>This is a mess. Add-on developers ( and html5 app developers! ) need a reliable, predictable way to show the user notifications that work consistently across platforms. The behaviour needs to be both helpful but also unobtrusive for users, with the right balance of features. In my mind the essential requirements are:</p>

<ul>
<li>if the user allows notifications, display notifications regardless of whether the app ( Firefox ) is focused or not. If I have written a chat application, for example, I&#8217;d love to be able to get the user&#8217;s attention if the tab my app is loaded into isn&#8217;t visiable, regardless of OS-level application visibility.</li>
<li>provide a decent api for notification &#8216;flair&#8217; - images, titles and text feel essential to me. For example, if I my chat app displaying notifications, it would be great to show the avatar image of the user sending the message that the notification was triggered by.</li>
<li>provide a way for the app or add-on to react to the click event by accepting a callback - again with my chat app, clicking the notification should be able to change focus to the window and tab where the notification originated from.</li>
<li>notifications should disappear after $some_low_number of seconds if there is no user action.</li>
</ul>


<p>Frustratingly, Notifications on OS X fail in all of these cases:</p>

<ul>
<li>notifications aren&#8217;t visible at all if Firefox is focused - they ust get stacked up in the Notifications UI with no visible indicator that anything has happened.</li>
<li>there is now way to use a custom image in a notification.</li>
<li>we don&#8217;t fire the onClick handler for the notification, because clicking on the notification bubble only focuses the notifying app.</li>
</ul>


<p>The most important use case I see is that any add-on or any app running in any tab should be able to request the ability to display notifications, and those notifications should be able to trigger a callback so that the developer can react to the click. The real-time web is upon us and I see this notification gap as being a real drag on what developers can do with social communications using WebSockets. Apple&#8217;s solution simply isn&#8217;t webby enough to help.</p>

<p>I am cautiously optimistic that a <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=782211">Mozilla implementation</a> of the <a target="_blank" href="http://www.w3.org/TR/notifications/">w3c notifications spec</a>. I&#8217;m a bit worried though, as the feeling seems to be that if an OS implements notifications <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=782211#c18">we should always use that</a> instead of a generic implementation. Notification center is too weird and limited to really be useful, so I would argue against using it. For Jetpack in particular, my preference would be to use our implementation regardless of OS version so we can provide add-on developers with a reasonable feature set they can rely on.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[JSConf EU 2012]]></title>
    <link href="http://canuckistani.ca/blog/2012/10/12/jsconf-eu-2012/"/>
    <updated>2012-10-12T13:27:00-07:00</updated>
    <id>http://canuckistani.ca/blog/2012/10/12/jsconf-eu-2012</id>
    <content type="html"><![CDATA[<p><img src="https://lh4.googleusercontent.com/-xK1ZlsxjFok/UHh9ZexV2QI/AAAAAAAAD6o/2qToAZX0Tng/s766/IMG_20121009_135502.jpg"></p>

<p>Last week/end I was fortunate to be able to travel to Berlin and attend <a target="_blank" href="http://2012.jsconf.eu/">JSConf EU 2012</a> and it&#8217;s sibling conference, <a target="_blank" href="http://rejectjs.org/">Reject.JS</a>. To say I had a great time is a huge understatement. JSConf events ( I&#8217;ve only beem to the European variant, but I assume this applies to other flavours as well ) are intense, informative, challenging, expensive, even exclusive to a certain degree, but above all they&#8217;re fun. Sure, the cost is formidable, but it is clear to see that all of the tickets sales and sponsorship funds go into the production. As somone who has occasionally organized tech events, the level of production value is pretty astonishing!</p>

<p>I <em>could</em> wax poetic for this entire post about how well run JSConf was, but there is nothing really new to report - it was just as well run last year ( although I forget if last year had the frozen yoghurt truck ). The truly great innovation this year was hosting the B track in an inflatable transparent plastic bubble out in the courtyard:</p>

<p><img src="https://lh4.googleusercontent.com/-h0Ik2GLGxis/UHh9ZbAzaMI/AAAAAAAAD6o/xw24SR4rVkM/s766/IMG_20121007_160101.jpg"></p>

<p>JSConf <em>is</em> fun, but it&#8217;s also a conference for programmers; this year&#8217;s edition had an <em>incredibly</em> wide scope. Starting with RejectJS and then continueing through the weekend, we saw JS powering all manner of things:</p>

<ul>
<li>a strongly typed, class-based JS superset, <a target="_blank" href="http://lanyrd.com/2012/jsconfeu/syxtx/">from Microsoft</a>.</li>
<li>an AR Drone that charged at red flags <a target="_blank" href="https://lh5.googleusercontent.com/-TSgEIa_ya_g/UHaTPyA6UcI/AAAAAAAAAHo/MVzEaFJ0AbI/s766/IMG_6475.JPG">like a bull at a Matador</a></li>
<li>any <a target="_blank" href="http://lanyrd.com/2012/jsconfeu/syxwd/">number</a> of other sorts of <a target="_blank" href="http://lanyrd.com/2012/jsconfeu/syxwg/">robots</a> and <a target="_blank" href="http://lanyrd.com/2012/jsconfeu/syxwf/">gadgets</a>.</li>
<li><a target="_blank" href="http://lanyrd.com/2012/jsconfeu/syxrq/">a guitar pedal</a> implemented in a browser, distorting live input from a real electric guitar!</li>
<li>a programming language <a target="_blank" href="http://lanyrd.com/2012/jsconfeu/syxqr/">intended for children</a>, but tested on aging parents</li>
</ul>


<p>Watching these talks I really got this sense of JS spreading at break-neck speed in all possible directions at once. Binary data? Check. Transpiling? Old news, sucka. Robots? Of course! And underlying it all, a burgeoning community that loves JS as it is - with a very bright future ahead of us.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Mozcamp EU 2012]]></title>
    <link href="http://canuckistani.ca/blog/2012/09/09/mozcamp-eu-2012/"/>
    <updated>2012-09-09T18:43:00-07:00</updated>
    <id>http://canuckistani.ca/blog/2012/09/09/mozcamp-eu-2012</id>
    <content type="html"><![CDATA[<p><img src="https://dl.dropbox.com/u/1212936/mozcamp/PANO_20120909_111806.png"></p>

<p>I&#8217;m sitting at the airport, feeling like I&#8217;ve put in an entire week of work in two days. This is Mozcamp, I&#8217;ve come to realize - all the energy, the great conversations, re-connecting with friends &amp; colleagues from all over the project and the world. It&#8217;s amazing once you&#8217;re there, and then you collapse from exhaustion once you&#8217;re out of it.</p>

<p>For those that didn&#8217;t make my talk due to some dubious excuse ( bwinton, lmandel, I&#8217;m look over in your direction ) here are the minimal slides I used:</p>

<p><a href="https://dl.dropbox.com/u/44296964/addons-navbar-mozcamp/index.html">https://dl.dropbox.com/u/44296964/addons-navbar-mozcamp/index.html</a></p>

<p>( <a href="https://github.com/canuckistani/addons-navbar-mozcamp">They&#8217;re on github as well</a>. ).</p>

<p>These slide are just background though - you can get the gist but I think I&#8217;ll need to make a more complete blog post about the Jetpack team&#8217;s work on improving Firefox UX for add-ons in a subsequent post, once I get back from a week &amp; a bit of vacation. Unfortunately, I <em>know</em> it wasn&#8217;t recorded because I had to unplug the mic at the beginning toget rid of some space-dub echo effect coming from the back of the room.</p>

<p>To sum up Mozcamp itself, it&#8217;s just amazing to me how much energy there is over here in Europe, and I was again impressed not just by the big communities like our Polish hosts, Mozilla Hispano, etc, but also by tiny contingents of people from places like Estonia or Latvia, or very new communities like Tunisia and Kenya. It also really feels like a lot of progress has been made since just last November and Berlin, and I think the <a href="https://reps.mozilla.org/">MozReps</a> program and all the hard work being done by staff and reps is really paying off.</p>

<p>More than that, Warsaw is the farthest east I&#8217;ve ever travelled ( until you hit Asia ) and it was humbling and impressive at the same time. I saw what I think of as three distinct Warsaws: the shining new towers and bustling city life in the center, the blocky and imposing Soviet-era buildings that are being renewed and repurposed by Poland&#8217;s economy, and hints and shreds of what remains from before 1945.</p>

<p>While I didn&#8217;t directly discuss this with any Poles, I did read up on some of <a href="http://en.wikipedia.org/wiki/Ochota_massacre">the history</a> and am a bit floored, at first by the horrifying tragedy, but also by the Poland I saw right in front of me, revitalized, full of web hackers, inventing the future alongside the rest of us. It&#8217;s really hard to connect these threads together, and a credit to the people of Poland that they&#8217;re thriving just 25 years after the Warsaw Pact unravelled. I&#8217;d really like to return some time when I have more than 72 hours to spend!</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Jetpack Work Week - London 2012]]></title>
    <link href="http://canuckistani.ca/blog/2012/09/01/jetpack-work-week/"/>
    <updated>2012-09-01T09:05:00-07:00</updated>
    <id>http://canuckistani.ca/blog/2012/09/01/jetpack-work-week</id>
    <content type="html"><![CDATA[<p><a target="_blank" href="http://www.flickr.com/photos/dtownsend/7902902958/in/photostream/lightbox/"><img src="http://farm9.staticflickr.com/8461/7902902958_e15e8b2518_z.jpg"></a></p>

<p>This past week the Jetpack team gathered at Mozilla&#8217;s <a target="_blank" href="http://www-dev.allizom.org/en-US/about/contact#map-europe-london">brilliant new offices</a> on St. Martin&#8217;s Lane in London for a much needed work week. It&#8217;s been a great week so far, and we&#8217;ve gotten a lot done in terms of both high-level discussions on the direction of the project as well as actual code.</p>

<p>Why was this week necessary? For starters, the Jetpack team is one of the more distributed teams in Mozilla, with team members spread from California and the west coast of Canada to Hungary. In particular, there is no city or Mozilla office in the world with more than 2 members - we&#8217;re spread out! If you also take into account that there are just a few hours of the day when the entire team is awake and working, it becomes even more critical that we gather periodically and work together in the same room.</p>

<p>Another reason why we needed to get together and sync up is that the Jetpack project is at an inflection point, as we are currently working on three key goals:</p>

<ol>
<li>The first goal is to finish our work to offer complete support in the SDK for Firefox on Android. While not all SDK apis make sense to support on mobile, it should be possible to create SDK-based mobile add-ons easily, and also create add-ons that target both desktop and mobile. The tracking bug for this work is <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=787718">bug 787718</a>.</li>
<li>The second goal is that we are actively working on landing add-ons <a target="_blank" href="http://people.mozilla.com/~shorlander/files/addons-in-toolbar-i01/addons-in-toolbar.html">user experience improvements</a> in Firefox that we think will dramatically improve the ability for add-ons to integrate easily with the Desktop Firefox UI. You can follow this work by subscribing to <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=695913">bug 695913</a>.</li>
<li>Finally and perhaps most importantly, we continue to execute on our plan to land the SDK apis in Firefox. If you&#8217;re interested in tracking this work, the tracking bug is <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=731779">bug 731779</a>. This move will have several positive impacts:

<ul>
<li>developers will no longer have to re-pack add-ons to maintain compatibility with newer Firefox versions.</li>
<li>SDK api implementations will only need to target a specific version of Firefox - our work to support multiple Firefox versions currently complicates our code in places.</li>
<li>Add-on developers and Firefox developers will be able to use the SDK&#8217;s apis with confidence, knowing these apis will be stable and included in Firefox itself.</li>
</ul>
</li>
</ol>


<p>We talked a lot about these three goals during the week and are currently planning how we work with the rest of the Firefox team to achieve them in the right order and with help from key Mozillians so that we have the best chance for success for each goal, one goal at a time.</p>

<p>Another big change is that our current Product Manger David Mason is moving on to greater responsibilities working with the Mozilla platform team. I&#8217;m very pleased to have the opportunity to step into this role in his place, but I know I speak for everyone on the team that we will all miss Dave&#8217;s prescence in the project and that we are all grateful for all of Dave and Myk&#8217;s hard work building the Jetpack team over the last couple of years.</p>

<p>During the week we also got a lot of code written, tested and reviewed, in fact we closed 16 SDK bugs including 7 P1 bugs. Some specific achievements included:</p>

<ul>
<li>thanks to <a target="_blank" href="https://twitter.com/ejpbruel">Eddy</a>, direct proxies are now in Firefox; this new platform capability will make a lot of Jetpack&#8217;s code simpler and more performant because we currently use content proxies extensively.</li>
<li>Eddy also gave an excellent talk on Spidermonkey internals and how they work, including performance tips! Everyone thought this was really interesting ( and at times terrifying ).</li>
<li><a target="_blank" href="https://twitter.com/TechnoBarje">Alex</a> implemented preference localization, landed some dramatic PageMod improvements, and fixed some leaks in url.js.</li>
<li><a target="_blank" href="https://twitter.com/erikvold">Eric</a> completed and has almost landed tabs api support for Firefox on Android.</li>
<li><a target="_blank" href="https://twitter.com/gozala">Irakli</a> investigated implementing an asynchronous file access api, a module for registering chrome uris in SDK add-ons, IndexedDB support, and also continued work on restructuring the SDK&#8217;s modules into the packageless layout we need in order to land in Firefox.</li>
<li><a target="_blank" href="https://twitter.com/zer0">Matteo</a> made great progress on implementing changes to Firefox&#8217;s navigation toolbar to support the navigation capabilities we are working on, and also landed module metadata to indicated module stability access.</li>
<li><a target="_blank" href="https://twitter.com/krizsanits">Gabor</a> landed support for expanded principals, and made progress on a new platform method to apply dynamic css changes to docuemnts.</li>
<li>Irakli, Will &amp; I hashed out an approach to how we deprecate older low-level apis and introduce news ones, including how we indicate in documentation or via a module&#8217;s behaviour whether it is experimental, supported or deprecated. This is critical as we continue to improve how the SDK is implemented, especially when other developers are using these lower-level modules.</li>
<li><a target="_blank" href="https://twitter.com/EnglishMossop/">Dave Townsend</a>, <a target="_blank" href="https://twitter.com/KWierso">Wes</a> &amp; I dug into bug lists and infrastructure issues, working to make sure that we&#8217;re communicating well with the resources in Mozilla we need to get our work done.</li>
<li><a target="_blank" href="https://twitter.com/dcm">Dave Mason</a> helped me lead a brain-storming session with the team in a side-project to come up with dramatically different / advanced add-on concepts. More on that later.</li>
<li>I&#8217;m sure I forgot some stuff!</li>
</ul>


<p>Stepping back I&#8217;m amazed at all the work we&#8217;ve been doing, and particularly excited about the three key goals I mentioned earlier. It is my belief that a year from now we will look back on these goals and see that they were a turning point not just for the Jetpack project, but for the notion of extensibility in Firefox in general. The Jetpack team is the team at Mozilla that works exclusively on Firefox extensibility; as Dave Townsend reminded us this week this means we must always be thinking about how to improve the add-on experience for Firefox users and add-on developers.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Gaia Rocking update]]></title>
    <link href="http://canuckistani.ca/blog/2012/08/10/gaia-rocking-update/"/>
    <updated>2012-08-10T12:13:00-07:00</updated>
    <id>http://canuckistani.ca/blog/2012/08/10/gaia-rocking-update</id>
    <content type="html"><![CDATA[<p>My gaia-rocking tool has been an interesting project, but also somewhat frustrating. Gaia is currently undergoing a high rate of change, and until recently QA at Mozilla was not testing the combination of B2G desktop builds ( which are a very recent  thing ) and Gaia.</p>

<p>This culminated in my attempts to get people going with app development using my system to test with at an apps hack day at FISL 13 in Brazil. Not surprisingly, the 3 main challenges I encountered were:</p>

<ol>
<li>the latest revision of Gaia did not work at all with the current desktop build. To fix this I temporarily fixed both versions at a level that ( mostly ) worked.</li>
<li>Gaia&#8217;s github repo is gigantic, and we were on a slow connection.</li>
<li>Gaia unfortunately has a dependency on xulrunner and xulrunner-sdk, and the latter is a rather large download that occurs when make is run for the first time.</li>
</ol>


<p>The last two problems we mostly mitigated through the judicious use of USB keys. We also ran into Linux distro compatibility issues, and I was reminded once again that writing software on OS X and expecting it to &#8216;just work&#8217; elsewhere is a fool&#8217;s errand. I think I need to work more on Windows and/or Linux so I can feel the unique pains of those platforms.</p>

<p>After returning from Brazil, I&#8217;ve participated in a few email threads about an effort to make this all a lot easier to use. There are two distinct use cases:</p>

<ol>
<li><p>Apps developers should have some easy way of creating an app and then running B2G desktop to test it.</p></li>
<li><p>The Gaia project itself needs a way to make sure that the latest stuff works with the other latest stuff, without necessarily having to muck about with a phone.</p></li>
</ol>


<p>You&#8217;d think these two aims would be aligned closely, but I&#8217;ve come to realize that they are not. Apps developers should have a small-as-possible download of B2G and Gaia that &#8216;Just Works&trade;&#8217; and includes a simple workflow for testing their own apps. The Gaia team wants the latest of everything, including <em>ALL THE BROKEN THINGS</em>.</p>

<p>Today I pushed some updates to Gaia-rocking that fix things for the Gaia team use case. As it happens in the current state it is also not a bad way to create and test apps, but there are no gurantees that this will stay the same. There is now daily smoke tests of gaia with the dekstop app though, so when things break they will be reported and fixed sooner.</p>

<p>As a slight nod to any apps developers using this, I also added support in the Makefile to create your own local.mk that can contain an override for the location of the Gaia source directory. So this alternate directory could be anywhere, and might contain a known-working version or your own development fork. If I were going to go about hacking on an app, here is what I would do:</p>

<figure class='code'><figcaption><span>Let&#8217;s get hacking</span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'>1. grab my own Gaia directory with a specific revision:
</span><span class='line'>curl -o gaia.zip https://github.com/mozilla-b2g/gaia/zipball/master
</span><span class='line'>// ...or whatever revision you want
</span><span class='line'>
</span><span class='line'>2. unzip gaia, create a <span class="s1">&#39;my_apps&#39;</span> subdirectory, <span class="k">then </span>copy the template app into the my_apps subdirectory:
</span><span class='line'>unzip gaia.zip <span class="o">&amp;&amp;</span> <span class="nb">cd </span>mozilla-b2g-gaia-* <span class="o">&amp;&amp;</span> mkdir my_apps <span class="o">&amp;&amp;</span> cp -r ./test_apps/template ./my_apps/appname
</span><span class='line'>
</span><span class='line'>3. create local.mk in the gaia directory so that the Gaia make <span class="nb">command </span>includes your apps:
</span><span class='line'><span class="nb">echo</span> <span class="s1">&#39;GAIA_APP_SRCDIRS?=apps test_apps showcase_apps my_apps&#39;</span> &gt; ./local.mk
</span><span class='line'>
</span><span class='line'>4. in the gaia-rocking directory, also create a local.mk file that sets the Gaia <span class="nb">source </span>directory to wherever you unzipped your Gaia from
</span><span class='line'><span class="nb">echo</span> <span class="s1">&#39;GAIA_SRC=/path/to/new/gaia/directory&#39;</span>
</span></code></pre></td></tr></table></div></figure>


<p>This should get you set up to run B2G Desktop with Gaia in a custom directory, and load your new app into the appcache along with the rest of Gaia&#8217;s apps:</p>

<p><img src="https://dl.dropbox.com/u/1212936/gaia_custom_app.png"></p>

<p>This is too many steps, I agree. But, once this setup is done, all you need to do is hack one your app and run &#8216;make run&#8217; in the gaia-rocking directory to test in the Gaia environment.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Brazil Travel Notes]]></title>
    <link href="http://canuckistani.ca/blog/2012/08/06/travel-hacking-brazil/"/>
    <updated>2012-08-06T11:23:00-07:00</updated>
    <id>http://canuckistani.ca/blog/2012/08/06/travel-hacking-brazil</id>
    <content type="html"><![CDATA[<p><a target="_blank" href="https://plus.google.com/photos/101120324269279399494/albums/5773264979344888049"><img src="https://lh4.googleusercontent.com/-DhfzumT1byE/UBleutISFGI/AAAAAAAABvg/duRQc4RUQ7s/s978/PANO_20120801_130636.jpg"></a></p>

<p><em>Click on the image to view some more photos</em>.</p>

<p>I just got back from 2 weeks in Brazil and wanted to share some of my mistakes &amp; observations in the hope that you, my fellow Mozillians will learn from my foolishness. Most of this info has to do specifically with booking flights and other sorts of transport so if you&#8217;re looking for a crazy Sao Paulo bar-hopping story, it ain&#8217;t here.</p>

<h2>Booking flights ( for Canadians )</h2>

<p>The good news for Canadian Mozillians is that there is a direct, daily flight from Toronto to Sao Paulo - AC 090 / 091. You should be aware this flight is a code-share with TAM and seems to be difficult to book via Egencia as an AC flight unless you book well in advance.</p>

<p>Booking as a TAM flight instead introduces various problems:</p>

<ul>
<li>you cannot do seat selection via AC or Egencia</li>
<li>you cannot apply for upgrades until you check in at the Airport</li>
<li>this flight is on a Boeing 767 ( <a href="http://is.gd/JsjNEp">http://is.gd/JsjNEp</a> )</li>
<li>other legs of the flight ( Toronto -> Vancouver ) were booked as Tango class, and could not be upgraded.</li>
</ul>


<p><em>Lesson:</em> code-shares are evil! Book early! Be flexible on dates!</p>

<p><em>Cautionary note</em>: on the return flight I was not able to upgrade, but was assured that I had a &#8216;really good seat in an exit row&#8217;. The seat they had assigned me to was, instead, the worst airline seat I&#8217;ve ever gotten. Row 18 on a 767 is exit row, sure, but the seat does <em>not</em> recline, does not seem to have appreciably more legroom, and is right next to the galley. I got zero sleep, and had the added bonus of being able to smell all the wonderful food being served for dinner in 1st class as it was being prepared.</p>

<p><em>Lesson:</em> Always check seatguru.com!</p>

<p>If I was to do this all over again, I should have tried juggling my travel dates to get the AC flight instead of accepting egencia&#8217;s TAM code-share.</p>

<h3>Cash</h3>

<p>You will need some cash! But not too much! There are a number of bank machines near the outside doors at arrivals in Guarulhos, including an HSBC ATM that worked well for me. Get 100BRL to start, and try not to carry too much at any one time.</p>

<h3>Transport to the city</h3>

<p>There is a pre-paid voucher you can get from a kiosk near the arrivals door - use this, and get in one of the white cabs queued nearby. Make sure that between you, the kiosk people and the dirver there is a good shared understanding of where your hotel is. Sao Paulo is <em>huge</em> and there can be several hotels for a given hotel chain.</p>

<h3>Sim cards</h3>

<p>The Vivo SIM card I used in Brazil worked quite well, all things considered. Internet access in generl in Brazil is slower than you&#8217;re used to, but it can be incredibly useful to have access to google maps on a smart phone, provided you&#8217;re careful about public phone use. Which leads me to&#8230;</p>

<h3>Phones</h3>

<p>People routinely get mugged in Sao Paulo for their mobile phones, which are probably much cheaper and crappier than the Galaxy Nexus or SII you&#8217;re carrying around. Don&#8217;t take out your phone in public unless necessary, and be very aware of your surroundings. While I was in Brazil, Mozillian Luca Toledo was mugged and had her phone stolen in Guarulhos Airport!</p>

<h3>Transport around the city</h3>

<p>We took a ton of taxi rides, sometimes for fairly short distances. We were cautioned by local contacts to do this to ensure our safety, and we were unwilling to take chances even though the area around our hotel felt <em>very</em> affluent. The taxis we rode in all preferred cash, often drove insanely fast, and universally were fuelled with natural gas tanks. Personally, the constant faint smell of natural gas exhaust made me quite naseous on longer rides!</p>

<h3>Mozilla Brazil community!</h3>

<p>I cannot overstate how great it is and how much easier this past trip was on me because I was able to rely on the help and guidance of Mozillians in Brazil. All of our community members were great, but I&#8217;d like to particularly call out Luca Toledo, Fabio Magnoni, Sergio Oliveira, and Clauber Stipkovic for all the help, translation, mascot-wearing, introductions, insights and inspiring passion. I was reminded yet again how fortunate I are to be a part of the Mozilla project - we have this unique force multiplier that makes anything we do in a place like Brazil not just easier, but more effective as well. Moz BR rocks!</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Running B2G Desktop all over the place]]></title>
    <link href="http://canuckistani.ca/blog/2012/08/02/running-b2g-desktop-all-over-the-place/"/>
    <updated>2012-08-02T11:45:00-07:00</updated>
    <id>http://canuckistani.ca/blog/2012/08/02/running-b2g-desktop-all-over-the-place</id>
    <content type="html"><![CDATA[<p>Last Thursday we staged a hugely successful Apps Hack Day in the Mozilla room at <a href="http://softwarelivre.org/fisl13">FISL 13</a>. Was it well attended? We had a massive line-up at 10AM and had to expand to an extra room! Was it well-recieved? Definitely, yes. FISL attracts FOSS enthusiasts from all over Brazil ( and especially students ) and the interest in Mozilla in general and Firefox OS in particular is very, <em>very</em> high.</p>

<p>As usual, we started out with a few quick talks to get people up to speed, and then spent the rest of the day helping out and answering questions. My Portuguese is <em>non-existent</em>, so I was very happy that we had Mozillians Fabio Magnoni ( from the Brazilian community ) and Artur Adib ( labs engineer ) to give talks in Portuguese. I gave a quick lightning talk in English on how to run B2G desktop to test html5 apps in Firefox OS&#8217; environment.</p>

<p>Here&#8217;s the video:</p>

<iframe width="420" height="315" src="http://www.youtube.com/embed/E1jpt0XZUVk" frameborder="0" allowfullscreen></iframe>


<p>Here are the notes from my lightning talk:</p>

<pre><code># Testing HTML5 Apps on B2G Desktop
    -&gt; Jeff Griffiths, Mozilla

Online: https://etherpad.mozilla.org/jeffg-gaia-desktop-hacking
    1. get desktop build
        -&gt; http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central/
    2. get gaia
        -&gt; https://github.com/mozilla-b2g/gaia **
        -&gt; make # run make once to trigger the xulrunner download
        -&gt; git checkout -b working 07edca0 # a working revision of gaia
    3. create local.mk
        -&gt; add 'GAIA_APP_SRCDIRS?=apps test_apps showcase_apps my_apps'
    4. create 'my_apps' directory
    5. cp -r test_apps/template ./my_apps/
    7. mv my_apps/template my_apps/$some_cool_name
    6. HACK!!
    7. TEST!!

Resources:

    1. Linux: http://informationisart.com/11/
    2. Windows: https://github.com/sihorton/b2g-desktop-profile-installer/
    3. Mac: https://github.com/canuckistani/gaia-rocking
    4. https://developer.mozilla.org/en/Apps 
    5. twitter: @mozhacks @canuckistani
</code></pre>

<p>One thing that has become very apparent to me while working on <a href="https://github.com/canuckistani/gaia-rocking">gaia-rocking</a>, preparing for this talk, and trying to get people going with B2G Desktop during the rest of the day is that the experience can be <em>very</em> rough. The B2G and Gaia teams are focused on one thing only right now, and that is shipping basecamp. This means that Gaia changes all the time, and B2G desktop is not yet well-tested.</p>

<p>Through various conversations with Dietrich and other team members though, I expect this to change and I am hopeful that once the hurricane of basecamp passes we&#8217;ll see all sorts of cool ideas come to fruition, including better use of Firefox&#8217;s devtools, and easier set-up of Gaia and desktop builds.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Running Gaia like a BOSS ( Pull requests welcome! )]]></title>
    <link href="http://canuckistani.ca/blog/2012/07/16/running-gaia-like-a-boss/"/>
    <updated>2012-07-16T22:13:00-07:00</updated>
    <id>http://canuckistani.ca/blog/2012/07/16/running-gaia-like-a-boss</id>
    <content type="html"><![CDATA[<p><img src="https://dl.dropbox.com/u/1212936/gaia-desktop.png"/></p>

<p style="font-size: 110%; color: red;">[[UPDATE: if you have trouble running Gaia with this tool ( or, at all ), you may need to run using &#8216;sudo&#8217;.]]</p>


<p>A week or so ago <a href="https://github.com/peregrinogris">Hernan Colmeiro</a> blogged about using <a href="http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central/">B2G Desktop</a> to <a href="http://www.peregrinogris.com.ar/4-Shedding-some-light-on-Firefox-OS">run Gaia on a desktop computer</a>, amongst other things. Running Gaia in this way is compelling as a way to test &amp; preview apps in the Gaia environment: you get the correct display size as well as the correct app launch &amp; dismissal behaviour.</p>

<p>But&#8230; it is a little awkward to get going. instructions for manually setting this up are of course <a href="https://wiki.mozilla.org/Gaia/Hacking#Running_B2G">on the wiki</a>, but there is still a lot of setup and implied foreknowledge about terminals, etc. I created the <a href="https://github.com/canuckistani/gaia-rocking">gaia-rocking repo</a> to help this ( and Hernan kindly linked to it! ) but gaia-rocking doesn&#8217;t quite rock, and currently it doesn&#8217;t rock at all on Linux or Windows. It needs help!</p>

<p>A short list of things I need to do this week:</p>

<ul>
<li>Windows and Linux support. Just running on Macs is clearly not good enough.</li>
<li>some way of easily pushing a single app into Gaia for testing</li>
<li>maybe an embedded web server that serves up apps the right way? Sort of Marketplace-lite.</li>
<li><a href="https://github.com/mozilla/mortar">Mortar</a> integration ( unsure completely what that means&#8230; )</li>
<li>I&#8217;m thinking of porting the Makefile to coffeescript, just for fun.</li>
</ul>


<p><a href="https://github.com/canuckistani/gaia-rocking/pulls">Pull requests welcome</a>!</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Coffee &amp; Cake]]></title>
    <link href="http://canuckistani.ca/blog/2012/07/15/coffee-and-cake/"/>
    <updated>2012-07-15T22:34:00-07:00</updated>
    <id>http://canuckistani.ca/blog/2012/07/15/coffee-and-cake</id>
    <content type="html"><![CDATA[<p>I posted <a href="http://canuckistani.ca/blog/2012/07/08/meta/">recently</a> about the sudden move over to <a href="http://octopress.org/">Octopress</a>. The slightly frustrating thing about using Octopress is the ruby angle, at least in the sense that it took a while to get a workable install going. This is probably mostly my fault, somewhat Apple&#8217;s fault, and maybe a little bit about ruby. Some of it was also Jekyl though, and the workflow in Jekly / Octo is also a little awkward.</p>

<p>The most irritating bit is this:</p>

<figure class='code'><figcaption><span>Friction</span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'>rake new_post<span class="o">[</span><span class="s2">&quot;some title here&quot;</span><span class="o">]</span>
</span></code></pre></td></tr></table></div></figure>


<p>I&#8217;m whining, sure, but this is just more punctuation than I really need. So because I&#8217;m a hacker first, I decided to fix this. What did I do? I didn&#8217;t go off to learn rake, fork Octopress and make a pull request - it&#8217;s even more stupid than that. I learned ( bits of ) coffeescript so I could hack on a Cakefile to wrap the Rakefile. I know, idiotic, but fun nonetheless:</p>

<figure class='code'><figcaption><span>Sugar on top</span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
</pre></td><td class='code'><pre><code class='coffeescript'><span class='line'><span class="p">{</span><span class="nx">spawn</span><span class="p">,</span> <span class="nx">exec</span><span class="p">}</span> <span class="o">=</span> <span class="nx">require</span> <span class="s">&#39;child_process&#39;</span>
</span><span class='line'><span class="p">{</span> <span class="nx">ask</span> <span class="p">}</span> <span class="o">=</span> <span class="nx">require</span> <span class="s">&#39;ask&#39;</span>
</span><span class='line'>
</span><span class='line'><span class="nx">task</span> <span class="s">&#39;new&#39;</span><span class="p">,</span> <span class="s">&#39;create a new blog post&#39;</span><span class="p">,</span> <span class="o">-&gt;</span>
</span><span class='line'>  <span class="c1"># get stdin here...</span>
</span><span class='line'>  <span class="nx">ask</span> <span class="s">&#39;New post title: &#39;</span><span class="p">,</span> <span class="sr">/.+/</span><span class="p">,</span> <span class="nf">(name) -&gt;</span>
</span><span class='line'>      <span class="nx">exec</span> <span class="s">&#39;rake new_post[&quot;&#39;</span><span class="o">+</span><span class="nx">name</span><span class="o">+</span><span class="s">&#39;&quot;]&#39;</span><span class="p">,</span> <span class="nf">(err, stdout, stderr) -&gt;</span>
</span><span class='line'>          <span class="k">throw</span> <span class="nx">err</span> <span class="k">if</span> <span class="nx">err</span>
</span><span class='line'>          <span class="nv">s = </span><span class="sr">/^.+\: (.+)\n$/</span><span class="p">.</span><span class="nx">exec</span><span class="p">(</span><span class="nx">stdout</span><span class="p">)</span>
</span><span class='line'>          <span class="nv">path = </span><span class="nx">s</span><span class="p">[</span><span class="nx">s</span><span class="p">.</span><span class="nx">length</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span>
</span><span class='line'>          <span class="nv">forked = </span><span class="nx">exec</span> <span class="s">&quot;subl </span><span class="si">#{</span><span class="nx">path</span><span class="si">}</span><span class="s">&quot;</span>
</span><span class='line'>          <span class="nx">process</span><span class="p">.</span><span class="nx">exit</span> <span class="mi">0</span>
</span></code></pre></td></tr></table></div></figure>


<p>The key bits are:</p>

<ul>
<li>the wrapper task removes the punctuation</li>
<li>as an added bonus, the callback opens the new markdown file in my editor!</li>
</ul>


<p>This was also the first non-demo / hello-world-ish code I&#8217;ve written in Coffeescript, and it&#8217;s not bad! There are things that definitely feel a bit awkward ( chaining methods, how callbacks work, etc ) but I think that is mostly just JS muscle memory I need to get over.</p>

<p>Another inspiration for trying on Coffeescript for size was this recent post by Rob Conery called &#8217;<a href="http://wekeroad.com/2012/07/04/try-it-quiet">Try it quiet</a>&#8217;, and the accompanying video on Vimeo:</p>

<iframe src="http://player.vimeo.com/video/43548699" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>


<p> <div style="font-size: 75%;"><em><a href="http://vimeo.com/43548699">Rob Conery - Real World NodeJS - Creating the Tekpub API</a> from <a href="http://vimeo.com/ndcoslo">NDCOslo</a> on <a href="http://vimeo.com">Vimeo</a></em>.</div></p>

<p>All of the Mocha tests are written in Coffeescript, and the cleaner syntax really clarifies the tests and expectations. It&#8217;s worth watching and even hacking along to if you&#8217;re unfamiliar with the bits of node he&#8217;s showing off. I was particularly charmed with how he runs mocha -w in a terminal and, as he implements things, more and more tests pass. Of course, you can&#8217;t beat Daft Punk live for a soundtrack either! :D</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Crappy tab 10.1? -> AOKP]]></title>
    <link href="http://canuckistani.ca/blog/2012/07/15/crappy-tab-10-dot-1-%3E-aokp/"/>
    <updated>2012-07-15T15:46:00-07:00</updated>
    <id>http://canuckistani.ca/blog/2012/07/15/crappy-tab-10-dot-1->-aokp</id>
    <content type="html"><![CDATA[<p style="color: red;"><strong>[[ Disclaimer!! Do this at your own risk! I am not responsible, here be dragons, etc&#8230; ]]</strong></p>


<p>If you have a Samsung Galaxy Tab 10.1 laying around the house ( and I suspect a large number of Mozillians do! ), you probably don&#8217;t use it for much. The OS is dated and not well supported by most apps, and the performance is awful.</p>

<p>I just flashed mine with a newer Android 4-based ROM called AOPK ( Android Open Kang Project, dunno? ) that not only updates and simplifies the OS, but also allows you a lot of control over the performance.</p>

<p>Here&#8217;s a peek at the desktop ( with some stuff moved around of course&#8230; )</p>

<p><img src="https://dl.dropbox.com/u/1212936/aopk-desktop.png"/></p>

<p>Here&#8217;s the meaty part, the custom ROM control lets you overclock the cpu as high as 1400MHZ!</p>

<p><img src="https://dl.dropbox.com/u/1212936/aopk-cpu.png"/></p>

<p>I toyed with 1400 but things got sketchy. 1200MHZ seems to be the sweet spot, and between that and a slimmer, more modern Android version the &#8216;ol Tab 10.1 actually feels pretty snappy? The important things work, from my point of view anyway: Netflix, Kindle, Elder Signs Omens, Hipmunk.</p>

<p>Some links if you want to look into this:</p>

<ul>
<li><a href="http://forum.xda-developers.com/showthread.php?t=1090289">You&#8217;ll need the latest version of Clockworkmod</a></li>
<li><a href="http://aokp.co/index.php/releases/_/milestone-6-r27">AOKP Milestone 6 download</a></li>
<li><a href="http://theunlockr.com/2012/05/11/how-to-flash-clockworkmod-recovery-on-the-wifi-only-galaxy-tab-10-1/">This looks like a pretty good tutorial</a></li>
</ul>


<p>Also, I needed a windows install to use Odin to initially install the Clockworkmod recovery kernel. Once I got there, I switched to using File Expert to host an ftp server on the tablet in order to transfer files from my Mac, and CWM itself to make backups and flash ROMs. There are probably cooler ways to do this ( ROM Manager, etc )?</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Meta]]></title>
    <link href="http://canuckistani.ca/blog/2012/07/08/meta/"/>
    <updated>2012-07-08T14:06:00-07:00</updated>
    <id>http://canuckistani.ca/blog/2012/07/08/meta</id>
    <content type="html"><![CDATA[<p>I&#8217;ve been threatening to do this for months, this is my blog running using <a href="http://octopress.org/">Octopress</a>, written in markdown and served as static files and served at potentially breathtaking speeds, specially compared to Drupal. Honestly, the hardest bits were an afternoon of swearing and futzing with my ruby environment a few weeks ago so I could get Jekyll ( and the Drupal migration stuff ) working properly. I <em>think</em> the content migration went well, and I&#8217;m too lazy to do much more than a cursory check.</p>

<p>This ain&#8217;t pretty, or even particularly fast ( yet ), but the posts are all here  albeit at different urls and I put in a few sensible redirects:</p>

<ul>
<li>the url PMO uses redirects properly, so PMO users should see this</li>
<li>all domains on this box that aren&#8217;t already configured somehow in Nginx redirect to the main page.</li>
<li>www. -> the bare url, because I&#8217;m minimalist like that.</li>
</ul>


<p>I&#8217;m not doing anything super-cool like hosting this in github or dropbox, I am still running a Linode machine because, hell, i like to mess around with redis, python and the like still even though i don&#8217;t really get paid to code anymore.</p>

<p>I&#8217;m pretty pleased with the system &amp; workflow, especially the code highlighting:</p>

<figure class='code'><figcaption><span>Good Ol&#8217; FizzBuzz</span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
</pre></td><td class='code'><pre><code class='javascript'><span class='line'><span class="kd">function</span> <span class="nx">fzbz</span><span class="p">(</span><span class="nx">n</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>  <span class="k">for</span> <span class="p">(</span><span class="kd">var</span> <span class="nx">i</span> <span class="o">=</span> <span class="nx">n</span> <span class="o">-</span> <span class="mi">1</span><span class="p">;</span> <span class="nx">i</span> <span class="o">&gt;=</span> <span class="mi">0</span><span class="p">;</span> <span class="nx">i</span><span class="o">--</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>      <span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
</span><span class='line'>          <span class="kd">var</span> <span class="nx">s</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span><span class="p">;</span>
</span><span class='line'>          <span class="k">if</span> <span class="p">(</span><span class="nx">i</span> <span class="o">%</span> <span class="mi">3</span> <span class="o">===</span> <span class="mi">0</span><span class="p">)</span> <span class="nx">s</span> <span class="o">+=</span> <span class="s1">&#39;Fizz&#39;</span><span class="p">;</span>
</span><span class='line'>          <span class="k">if</span> <span class="p">(</span><span class="nx">i</span> <span class="o">%</span> <span class="mi">5</span> <span class="o">===</span> <span class="mi">0</span><span class="p">)</span> <span class="nx">s</span> <span class="o">+=</span> <span class="s1">&#39;Buzz&#39;</span><span class="p">;</span>
</span><span class='line'>          <span class="k">if</span> <span class="p">(</span><span class="nx">s</span><span class="p">.</span><span class="nx">length</span> <span class="o">===</span> <span class="mi">0</span><span class="p">)</span> <span class="nx">s</span> <span class="o">=</span> <span class="nx">i</span><span class="p">;</span>
</span><span class='line'>          <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">s</span><span class="p">);</span>
</span><span class='line'>      <span class="p">})(</span><span class="nx">i</span><span class="p">)</span>
</span><span class='line'>  <span class="p">};</span>   
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>


<p>&#8230;back in the day I literally lost <em>weeks</em> to getting good code highlighting working reliably on Drupal with Geshi. This was so easy in comparison it makes me want to buy a fixie.</p>

<p>If I get some time on planes &amp; whatnot over the next few weeks I&#8217;ll do some additional work like:</p>

<ul>
<li>shed the default theme. I think I&#8217;m to old and crufty to go for something as fancy as <a href="http://jeditoolkit.com/">Irakli&#8217;s</a>, but I&#8217;d like to have something a bit more, er, <em>unique</em>.</li>
<li>improve the performance, I really liked <a href="http://blog.jphpsf.com/2012/06/12/squeezing-octopress-for-faster-load-times/">this writeup of techniques</a> for really drilling into static file server perf.</li>
<li>comments using disqus, I suppose.</li>
</ul>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[New server]]></title>
    <link href="http://canuckistani.ca/blog/2012/02/18/new-server/"/>
    <updated>2012-02-18T00:00:00-08:00</updated>
    <id>http://canuckistani.ca/blog/2012/02/18/new-server</id>
    <content type="html"><![CDATA[<p><em><strong>TL;DR</strong></em>: my linode got hacked somehow so I moved this blog to a new server.*</p>

<p>Last week I got a notice from the helpful folks at Linode informing me that my machine was trying to brute-force other machines on their network. Essentially, this is what I get for having a weak password on one of the accounts ( the attacker never got root access ) and running sshd on port 22.</p>

<p>For a variety of reasons, I didn&#8217;t get around to completely paving the old box until today. I just changed the sshd port, changed all the passwords once that was done, checked out a few things on the box, and left it. Last night I built a new linode, copied essential site data over and got everything running. About a half an hour ago I flipped ip addresses between the two machines, and that&#8217;s why you just got a bunch of old blog posts in your rss reader.</p>

<p>Sorry! It&#8217;s literally been the kind of week where getting my server hacked by some bored russian teenager is just a minor distraction.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Launching multiple Firefox profiles on OS X using applescript]]></title>
    <link href="http://canuckistani.ca/blog/2011/12/24/launching-multiple-firefox-profiles-on-os-x-using-applescript/"/>
    <updated>2011-12-24T00:00:00-08:00</updated>
    <id>http://canuckistani.ca/blog/2011/12/24/launching-multiple-firefox-profiles-on-os-x-using-applescript</id>
    <content type="html"><![CDATA[<p><a href="http://blog.ascher.ca/" target="_blank">David</a> asked me the other day to blog about my applescript hack for launching different Firefox profiles in separate processes. I consider this to be, at best, a hack, but it&#8217;s a pretty productive hack, so here we go!</p>

<p>Step 1: create a new profile:</p>

<pre>/Applications/Aurora.app/Contents/MacOS/firefox -ProfileManager</pre>


<p>Just click on &#8216;Create Profile&#8217;, name the profile ( say, Firebug, for no particular reason ), and click ok. Make sure when you get back to the ProfileManager you select &#8216;default&#8217; again:</p>

<p><img src="http://dl.dropbox.com/u/1212936/ff_profiles/profilemanager.png"></p>

<p>Firefox will instead select the <em>new</em> profile, which is not what we want.</p>

<p>Step 2: create the applescript</p>

<p>Open the applescript editor and paste in this code:</p>

<p>( <strong>Update</strong> : Peter Cramer was nice enough to send me a patch for this script that solves the focus problem. )</p>

<pre>
do shell script "/Applications/FirefoxNightly.app/Contents/MacOS/firefox -jsconsole -P Nightly &> /dev/null &"

delay 2

tell application "System Events" to keystroke tab using {command down, shift down}
</pre>


<p>You&#8217;ll note, this isn&#8217;t <em>really</em> much applescript, what we&#8217;re really doing is just shelling out to fire up Aurora.app and supply the correct argument for -P.</p>

<p>Step 3: create the .app bundle</p>

<p>In the applescript editor, select Edit / Save As and select &#8216;Application&#8217; under the &#8216;File format&#8217; drop list. This will create a .app bundle that acts just like any other OS X application. In particular, the name you gave it is nicely indexed by Spotlight, so you can launch it by triggering Spotlight ( or butler, or Quicksilver? ) and typing some fragment of the filename:</p>

<p><img src="http://dl.dropbox.com/u/1212936/ff_profiles/save_as_app.png"></p>

<p>You should now be able to launch Aurora ( or whichever channel you pref ) running a specific profile by double-clicking on this .app. This isn&#8217;t how I use it though, instead I tend to launch the .app via Spotlight:</p>

<p><img src="http://dl.dropbox.com/u/1212936/ff_profiles/spotlight.png"></p>

<p><del><em>Caveat</em>: the one problem with this technique is that Firefox is launched dead-last in the applications list, so you will need to manually switch to it. It&#8217;s slightly annoying, but I theorize that it is no less annoying than having to learn enough Applescript to work around it. I <em>did</em> look into this for a bit the other night with no luck. Patches / suggestions welcome!</del> ( See note above regarding a workaround for the focus issue. )</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[HOWTO: Mobile data access in Berlin, Germany]]></title>
    <link href="http://canuckistani.ca/blog/2011/11/10/howto-mobile-data-access-in-berlin-germany/"/>
    <updated>2011-11-10T00:00:00-08:00</updated>
    <id>http://canuckistani.ca/blog/2011/11/10/howto-mobile-data-access-in-berlin-germany</id>
    <content type="html"><![CDATA[<p>I&#8217;m in Berlin this week to attend this weekend&#8217;s MozCamp EU; because I&#8217;m a dork I really really like having some sort of local data network access, in particular for using google maps on my unlocked Android phone. Having mobile data access has completely changed how I travel, I&#8217;m much more likely to just really explore a place than I would without access to google maps. So here&#8217;s my process for getting cheap mobile data in Berlin:</p>

<ol>
<li>took the U6 -> S line trains to Alexanderplatz to get to the Alexa Mall ( http://g.co/maps/rv2hz, see map below )</li>
<li>went to Media Markt ( think German Best Buy ), bought a FONIC.de 10 euro SIM card</li>
<li>back at the Tryp hotel where I&#8217;m staying, I registered online with fonic.de to activate the sim. There is no English localization of the site and my German is terrible so I had a second window open to google translate to get through it.</li>
<li>in order for the data plan to really start, I had to set my Android phone to &#8216;data roaming&#8217; mode.</li>
</ol>


<p>This will get you a flat rate of 500MB of data, plus relatively cheap text and calling! Sadly, you do need to jump online to register the sim, this is definitely less convenient than what I got last month in London, where they sell flat-rate data sims from vending machines at Heathrow.</p>

<p>Alexa / Media Markt:</p>

<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.ca/maps?q=Alexa+Berlin&amp;ie=UTF8&amp;hl=en&amp;view=map&amp;cid=2055121840354938119&amp;hq=Alexa+Berlin&amp;hnear=&amp;ll=52.519745,13.414306&amp;spn=0.006295,0.006295&amp;t=m&amp;vpsrc=0&amp;iwloc=A&amp;output=embed"></iframe>


<br /><small><a href="http://maps.google.ca/maps?q=Alexa+Berlin&amp;ie=UTF8&amp;hl=en&amp;view=map&amp;cid=2055121840354938119&amp;hq=Alexa+Berlin&amp;hnear=&amp;ll=52.519745,13.414306&amp;spn=0.006295,0.006295&amp;t=m&amp;vpsrc=0&amp;iwloc=A&amp;source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[FSOSS Rocked!]]></title>
    <link href="http://canuckistani.ca/blog/2011/11/01/fsoss-rocked/"/>
    <updated>2011-11-01T00:00:00-07:00</updated>
    <id>http://canuckistani.ca/blog/2011/11/01/fsoss-rocked</id>
    <content type="html"><![CDATA[<p>This past week/end I was fortunate to be able to attend Seneca College&#8217;s awesome annual Free Software &amp; Open Source Symposium ( FSOSS for short ). This year marked ten years of FSOSS, and I was really impressed with the diversity of talks presented, as well as the irrepressible energy of the Seneca students participating and volunteering. I&#8217;d like to thank all of the students and staff for putting in the time to produce a great event; I know how gruelling this can be but it was totally worth it!</p>

<p>On Friday I arrived early and met up with fellow Mozillian <a href="http://twitter.com/#!/armenzg">Armen Zambrano</a> to set up and man the Mozilla table:</p>

<p><a href="http://www.flickr.com/photos/anisotropic/6288443683/in/photostream/" target="_blank"><img src="http://farm7.static.flickr.com/6051/6288443683_fa60b2f72e_d.jpg"/></a></p>

<p>See all that swag on the table? It was gone quite quickly, especially the hacky sacks. Armen and I were at the table all day talking to students and attendees, engaging with them on questions ranging from Thunderbird UX and rapid release schedules to Mozilla&#8217;s various student-focused programs such as internships, recent-grad positions and <a href="http://studentreps.mozilla.org/en/">Student Reps</a>. Rarely was it quiet:</p>

<p><a href="http://www.flickr.com/photos/anisotropic/6298846643/in/photostream" target="_blank"><img src="http://farm7.static.flickr.com/6103/6298846643_df1737cc5c_d.jpg"/></a></p>

<p>On Saturday we decided not to man the table - because we were out of swag! Also, Armen and I were both speaking in the morning. For Armen&#8217;s perspective, please check out his blog post here:</p>

<p><a href="http://armenzg.blogspot.com/2011/11/how-fsoss-was-for-me.html">http://armenzg.blogspot.com/2011/11/how-fsoss-was-for-me.html</a></p>

<p>At 10AM I gave a talk to about 30 people introducing them to the SDK and it&#8217;s various features. If you&#8217;re curious the slides are here:</p>

<p><a href="http://talks.canuckistani.ca/fsoss/">http://talks.canuckistani.ca/fsoss/</a></p>

<p>FSOSS volunteers recorded the talk, so hopefully I&#8217;ll get a copy back to hook up with my slides using <a href="http://popcornjs.org/">popcorn.js</a>. As well, the demos included in the talk will only work if you are running Firefox 7+ and have installed this helper add-on:</p>

<p><a href="http://talks.canuckistani.ca/fsoss/addon/fsoss-example.xpi">http://talks.canuckistani.ca/fsoss/addon/fsoss-example.xpi</a></p>

<p>There were a number of other talks by Mozillians:</p>

<ul>
<li>Ehsan Akhgari: <a href="http://fsoss.senecac.on.ca/2011/node/113">How Web Browsers Work</a></li>
<li>Lawrence Mandel: <a href="http://fsoss.senecac.on.ca/2011/node/58">XBMC</a></li>
<li>David Seifried: <a href="http://fsoss.senecac.on.ca/2011/node/79">Popcorn.js &amp; Popcorn-Maker</a></li>
<li>Armen Zambrano: <a href="http://fsoss.senecac.on.ca/2011/node/108">How to ship Open Source software to half a billion users</a></li>
</ul>


<p>On Saturday afternoon Ehsan, Lawrence and I helped facilitate a Mozilla-focused BOF session during the &#8216;unconference&#8217; section of the schedule. The conference was interesting and free-wheeling, covering such topics as #OWS, rapid release, enterprise support and how Mozilla works with Linux distributions.</p>

<p>The thing that impressed me the most about FSOSS was learning more from the Seneca students &amp; faculty about their programs; I wish more educational institutions would follow their lead and get their students working on open source.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[The death of share on Google Reader: an opportunity?]]></title>
    <link href="http://canuckistani.ca/blog/2011/10/22/the-death-of-share-on-google-reader-an-opportunity/"/>
    <updated>2011-10-22T00:00:00-07:00</updated>
    <id>http://canuckistani.ca/blog/2011/10/22/the-death-of-share-on-google-reader-an-opportunity</id>
    <content type="html"><![CDATA[<p><img src="http://blogs-images.forbes.com/erikkain/files/2011/10/google-reader-e1319205943437.jpg"/></p>

<p>E.D. Kain over at <a href="http://www.forbes.com/sites/erikkain/2011/10/21/the-unsocial-network-why-google-is-wrong-to-kill-off-google-reader/">Forbes</a> write a succinct piece on the utility of Google Reader:</p>

<blockquote>Not in the sense that people in Reader are anti-social so much as the point is to harbor a small enclave of carefully selected people and create a safe-haven of sorts where that “carefully constructed human curated” list of shares and insights can flourish. In Reader, you don’t go after as many friends as possible. You certainly don’t see anyone from high school. Nobody shares photos of their kids. The discussions that do blossom are almost always very smart and focused. It’s the internet if the world were a more prefect place.</blockquote>


<p>This neatly sums up my own ( very heavy ) use of Reader with a very short list of people who I use as filters for the wider world. We few merry nerds share constantly and are enriched by each other&#8217;s subscriptions; we forget conveniently that all this time spent clicking and sharing further deepens Google&#8217;s understanding of our online lives. Now they want to pull all that into Google+, which all of us are on but none of us actually use.</p>

<p>The thing is, we are probably smart enough to build our own, and I&#8217;m pretty sure we aren&#8217;t alone. If I was going to re-do Reader as a project for my own particular purposes, it would be very simple:</p>

<ul>
<li>import opml</li>
<li>bookmarklets or browser extensions to handle new subscriptions</li>
<li>share and comment</li>
<li>some sort of &#8216;friend&#8217; discovery using twitter, which I choose because all of the people I share posts with on Reader, I also follow on twitter. In fact, this could just be a twitter list you create, assuming the twitter api provides access to those sorts of things.</li>
<li>self-hosted. This doesn&#8217;t need to be internet scale. In fact, it could be <a href="http://unhosted.org/">unhosted</a>, <em>and</em> an <a href="https://apps.mozillalabs.com/">Open Web App</a>.</li>
</ul>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Speaking at FSOSS @ Seneca College next week!]]></title>
    <link href="http://canuckistani.ca/blog/2011/10/21/speaking-at-fsoss-seneca-college-next-week/"/>
    <updated>2011-10-21T00:00:00-07:00</updated>
    <id>http://canuckistani.ca/blog/2011/10/21/speaking-at-fsoss-seneca-college-next-week</id>
    <content type="html"><![CDATA[<div><img style="display:block;" src="http://www.raspberrypi.org/wp-content/uploads/2011/08/DSCF1808-300x225.jpg"><em style="font-size: 75%;">A Raspberry Pi  Alpha board</em></div>


<p>I&#8217;m excited to head out to Toronto ( what my mother refers to fondly as &#8217;<em>the big smoke</em>&#8217; ) next week to give a talk on developing add-ons with the <a href="http://fsoss.senecac.on.ca/2011/node/77">Add-on SDK</a> at Seneca College&#8217;s Free Software and Oopen Source Symposium. Looking over the schedule of talks I am amazed at the diversity of talks; it is refreshing be able to attend a single event and attend sessions on such diverse subjects as:</p>

<ul>
<li><a href="http://fsoss.senecac.on.ca/2011/node/99">Drupal theme building</a></li>
<li><a href="http://fsoss.senecac.on.ca/2011/node/58">XBMC</a> - using Linux as a media centre.</li>
<li><a href="http://fsoss.senecac.on.ca/2011/node/107">OLPC Project work in Kenya</a></li>
<li><a href="http://fsoss.senecac.on.ca/2011/node/110">Raspberry Pi</a> a full Linux system in a tiny $25 package. <a href="http://www.raspberrypi.org/">DO WANT</a>.</li>
<li><a href="http://fsoss.senecac.on.ca/2011/schedule">Lots of other amazing stuff</a> - really, I&#8217;m just scratching the surface!</li>
</ul>


<p>I am also pleased that Mozilla has a strong presence at FSOSS this year; not only are we sponsoring but there are talks on <a href="http://fsoss.senecac.on.ca/2011/node/79">Popcorn.js</a> and <a href="http://fsoss.senecac.on.ca/2011/node/108">Mozilla release management</a>, and I am planning to organize a Mozilla BOF for Saturday afternoon.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[On Kindle, Reamde and the data-only travelling experience.]]></title>
    <link href="http://canuckistani.ca/blog/2011/10/11/on-kindle-reamde-and-the-data-only-travelling-experience/"/>
    <updated>2011-10-11T00:00:00-07:00</updated>
    <id>http://canuckistani.ca/blog/2011/10/11/on-kindle-reamde-and-the-data-only-travelling-experience</id>
    <content type="html"><![CDATA[<p><img src="http://farm7.static.flickr.com/6162/6197901252_f28a50c3c9.jpg"/></p>

<p>The other day <a href="http://canuckistani.ca/jeff/blog/merry-old">I was in England</a> for, like, 48 hours for work. My fellow traveller <a href="http://autonome.wordpress.com/">Dietrich</a> and I spent some time the afternoon we arrived tromping around Islington. While in England I was running on a data-only 3G <a href="http://threestore.three.co.uk/broadband/?ipad=1&amp;intid=3mainmbbwtclbll249">&#8216;iPad&#8217; sim card from 3 Wireless</a>, which as it turns out is splendidly fast and convenient. in particular because we <em>bought the sim cards from a vending machine at the airport</em>.  Neither of us cared particularly about making calls or sending sms, but data was incredibly useful and as we walked up Clerkenwell we were frequently in danger of hitting light poles or cabs as we stared intently at google maps on our phones, tracking down coffee breakfast or <a href="http://www.flickr.com/photos/anisotropic/6197379489/">whisky</a>.</p>

<p>As we walked, conversation drifted to books, the place-names we were seeing around us and in particular, Neal Stephenson&#8217;s epic, brilliant and daunting <a href="http://en.wikipedia.org/wiki/The_Baroque_Cycle">Baroque Cycle</a>. The novels spend an enormous amount of time in London and environs, and we were keenly aware that were walking through these same places we&#8217;d only previously read about.</p>

<p>Dietrich off-handedly mentioned <a href="http://en.wikipedia.org/wiki/Reamde">Reamde</a>, Stephenson&#8217;s new book, which I hadn&#8217;t seen on the shelves yet but had heard good things on the twitters about, and this stuck in my head that I should check it out.</p>

<p>The next day was <a href="http://mashable.com/2011/09/29/jeff-bezos-kindle-fire-video/">Amazon Kindle Fire</a> release day and that morning as I was waiting in the hotel lobby shifting through all of that news I saw another mention of Reamde.  On impulse I grabbed my phone, opened kindle, searched for the book and clicked one single time to buy it. About 30 seconds the first page opened on the screen and I started reading. This wasn&#8217;t so much a discovery or an ah-hah moment, just a reminder that, given the right situation I can instantly acquire any number of digital content almost anywhere, as long as I have data.</p>

<p>Flash forward to today, Boris blogged about <a href="http://blog.bmannconsulting.com/turning-the-corner-on-ebook-buying">turning the corner on ebook buying</a> with a link to Reamde at the top. Like him, my interest in ebooks began with my iPhone, and in particular a trip to Asia my wife and I took in which we whiled away many an hour reading ebooks on our iPhones while on planes, trains, buses, cars, etc. I&#8217;ve never thought reading books was a great experience on a computer, but mobile devices are fantastic for it. I read more, in more places. The realization I had is that, wherever I travel ( and with the new gig, I&#8217;m travelling a fair bit ) all I really need is data to get around ( and an unlocked 3G-capable GSM device ). Having data is <em>key</em>, in fact. traditional phone service is <em>not</em>.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[JSConf.eu]]></title>
    <link href="http://canuckistani.ca/blog/2011/10/07/jsconf-eu/"/>
    <updated>2011-10-07T00:00:00-07:00</updated>
    <id>http://canuckistani.ca/blog/2011/10/07/jsconf-eu</id>
    <content type="html"><![CDATA[<p><a href="http://www.flickr.com/photos/blank22763/sets/72157627810654002/with/6208846630/"><img src="http://farm7.static.flickr.com/6147/6208846630_a4a3068bf4.jpg"></a></p>

<p><em>Yup, that&#8217;s the back of my neck.</em></p>

<p>Last weekend <a href="http://twitter.com/#!/dietrich">Dietrich</a>, <a href="http://twitter.com/#!/ZER0">Matteo</a> and I were fortunate enough to be able to tack a trip to Berlin on to the end of out trip to Merry Old London to attend <a href="http://jsconf.eu">JSConf.eu</a>. I&#8217;ve been to many conferences ( and even helped produce a few? ) and was totally impressed by JSConf, on a number of levels:</p>

<ul>
<li><strong>Room for rockstars <em>and</em> local speakers</strong> ( some speakers of course fall into both groups ). The main room at JSConf was very large, to the extent that it would freak me out doing a talk there. It was good to see that the upstairs room was both cozier and the talks more diverse than the main room.</li>
<li><strong>Levity!</strong> The conference opened with a charming girl named Mandy <a href="http://vimeo.com/29873668">singing Brendan Eich a hilarious song</a>. Mid-afternoon on day 1 there was a coding competition where the loser for each question had to drink booze mixed by robots.</li>
<li><strong>Proper caffeination</strong> thanks to <a href="http://www.espresso-ambulanz.de/">Espresso Ambulanz</a>, a key success factor for the North Americans fighting off both jet lag and the ill effects of the party the night before.</li>
<li><strong>Fantastic illustrations</strong>. I wasn&#8217;t able to get all of them, <a href="http://www.flickr.com/photos/anisotropic/tags/amazinillustration/">but here are a few</a>.</li>
</ul>


<p><img src="http://farm7.static.flickr.com/6239/6221236048_03fa0010b2.jpg"></p>

<p>The weekend for me was a mixture of attending talks, talking to people about Firefox, demoing <a href="http://nightly.mozilla.org/">mobile nightly builds</a>, helping <a href="http://twitter.com/#!/olleolleolle">Olle</a> install a Nightly build on <em>his</em> Galaxy S, and fielding all sorts of SDK questions from how to use Websockets, to AMO review queue gripes. That doesn&#8217;t necessarily sound like loads of fun, but it <em>was</em>, and it was a great reminder of how awesome community-driven events like this can be.</p>

<p>The single greatest moment for me happened during <a href="http://www.wait-till-i.com/2011/10/05/jsconf-eu-community-js-reloaded-how-to-rock-as-a-movement/">Christian Heillmann&#8217;s talk</a> on Sunday where right at the end, he showed the packed house some demos of <a href="http://cf.cdn.vid.ly/8e6x9g/webm.webm">upcoming features in Firefox&#8217;s dev tools</a>. I&#8217;m not exaggerating when I say that people were <em>blown away</em>. The crowd reaction was huge!</p>
]]></content>
  </entry>
  
</feed>
