<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>blog.lmorchard.com &#187; mozilla</title>
	<atom:link href="http://blog.lmorchard.com/tag/mozilla/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.lmorchard.com</link>
	<description>write like no one&#039;s reading</description>
	<lastBuildDate>Tue, 11 Jun 2013 06:57:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6-beta2</generator>
		<item>
		<title>Looking for a Django app to manage Roles within Groups</title>
		<link>http://blog.lmorchard.com/2013/02/23/looking-for-a-django-app-to-manage-roles-within-groups</link>
		<comments>http://blog.lmorchard.com/2013/02/23/looking-for-a-django-app-to-manage-roles-within-groups#comments</comments>
		<pubDate>Sat, 23 Feb 2013 17:21:13 +0000</pubDate>
		<dc:creator>lmorchard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[badger]]></category>
		<category><![CDATA[badges]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://blog.lmorchard.com/?p=949</guid>
		<description><![CDATA[I want to add some team-based features to django-badger. I was hoping that someone had already built a reusable app to do most of the work for me. This happens quite a lot when I&#8217;m working with Django. Unfortunately, I haven&#8217;t quite found what I&#8217;m looking for yet. Consider this blog post either the product [...]]]></description>
				<content:encoded><![CDATA[<p>I want to add some team-based features to <a href="https://github.com/lmorchard/django-badger">django-badger</a>. I was hoping that someone had already built a reusable app to do most of the work for me. This happens quite a lot when I&#8217;m working with Django. Unfortunately, I haven&#8217;t <em>quite</em> found what I&#8217;m looking for yet. Consider this blog post either the product of my thinking out loud toward a rough spec, or a long-winded lazyweb search query.</p>
<p><span id="more-949"></span></p>
<p>First, what do I mean by a &#8220;team&#8221;? Well, a familiar example is <a href="http://www.wowwiki.com/Guild_list_%28interface%29">a guild in World of Warcraft</a>: A group of people with access to shared resources, that access controlled by permissions bundled into ranks assigned to each member of the group.</p>
<div class="wp-caption aligncenter" style="width: 460px"><a href="http://www.wowwiki.com/Guild_list_%28interface%29"><img alt="Guild management in WoW" src="http://images2.wikia.nocookie.net/__cb20091106224144/wowwiki/images/thumb/3/3e/Guild_list_%28interface%29.png/450px-Guild_list_%28interface%29.png" width="450" height="324" /></a><p class="wp-caption-text">Guild management in WoW</p></div>
<p>While Django does come with Users, Groups, &amp; Permissions, the concept of Roles within Groups to which Permissions can be attached seems missing.</p>
<p>If I try to extend the Django building blocks, maybe I could represent a &#8220;Team&#8221; as a bundle of Groups and treat those Groups as Roles? Or, maybe Groups should just become hierarchical &#8211; make it <a href="http://en.wikipedia.org/wiki/Turtles_all_the_way_down">turtles all the way down</a>. (I really like that expression, in case you can&#8217;t tell.)</p>
<p>With respect to that last point, I found <a href="https://github.com/rasca/django-hierarchical-auth">django-hierarchical-auth</a>. That seems like a good lead. But, I&#8217;m having trouble finding other projects using it. There&#8217;s <a href="http://www.feincms.org/">feinCMS</a> &#8211; I&#8217;ve never heard of that before, but that&#8217;s more my lack than theirs.</p>
<p>In the case of <a href="https://github.com/lmorchard/django-badger">django-badger</a>, I&#8217;d like to enable users to start teams, create badges that belong to the team, and allow other team members varying levels of control over those badges (e.g. creating, editing, awarding, approving nominations, etc).</p>
<p>So, there&#8217;s the matter of user interface &#8211; I&#8217;d like any user (not just site-wide admins) to be able to:</p>
<ul>
<li>create a team;</li>
<li>manage team profile information;</li>
<li>manage &amp; grant roles based on a canned selection of permissions;</li>
<li>invite other users as members, remove members;</li>
<li>accept team invitations, request to join a team, remove oneself from a team.</li>
</ul>
<p>The <a href="https://github.com/rasca/django-hierarchical-auth">django-hierarchical-auth</a> app comes with no views; it&#8217;s just a backend utility. So, if I grab that app, I&#8217;ll still have to build the UI and supporting models myself (i.e. for team profiles and permission sets).</p>
<p>So, that leaves me wondering if there&#8217;s some value in me building a reusable app atop <a href="https://github.com/rasca/django-hierarchical-auth">django-hierarchical-auth</a> that basically implements what that WoW guild management interface offers? Ultimately, that&#8217;s what I&#8217;m really hoping someone else has built for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lmorchard.com/2013/02/23/looking-for-a-django-app-to-manage-roles-within-groups/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>KumaScript: Bringing scripting to the wiki bears</title>
		<link>http://blog.lmorchard.com/2013/02/21/kumascript</link>
		<comments>http://blog.lmorchard.com/2013/02/21/kumascript#comments</comments>
		<pubDate>Thu, 21 Feb 2013 18:30:06 +0000</pubDate>
		<dc:creator>lmorchard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mdn]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://blog.lmorchard.com/?p=897</guid>
		<description><![CDATA[KumaScript turned one year old back at the end of January, and I&#8217;m sad to say no one celebrated its birthday &#8211; not even me. I&#8217;m pretty sure very few people outside of the core team at the Mozilla Developer Network even know what KumaScript is. So, I guess it&#8217;s about time I do something [...]]]></description>
				<content:encoded><![CDATA[<p><a href="https://github.com/mozilla/kumascript">KumaScript</a> turned <a href="https://github.com/mozilla/kumascript/commit/0cb247eaac58cf00bb59e16d6b37a215484633b2">one year old</a> back at the end of January, and I&#8217;m sad to say no one celebrated its birthday &#8211; not even me. I&#8217;m pretty sure very few people outside of the core team at the Mozilla Developer Network even know what <a href="https://github.com/mozilla/kumascript">KumaScript</a> is. So, I guess it&#8217;s about time I do something about that.</p>
<p><span id="more-897"></span></p>
<h3>Necessity is the Mother of Invention</h3>
<p>The major focus of my workaday (and workanight) life last summer was the relaunch of the Mozilla Developer Network wiki.</p>
<p>It had been close to 18 months in the making, which usually spells <a href="http://blog.lmorchard.com/2012/09/17/on-the-other-end-of-a-self-imposed-death-march-project">death march</a> and disaster. But, against many expectations, we did finally arrive at something for launch that neither fell over in flames immediately nor jettisoned a significant number of features with respect to what it was replacing. I think this is the first time in my career something like this went off with as few hitches as it did.</p>
<p>Your first questions might go something along the lines of, &#8220;18 months? For a <em>wiki</em>? Are you insane or just incompetent?&#8221; Well, it might help to note a few additional details:</p>
<ul>
<li>We call it a wiki, but it&#8217;s really more of a content management system that anyone can edit. It supports translation from English to 34 other languages, tracks revisions &amp; content hierarchies, accepts file attachments, and sings &amp; dances in a variety of other annoying-to-implement ways.</li>
<li>At the time of switchover, we had over 50,000 documents to migrate with care from the old system to the new one. That body of content represents years of work, a non-trivial hunk of cruft and spam, and tickles a maddening array of edge cases.</li>
<li style="text-align: left;">The wiki we replaced—i.e. <a href="http://www.mindtouch.com/">MindTouch</a>—supports server-side scripting in content with a language based on Lua—i.e. <a href="http://developer.mindtouch.com/en/docs/DekiScript">DekiScript</a>.</li>
</ul>
<p>Each of the above points represents its own special mix of horror and challenge, and I took on the bulk of the last two. That caused me a lot of stress, and <a href="http://blog.lmorchard.com/2012/09/17/on-the-other-end-of-a-self-imposed-death-march-project">I blogged a bit about that</a>.</p>
<p>This blog post, however, focuses on that last point: <a href="https://github.com/mozilla/kumascript">KumaScript</a> was built by backing into a semi-compatible replacement for <a href="http://developer.mindtouch.com/en/docs/DekiScript">DekiScript</a>. That&#8217;s pretty much the worst way to go about building something, but it seems to have worked.</p>
<h3>What Does It Look Like?</h3>
<p>First, you might want to check out <a href="https://developer.mozilla.org/en-US/docs/Project:Introduction_to_KumaScript">&#8220;Introduction to KumaScript&#8221; on MDN</a>. It&#8217;s the best work in progress describing the ins-and-outs of the service. But for the sake of this blog post, consider <a href="https://developer-new.mozilla.org/en-US/docs/KumaTests/hello_test?raw=1">this wiki document</a>:</p>
<pre>Here are three hellos:
{{ hello('3') }}</pre>
<p>Now, consider <a href="https://developer-new.mozilla.org/en-US/docs/Template:hello">this KumaScript template</a>, named <code>Template:hello</code>:</p>
<pre>&lt;% for (var i = 0; i &lt; $0; i++) { %&gt;
Hello #&lt;%= i %&gt;
&lt;% } %&gt;</pre>
<p>Put the two of these together, and you get <a href="https://developer-new.mozilla.org/en-US/docs/KumaTests/hello_test">this output</a>:</p>
<pre>Here are three hellos:
Hello #0
Hello #1
Hello #2</pre>
<p>KumaScript on MDN consists mainly of the following:</p>
<ul>
<li><a href="https://developer.mozilla.org/en-US/docs/Project:Introduction_to_KumaScript#Template_Syntax">Templates implemented using Embedded JavaScript Templates</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Project:Introduction_to_KumaScript#Macro_Syntax">Macros in wiki content that call templates with parameters</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Project:Introduction_to_KumaScript#Creating_modules">Common JS inspired modules for reusable code used by templates</a></li>
</ul>
<p>This quick introduction glosses over interesting things you can do with KumaScript—e.g. accessing data from external sources via HTTP, fetching content from other documents (also via HTTP). But, again, you can dive deeper by reading <a href="https://developer.mozilla.org/en-US/docs/Project:Introduction_to_KumaScript">&#8220;Introduction to Kumascript&#8221; on MDN</a>.</p>
<h3>Scripting in Wikis</h3>
<p>Why would one would even build such a thing as KumaScript? As it turns out, programmatically generating content is quite handy for composing documentation. Here are a few use cases:</p>
<ul>
<li>Localized macros for often-repeated constructs such as <a href="https://developer.mozilla.org/en-US/docs/Template:Warning">warnings</a>, notes, tips, &amp; callouts.</li>
<li>Conditional content based on variables such as product, locale, &amp; standards status.</li>
<li><a href="http://en.wikipedia.org/wiki/Transclusion">Transclusion</a> of content, <a href="https://developer.mozilla.org/en-US/docs/XUL/button">building documents from documents</a>. (Try viewing <a href="https://developer.mozilla.org/en-US/docs/XUL/button?raw">the raw source</a> of that page.)</li>
<li>Mashups of data from MDN itself and from other sites and services like Bugzilla and Github. For example, here&#8217;s <a href="https://developer.mozilla.org/en-US/docs/Project:Changelog">a self-updating Changelog of our code deployments on MDN</a>. And, here&#8217;s <a href="https://developer.mozilla.org/en-US/docs/Template:KumaGithubChanges">the template behind that page</a>.</li>
</ul>
<p>It&#8217;s also worth pointing out that is different from scripting mixed with HTML like you get from ASP or PHP: There, you can process forms, personalize responses, and generally build web applications.</p>
<p>In the world of KumaScript, content scripting is a heavily cached thing and not tied to the current HTTP request. It mostly runs only when the document itself is edited, but can also be executed when we think dependencies or external data sources have changed.</p>
<p>In fact, KumaScript code doesn&#8217;t even have access to the incoming visitor&#8217;s request data at all—i.e. username, cookies, referrer header, et al—and instead we operate mainly on the content and metadata of documents.</p>
<h3>Why JavaScript?</h3>
<p>As I mentioned earlier, <a href="http://www.mindtouch.com/">MindTouch</a> provides for scripted content by way of the Lua-based <a href="http://developer.mindtouch.com/en/docs/DekiScript">DekiScript</a>. It&#8217;s also interesting to note that the Wikimedia Foundation is working on <a href="http://www.mediawiki.org/wiki/Lua_scripting">a Lua-based scripting system for MediaWiki and Wikipedia</a>. So, scripted content in a wiki isn&#8217;t an entirely crazy idea, in and of itself.</p>
<p>As for Lua, I think it&#8217;s a nice little language. It&#8217;s used in World of Warcraft and many other games. It&#8217;s known for being easily embedded into applications to grant scriptability. I can totally see why one would reach for it.</p>
<p>But, at Mozilla, we&#8217;re all about the web. The lingua franca of programming on the web is JavaScript. And, it doesn&#8217;t hurt that MDN already has a huge body of JavaScript documentation.</p>
<p>So, as far as harmonious language choices go, I can&#8217;t think of a better one for scripting content on MDN than JavaScript.</p>
<h3>Boring Lets Me Sleep at Night</h3>
<p>There are some exciting things about embedding a Lua interpreter into a wiki platform, as MindTouch and MediaWiki have done. Even having chosen JavaScript over Lua, I could have tried embedding a JS interpreter like <a href="http://code.google.com/p/v8/">V8</a> or <a href="https://developer.mozilla.org/en-US/docs/SpiderMonkey">SpiderMonkey</a> into Python.</p>
<p>However, because I like to sleep at night and am not particularly clever about embedding languages within languages (<a href="http://stackoverflow.com/questions/5099043/embedding-a-low-performance-scripting-language-in-python#comment5715808_5099043">yo dawg</a>), I want nothing to do with this brand of excitement. Consider me <a href="http://en.wikipedia.org/wiki/Hobbit#Lifestyle">a Hobbit</a> among developers.</p>
<p>So, KumaScript is a standalone <a href="http://nodejs.org/">Node.js</a> web service. That is, everything going into and coming out of KumaScript happens over HTTP. I understand HTTP a whole lot more than embedding language interpreters.</p>
<p>Don&#8217;t get me wrong: Node.js is an exciting piece of exotic matter in its own right. But, someone more clever than me maintains Node.js. And, I&#8217;m betting most of my co-workers and potential project contributors understand JavaScript, Node.js, and HTTP much better than embedding languages in other languages.</p>
<p>In fact, besides my overwrought glue code, <a href="https://github.com/mozilla/kumascript/blob/master/package.json#L22">KumaScript consists mainly of modules written &amp; maintained by other people more clever than me</a>. That&#8217;s even less work for me. One of the few things I like as much as sleeping at night is when other people fix bugs and build things for me.</p>
<h3>HTTP ALL the Things</h3>
<p>I really like HTTP. I&#8217;ve spent a good chunk of my adult life learning to understand it—so by this point it might be Stockholm Syndrome, but I think it embeds a lot of cleverness and useful decisions.</p>
<p>HTTP gives you interesting system boundaries. You can cache, scale, and abstract using intermediaries. There are nice identifiers (ie. URLs), status codes, and a rich arsenal of means to transport data and metadata (ie. methods, headers, and content types).</p>
<p>Having made KumaScript an HTTP service also means that someone other than MDN could use it. The interface was not built specifically for MDN, it&#8217;s neither dependent on Python nor Django. Fire up the processes and try running your web content through it—could be a wiki, could be a pile of static HTML. There is, of course, slightly more to it than that—but not much.</p>
<p>In fact, I really <em>do</em> hope someday someone beyond MDN tries using KumaScript.</p>
<h3>Turtles All the Way Down</h3>
<p>So, the MDN wiki—<a href="https://github.com/mozilla/kuma">named Kuma</a>, which means <a href="http://en.wikipedia.org/wiki/Kuma#Animals">&#8220;bear&#8221; in Japanese</a>—talks to KumaScript via HTTP. And, in turn, KumaScript talks to the wiki with HTTP.</p>
<p>In fact, although the KumaScript service itself is hidden behind a firewall, <a href="https://developer.mozilla.org/en-US/docs/Project:The_Kuma_API">the wiki API used by KumaScript is open to the public</a>. What&#8217;s good for the goose is good for the gander, after all.</p>
<p>The typical document rendering process goes something like this:</p>
<ol>
<li>Kuma makes a GET request to KumaScript with the URL of a wiki document.</li>
<li>KumaScript makes a GET request to Kuma for the raw source of the wiki document.</li>
<li>KumaScript parses the source, looking for macros &amp; inventorying templates.</li>
<li>KumaScript makes a GET request to Kuma for the source of each template needed.</li>
<li>KumaScript evaluates the macros by executing templates with the given parameters. This may kick off additional GET requests as needed by templates to load modules.</li>
<li>KumaScript responds to the initial request from Kuma with the results of macro evaluation in the document.</li>
</ol>
<p>It&#8217;s <del>turtles</del> HTTP GET, <a href="http://en.wikipedia.org/wiki/Turtles_all_the_way_down">all the way down</a>. Well, except for when we want to do a preview before saving: In that case it&#8217;s an HTTP POST which kicks everything off at step #3, with raw source in the request body.</p>
<p>And though this might look like a Rube Goldberg machine, there are some nice qualities to all this HTTP GET traffic:</p>
<ul>
<li>Each GET is susceptible to caching, via the usual headers and semantics.</li>
<li>Each GET can be serviced by a different process on a different machine.</li>
</ul>
<p>I&#8217;m sure I could come up with more items after I have lunch, but this is just HTTP.</p>
<p>Content flows through request and response bodies. And—though this part might be a bit of a hack—I encode document context, errors, and messages using custom HTTP headers as a side-channel <a href="https://github.com/lmorchard/node-firelogger">using the FireLogger protocol</a> as an inspiration.</p>
<h3>Security &amp; Safety</h3>
<p>Something I could have done with KumaScript was to simply allow wiki authors to drop hunks of executable code into the middle of documents. DekiScript seems to allow for this. But, we never really used it that way on MDN.</p>
<p>Instead, what we have is a system of templates and macros:</p>
<ul>
<li>Templates contain the JavaScript code in the form of <a href="https://github.com/visionmedia/ejs">Embedded JavaScript Templates</a>. At present, these can be authored only by a core of trusted MDN editors.</li>
<li>Macros call templates with parameters and dump the results of execution into the document. These can be used by anyone, and have <a href="https://github.com/mozilla/kumascript/blob/master/lib/kumascript/parser.pegjs">a very constrained syntax</a>.</li>
<li>The content resulting from macro evaluation <a href="https://pypi.python.org/pypi/bleach">is sanitized</a> such that it&#8217;s subject to the same constraints as hand-written markup.</li>
</ul>
<p>Since KumaScript has no access to a user&#8217;s request data, we&#8217;re decently firewalled in terms of privacy and abusing the visitor. And, since <a href="https://pypi.python.org/pypi/bleach">the markup is filtered</a>, it&#8217;s difficult to inject nasty XSS exploits and the like.</p>
<p>So, when I say security and safety, I&#8217;m thinking mainly about our servers: We want to sandbox this server-side JS such that it can&#8217;t abuse CPU, memory, or network resources. At present, my approach to this is anemic: Restrict code authoring to trusted people, and impose impatient timeouts on macro execution.</p>
<p>I have thoughts about improving this situation in the future, and hopefully expanding the ability to author JS templates. Because, remember, MDN is a wiki—anyone and everyone can edit it. I&#8217;d like that to include the JS code, if at all possible to do with relative safety.</p>
<p>Patches and pull requests are welcome, especially if you&#8217;re smarter than me about these things. (It&#8217;s not hard to be smarter than me about these things.)</p>
<h3>Scaling &amp; Stability</h3>
<p>KumaScript scales like just about any web service. You can stick it behind a load balancer. Scale it horizontally by throwing more CPUs and processes at the problem. Cache the hell out of the responses. Throw a proxy in front of it to cache the hell out of outgoing requests to external services. Again, this is meant to be as boring as I can make it.</p>
<p>And, if a KumaScript process should happen to misbehave or starts having a seizure, just kill it and start another one. There should be no state to worry about, and the processes should start up really fast. Ideally, the logs will have recorded what went wrong and we end up with just a transient error.</p>
<h3>Maturity &amp; THE FUTURE</h3>
<p>KumaScript turned a year old last month, has been in production since last summer, and had its last commit around 5 months ago. It has lots of tests, and it uses a version of Node.js from early 2012.</p>
<p>That doesn&#8217;t mean it&#8217;s abandoned, though: KumaScript is a mature project by most definitions. It&#8217;s been working well enough that I haven&#8217;t wanted to touch it. Most of the work goes on within the wiki itself, and KumaScript is meant to be the smallest piece it can be.</p>
<p>And maturity doesn&#8217;t mean I don&#8217;t have notions about future work. Off the top of my head, I&#8217;d like to get around things like the following:</p>
<ul>
<li>Improve template execution &amp; sandboxing. Currently, if any one thing misbehaves in the document, the whole process gets aborted. Maybe instead, I should <a href="https://github.com/lloyd/node-compute-cluster">spin up a pool of processes</a>: Each them can take care of executing a single macro, while a master process watches for CPU / RAM / network abuse and kills anything that behaves badly.</li>
<li>Reconsider my possibly brain-dead approach to parsing source documents for macros using a PEG.js grammar. Or, maybe it&#8217;s good enough.</li>
<li>Need much better error trapping and reporting throughout everywhere.</li>
<li>Need much better use of <a href="https://github.com/etsy/statsd/">statsd</a> for measuring timings and suchlike.</li>
<li>Maybe offer an HTTP proxy that runs all content through the service, for easier deployment atop existing sites beyond MDN.</li>
</ul>
<p>And of course: Suggestions, patches, and pull requests are more than welcome!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lmorchard.com/2013/02/21/kumascript/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My experience in becoming a FirefoxOS contributor</title>
		<link>http://blog.lmorchard.com/2012/11/15/my-experience-in-becoming-a-firefoxos-contributor</link>
		<comments>http://blog.lmorchard.com/2012/11/15/my-experience-in-becoming-a-firefoxos-contributor#comments</comments>
		<pubDate>Thu, 15 Nov 2012 17:34:57 +0000</pubDate>
		<dc:creator>lmorchard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[firefoxos]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://blog.lmorchard.com/?p=531</guid>
		<description><![CDATA[Back in September, I wrote that I wasn&#8217;t leaving MDN. And, I&#8217;m not, really. But, it turns out that FirefoxOS needs some help to reach its first release milestones. So, some of us webdevs from around Mozilla are temporarily switching our daily efforts over to slay bugs on Gaia. That&#8217;s the layer of FirefoxOS which [...]]]></description>
				<content:encoded><![CDATA[<p>Back in September, <a href="http://blog.lmorchard.com/2012/09/17/on-the-other-end-of-a-self-imposed-death-march-project#p[BInCtb]">I wrote that I wasn&#8217;t leaving MDN</a>. And, I&#8217;m not, really. But, it turns out that <a href="http://www.mozilla.org/firefoxos/">FirefoxOS</a> needs some help to reach its first release milestones. So, some of us <a href="http://blog.mozilla.com/webdev/">webdevs from around Mozilla</a> are temporarily switching our daily efforts over to slay bugs on <a href="https://github.com/mozilla-b2g/gaia">Gaia</a>. That&#8217;s the layer of <a href="http://www.mozilla.org/firefoxos/">FirefoxOS</a> which provides the overall system UI and core apps.</p>
<p><span id="more-531"></span></p>
<p>I&#8217;m planning to return to primarily <a href="https://developer.mozilla.org/">MDN</a> work in a few months &#8211; but, right now, <a href="http://www.mozilla.org/firefoxos/">FirefoxOS</a> is kind of a big deal.</p>
<p>Thus, like <a href="http://blog.margaretleibovic.com/post/32836884540/challenges-getting-started-with-gaia">some of</a> my <a href="http://bluesock.org/~willg/blog/gaia/gaia_onboarding.html">other</a> <a href="http://schalk-neethling.com/2012/10/debugging-b2g-desktop-blank-screen-on-launch-gaia/">colleagues</a> in the past month, I&#8217;ve gone from being a fully-operational battle coder on a project with which I have years of experience, to being a total noob with no idea how to find my way to &#8220;Hello world&#8221;. It&#8217;s been awhile since I last parachuted into the middle of an open source combat zone, so I fell back to my training to get my bearings:</p>
<ol>
<li>Find the docs</li>
<li>Get the source</li>
<li>Run the project</li>
<li>Break something, see what happens, fix it</li>
<li>Fix a known bug, submit a patch</li>
<li>Try to improve the process of fixing things</li>
</ol>
<h2>Finding the docs</h2>
<p>Oddly enough, <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS">MDN was a good place to start for docs</a>. Though, there are FirefoxOS docs spread between MDN, GitHub, and <a href="https://wiki.mozilla.org/Gaia/Hacking">wiki.mozilla.org</a>. And, of course, they are each in various states of freshness and truthiness. Keep your wits about you; here be dragons.</p>
<h2>Getting the source</h2>
<p>Getting the source for FirefoxOS is a bit of a trick question &#8211; it depends on what you want to do, and how you want to contribute:</p>
<ul>
<li><a href="https://github.com/mozilla-b2g/B2G">mozilla-b2g/B2G</a> is the mother of all repos. Only start there if you&#8217;re brave &amp; interested in the whole shebang. Fair warning, though: When the smoke cleared hours later, and the README was done with me, I had acquired 17G of new stuff in my dev directory. But, you&#8217;ll have ALL the things, and you can flash FirefoxOS to compatible hardware. </li>
<li><a href="https://github.com/mozilla-b2g/gaia">mozilla-b2g/gaia</a> will be the most interesting if you&#8217;re like me and hoping to contribute as a webdev. That&#8217;s chock full of HTML, CSS, and JavaScript. It&#8217;s also pretty much free of pesky kernel code or device drivers that hurt my brain, because I&#8217;m not prepared to work at that low a level at this point in the morning. </li>
</ul>
<p>There are other repos, for the <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Gonk">Gonk</a> and <a href="https://developer.mozilla.org/en-US/docs/Gecko">Gecko</a> layers of FirefoxOS. But, for the sake of my sanity, I&#8217;m trying to avert my eyes for now.</p>
<h2>Running the project</h2>
<p>If you don&#8217;t have a compatible mobile device (and few do), you need a B2G Desktop build. While it&#8217;s true that many apps <em>will</em> run in Firefox Nightly, and there is an emulator you can build from the b2g repo, most apps are presently problematic in Firefox Nightly, and I&#8217;ve never gotten the emulator to build successfully.</p>
<p>You can either <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Boot_to_Gecko/Using_the_B2G_desktop_client#Building_the_desktop_client">build your own B2G Desktop</a>, or <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Boot_to_Gecko/Using_the_B2G_desktop_client#Download_a_nightly_build">download a nightly build</a>. I&#8217;ve done both, and generally I recommend sticking with the nightly Aurora builds.</p>
<p>On OS X, I was able to download a nightly build and launch it with a double-click. That got things running &#8211; hooray! But, it didn&#8217;t get me productive straight away: The nightly build comes equipped with its own embedded build of Gaia, which makes it handy for trying out your own 3rd party apps but not-so-handy for hacking on Gaia itself.</p>
<p>To improve this situation, you need to do two things:</p>
<ol>
<li><a href="https://wiki.mozilla.org/Gaia/Hacking#Nightly_Builds">Build your own Gaia profile</a> from your own clone of <a href="https://github.com/mozilla-b2g/gaia">mozilla-b2g/gaia</a>. This is pretty much just running <code>make</code> or <code>DEBUG=1 make</code> from your git clone. </li>
<li>Run B2G Desktop from a terminal <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Boot_to_Gecko/Using_the_B2G_desktop_client#Running_the_desktop_client">with command line options</a> that tell it to use your new Gaia profile, rather than the built-in. </li>
</ol>
<p>So, at this point, I have the Gaia source and a means by which to run it on my laptop.</p>
<h2>Breaking things</h2>
<p>After getting the project running as intended, I break something. And by that, I mean that I change a button title somewhere to &#8220;LOL BUTTS&#8221; or intentionally introduce an exception or syntax error somewhere. Then, I fix it. This is practice that exposes me to the guts of the thing; gets me into the edit/build/run cycle; shows me what it does when something goes wrong; and pushes me toward finding the tests.</p>
<p>But, I think I picked the wrong week to step into the arena, because everything came pre-broken. There were semi-known bugs preventing nightly builds of B2G Desktop from running my fresh clone of Gaia. It took me most of my first week to track down those bugs in bugzilla, find workarounds, and finally get something going. And then, it all broke again. And I found workarounds again.</p>
<p>Eventually, I was at a point where I built my own B2G Desktop from source with a particular patch from a particular bug applied, and <em>that</em> got me to the point where I could <a href="https://github.com/mozilla-b2g/gaia/commit/9f0129c7a5f04d58bbbe140de2b9562e3172d23c">submit my first pull request</a> to fix a broken test.</p>
<p>Happily, things seem to have stabilized since I started: B2G Desktop nightlies have been cooperating with bleeding-edge Gaia lately, so I&#8217;ve been able to stop building my own. So, now, when I find a combination of B2G Desktop and phone and Gaia checkout that works, I cling to that for dear life until it&#8217;s absolutely necessary for me to update one of the parts.</p>
<p>In short, FirefoxOS is very much in flux, right now. Bring a hard hat and expect delays.</p>
<h2>Fixing things</h2>
<p>Once I&#8217;ve broken something and then fixed it, I usually have a sense for how to get real work done. Since then, I&#8217;ve been slowly wrapping my head around <a href="https://github.com/mozilla-b2g/gaia/tree/master/apps/calendar">the core Calendar app</a>, and <a href="https://github.com/mozilla-b2g/gaia/commits?author=lmorchard">my bug fixes have finally started trickling in</a>.</p>
<p>Cobbling together a reliable Gaia-hacking workflow is complicated, though:</p>
<ul>
<li>Some Gaia apps work in Firefox Nightly, at least partially. This is great, because Firefox has all the great tools like the DOM inspector and web console. And, for the most part, you can just save-and-refresh to see changes. </li>
<li>All Gaia apps work in B2G Desktop, usually, though sometimes there are&#8230; quirks. This is good for seeing how changes work in a closer-to-real environment. But, B2G Desktop has none of the web developer tools offered by Firefox. And, to see changes, I generally have to save, relaunch B2G Desktop, then relaunch the app within the simulator. That&#8217;s pretty inconvenient.</li>
<li>All Gaia apps work on the Mozilla-supplied dev phone &#8211; which almost no one has. Well, they work more often than they do on B2G Desktop and Firefox, anyway. But, including a phone in the dev iteration loop is downright painful: As opposed to the usual webdev experience of save-and-refresh, the phone demands a save-build-flash-restart-relaunch cycle. </li>
<li>There is one awesome thing, at least for <a href="https://github.com/mozilla-b2g/gaia/tree/master/apps/calendar">the Calendar app</a>: <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Boot_to_Gecko/Gaia_Unit_Tests">There are unit tests which run in B2G Desktop, but are driven by a node.js controller in my shell</a>. That lets me beat up on my code &amp; logic in a &#8220;headless&#8221; context before jumping into Firefox, B2G Desktop, or the phone for a fuller integration test and a manual run-through. In fact, the unit testing framework even watches for file changes and will re-run tests right after a save, complete with a Growl notification of pass/fail.</li>
</ul>
<h2>Room for improvement</h2>
<p>Slowly but surely, I&#8217;ve gotten my minigun barrel spun up to start firing <a href="http://techcrunch.com/2011/10/25/lead-bullets/">piles of lead bullets</a> at Gaia bugs. But, it has been and continues to be a challenge. I&#8217;m hard-pressed to recommend it as a fun-time leisure project to anyone without a Mozilla paycheck, or even as an off-hours interest for those who live-and-breathe Firefox. This is to be expected, since it&#8217;s not even a v1.0 project yet &#8211; but, I really, really hope things improve in the not-so-distant future.</p>
<ul>
<li>We need to make sure that new contributors can get quickly from cloning the source to running the code. And it should <em>always</em> work &#8211; as in big, noisy automated tests fail when it breaks. I don&#8217;t care if it works fine on the phone if I can&#8217;t hack on it, at least from a contributor perspective. </li>
<li>We need a consistent and convenient development environment for Gaia. All day, I bounce between things that are partly broken in Firefox, partly broken in B2G Desktop, and mostly working on the phone. This kills productivity and enthusiasm, all day. And, many times, no one else in the <a href="irc://irc.mozilla.org/gaia">#gaia channel on IRC</a> knows what I&#8217;m on about when I say something&#8217;s broken &#8211; because everyone&#8217;s dev environment is a unique little snowflake. </li>
<li>My ideal workflow would never leave Firefox and my editor: Consider it a variant of the Responsive Design View, and ensure all the various APIs expected on a real phone are either working properly, polyfilled, or usefully stubbed out. Then, when it&#8217;s perfect in my most comfy environment, I can try it on a phone or standalone simulator as an afterthought. The <a href="http://www.blueskyonmars.com/2012/11/08/r2d2b2g-is-becoming-the-firefox-os-simulator/">upcoming built-in Firefox OS Simulator</a> (née <a href="https://hacks.mozilla.org/2012/10/r2d2b2g-an-experimental-prototype-firefox-os-test-environment/">r2d2b2g</a>) looks promising, but it needs to be seamless. </li>
</ul>
<h2>Still digging</h2>
<p>Even with the challenges, and even if my contributions are small, I&#8217;m happy to have the opportunity to work on FirefoxOS. It&#8217;s a big deal; it&#8217;s the next Firefox. So, I plan to keep ramming my head against this stuff to help make it better, and I hope we can start taking time to make making it better better, too!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lmorchard.com/2012/11/15/my-experience-in-becoming-a-firefoxos-contributor/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Privacy and Social Media</title>
		<link>http://blog.lmorchard.com/2012/10/01/privacy-and-social-media</link>
		<comments>http://blog.lmorchard.com/2012/10/01/privacy-and-social-media#comments</comments>
		<pubDate>Mon, 01 Oct 2012 17:00:16 +0000</pubDate>
		<dc:creator>lmorchard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[social]]></category>
		<category><![CDATA[socialmedia]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.lmorchard.com/?p=443</guid>
		<description><![CDATA[Somewhat apropos of what I posted recently about freedoms, there&#8217;s been a kerfuffle about Facebook and privacy (again). A particular post I just read kind of set me off, so I decided to expand on a comment I left there. Assumed rights This started out as a comment in response to Sorry Facebook, This Was [...]]]></description>
				<content:encoded><![CDATA[<p>Somewhat apropos of <a href="http://blog.lmorchard.com/2012/09/24/freedom-of-from-choice#p[Dygtcp]">what I posted recently about freedoms</a>, there&#8217;s been a kerfuffle about Facebook and privacy (again). A <a href="http://www.readwriteweb.com/archives/yes-facebook-this-was-a-privacy-bungle-heres-what-you-shouldve-done.php#comment-667692804">particular post</a> I just read kind of set me off, so I decided to expand on a comment I left there.</p>
<p><span id="more-443"></span></p>
<h2>Assumed rights</h2>
<p>This started out as <a href="http://www.readwriteweb.com/archives/yes-facebook-this-was-a-privacy-bungle-heres-what-you-shouldve-done.php#comment-667692804">a comment</a> in response to <a href="http://www.readwriteweb.com/archives/yes-facebook-this-was-a-privacy-bungle-heres-what-you-shouldve-done.php">Sorry Facebook, This Was A Privacy Bungle! Here&#8217;s What You Should&#8217;ve Done</a>, over on <a href="http://www.readwriteweb.com/">ReadWriteWeb</a>. The post wraps up like so:</p>
<blockquote><p>
  So this isn&#8217;t the fault of Facebook&#8217;s users. We knew what we were doing then, when we posted to our Walls. And we know what we&#8217;re doing now. The lesson here is that Facebook should have given us the option of selecting the privacy setting for those old Wall posts. Or maybe even made those old posts available to &#8220;Close Friends&#8221; only, as the default. Then we could adjust if we wished.</p>
<p>  Facebook&#8217;s mistake was that it had no right to assume that our &#8220;Friends&#8221; of 2007-09 means the same thing as &#8220;Friends&#8221; in 2012.</p>
</blockquote>
<p>Sorry, but no. The mistake was that <em>you</em> could assume many rights over content you&#8217;d submitted into Facebook&#8217;s ownership. If you had assumptions of rights or ownership, then in fact you <strong><em>did not know</em></strong> what you were doing then when you posted to your Walls, then or now.</p>
<h2>Darth Zuckerberg?</h2>
<p>Maybe this whole thing seems a bit Vader-ish. (ie. &#8220;<a href="http://video.adultswim.com/robot-chicken/this-deals-getting-worse-all-the-time.html">I am altering the deal. Pray I don&#8217;t alter it any further.</a>&#8220;)</p>
<p>But, even if your impression was that what you posted back then was &#8220;just between us&#8221; &#8211; the fact is that Facebook has always been well within their rights to alter the definition of &#8220;us&#8221; at any point they liked. I&#8217;d be amazed if the terms of service (<a href="http://tos-dr.info/">which no one reads</a>, of course) didn&#8217;t give them plenty of room to do things just like this.</p>
<p>Of course, I&#8217;m not a lawyer. But, I can imagine there are things companies put into terms of service that run afoul of actual laws. But, Facebook has lots of money, and that yields lots of incentive to look for legal exploits.</p>
<p>And, accordingly, <a href="http://techcrunch.com/2012/06/21/sponsored-stories-lawsuit/">people have sued and won</a> where Facebook was vulnerable. But, I&#8217;m reasonably convinced that voluntarily posting your secrets to Facebook doesn&#8217;t come with a legal guarantee of privacy. Maybe a good lawyer (ie. better than those at Facebook) could prove me wrong on this. But otherwise&#8230; umm&#8230; don&#8217;t do that.</p>
<h2>It&#8217;s not your backyard</h2>
<p>You don&#8217;t own the spaces you inhabit on Facebook. You&#8217;re enjoying a party at someone&#8217;s house, and you barely know the guy. In fact, your content is the currency that pays for the booze (ie. the privilege of using their servers). That&#8217;s why it&#8217;s <a href="http://en.wikipedia.org/wiki/Gratis_versus_libre#.22Free_beer.22_vs_.22free_speech.22_distinction">free-as-in-beer</a>: You&#8217;ve given them what you post, instead of money. That&#8217;s valuable stuff, if they can ever quite figure out how to sell it.</p>
<p>You and your friends can tell yourselves that your little clique on the quiet patio is a private gathering. But, that&#8217;s still not your house. Don&#8217;t be surprised if gossip gets overheard.</p>
<p><a href="http://www.readwriteweb.com/archives/yes-facebook-this-was-a-privacy-bungle-heres-what-you-shouldve-done.php">Richard MacManus</a> wrote that &#8220;[Facebook] has unilaterally decided to impose a new concept of privacy onto its users.&#8221; But, that&#8217;s like saying the homeowner unilaterally decided to put out the bonfire in the backyard. One might ask the guests&#8217; opinion about the bonfire &#8211; but that&#8217;s just being a gracious host.</p>
<p>A better scenario might be if the homeowner decided to start filming a reality show. Still, I think you agreed to a release at the door. It might have even been printed the plastic cups, and drinking the beer sealed the deal. That release covered this contingency, no matter how intuitively distasteful it seems. (Sounds shady to me, but then so do terms of service pages.)</p>
<h2>The cake: eating vs having it</h2>
<p>You can&#8217;t both pay to party by supplying your content and then later claim ownership of the payment. You ate the cake; you can&#8217;t take it home after. You can express your feelings of stomach ache (which is also content), but the lesson here is Facebook never was and never will be a private space. There might have been perceived partitions at one point, but those partitions can move whenever the homeowners want.</p>
<h2>Where to go from here</h2>
<p>As I see it, you have three options:</p>
<ol>
<li>Pay to create your own private social spaces on the web. That, at least, <a href="http://www.metafilter.com/95152/Userdriven-discontent#3256046">makes you the customer</a>.</li>
<li>Accept Facebook for what it is: A party in a stranger&#8217;s backyard, at which you are both a guest and <a href="http://www.metafilter.com/95152/Userdriven-discontent#3256046">the product on sale</a>.</li>
<li>Lobby your lawmakers to outlaw what Facebook does with your content. Good luck.</li>
</ol>
<p>I&#8217;m willing to bet #1 and #2 are cheaper and much more practical than #3.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lmorchard.com/2012/10/01/privacy-and-social-media/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Freedom to Change Your Mind</title>
		<link>http://blog.lmorchard.com/2012/09/27/freedom-to-change-your-mind</link>
		<comments>http://blog.lmorchard.com/2012/09/27/freedom-to-change-your-mind#comments</comments>
		<pubDate>Thu, 27 Sep 2012 16:59:50 +0000</pubDate>
		<dc:creator>lmorchard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[b2g]]></category>
		<category><![CDATA[choice]]></category>
		<category><![CDATA[firefoxos]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://blog.lmorchard.com/?p=313</guid>
		<description><![CDATA[I posted a few days ago about freedom of and from choice, but I think there&#8217;s something orthogonal to that spectrum: The freedom to change your mind, both figuratively and literally. Fractal of choice To sum up what I wrote earlier, there&#8217;s a spectrum of what choices you make and what choices you leave up [...]]]></description>
				<content:encoded><![CDATA[<p>I posted a few days ago about <a href="http://blog.lmorchard.com/2012/09/24/freedom-of-from-choice">freedom of and from choice</a>, but I think there&#8217;s something <a href="http://en.wikipedia.org/wiki/Orthogonality">orthogonal</a> to that spectrum: The freedom to change your mind, both figuratively and literally.</p>
<p><span id="more-313"></span></p>
<h2>Fractal of choice</h2>
<p>To sum up what I <a href="http://blog.lmorchard.com/2012/09/24/freedom-of-from-choice">wrote</a> earlier, there&#8217;s a spectrum of what choices you make and what choices you leave up to someone else:</p>
<ul>
<li>You might choose to <a href="http://store.apple.com/">live entirely within the Apple ecosystem</a>, relying on expert designers to provide elegant and beautiful experiences.</li>
<li>You might decide to <a href="https://www.system76.com/">buy a PC laptop with Ubuntu pre-installed</a> and embrace the gritty world of open source software.</li>
<li>You might build a PC desktop from parts <a href="http://newegg.com">ordered ala carte</a>—maybe even compile your OS and all applications from source, <a href="http://www.gentoo.org/">Gentoo</a> or <a href="http://freebsd.org">FreeBSD</a> style. </li>
<li>You might decide to construct <a href="http://www.wired.com/gadgetlab/2009/05/homebrewed-cpu/">an 8-bit CPU out of ICs and a big mess of wires</a>, and cobble together <a href="http://www.bigmessowires.com/2008/11/28/microsoft-basic/">your own port of Microsoft BASIC</a>.</li>
<li>You could gather piles of various exotic materials and bake your own semiconductors and ICs at home—<a href="http://www.youtube.com/watch?v=PdcKwOo7dmM">but really, who does that</a>?</li>
</ul>
<p>There are many choices to make, and it&#8217;s even your choice to decide at which fractal level of complexity you&#8217;re most comfortable. So far, so good.</p>
<h2>Changing your mind</h2>
<p>But, what about after you&#8217;ve made your choices about choices—can you change your mind later?</p>
<ul>
<li>Can you take your tools with you to a new ecosystem? </li>
<li>If you can&#8217;t take them with, can you find alternatives?</li>
<li>Are your thoughts and work expressed in ways that leave you free to change tools?</li>
<li>Can you take possession of the thoughts you&#8217;ve poured into a tool or service?</li>
<li>What happens when your relied-upon experts go out of business?</li>
<li>Or, better yet, <a href="http://techland.time.com/2012/07/20/why-google-or-facebook-buying-your-favorite-startup-means-its-probably-toast/">what happens when they cash out to Google or Facebook or Yahoo</a>?</li>
<li>Do you own the device in your hand? Or, have you just gotten a limited license to use it?</li>
</ul>
<p>And, this is probably overly clever, but when I write &#8220;change your mind&#8221; I mean both:</p>
<ol>
<li>reconsidering your decisions and</li>
<li><em>altering your cognitive system</em>. </li>
</ol>
<p>Because, as I&#8217;ve written before, these things are <a href="http://opinionator.blogs.nytimes.com/2010/12/12/out-of-our-brains/">cognitive prosthetics</a>—they&#8217;re a part of your thinking apparatus. Again, it goes back to how much time you&#8217;re willing to devote to <a href="http://blog.lmorchard.com/2012/09/24/freedom-of-from-choice#p[HIgHca]">sharpening your saw</a> with intentional use of technology.</p>
<p>Personally, I resist the notion of allowing parts of my extended mind to be controlled more by third-party experts than me. Even if I choose <em>for now</em> to leave myself in their hands, I want clearly marked exits and an escape plan.</p>
<h2>Intersection of axes</h2>
<p>So, if freedom {of,from} choice and freedom to change my mind are <a href="http://en.wikipedia.org/wiki/Orthogonality">orthogonal</a>, what does that look like? (Maybe I&#8217;ll come back to this post with a drawing.)</p>
<p>I would think that a high degree of freedom of choice would leave you quite free to change your mind later. But, I could imagine reworking that <a href="http://www.bigmessowires.com/2009/02/02/wire-wrap-photos/">Big Mess &#8216;o Wires</a> would be a huge pain. So, I probably wouldn&#8217;t use a <a href="http://www.bigmessowires.com/2009/02/02/wire-wrap-photos/">BMOW</a> as my daily workstation.</p>
<p>On the other hand, some of the best designed systems <a href="http://tech.slashdot.org/story/04/03/04/1337259/your-future-cars-hood-will-be-welded-shut">are trending</a> toward <a href="http://www.netc.org/openoptions/background/roadster.html">hoods welded shut</a>. Shouldn&#8217;t it be possible to start from a product of expert design (an iPhone, for instance), only later to pop the cover off (literally or virtually) and do your own thing? There are jailbreaks—but why are you in a jail? And, doesn&#8217;t it seem like they&#8217;d make it airtight if they could?</p>
<p>Is it just that <a href="http://www.imore.com/jailbreak-app-piracy-cost-theft">app pirates are ruining it for the rest of us</a>? I mean, it&#8217;s mighty convenient to have your customers <a href="http://scripting.com/davenet/2001/07/06/theMicroChannelArchitectur.html">locked in the trunk</a>: It&#8217;s harder for them to hurt themselves or the upholstery, and they can&#8217;t easily wander off if you make some turns they don&#8217;t like. But, that&#8217;s tinfoil-hat territory, and I could rant all day.</p>
<p>Android seems to be doing well, and it&#8217;s <em>mostly</em> open. I&#8217;ve switched device vendors a few times, and all my apps have survived the changes. I&#8217;ve flashed my own choice of firmware on a few of my phones, and have been pleased. I have a sense of deeper choices available, should I ever want to chase after them.</p>
<p>Palm&#8217;s webOS devices were <em>crazy</em> open—not open source per se, but <a href="http://webos.org/2009/06/10/palm-pre-konami-code-dev-mode/">you could unlock root with the Konami code</a> and <a href="http://www.webos-internals.org/wiki/Applying_Patches">apply patches to core applications</a>. Alas, webOS crashed and burned at HP. My hunch is that <a href="http://www.theverge.com/2012/6/5/3062611/palm-webos-hp-inside-story-pre-postmortem">being open isn&#8217;t what did them in</a>, though.</p>
<p>Mozilla (disclaimer: my employer) is headed into that webOS territory with <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS">FirefoxOS</a>. In that currently-coalescing ecosystem, the <a href="https://developer.mozilla.org/en-US/apps">apps come from the open web</a>, aren&#8217;t gate-kept by a single marketplace, and can even run on non-FirefoxOS devices. I suspect it won&#8217;t be as slick an ecosystem as Apple&#8217;s, <a href="http://blog.lmorchard.com/2012/09/24/freedom-of-from-choice#p[OtoFoc]">because the loosely-coupled gates will let in more dirt</a>. But, it will be high on the freedom-to-change axis, and the quality of freedom-from-choice options will limited only by the talent of the designers involved.</p>
<h2>Conclusion</h2>
<p>So, I didn&#8217;t <em>really</em> mean to write an advertisement for <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS">FirefoxOS</a>—I work for Mozilla because I love the mission, I&#8217;m not trying to shill. Really, I just think it&#8217;s very important to have a sense of your choices and freedoms when you accept technology into your life. And, of course, I have some very strong opinions, but this post and the one before it are intended as more about choice in general than my own choices or angst. If you&#8217;re happy with your choices, even upon close examination, then that&#8217;s great—just keep your wits about you.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lmorchard.com/2012/09/27/freedom-to-change-your-mind/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Freedom {of,from} Choice</title>
		<link>http://blog.lmorchard.com/2012/09/24/freedom-of-from-choice</link>
		<comments>http://blog.lmorchard.com/2012/09/24/freedom-of-from-choice#comments</comments>
		<pubDate>Mon, 24 Sep 2012 17:25:54 +0000</pubDate>
		<dc:creator>lmorchard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[freedom]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://blog.lmorchard.com/?p=277</guid>
		<description><![CDATA[Freedom of choice and freedom from choice lay on a spectrum. And, in technology, it&#8217;s no coincidence that more choice tends to be messier and complex, less choice tends to be cleaner and simple. It&#8217;s a trade-off between what you choose and what you leave up to an expert. Tasting menus and wine pairings My [...]]]></description>
				<content:encoded><![CDATA[<p>Freedom <em>of</em> choice and freedom <em>from</em> choice lay on a spectrum. And, in technology, it&#8217;s no coincidence that more choice tends to be messier and complex, less choice tends to be cleaner and simple. It&#8217;s a trade-off between what you choose and what you leave up to an expert.</p>
<p><span id="more-277"></span></p>
<h2>Tasting menus and wine pairings</h2>
<p>My wife and I like to go out a few times a year on date nights to nice restaurants. These restaurants have <a href="https://www.google.com/search?q=tasting+menu">tasting menus</a> with wine pairings. This is dinner on cruise control, and we let the chef drive. It&#8217;s great when it works, because the chef makes expert choices.</p>
<p>Occasionally, it doesn&#8217;t work. There might be something we don&#8217;t like: Rabbit are pets, for instance. We&#8217;re not fans of seafood, though some menus have surprised us. We also have food allergies. Usually—though not always—we can ask for a substitution. Otherwise, we chalk it up to adventure.</p>
<p>But, overall, ordering from the tasting menu and trying the wine pairings makes date night simple with a side of novelty. It&#8217;s on the high end of freedom from choice. We choose to go out, and we choose the restaurant, but we leave the rest to experts.</p>
<h2>Suds and swine</h2>
<p>On the other end of things, I like to make homebrew—<a href="http://www.alphadictionary.com/goodword/word/zymurgy">zymurgy</a>, not software. There&#8217;s a spectrum of choice to be had here, too. But, even with <a href="https://www.homebrewing.org/2-Hearted-Clone_p_518.html">a kit</a>, the process is much more involved than just ordering a pint. I also have <a href="http://rogueestate.com/">friends who are great cooks</a>. When we all get together, <a href="http://www.flickr.com/photos/k1ds3ns4t10n/6114071558/">it&#8217;s a party</a>.</p>
<p>But, that party is <em>about</em> the food and drink, about sharing the process and the product. It&#8217;s not a simple date night: The choices are the focus as much as the participants. It&#8217;s a chance to show off and try new things, become experts ourselves.</p>
<h2>Power and ease of use</h2>
<p>Where am I going with this? Well, <a href="http://threads2.scripting.com/2012/september/todaysPodcast">Dave Winer said this in a podcast</a>:</p>
<blockquote><p>
  In software, the tricky parts are where the power comes from, and the ease of use comes from where you limit the amount of options. The more limited the options, the easier it is, but the less powerful it is. It&#8217;s just an engineering tradeoff there. It&#8217;s like the tradeoff between heat and motion in physics.</p>
</blockquote>
<p>The folks at Apple are masters of tasting menus and wine pairings when it comes to consumer electronics. You pick Apple because you don&#8217;t want to think about most of the choices. They have experts in various forms of design, and their products are elegant, beautiful, and generally work great together. It&#8217;s blindingly obvious from their bank balance that this is something people are more than happy to pay for.</p>
<p>Why? Because you have better things to do with your time than to futz with impedance mismatches and arcane interfaces. You know, like do the things for which you bought the gadgets in the first place (eg. work, play, communicate, etc).</p>
<p>On the other hand, you have something like the Linux ecosystem. Therein, many others have made choices for you. But, all the choices are still open to you—and many <em>must</em> be made by you. The result is kind of a mess at times, with little or no top-down unifying vision. But, the grit and the loose coupling between the parts are the stuff of freedom. Freedom of choice is dirty and complex, especially when lots of players are involved.</p>
<h2>Choose not to decide, or DIY</h2>
<p>Here&#8217;s the thing: <a href="http://www.youtube.com/watch?feature=player_detailpage&amp;v=OnxkfLe4G74#t=70s">If you choose not to decide, you still have made a choice</a>—you&#8217;ve just chosen to let an expert make most of the choices for you.</p>
<p>What happens when disagree with some of those choices? If you&#8217;re lucky, you can ask for substitutions (or tweak some options). But, you might have to go to a different restaurant (ie. another manufacturer). If you&#8217;re really unlucky, you&#8217;ll find that you disagree with <em>almost all of the restaurants and manufacturers</em>. Sometimes, we just grin and bear it, because switching is too inconvenient.</p>
<p>And beyond switching, do-it-yourself is just plain hard. You can crawl up the spectrum toward greater freedom-of-choice—but that demands greater knowledge, skill, and attention. You have to discover the choices, make them, and then track what you&#8217;ve done. In fact, it rises to the level of a <em>hobby</em> at a certain point, and you spend as much time (or more) on the infrastructure as the things it&#8217;s there to support.</p>
<h2>Sharpen the saw</h2>
<p>Here, I guess, it&#8217;s a personal decision: How much time are you willing to spend on the devices through which you do your thinking? Because, that&#8217;s what computers, tablets, smartphones, and software are: They&#8217;re <a href="http://opinionator.blogs.nytimes.com/2010/12/12/out-of-our-brains/">cognitive prosthetics</a>, addons to your brain that expand your capabilities to think, remember, and communicate. How comfortable are you with the choices made by your chosen experts in shaping the patterns of your mind?</p>
<p>Me, I&#8217;ve been a hobbyist in this field since very shortly after I learned how to read. My take on the power / ease-of-use spectrum was best put by Doug Engelbart, who asked &#8220;<a href="http://www.dougengelbart.org/history/pix.html#6a">Would you rather ride a tricycle or a bicycle to get across town?</a>&#8221; I&#8217;d rather have the freedom to program and recombine (and crash and twist my ankle), than take on an extra stabilizing wheel or slow down.</p>
<p>But, even if you&#8217;re not willing to rise to the level of cognitive prosthetics hobbyist, think about <a href="https://www.stephencovey.com/7habits/7habits-habit7.php">sharpening the saw</a>. Have you ever tried meditation? Written a journal? Taken training? Practiced a skill? Have you ever taken a critical look at the technology in your life and considered how it&#8217;s serving you and your mind? It&#8217;s all in the same category, to me. It&#8217;s an effort, and it takes time—but it&#8217;s self-investment.</p>
<h2>Food for thought</h2>
<p>In my head, earlier versions of this were more judgmental: <em>Holy crap how can so many people be so passive about the technology in their lives</em>?</p>
<p>Of course, it&#8217;s obvious: <em>People don&#8217;t have time for this crap. You&#8217;re the weirdo who&#8217;s been doing it almost since birth.</em></p>
<p>Still, just like attention to diet and exercise (of which I need more, myself), I think intentional use of technology is crucial. Take stock of your choices and freedoms. Be mindful of where you are on the freedom-of / freedom-from spectrum.</p>
<p>Do your gadgets and services make you more free and capable in ways about which you care? Have you given up things you&#8217;d rather not have given up (eg. time, cost, privacy, flexibility, lock-in, reliability, longevity)? Do you trust what your chosen experts are doing for you, are they working for your interests?</p>
<p>Of course, in my personal life, it&#8217;s a hobby. And it&#8217;s my job. And I spend way more time on mindful technology than I should, versus mindful eating and living. <a href="http://blog.lmorchard.com/2012/09/17/on-the-other-end-of-a-self-imposed-death-march-project">Like I said</a>, I need to work on that. But, hopefully, I&#8217;ve managed to lay out some ideas in this post about freedom, choice, and technology without coming off as a total angry nerd.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lmorchard.com/2012/09/24/freedom-of-from-choice/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Developing Open Web Apps: First, get it onto the web</title>
		<link>http://blog.lmorchard.com/2012/09/18/first-get-it-onto-the-web</link>
		<comments>http://blog.lmorchard.com/2012/09/18/first-get-it-onto-the-web#comments</comments>
		<pubDate>Tue, 18 Sep 2012 17:50:35 +0000</pubDate>
		<dc:creator>lmorchard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[openwebapps]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://blog.lmorchard.com/?p=242</guid>
		<description><![CDATA[I've been interested in developing [open web apps][1] (aka the [single-page app][2]) for years. But, it feels like the space is really on fire now, since the advent of HTML5 tech and the recent moves by Mozilla and Google toward truly "appifying" these things to compete with offerings from iOS and Android. Lots of pieces have come into alignment, and [great things are coming together][3]—[never mind what the folks at Facebook say][4].

So, I think I'm going to build a simple app and blog about it. And, these days, the first thing I think about when starting a web app is: How do I get it onto the web?]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been interested in developing <a href="https://developer.mozilla.org/en-US/apps">open web apps</a> (aka the <a href="http://en.wikipedia.org/wiki/Single-page_application">single-page app</a>) for years. But, it feels like the space is really on fire now, since the advent of HTML5 tech and the recent moves by Mozilla and Google toward truly &#8220;appifying&#8221; these things to compete with offerings from iOS and Android. Lots of pieces have come into alignment, and <a href="https://wiki.mozilla.org/Kilimanjaro">great things are coming together</a>—<a href="http://groovecoder.com/2012/09/12/facebook-never-bet-on-html5/">never mind what the folks at Facebook say</a>.</p>
<p>So, I think I&#8217;m going to build a simple app and blog about it. And, these days, the first thing I think about when starting a web app is: How do I get it onto the web?</p>
<p><span id="more-242"></span></p>
<h2>Start on the web</h2>
<p>Okay, so getting on the web is not the <em>first</em> thing. The <em>very</em> first thing is to create a new <a href="http://github.com/lmorchard">github.com</a> repo (complete with <code>README.md</code> and <code>.gitignore</code>) and then:</p>
<pre><code>cd ~/Dropbox/Public/
git clone git@github.com:lmorchard/my-project.git
cd my-project
</code></pre>
<p>And <em>then</em>, I start thinking about getting it onto the web.</p>
<p>That might sound backward: If all I have is a <code>README</code>, aren&#8217;t I jumping the gun? Well, no—I like to iterate, especially when experimenting with something new. Start simple, try one little thing, repeat. And, because this is a new pan-device world we&#8217;re living in, I&#8217;m often sitting on my couch hacking with a laptop in front, tablet to the left, and phone to the right.</p>
<p>So, before I even write the first line of &#8220;Hello world&#8221; in HTML, I want to have a way to get at it from all the gadgets. If it were just my laptop, I could open a <code>file://</code> URL and be done with it. Oh, but not really: Many of the new HTML5-and-friends technologies depend on things like domain origins and real HTTP connections.</p>
<p>I could <a href="http://www.linuxjournal.com/content/tech-tip-really-simple-http-server-python">start up a disposable HTTP server in the project directory</a> on my laptop and point the other gadgets at that. That works, to some extent. But, that&#8217;s limited to my LAN, I can&#8217;t share it with others for quick alpha testing, and I can&#8217;t check it out when I&#8217;m away from home and the laptop is closed.</p>
<p>That leaves me with my own web server. But, you know, that&#8217;s a pain in the butt and I&#8217;m getting tired of being sysadmin to my own server. Let&#8217;s take it to the cloud!</p>
<h2>How I (ab)use Github Pages</h2>
<p>Since I started with GitHub, <em>my project is already on the web</em>. Or, mostly it is, but just not exactly how I&#8217;d like it. To get the project published at a URL, this is what I do:</p>
<pre><code>git co -b gh-pages
git push origin gh-pages
git co master
</code></pre>
<p>Give it a few, and you&#8217;ll receive an email from <a href="http://pages.github.com/">Github Pages</a> (re: <code>[my-project] Page build successful</code>). Give it a few more, since this is the first time for the project. Shortly, the <code>README</code> shows up at an URL like the following:</p>
<pre><code>http://lmorchard.github.com/my-project/README.md
</code></pre>
<p>After that, whenever I want to publish updates to the app, this is what I do:</p>
<pre><code>git co gh-pages
git rebase master
git push origin gh-pages
git co master
</code></pre>
<p>And, within seconds (usually), my app is updated on the web. With free hosting, because the folks at GitHub are really nice.</p>
<p>But, though this works nicely for an app demo or beta, try not to abuse their hospitality by using your <a href="http://pages.github.com/">GitHub Pages</a> URL as the official distribution point for your app.</p>
<h2>How I (ab)use Dropbox</h2>
<p>You know, all that committing and pushing and rebasing can really get tiresome. And, it craps up my commit history while I&#8217;m just kind of twiddling some bits back and forth to see what happens. We&#8217;re living in the future, damn it, I don&#8217;t have to put up with this!</p>
<p>And, so, I don&#8217;t. Maybe you noticed that I ran <code>git clone</code> from inside my <a href="https://www.dropbox.com/help/16/en">Dropbox Public folder</a>. Anything in that folder <em>is already on the web</em>: Each file has a public URL, and I can acquire it with a right-click in Finder (ie. Dropbox > Copy Public Link). The result is something like this:</p>
<pre><code>https://dl.dropbox.com/u/2798055/my-project/README.md
</code></pre>
<p>It&#8217;s a crufty URL, but an URL nonetheless. Dropbox public links also mirror the folder structure, so that an <code>index.html</code> can load all the CSS and JS it wants from relative URLs just like a normal web host.</p>
<p>With Dropbox, then, my hacking cycle with Dropbox looks like this:</p>
<ol>
<li>Save in MacVim</li>
<li>Switch to Firefox</li>
<li>Refresh</li>
<li>Repeat</li>
</ol>
<p>More often than not, my app has gotten updated on the Dropbox servers somewhere between steps #1 and #3. That&#8217;s a much tighter iteration loop than doing the GitHub dance. In fact, it&#8217;s pretty much indistinguishable from just working on my laptop with <code>file://</code> URLs or a disposable HTTP server on my LAN.</p>
<p>There&#8217;s some bad news, though. I&#8217;ve just read that <a href="https://www.dropbox.com/help/16/en">new accounts created after 7/31/2012 no longer get a Public folder</a>. So, it would seem that the days of carefree hosting-by-Public-folder are on the way out. But fret not: the folks at Dropbox have <a href="https://tech.dropbox.com/?p=345">provided an alternative for hosting static web apps under development</a>. They&#8217;ve also opened up their API for use by open web apps with <a href="https://github.com/dropbox/dropbox-js">dropbox-js</a>. In fact, this API will play a part in the app about which I plan to blog.</p>
<h2>How I use Amazon S3</h2>
<p>So, (ab)using GitHub and Dropbox for hosting your app under development is fine and dandy. But, you definitely don&#8217;t want to rely on them for publishing your app for wider distribution. <a href="http://en.wikipedia.org/wiki/There_ain%27t_no_such_thing_as_a_free_lunch">There ain&#8217;t no such thing as a free lunch</a> (TANSTAAFL), and someone&#8217;s bound to shut you down or send you a bill—best to get that out of the way up front.</p>
<p>As it turns out, <a href="http://aws.amazon.com/">Amazon Web Services</a> will happily accept <a href="http://aws.amazon.com/s3/pricing/">the change from your penny jar</a> to serve up small collections of web content. Well, they will after you&#8217;ve turned the physical pennies into numbers in a bank account, but my point is that Amazon S3 is <em><a href="http://aws.amazon.com/s3/pricing/">super cheap</a></em>. And, since I&#8217;m talking about a single-page web app here, <a href="http://aws.amazon.com/about-aws/whats-new/2011/02/17/Amazon-S3-Website-Features/">plain old static web hosting</a> is all you need for now.</p>
<p>In fact, if you own a domain name, you can control the URL from which S3 serves up your content. Basically, you just:</p>
<ol>
<li>create a DNS record with a CNAME to S3 (eg. <code>my-project.lmorchard.com</code> -> <code>s3-website-us-east-1.amazonaws.com</code>);</li>
<li><a href="https://console.aws.amazon.com/s3/home">create a bucket named for your domain</a> (eg. <code>my-project.lmorchard.com</code>);</li>
<li><a href="http://aws.typepad.com/aws/2011/02/host-your-static-website-on-amazon-s3.html">check a box in the properties panel to enable static hosting</a>.</li>
</ol>
<p>The above is vaguely more advanced than either GitHub or Dropbox, but this is playing with power. And, with great power comes great responsibility to read the fine manual. Still, it&#8217;s not that hard and it&#8217;s not that spendy.</p>
<h3>How I make Amazon S3 work like Dropbox</h3>
<p>So, great: You&#8217;ve got Amazon S3 serving content at a URL of your choice. And, you can upload content using the <a href="https://console.aws.amazon.com/s3/home">control panel</a> or one of the many fine desktop clients available. But, that sounds a bit like the GitHub deployment dance, just GUI-er. Not bad for Official Releases of your app—but what a pain for development!</p>
<p>Apropos of that, I have a small trick on OS X that makes Amazon S3 as convenient as Dropbox:</p>
<ul>
<li>Install <a href="https://rubygems.org/gems/kicker">kicker</a>;</li>
<li>Install <a href="http://s3tools.org/s3cmd">s3cmd</a> and configure it with your S3 credentials;</li>
<li>Run <a href="https://github.com/lmorchard/notational-vapor/blob/master/s3-sync.sh">this</a> from your project directory in a terminal:
<p>kicker -c -e &#8216;s3cmd -vfrP &#8211;exclude=&#8221;<em>swp&#8221; &#8211;exclude=&#8221;.git</em>&#8221; sync . s3://my-project.lmorchard.com/&#8217;</li>
</ul>
<p>What this does is start <code>kicker</code> to monitor your files. Whenever anything changes, <code>s3cmd</code> uploads the changes to Amazon S3. After the first run, my content shows up at an URL like:</p>
<pre><code>http://my-project.lmorchard.com/README.md
</code></pre>
<p>So, again, my hacking cycle with Amazon S3 looks like this:</p>
<ol>
<li>Save changes</li>
<li>Switch to browser</li>
<li>Refresh</li>
<li>Repeat</li>
</ol>
<p>Again, this turns out to be nearly indistinguishable from working on <code>localhost</code> or with <code>file://</code> URLs, because the kicker-s3cmd team has generally already shipped off my changes before I can get to the browser. I&#8217;m sure something similar to the above can be cobbled together on Linux or Windows, but I don&#8217;t work there so I&#8217;ve not bothered to figure it out.</p>
<h2>In conclusion</h2>
<p>Developing open web apps on the open web can be fun, fast, cheap, and convenient. I&#8217;ve got more posts forthcoming, at least in my head, but hopefully this one gives some starting points.</p>
<p>I may also revise and further develop this post, since I left quite a bit of reading to the reader with links to follow. There are also even more cheap and easy web hosts, so maybe I&#8217;ll explore those as well. In the meantime, feel free to leave some comments!</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.lmorchard.com/2012/09/18/first-get-it-onto-the-web/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>On the other end of a self-imposed death march project</title>
		<link>http://blog.lmorchard.com/2012/09/17/on-the-other-end-of-a-self-imposed-death-march-project</link>
		<comments>http://blog.lmorchard.com/2012/09/17/on-the-other-end-of-a-self-imposed-death-march-project#comments</comments>
		<pubDate>Mon, 17 Sep 2012 20:25:03 +0000</pubDate>
		<dc:creator>lmorchard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mdn]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://blog.lmorchard.com/?p=213</guid>
		<description><![CDATA[So, I&#8217;m a couple of weeks back from a well-deserved vacation taken after the launch of a project well over 18 months in the making. I kind of overworked myself, voluntarily, and that needs to change. What project? Kuma on developer.mozilla.org. What&#8217;s that? Well, it&#8217;s generally described as a wiki, but though I think we&#8217;ve [...]]]></description>
				<content:encoded><![CDATA[<p>So, I&#8217;m a couple of weeks back from a well-deserved vacation taken after the launch of a project well over 18 months in the making. I kind of overworked myself, voluntarily, and that needs to change.</p>
<p><span id="more-213"></span></p>
<p>What project? <a href="https://github.com/mozilla/kuma">Kuma</a> on <a href="https://developer.mozilla.org">developer.mozilla.org</a>. What&#8217;s that? Well, it&#8217;s generally described as a wiki, but though I think we&#8217;ve gone a long way away from &#8220;<a href="http://www.wiki.org/wiki.cgi?WhatIsWiki">The simplest online database that could possibly work</a>&#8220;. At this point, it&#8217;s a content management system, complete with revision management, WYSIWYG, collaboration, community, and localization features. It&#8217;s a wiki insofar as anyone can edit it, but Kuma&#8217;s not exactly simple.</p>
<p>The parts I had the heaviest hand in were:</p>
<ul>
<li><a href="https://github.com/mozilla/kuma/blob/master/apps/dekicompat/management/commands/migrate_to_kuma_wiki.py">Content migration from the previous incarnation</a>, which employed the <a href="http://www.mindtouch.com/">MindTouch</a> platform to a very full extent;</li>
<li>Development of <a href="https://github.com/mozilla/kumascript">KumaScript</a>, a server-side JS platform for dynamic content heavily inspired by (ie. cribbed entirely from) <a href="http://developer.mindtouch.com/en/docs/DekiScript">DekiScript</a>.</li>
</ul>
<p>As it turns out, those were two of the hardest parts of the project. No, I wasn&#8217;t alone: I&#8217;m a member of a team, and my teammates did plenty of work themselves. But, I&#8217;ve found that I have a lot in common with <a href="http://masseffect.wikia.com/wiki/Mordin_Solus">Mordin Solus</a>, a fact that made me actually cry during this scene:</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='320' height='240' src='http://www.youtube.com/embed/1lfJMIwHDEM?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>(Spoiler alert: Mordin gets blown up.)</p>
<p>That&#8217;s why I say this was a self-imposed <a href="http://en.wikipedia.org/wiki/Death_march_%28project_management%29">death march</a>. No one nailed me to my desk, and no one on my team was a slacker. In fact, although there was a lot of pressure to get this project out the door ASAP, managers and others quite often told me to take it easier. And furthermore, working on myself to ease up on this particularly neurotic sentiment was a major theme of recent performance reviews.</p>
<p>So, to be clear: This is about me, and not my team. My team is awesome.</p>
<p>That said, my motivations for the work on MDN are pretty simple:</p>
<ul>
<li>I think producing tech books online, collaboratively, is the future;</li>
<li>I love Mozilla and the open web.</li>
</ul>
<p>And, so it seems, Mozilla loves me back. I got atta boys all around, from managers and awesome teammates alike. So, my efforts certainly didn&#8217;t go unappreciated. In my experience <a href="http://careers.mozilla.org/en-US/">Mozilla is a brilliant place to work</a> and is an organization that appreciates both smart and hard work in ways both conventional and unexpected.</p>
<p>All that said, though, I really do need to ease up. There are plenty of things in life at large that I&#8217;ve been neglecting lately &#8211; and that&#8217;s not good: Those are the things that make my work possible to begin with.</p>
<p>But, I&#8217;m not burnt out and I&#8217;m not moving on. I didn&#8217;t bust my ass on MDN just to wander off from it, and I can&#8217;t think of a better place to be than at Mozilla (<a href="https://wiki.mozilla.org/Kilimanjaro">especially right now</a>). But, it&#8217;s time to take a bit of a more human pace with things. Contribute, take breaks, trust my awesome teammates can kick as much ass as I demand from myself.</p>
<p>Because the MDN team totally does kick so much ass.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lmorchard.com/2012/09/17/on-the-other-end-of-a-self-imposed-death-march-project/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Note to self File a bug to get&#8230;</title>
		<link>http://blog.lmorchard.com/2012/07/10/note-to-self-file-a-bug-to-get</link>
		<comments>http://blog.lmorchard.com/2012/07/10/note-to-self-file-a-bug-to-get#comments</comments>
		<pubDate>Wed, 11 Jul 2012 03:21:27 +0000</pubDate>
		<dc:creator>lmorchard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://blog.lmorchard.com/2012/07/10/note-to-self-file-a-bug-to-get</guid>
		<description><![CDATA[Note to self: File a bug to get the Mozilla tag feed here added to Planet Mozilla]]></description>
				<content:encoded><![CDATA[<p>Note to self: File a bug to get <a href="http://blog.lmorchard.com/tag/mozilla/feed">the Mozilla tag feed</a> here added to Planet Mozilla</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lmorchard.com/2012/07/10/note-to-self-file-a-bug-to-get/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How webdev has been getting better</title>
		<link>http://blog.lmorchard.com/2012/07/10/webdev-more-better</link>
		<comments>http://blog.lmorchard.com/2012/07/10/webdev-more-better#comments</comments>
		<pubDate>Wed, 11 Jul 2012 02:52:57 +0000</pubDate>
		<dc:creator>lmorchard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://blog.lmorchard.com/?p=110</guid>
		<description><![CDATA[So, in the last thing I posted, I wrote about how fixing problems on live web sites feels like fixing space robots. At Mozilla, though, things have been getting steadily better and more interesting: There&#8217;s still the sysadmin-as-remote-pair-of-hands-driven-by-trouble-tickets thing going on, but less so every day. More and more, we&#8217;re getting into continuous deployment. Our [...]]]></description>
				<content:encoded><![CDATA[<p>So, in the last thing I posted, I wrote about how fixing problems on live web sites <a href="http://blog.lmorchard.com/2012/07/10/webdev-in-spac">feels like fixing space robots</a>. At Mozilla, though, things have been getting steadily better and more interesting:</p>
<p><a href="http://www.amazon.com/gp/product/B004D18MCK/ref=as_li_ss_il?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B004D18MCK&amp;linkCode=as2&amp;tag=0xdecafbad01-20"><img src="http://ecx.images-amazon.com/images/I/41AvY4p2haL._SL160_.jpg" style="float:left; margin: 1em 1em 1em 0" /></a></p>
<p>There&#8217;s still the <em>sysadmin-as-remote-pair-of-hands-driven-by-trouble-tickets</em> thing going on, but less so every day. More and more, we&#8217;re getting into <a href="http://www.slideshare.net/MattBrandt/mozilla-continuous-deploment-on-sumo">continuous deployment</a>. Our sysadmins are really smart cookies: They&#8217;re steadily replacing themselves with scripts of varying sizes. That way, they can get on to more interesting things. In fact, just recently, they gave us a great Big Red Button that deploys code from a git repository to the live site on demand. And, for some reason, I&#8217;m one of the people who got a key to it.</p>
<p>Okay, maybe not <a href="http://www.amazon.com/gp/product/B004D18MCK/ref=as_li_ss_il?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B004D18MCK&amp;linkCode=as2&amp;tag=0xdecafbad01-20"><em>that</em> exact button</a>, but ours is very keen. Of course, when it broke once, I felt like the Pakled on the right (and not Geordi):</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='640' height='390' src='http://www.youtube.com/embed/-WmGvYDLsj4?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>But, the Big Red Button hasn&#8217;t broken very often. So, I&#8217;d rather be a Pakled some of the time than pretend to be a rocket scientist all of the time.</p>
<p><a href="http://octodex.github.com/"><img src="http://octodex.github.com/images/twenty-percent-cooler-octocat.png" style="width: 150px; float: right; margin: 1em 0 1em 1em" /></a> Oh yeah, and <a href="https://github.com/mozilla/">we&#8217;re using GitHub a lot these days</a>. It&#8217;s crazypants awesome for collaboration, and it fits right in with our style because we want to do everything in the open anyway. We&#8217;ve even somehow lured people who don&#8217;t normally code into <a href="https://github.com/mozilla/kuma/commit/1a8038215a2c4bb7fba5ff098875d034704d79bd">submitting Pull Requests</a>. And, it&#8217;s amazingly powerful to refer to specific lines of code and commits by URL in IRC or email.</p>
<p><a href="http://vagrantup.com/"><img src="http://vagrantup.com/static/images/hippie.png" style="width: 150px; float: left; margin: 1em 1em 1em 0" /></a> I&#8217;ve also been getting a lot better at building development environments, <a href="http://opensourcebridge.org/wiki/2011/Inviting_Contributors_to_Open_Source_Webdev_through_Virtualization">using Puppet and Vagrant</a> and Amazon EC2. I haven&#8217;t quite gotten to the point where I can borrow IT&#8217;s Puppet manifests directly &#8211; ie. those scripts with which sysadmins are replacing themselves.</p>
<p>But, we are maintaining the recipes for spinning up dev servers right alongside the code. Our READMEs are shrinking, rather than growing &#8211; and yet we&#8217;re still adding more services and dependencies. I no longer really fear totally jack-knifing my dev rig, because I can just toss it and conjure up another in the time it takes me to run to lunch.</p>
<p>Let&#8217;s see, what else? I&#8217;m sure I&#8217;ll think of something. Until then, SHIP IT. (The post, I mean.)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lmorchard.com/2012/07/10/webdev-more-better/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How webdev is like space exploration</title>
		<link>http://blog.lmorchard.com/2012/07/10/webdev-in-spac</link>
		<comments>http://blog.lmorchard.com/2012/07/10/webdev-in-spac#comments</comments>
		<pubDate>Tue, 10 Jul 2012 18:32:13 +0000</pubDate>
		<dc:creator>lmorchard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[space]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://blog.lmorchard.com/?p=105</guid>
		<description><![CDATA[This isn&#8217;t so much a complaint as a set of observations: Sometimes, as a webdev, diagnosing and fixing issues on a live site in production gives me sympathy for NASA scientists dealing with remote space probes. And, that&#8217;s because I generally don&#8217;t have direct access to the servers. Instead, my access is mediated through sysadmins [...]]]></description>
				<content:encoded><![CDATA[<p>This isn&#8217;t so much a complaint as a set of observations: Sometimes, as a webdev, diagnosing and fixing issues on a live site in production gives me sympathy for NASA scientists dealing with remote space probes. And, that&#8217;s because I generally don&#8217;t have direct access to the servers. Instead, my access is mediated through sysadmins whose primary communication channel is trouble tickets. (Occasionally, I&#8217;ll be lucky enough to have someone I can pester more directly, but that&#8217;s a privilege that I try really hard not to abuse.)</p>
<p><a href="http://marsrovers.jpl.nasa.gov/home/index.html"><img src="http://marsrovers.jpl.nasa.gov/overview/rover_low_angle_200.jpg" style="float:right; margin: 1em 0em 1em 1em" /></a> So, I build my own replicas of production sites, as best as I can. I deploy exploratory rovers into those environments, and try to account for what could happen based on everything I know up to this point. Once I&#8217;ve done all I can to prepare, I fire up the comms dish and beam out a request to the distant probe. This takes time because I have to wait until the receiver is in alignment, and there&#8217;s a transmission &amp; reply delay due to distance. (<em>In other words, I file a bug and wait for someone to pick it up. That takes awhile, because we&#8217;re all busy people, and I&#8217;m a telecommuter who can&#8217;t just go tap someone on the shoulder.</em>)</p>
<p>I cross my fingers and hope I&#8217;ve built up a good-enough model of the remote environment, and maybe I&#8217;ll find that my hypothesis will be validated. If not, well, then I at least hope I haven&#8217;t broken anything, and hope that there&#8217;s new information in the reply that I can assimilate into my replica environment here back at home for an improved next attempt.</p>
<p>But, I&#8217;m not entirely sure how to improve this situation. If I had direct access to production servers, I&#8217;d be able to do more. However, if I had that access, I&#8217;d be <em>expected</em> to do more. You know, like wear a pager and wake up at 4am to fix an alarm condition. I&#8217;ve done that job in the past, and I don&#8217;t envy anyone who has it now.</p>
<p>There are also, I imagine, trust and confidentiality issues: even though I write the code, I&#8217;m not necessarily qualified to be in contact with certain kinds of sensitive data on a daily basis. (And by not qualified, I mean not bound by a certain class of contractual or legal obligations and not subject to certain kinds of training. I&#8217;ll say you can trust me, but trust is sometimes a formalized thing.)</p>
<p>Still, some days I like to imagine that what I&#8217;m doing is trying to debug the behavior of a robot in orbit around Mars. It keeps me from putting too many dents into my desk with my forehead.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lmorchard.com/2012/07/10/webdev-in-spac/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
