<?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>Mozilla Web Development</title>
	<atom:link href="http://blog.mozilla.org/webdev/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mozilla.org/webdev</link>
	<description>Engineering the web</description>
	<lastBuildDate>Tue, 21 May 2013 19:37:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Firefox Marketplace: May 3rd – May 16th</title>
		<link>http://blog.mozilla.org/webdev/2013/05/21/firefox-marketplace-may-3rd-may-16th/</link>
		<comments>http://blog.mozilla.org/webdev/2013/05/21/firefox-marketplace-may-3rd-may-16th/#comments</comments>
		<pubDate>Tue, 21 May 2013 19:11:10 +0000</pubDate>
		<dc:creator>Andy McKay</dc:creator>
				<category><![CDATA[Marketplace]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.mozilla.org/webdev/?p=3473</guid>
		<description><![CDATA[This is a regular post focusing on the status of the Firefox Marketplace. Total bugs open: 552 Total bugs opened: 298 Total bugs closed: 218 Some specific changes of note: APIs added for payment status and users permissions (868030 and &#8230; <a class="go" href="http://blog.mozilla.org/webdev/2013/05/21/firefox-marketplace-may-3rd-may-16th/">Continue reading</a>]]></description>
				<content:encoded><![CDATA[<p>This is a regular post focusing on the status of the <a href="https://marketplace.firefox.com">Firefox Marketplace</a>.</p>
<ul>
<li>Total bugs open: <a href="https://bugzilla.mozilla.org/buglist.cgi?bug_status=UNCONFIRMED;bug_status=NEW;bug_status=ASSIGNED;bug_status=REOPENED;product=marketplace;list_id=5331358">552</a></li>
<li>Total bugs opened: <a href="https://bugzilla.mozilla.org/buglist.cgi?chfieldfrom=2013-05-03&#038;chfield=[Bug%20creation]&#038;chfieldto=2013-05-16&#038;product=marketplace&#038;list_id=6355455">298</a></li>
<li>Total bugs closed: <a href="https://bugzilla.mozilla.org/buglist.cgi?chfieldfrom=2013-05-03;chfield=resolution;chfieldto=2013-05-16;chfieldvalue=FIXED;product=marketplace;list_id=5697624">218</a></li>
</ul>
<p>Some specific changes of note:</p>
<ul>
<li>APIs added for payment status and users permissions (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=868030">868030</a> and <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=868252">868252</a>)</li>
<li>API to allow the setup of payments for apps (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=869572">869572</a>)</li>
<li>Allow a submission flow that checks app permissions (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=858306">858306</a>)</li>
<li>Enable the German and Polish translations (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=868888">868888</a> and <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=868594">868594</a>)</li>
<li>Signing in after logging out fixed (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=869664">869664</a>)</li>
<li>Submitting reviews multiple times fixed (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=871871">871871</a>)</li>
<li>Webfighter demo gained payments (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=858289">858289</a>)</li>
<li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=811014">Forced issuers</a> for payments re-enabled (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=850084>850085</a>)</li>
<li>Payments hooked up for the mMrketplace (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=867729">867729</a>)</li>
<li>Senior Themes reviewer group created (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=868053">868053</a>)</li>
<li>Move from pyes to pyelasticsearch (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=857156">857156</a>)</li>
<li>Scroll positions preserved between tabs in the marketplace (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=868249">868249</a>)</li>
<li>Stop Marketplace reverting to US after a phone reboot (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=865132">865132</a>)</li>
</ul>
<p>The new Marketplace consumer user interface was pushed. The Marketplace is now a packaged app that uses the REST API to populate the app. This was a huge change and makes the site faster and more awesome. To checkout the packaged app see the <a href="https://github.com/mozilla/fireplace/">Fireplace</a> app on github.</p>
<p>The Marketplace was also moved out of <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=854433">Aurora status</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.org/webdev/2013/05/21/firefox-marketplace-may-3rd-may-16th/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Avoiding Dependencies</title>
		<link>http://blog.mozilla.org/webdev/2013/05/03/avoiding-dependencies/</link>
		<comments>http://blog.mozilla.org/webdev/2013/05/03/avoiding-dependencies/#comments</comments>
		<pubDate>Fri, 03 May 2013 23:33:06 +0000</pubDate>
		<dc:creator>Andy McKay</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.mozilla.org/webdev/?p=3446</guid>
		<description><![CDATA[Guest post on behalf of Matt Basta. Avoid code duplication and reusing code is always an admirable goal. However, in some occasions, it&#8217;s not a bad idea to duplicate a little bit of code in order to make your software &#8230; <a class="go" href="http://blog.mozilla.org/webdev/2013/05/03/avoiding-dependencies/">Continue reading</a>]]></description>
				<content:encoded><![CDATA[<p>Guest post on behalf of <a href="https://twitter.com/mattbasta">Matt Basta</a>.</p>
<p>Avoid code duplication and reusing code is always an admirable goal. However, in some occasions, it&#8217;s not a bad idea to duplicate a little bit of code in order to make your software better.</p>
<h2><a class="anchor" href="#an-example" name="an-example"></a>An Example</h2>
<p>When writing a Node app, accessing a directory listing is fairly simple: the <code>fs.readdir</code> command provides a list of objects in a directory, and a call to <code>fs.stat</code> will tell you whether each object is a directory or a file.</p>
<p>That&#8217;s fairly straightforward, but recursing (especially when using callbacks) can require some mental yoga. Each directory needs to keep track of how many subdirectories it expects to receive callbacks for and results need to be aggregated in pieces rather than sequentially.</p>
<p>When I needed a recursive directory listing this past week, I was tempted to use a library: why solve a solved problem? The <code>glob</code> library provides this functionality with very little effort:</p>
<p><script src="https://gist.github.com/andymckay/5515124.js"></script></p>
<p>Why would you use anything else? Here&#8217;s what I saw when I did an <code>npm install glob</code>:</p>
<ul>
<li>glob
<ul>
<li>minimatch
<li>lru-cache</li>
</ul>
<li>sigmund</li>
<li>grafeful-fs</li>
<li>inherits</li>
</ul>
<p>Simply by adding glob to my project, I&#8217;ve added a total of six modules. That&#8217;s not unexpected, though, since glob does a whole lot more than I need it to do. In the end, I ended up simply writing my own, and including it in the single file that requires the functionality:</p>
<p><script src="https://gist.github.com/andymckay/5515118.js"></script></p>
<h2><a class="anchor" href="#why-are-dependencies-not-good" name="why-are-dependencies-not-good"></a>Why are dependencies not good?</h2>
<p>First, and most importantly, is the security of those packages. If the SSH keys of the developer of those packages are compromised, an attacker could provide an &#8220;updated&#8221; version of the library which includes malicious code. At Mozilla, we use internal mirrors of PyPi and NPM to make sure we&#8217;re not installing arbitrary modules. Avoiding dependencies helps to avoid requiring a solution.</p>
<p>Second, there&#8217;s a performance hit for libraries. If you&#8217;re building a one-off fix for a simple problem, using a library increases the overhead of your app&#8217;s load and use. If you&#8217;re building a web app on Node or Django, you might use an auto-reloader to restart your local server when script files change. In many projects, this takes an imperceptibly small amount of time to reload. As your codebase and dependency list grows, your auto-reloader can take precious seconds to run (we have projects that take almost five seconds to reboot).</p>
<p>Each dependency increases the time it will take to install your application. Zamboni (the code behind addons.mozilla.org and marketplace.firefox.com), for instance, takes 12 minutes to install libraries and dependencies. What starts out as a small number of libraries can very quickly grow out of control and become a serious nuisance. <code>time npm install glob</code>, to reference my earlier example, tells me that glob adds four seconds to my install time. Some simple and unscientific benchmarks from popular node libraries:</p>
<ul>
<li><code>socket.io</code>: 33s</li>
<li><code>mongoose</code>: 9.5s</li>
<li><code>connect</code>: 5.7s</li>
<li><code>jade</code>: 5.3s</li>
<li><code>express</code>: 4.4s</li>
<li><code>glob</code>: 3.9s</li>
</ul>
<p>And some from popular Python libraries (run with <code>time pip install &lt;module&gt;</code>):</p>
<ul>
<li><code>numpy</code>: 110s</li>
<li><code>django</code>: 96s</li>
<li><code>pycrypto</code>: 18s</li>
<li><code>flask</code>: 14s</li>
</ul>
<p>Third, you&#8217;re taking the gamble that the libraries that you depend on don&#8217;t have conflicting versions. A great example of this can be illustrated by a web app that I was building: the HTTP requests that I was creating with Python&#8217;s requests library didn&#8217;t have a <code>.json</code> property, as the docs state. An hour of hair-tearing later, I discovered that another library that I was using had already installed a much older version of requests which lacked the property. Unfortunately, the library wasn&#8217;t compatible with the latest version of requests and I had to settle for the old version.</p>
<p>The consequences could have been much worse, and this is a not-well-solved problem (for the Python community, at least).</p>
<p>Last, if your project is used as a library, including dependencies decreases the re-usability of your code. If your code uses a third-party library when it could have taken advantage of some slightly-gnarly standard library tools, all of the above reasons make it that much more difficult for a developer to justify using your tool.</p>
<h2><a class="anchor" href="#now-hold-on-just-a-minute" name="now-hold-on-just-a-minute"></a>Now hold on just a minute.</h2>
<p>Does this mean you should never use an external library? Not at all! You should use libraries whenever it&#8217;s appropriate. Sometimes the effort required to perform a task correctly and thoroughly (or at all) is simply too much work to do on your own. OAuth? You&#8217;ll probably want a library. Database work or ORM? Use a library. But what if you need to serve a single static HTML file over HTTP? You can probably use Node&#8217;s http or Python&#8217;s SimpleHTTPServer without too much heartache.</p>
<p>Sometimes it&#8217;s just irresponsible to write code yourself: would you trust a developer&#8217;s one-off method or a mature ORM&#8217;s SQL sanitization code? What about code to generate secure random numbers for encrypting sensitive data? Or code that protects against XSS attacks? There are a lot of instances where it&#8217;s in your users&#8217; best interest to use a trusted solution rather than your own solution.</p>
<h2><a class="anchor" href="#a-double-edged-sword" name="a-double-edged-sword"></a>A double-edged sword.</h2>
<p>Another reason for choosing libraries is the community: if there are bug fixes to a third-party library, dependents can relatively easily update to the latest version of the library and take advantage of the improvements immediately.</p>
<p>That can be a good thing and a bad thing, though. Libraries without a community around them can contain bugs that don&#8217;t get patched in a timely manner. Fixes may be difficult or impossible to upstream.</p>
<h2><a class="anchor" href="#tldr" name="tldr"></a>TL;DR</h2>
<ol>
<li>If you can easily get by without a dependency, you don&#8217;t need the dependency.</li>
<li>If you&#8217;re building a library, you should avoid dependencies.</li>
<li>Don&#8217;t avoid dependencies if it means potentially putting your users at risk.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.org/webdev/2013/05/03/avoiding-dependencies/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Firefox Marketplace: April 19th – May 2nd</title>
		<link>http://blog.mozilla.org/webdev/2013/05/03/firefox-marketplace-april-19th-may-2nd/</link>
		<comments>http://blog.mozilla.org/webdev/2013/05/03/firefox-marketplace-april-19th-may-2nd/#comments</comments>
		<pubDate>Fri, 03 May 2013 23:20:36 +0000</pubDate>
		<dc:creator>Andy McKay</dc:creator>
				<category><![CDATA[Marketplace]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.mozilla.org/webdev/?p=3440</guid>
		<description><![CDATA[This is a regular post focusing on the status of the Firefox Marketplace. Total bugs open: 538 Total bugs opened last two weeks: 237 Total bugs closed last week: 159 Payments testing was conducted in the field and that caused &#8230; <a class="go" href="http://blog.mozilla.org/webdev/2013/05/03/firefox-marketplace-april-19th-may-2nd/">Continue reading</a>]]></description>
				<content:encoded><![CDATA[<p>This is a regular post focusing on the status of the <a href="https://marketplace.firefox.com">Firefox Marketplace</a>.</p>
<ul>
<li>Total bugs open: <a href="https://bugzilla.mozilla.org/buglist.cgi?bug_status=UNCONFIRMED;bug_status=NEW;bug_status=ASSIGNED;bug_status=REOPENED;product=marketplace;list_id=5331358">538</a></li>
<li>Total bugs opened last two weeks: <a href="https://bugzilla.mozilla.org/buglist.cgi?chfieldfrom=2013-04-05&#038;chfield=[Bug%20creation]&#038;chfieldto=2013-04-18&#038;product=marketplace&#038;list_id=6355455">237</a></li>
<li>Total bugs closed last week: <a href="https://bugzilla.mozilla.org/buglist.cgi?chfieldfrom=2013-04-05;chfield=resolution;chfieldto=2013-04-18;chfieldvalue=FIXED;product=marketplace;list_id=5697624">159</a></li>
</ul>
<p>Payments testing was conducted in the field and that caused a large number of bugs to be filed.</p>
<p>Some specific changes of note:</p>
<ul>
<li>API for the simulator to create app receipts (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=865498">865498</a>)</li>
<li>Users languages are now persisted for Marketplace and AMO so emails can be localized (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=833049">833049</a>)</li>
<li>API now works correctly with geo location (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=863775">863775</a>)</li>
<li>App locale listings improved in the developer pages (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=866287">866287</a>)</li>
<li>A whole bunch of payment fixes from Bango.</li>
<li>Product icon API makes payment pages so much prettier (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=864451">864451</a>)</li>
<li>Fireplace shows new apps (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=867272">867272</a>)</li>
<li>Review queue for themes improved (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=841185">841185</a>)</li>
<li>A parser for the new app feature detection (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=862459">862459</a>)</li>
<li>New design for the details page (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=860384">860384</a></li>
<li>If users abort during PIN, make them start again (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=867727">867727</a></li>
</ul>
<p>Payments with an icon:</p>
<p><a href="http://blog.mozilla.org/webdev/files/2013/05/Screen-Shot-2013-05-03-at-4.14.27-PM.png"><img src="http://blog.mozilla.org/webdev/files/2013/05/Screen-Shot-2013-05-03-at-4.14.27-PM.png" alt="Screen Shot 2013-05-03 at 4.14.27 PM" width="319" height="480" class="alignnone size-full wp-image-3441" /></a></p>
<p><a href="https://developer.mozilla.org/en-US/docs/WebAPI/Web_Activities">Web activities</a> are <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=865965">coming to</a> the Marketplace.</p>
<p><script src="https://gist.github.com/andymckay/5515023.js"></script></p>
<p>Check out the <a href="https://github.com/mozilla/fireplace/wiki/Web-Activities">documentation</a> for more.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.org/webdev/2013/05/03/firefox-marketplace-april-19th-may-2nd/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mozilla Webdev “Beer and Tell”, April 26, 2013</title>
		<link>http://blog.mozilla.org/webdev/2013/04/30/mozilla-webdev-beer-and-tell-april-26-2013/</link>
		<comments>http://blog.mozilla.org/webdev/2013/04/30/mozilla-webdev-beer-and-tell-april-26-2013/#comments</comments>
		<pubDate>Tue, 30 Apr 2013 18:47:49 +0000</pubDate>
		<dc:creator>Jennifer Fong</dc:creator>
				<category><![CDATA[Beer and Tell]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.mozilla.org/webdev/?p=3413</guid>
		<description><![CDATA[So what’s a Beer and Tell? A Beer and Tell is an event web developers at Mozilla hold every third Friday of the month. We share emotional and uplifting stories about projects we&#8217;re hacking on to the group. Usually open &#8230; <a class="go" href="http://blog.mozilla.org/webdev/2013/04/30/mozilla-webdev-beer-and-tell-april-26-2013/">Continue reading</a>]]></description>
				<content:encoded><![CDATA[<h2>So what’s a Beer and Tell?</h2>
<p>A Beer and Tell is an event web developers at Mozilla hold every third Friday of the month. We share emotional and uplifting stories about projects we&#8217;re hacking on to the group. Usually open source projects. Likely with a reasonable license. Today your Beer and Tell post is written by Edna Piranha of Noodle Industries fame.</p>
<h2>Last Friday, we experienced the following dramatic and exciting worlds:</h2>
<ul>
<li>Michael Kelly&#8217;s text-based adventures in JavaScript!</li>
<li>Absent Erik Rose&#8217;s clickable traceback stack frames in Python!</li>
<li>James Long&#8217;s scalable cloth simulation in LLJS/asm.js!</li>
<li>Chris Van&#8217;s &#8220;because my original project name was taken on Github&#8221; project GltHub!</li>
<li>Edna Piranha&#8217;s (that&#8217;s me!) interactive fiction game engine thing!</li>
<li>Matt Basta&#8217;s graphicsBC!</li>
</ul>
<h2>Text-based adventures in JavaScript</h2>
<p>Reporting from hills surrounding a Martian colony, Michael Kelly shares his <a href="http://osmose.github.io/sample-adventure/">latest project</a> &#8211; an ode to the time when we were young children (or possibly still unborn) &#8211; text-based adventure games in JavaScript. You can <a href="https://github.com/Osmose/sample-adventure">play a demo</a>, as long as you promise to avoid viewing the source and cheating.</p>
<div id="attachment_3434" class="wp-caption alignnone" style="width: 590px"><a href="http://blog.mozilla.org/webdev/files/2013/04/Screenshot_2013-04-30_2_45_PM.png"><img class="size-medium wp-image-3434" alt="Text adventures in JavaScript" src="http://blog.mozilla.org/webdev/files/2013/04/Screenshot_2013-04-30_2_45_PM-580x277.png" width="580" height="277" /></a><p class="wp-caption-text">Text adventures in JavaScript</p></div>
<h2>Clickable traceback stack frames in Python</h2>
<p>While we weren&#8217;t looking, Erik Rose&#8217;s body was replaced by Mike Cooper and he presented in Erik&#8217;s voice about <a href="https://pypi.python.org/pypi/nose-progressive/">nose-progressive</a>. You can click your stack frames to open your editor &#8211; <a href="http://mythmon.com/posts/sublime-urxvt-nose-progressive.html">view a demo</a> or call your local representative!</p>
<h2>Scalable cloth simulation in LLJS/asm.js</h2>
<p>Like a hawk from the night sky, James Long swooshes into the Mountain View office through a wormhole and opens his high-performance laptop. He presses the space bar and an open source browser opens with a cloth simulation. He plays Gary Wright&#8217;s &#8220;Dreamweaver&#8221; while we are slowly possessed by the silky smooth cloth simulation. You too, can be <a href="http://jlongster.com/s/lljs-cloth/">possessed by the dance of the cloth</a>.</p>
<div id="attachment_3428" class="wp-caption alignnone" style="width: 590px"><a href="http://blog.mozilla.org/webdev/files/2013/04/Screenshot_2013-04-30_2_36_PM.png"><img class="size-medium wp-image-3428" alt="cloth simulation" src="http://blog.mozilla.org/webdev/files/2013/04/Screenshot_2013-04-30_2_36_PM-580x449.png" width="580" height="449" /></a><p class="wp-caption-text">cloth simulation</p></div>
<h2>GltHub (a.k.a. because my original project name was taken)</h2>
<p>Chris Van takes us on a spaceship to Jupiter and tells us about <a href="http://glthub.com">GltHub</a>, a site that reminds you of the guilt you should feel for not closing bugs fast enough. If you want to contribute more guilt, check out the <a href="https://github.com/cvan/glthub">rocket engine that made this</a>.</p>
<div id="attachment_3429" class="wp-caption alignnone" style="width: 590px"><a href="http://blog.mozilla.org/webdev/files/2013/04/Screenshot_2013-04-30_2_39_PM.png"><img class="size-medium wp-image-3429" alt="GltHub" src="http://blog.mozilla.org/webdev/files/2013/04/Screenshot_2013-04-30_2_39_PM-580x362.png" width="580" height="362" /></a><p class="wp-caption-text">GltHub</p></div>
<h2>General Store</h2>
<p>Edna Piranha (wait, I&#8217;m talking about myself in the third person &#8211; weird) presents an interactive fiction game engine called <a href="https://github.com/ednapiranha/generalstore">General Store</a> that causes post-post-post modern, post-deconstructed encounters with the fourth kind &#8211; absurdist fiction. Also known as Lovecraft meets Kafka. Do not attempt to adjust your television, just <a href="http://generalgoods.net">click around and breathe slowly</a>.</p>
<div id="attachment_3430" class="wp-caption alignnone" style="width: 590px"><a href="http://blog.mozilla.org/webdev/files/2013/04/Screenshot_2013-04-30_2_41_PM.png"><img class="size-medium wp-image-3430" alt="General Store" src="http://blog.mozilla.org/webdev/files/2013/04/Screenshot_2013-04-30_2_41_PM-580x438.png" width="580" height="438" /></a><p class="wp-caption-text">General Store</p></div>
<h2>graphicsBC</h2>
<p>We finally land back on planet Earth and sit comfortably in a circle around a campfire. With a flashlight under his chin pointing upwards and him staring straight at us, Matt Basta talks about <a href="https://github.com/mattbasta/graphicsbc">graphicsBC</a>, a microscript for code golfers and hobbyists to create graphics. Suddenly, Tofumatt shows up in a flying motorcycle and throws his helmet into the fire.</p>
<p>And that&#8217;s it for now! See you again next month.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.org/webdev/2013/04/30/mozilla-webdev-beer-and-tell-april-26-2013/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kanban for MDN development</title>
		<link>http://blog.mozilla.org/webdev/2013/04/22/kanban-for-mdn-development/</link>
		<comments>http://blog.mozilla.org/webdev/2013/04/22/kanban-for-mdn-development/#comments</comments>
		<pubDate>Mon, 22 Apr 2013 20:03:55 +0000</pubDate>
		<dc:creator>groovecoder</dc:creator>
				<category><![CDATA[Kanban]]></category>
		<category><![CDATA[Mozilla Developer Network]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.mozilla.org/webdev/?p=3346</guid>
		<description><![CDATA[MDN workflow was a formless void When I first joined Mozilla there was no workflow for MDN; in fact, there were no full-time developers for MDN! To push my first bug fix to the site, I had to negotiate a &#8230; <a class="go" href="http://blog.mozilla.org/webdev/2013/04/22/kanban-for-mdn-development/">Continue reading</a>]]></description>
				<content:encoded><![CDATA[<p style="text-align: left;"><a href="https://mdn.kanbanery.com/projects/32137/board/?key=0383ba5f05e165e0eb19d8476654fe9775ce2ca7"><img class="size-medium wp-image-3348 aligncenter" alt="MDN Kanbanery" src="http://blog.mozilla.org/webdev/files/2013/04/mdn_kanban-300x151.png" width="300" height="151" /></a></p>
<h2 style="text-align: left;">MDN workflow was a formless void</h2>
<p style="text-align: left;">When I first joined Mozilla there was no workflow for MDN; in fact, there were no full-time developers for MDN! To push <a href="https://github.com/fwenzel/mdn/commit/2969239112346c04c46db2cebece4b675d779590">my first bug fix</a> to the site, I had to negotiate a <strong>mess of mdn bugs, wiki pages, and IT bugs, strung together with email</strong>. It took a couple weeks to get a simple fix into production, and worst of all &#8211; I had to interrupt at least 3 other peoples&#8217; regular workflows.</p>
<h2 style="text-align: left;">Let there be Scrum</h2>
<p style="text-align: center;"><a href="http://scrumbu.gs/t/mdn/2012-07-03/"><img class=" wp-image-3374 aligncenter" alt="MDN Sprint Burndown" src="http://blog.mozilla.org/webdev/files/2013/04/mdn_sprint_burndown-580x290.png" width="580" height="290" /></a></p>
<p style="text-align: left;">I had done Scrum for a few years at SourceForge so I naturally <strong>started to work in some &#8220;scrummy&#8221; things for MDN</strong> &#8211; first I added some <a href="http://groovecoder.com/2011/07/18/bugzilla-agile/">agile/scrum features to the Bugzilla JS addon</a>. Then we got another couple of developers on the team and we used <a href="http://groovecoder.com/2011/11/09/mdn-agile-status/">more agile practices in our MDN workflow</a>. So we did user stories, <a href="http://standu.ps/project/mdndev">standups</a>, retrospectives, <a href="http://planningpoker.com/">planning poker</a>, and <a href="http://scrumbu.gs/t/mdn/">sprints on top of Bugzilla</a> with Paul McLanahan&#8217;s fantastic <a href="http://scrumbu.gs/">ScrumBugs</a> tool. We used it to run our sprints for over a year; to migrate MDN from MindTouch to Django<strong></strong>. <strong>Sprints helped</strong><strong> us prioritize, plan, and commit to release batches of bug-fixes, enhancements, and features at regular intervals.</strong></p>
<h2 style="text-align: left;">Continuous Deployment</h2>
<p style="text-align: left;"><a href="http://blog.mozilla.org/webdev/files/2013/04/mdn_chief_stage.png"><img class="size-full wp-image-3377 aligncenter" alt="MDN Staging Chief" src="http://blog.mozilla.org/webdev/files/2013/04/mdn_chief_stage.png" width="491" height="417" /></a></p>
<p style="text-align: left;">On our new Django platform, <a href="http://jamessocol.com/">James</a> and <a href="https://twitter.com/jake_maul">Jake</a> hooked <a href="https://github.com/mozilla/chief">chief</a> up to give us continuous deployment to MDN; our &#8220;regular intervals&#8221; went from weeks to hours. Our flexibility and adaptability with continuous deployment is awesome. Pushing frequently caused a series of effects on our workflow, though:</p>
<ol style="text-align: left;">
<li>We naturally <strong>prioritized things by hours or days</strong>. So, during our sprints, we would</li>
<li><strong>remove and add items between planning meetings</strong>. This had knock-on effects like</li>
<li>making it <strong>hard to see what we&#8217;re actually working on</strong> between meetings, and</li>
<li>making our <strong>sprint-based estimates totally inaccurate</strong>.</li>
</ol>
<h2 style="text-align: left;">A ban came, it&#8217;s name was Kan</h2>
<p style="text-align: left;">Around this time, I read <a href="http://www.amazon.com/Kanban-ebook/dp/B0057H2M70/ref=sr_1_1_bnp_1_kin?ie=UTF8&amp;qid=1352048493&amp;sr=8-1&amp;keywords=kanban">Kanban</a>, by David Anderson and some of <a href="http://www.infoq.com/minibooks/kanban-scrum-minibook">Kanban and Scrum</a>. A couple things stood out to me:</p>
<ul style="text-align: left;">
<li>Kanban visualizes existing workflow</li>
<li>Kanban favors <a href="http://www.joelonsoftware.com/items/2007/10/26.html">Evidence-Based Scheduling</a> over estimates</li>
</ul>
<p style="text-align: left;">The Kanban feature I most liked was <em>lead time</em> &#8211; i.e., the clock time between when a request is made and delivered &#8211; and <em>cycle times</em> &#8211; i.e., the clock time between when a cycle of work begins and ends. These clock times seem more valuable to plan and prioritize than fuzzy estimations. Because really &#8211; who doesn&#8217;t like data and numbers, right? So, of course, I wrote code &#8211; <a href="https://github.com/groovecoder/kanbugs">kanbugs</a> &#8211; to help visualize our MDN workflow and calculate our lead and cycle times.</p>
<h2 style="text-align: left;">Kanbugs</h2>
<p style="text-align: left;"><a href="http://blog.mozilla.org/webdev/files/2013/04/kanbugs_screenshot.png"><img class=" wp-image-3370 aligncenter" alt="Kanbugs Screenshot" src="http://blog.mozilla.org/webdev/files/2013/04/kanbugs_screenshot-580x832.png" width="348" height="499" /></a>Kanbugs used data from our bugzilla product and our GitHub pull requests to visualize our workflow. In general, the workflow was:</p>
<ol style="text-align: left;">
<li>We <strong>select</strong> a bug and add &#8216;p=&lt;estimate&gt;&#8217; to the whiteboard</li>
<li>We <strong>implement</strong> a bug and submit a GitHub pull request with &#8220;fix bug &lt;id&gt;&#8221; in the commit message</li>
<li>We <strong>review</strong> a bug and merge it to master, which automatically marks the bug &#8216;RESOLVED:FIXED&#8217; in bugzilla</li>
<li>WebQA <strong>tests</strong> the bug on <a href="http://developer-dev.allizom.org/">the MDN dev integration server</a></li>
<li>We <strong>release</strong> the code to production, and WebQA marks the bug &#8220;VERIFIED:FIXED&#8221; in bugzilla</li>
</ol>
<p style="text-align: left;">By visualizing the workflow and calculating both lead and cycle times we learned a couple interesting things. Most prominently, of our 39-day lead-time, 19 days were spent in <em>triage</em> and 14 days were spent <em>waiting for testing</em>! <strong>85% of our lead-time was happening outside the development team</strong>. This kind of data helps us more effectively improve our workflow. E.g., rather than improve our estimates, we worked with WebQA to change from mandatory to as-needed exploratory testing.</p>
<p style="text-align: left;">Kanbugs was good for passive, read-only visualization and calculation, but (like Scrumbu.gs before) it wasn&#8217;t made for active management. It lacks:</p>
<ul style="text-align: left;">
<li><strong>Quick visual scanning for action items</strong> &#8211; who&#8217;s blocked? who&#8217;s too busy? what should I work on next?</li>
<li><strong>Work-in-Progress limits</strong> &#8211; Kanban enforces <a href="http://www.startuplessonslearned.com/2009/02/work-in-small-batches.html">small batch sizes</a> by setting limits on how many things can be in the board at a time</li>
</ul>
<h2 style="text-align: left;">Kanbanery</h2>
<p style="text-align: left;"><a href="https://mdn.kanbanery.com/projects/32137/board/?key=0383ba5f05e165e0eb19d8476654fe9775ce2ca7"><img class="aligncenter" alt="MDN Kanbanery" src="http://blog.mozilla.org/webdev/files/2013/04/mdn_kanban-300x151.png" width="300" height="151" /></a>Kanbanery is good for these features. So, a couple months ago, we started an <a href="https://mdn.kanbanery.com/projects/32137/board/?key=0383ba5f05e165e0eb19d8476654fe9775ce2ca7">MDN board on Kanbanery</a>. Kanbanery&#8217;s visualization is great. On a typical morning, I check emails and then</p>
<ol style="text-align: left;">
<li>quickly scan the board<strong> for any cards with green check-marks</strong> that I can pull to the next step of development.</li>
<li>quickly scan the <strong>work-in-progress limits to see if I can help un-block cards</strong> that are piling up at a certain step</li>
<li>quickly scan the board <strong>for my cards to resume my main dev task(s)</strong></li>
</ol>
<p style="text-align: left;">Of course, now that we&#8217;ve used Kanbanery for a couple months, we&#8217;ve hit drawbacks:</p>
<ul style="text-align: left;">
<li><strong>Yet Another Tracking Tool</strong> &#8211; we already have to keep up with email, bugzilla, and github. Scrumbugs had the same drawback, but Scrumbugs doesn&#8217;t micro-track through the sprint, and it automatically marks bugs fixed using bugzilla data.</li>
<li><strong>How to incorporate contributors</strong> &#8211; we don&#8217;t want to make contributors use Yet Another Tracking Tool, so we don&#8217;t include them in the board. That means the board doesn&#8217;t show contributors&#8217; work, which can be considerable.</li>
<li><strong>General process churn</strong> &#8211; we went from no process through multiple forms of agile and scrum practices to Kanban in the space of about 18 months. I really like to continuously improve dev practices, but even I&#8217;m getting tired of changing things.</li>
</ul>
<h2 style="text-align: left;">What&#8217;s next &#8211; maybe Kanbuggery?</h2>
<p style="text-align: left;">Rather than change things up again, what I&#8217;d really like to do is <strong>automate Kanbanery &#8211; to update the board based on bugzilla and github actions</strong>, like we had done with Kanbugs. Then Kanbanery could give us its great visual features without needing active care and attention. <a href="http://support.kanbanery.com/entries/20347483-API-Version-1-3">Kanbanery has what looks like a fully-featured API</a>, but I haven&#8217;t had time to explore it. Has anyone else?</p>
<p style="text-align: left;">How are other Mozilla, open-source, or website teams using Kanban for development?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.org/webdev/2013/04/22/kanban-for-mdn-development/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Firefox Marketplace: April 5th – April 18th</title>
		<link>http://blog.mozilla.org/webdev/2013/04/19/firefox-marketplace-april-5th-april-18th/</link>
		<comments>http://blog.mozilla.org/webdev/2013/04/19/firefox-marketplace-april-5th-april-18th/#comments</comments>
		<pubDate>Fri, 19 Apr 2013 23:08:45 +0000</pubDate>
		<dc:creator>Andy McKay</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.mozilla.org/webdev/?p=3364</guid>
		<description><![CDATA[This is a regular post focusing on the status of the Firefox Marketplace. Total bugs open: 485 Total bugs opened last two weeks: 150 Total bugs closed last week: 110 The API documentation has moved and is now separate from &#8230; <a class="go" href="http://blog.mozilla.org/webdev/2013/04/19/firefox-marketplace-april-5th-april-18th/">Continue reading</a>]]></description>
				<content:encoded><![CDATA[<p>This is a regular post focusing on the status of the <a href="https://marketplace.firefox.com">Firefox Marketplace</a>.</p>
<ul>
<li>Total bugs open: <a href="https://bugzilla.mozilla.org/buglist.cgi?bug_status=UNCONFIRMED;bug_status=NEW;bug_status=ASSIGNED;bug_status=REOPENED;product=marketplace;list_id=5331358">485</a></li>
<li>Total bugs opened last two weeks: <a href="https://bugzilla.mozilla.org/buglist.cgi?chfieldfrom=2013-04-05&#038;chfield=[Bug%20creation]&#038;chfieldto=2013-04-18&#038;product=marketplace&#038;list_id=6355455">150</a></li>
<li>Total bugs closed last week: <a href="https://bugzilla.mozilla.org/buglist.cgi?chfieldfrom=2013-04-05;chfield=resolution;chfieldto=2013-04-18;chfieldvalue=FIXED;product=marketplace;list_id=5697624">110</a></li>
</ul>
<p>The API documentation has <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=854942">moved</a> and is <a href="http://firefox-marketplace-api.readthedocs.org/en/latest/">now separate</a> from the rest of the marketplace code. The marketplace has adopted the <a href="http://agmweb.ca/2013-04-13-http-status-codes/">status code 451</a> to describe an app we can&#8217;t display.</p>
<p>The migration over to the <a href="http://addons.mozilla.org">Add-ons</a> site is now <a href="https://blog.mozilla.org/addons/2013/04/11/background-themes-have-moved-to-amo/">complete</a>. Go check out <a href="https://addons.mozilla.org/en-US/firefox/themes/">themes</a>.</p>
<p>Some specific changes of note:</p>
<ul>
<li>OAuth has been turned on for all internal services between marketplace, solitude and webpay (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=858813">858813</a>)</li>
<li>Changes to the <a href="https://wiki.mozilla.org/Apps/WebApplicationReceipt#the_typ_field">receipt specification</a> to allow different kinds of receipts (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=858610">858610</a>)</li>
<li>Three legged OAuth has landed for the API (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=827948">827948</a>)</li>
<li>API submission is now throttled, but you can apply for access to submit more apps (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=848869">848869</a>)</li>
<li>Did we mention themes are migrated, oh yeah (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=858276">858276</a>)</li>
<li><a href="https://github.com/mozilla/fireplace/">Fireplace</a> now has a featured page (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=860410">860410</a>)</li>
<li>Receipt verifying now checks the verifying service URL (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=770666">770666</a>) and type of receipt</li>
<li><a href="https://github.com/mozilla/fireplace/">Fireplace</a> now has abuse pages (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=857685">857685</a>)</li>
<li>Unit tests galore (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=851582">851582</a>) and more for Fireplace</li>
<li>Apps filtered on adult and child flags (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=852567">852567</a>)</li>
<li>PIN user interface awesomeness (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=842861">842861</a>)</li>
<li>Charts, charts and more charts using <a href="https://github.com/mozilla/monolith">monolith</a> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=843046">843046</a>)</li>
<li>Where in the world is Carmen Sandiego? I don&#8217;t know but our new geo location might tell you (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=851192">851192</a>)</li>
</ul>
<p>And finally&#8230; odd add-on of the day <a href="http://people.mozilla.com/~bwinton/whimsy/whimsy.xpi">whimsy</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.org/webdev/2013/04/19/firefox-marketplace-april-5th-april-18th/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox Marketplace: March 8th &#8211; April 3rd</title>
		<link>http://blog.mozilla.org/webdev/2013/04/08/firefox-marketplace-march-8th-april-3rd/</link>
		<comments>http://blog.mozilla.org/webdev/2013/04/08/firefox-marketplace-march-8th-april-3rd/#comments</comments>
		<pubDate>Mon, 08 Apr 2013 18:26:08 +0000</pubDate>
		<dc:creator>Andy McKay</dc:creator>
				<category><![CDATA[Marketplace]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.mozilla.org/webdev/?p=3360</guid>
		<description><![CDATA[This is a weekly post focusing on the status of the Firefox Marketplace. Because of holidays, PyCon and then more holidays, this post is a little delayed and covers a few weeks. Total bugs open: 464 Total bugs opened last &#8230; <a class="go" href="http://blog.mozilla.org/webdev/2013/04/08/firefox-marketplace-march-8th-april-3rd/">Continue reading</a>]]></description>
				<content:encoded><![CDATA[<p>This is a weekly post focusing on the status of the <a href="https://marketplace.firefox.com">Firefox Marketplace</a>. Because of holidays, <a href="https://us.pycon.org/2013/">PyCon</a> and then more holidays, this post is a little delayed and covers a few weeks.</p>
<ul>
<li>Total bugs open: <a href="https://bugzilla.mozilla.org/buglist.cgi?bug_status=UNCONFIRMED;bug_status=NEW;bug_status=ASSIGNED;bug_status=REOPENED;product=marketplace;list_id=5331358">464</a></li>
<li>Total bugs opened last two weeks: <a href="https://bugzilla.mozilla.org/buglist.cgi?chfieldfrom=2013-03-08;chfield=[Bug%20creation];chfieldto=2013-04-03;product=marketplace;list_id=5697618">232</a></li>
<li>Total bugs closed last two weeks: <a href="https://bugzilla.mozilla.org/buglist.cgi?chfieldfrom=2013-03-08;chfield=resolution;chfieldto=2013-04-03;chfieldvalue=FIXED;product=marketplace;list_id=5697624">233</a></li>
</ul>
<p>Most of the changes revolve around the API. There are endpoints added for the homepage, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=847672">login</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=848428">ratings</a> and more. For more information on the Marketplace API, please check out <a href="http://zamboni.readthedocs.org/en/latest/topics/api.html">the documentation</a>.</p>
<p>The primary consumer of the API right now is <a href="https://github.com/mozilla/fireplace/">fireplace</a> the <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=855579">packaged app</a> for the Marketplace. There have been a lot of changes in <a href="https://bugzilla.mozilla.org/buglist.cgi?quicksearch=fireplace&#038;list_id=6233439">fireplace</a> including search results, ratings and more.</p>
<p>We are currently migrating the existing <a href="http://www.getpersonas.com/">Get Personas</a> site over to the <a href="https://addons.mozilla.org/firefox/themes/">Add-ons</a> site. For more information read our <a href="https://blog.mozilla.org/addons/2013/03/27/getpersonas-com-is-becoming-read-only/">blog post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.org/webdev/2013/04/08/firefox-marketplace-march-8th-april-3rd/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Better know a WebDev: Wil Clouser</title>
		<link>http://blog.mozilla.org/webdev/2013/03/28/better-know-a-webdev-wil-clouser/</link>
		<comments>http://blog.mozilla.org/webdev/2013/03/28/better-know-a-webdev-wil-clouser/#comments</comments>
		<pubDate>Fri, 29 Mar 2013 00:13:44 +0000</pubDate>
		<dc:creator>Andy McKay</dc:creator>
				<category><![CDATA[Better Know a WebDev]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.mozilla.org/webdev/?p=3326</guid>
		<description><![CDATA[Featuring Wil Clouser. What do you do at Mozilla? I&#8217;m the Engineering Manager for the Firefox Marketplace and Add-ons. I spend most of my day trying to remove roadblocks for developers and coordinating with other teams to make sure there &#8230; <a class="go" href="http://blog.mozilla.org/webdev/2013/03/28/better-know-a-webdev-wil-clouser/">Continue reading</a>]]></description>
				<content:encoded><![CDATA[<p>Featuring <a href="https://twitter.com/clouserw">Wil Clouser</a>.</p>
<p><a href="http://blog.mozilla.org/webdev/files/2013/03/5865658769_1fa4436ecc.jpg"><img src="http://blog.mozilla.org/webdev/files/2013/03/5865658769_1fa4436ecc.jpg" alt="5865658769_1fa4436ecc" width="500" height="331" class="alignnone size-full wp-image-3331" /></a></p>
<h3>What do you do at Mozilla?</h3>
<p>I&#8217;m the Engineering Manager for the <a href="http://marketplace.firefox.com">Firefox Marketplace</a> and <a href="http://addons.mozilla.org">Add-ons</a>.  I spend most of my day trying to remove roadblocks for developers and coordinating with other teams to make sure there is a steady stream of work.  The spice must flow!</p>
<p>Other parts of my job are day-to-day team operations (HR questions, career development, etc.), spec reviews, architectural design input, any shady negotiations for project priority, and crisis management in the rare case when something goes pear shaped.</p>
<h3>Any fun side projects you’re working on?</h3>
<p>I&#8217;m a hobbyist photographer these days and have started experimenting with writing short (fiction) stories to go along with the pictures. Something that is still in its infancy for sure.</p>
<h3>How did you get started in web development or programming?</h3>
<p>I took a C class in high school and thought it was fun, then I suffered through Java in college and started doing PHP work part time for the university.  I flipped to python a few years ago and have enjoyed it although my coding these days is mostly minor tweaks to other peoples&#8217; code.</p>
<h3>How did you get involved with Mozilla?</h3>
<p><a href="https://twitter.com/morgamic">Mike Morgan</a> and I worked in the same place while I was in college.  He was doing volunteer work with Mozilla and it looked like he was having a good time so I started volunteering too.  At that time we were maintaining <a href="http://addons.mozilla.org">Add-ons</a> which was a mix of hard-coded add-ons and smarty templates. It wasn&#8217;t pretty.</p>
<h3>What’s a funny fail or mistake story you can share?</h3>
<p>We used to maintain <a href="http://mozilla.com">mozilla.com</a> in SVN as a bunch of static files in a hierarchy.  I may have gotten a little carried away with the flat files &#8211; we had about a dozen files we duplicated for every version of Firefox (at the time we had 4 levels, eg. version 2.0.0.1) and for every locale (about 60 locales).  That, combined with the locale specific CSS and images added up to a ton of files on disk and SVN would soak up all the disk I/O trying to do an update or a commit.</p>
<p>Anyway, when we launched Firefox 3 we were aiming for the <a href="http://en.wikipedia.org/wiki/Firefox_3#Guinness_World_Record">Guinness World Record</a> and we put on a big show of it to get lots of downloads including having people talking live on <a href="https://air.mozilla.org">Air Mozilla</a> about how awesome the new browser was.  Due to the high traffic everything was responding slower than usual, but we were in decent shape, except that I had to push one last thing to SVN and I did an `svn up` first and it was just sitting there thrashing and &#8211; SVN doesn&#8217;t have any output when it&#8217;s parsing through your directory tree &#8211; I just had to sit there and wait.  It ended up taking about 20-30 minutes which wasn&#8217;t unusual (sadly enough), but not being able to give an estimate was rough.  I remember watching <a href="https://twitter.com/beltzner">Mike Beltzner</a> talking about random things on Air Mozilla trying to fill time and he&#8217;d ask me on IRC for an update every couple minutes and I&#8217;d reply with &#8220;real soon now.&#8221;  I felt bad for him.</p>
<p>So, I contributed to us being late to launch in a high-profile kind of way, but we still made the record and I was happy about that. <img src='http://blog.mozilla.org/webdev/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>What’s something you’re particularly proud of?</h3>
<p>When the Marketplace team gets in its groove it blows productivity estimates out of the water.  We work so well together I&#8217;m just proud of my whole team.  The entire Firefox Marketplace was just an idea a year ago and look where we are now.</p>
<h3>What’s coming up that you’re excited about?</h3>
<p>We&#8217;re going to be merging <a href="http://www.getpersonas.com">Get Personas</a> into <a href="http://addons.mozilla.org">Add-ons</a>. For real.  We&#8217;ve been talking about it for, like, 2 years and every time it comes up it gets bumped for something higher priority but it&#8217;s finally close enough that we&#8217;re just going for it.</p>
<h3>What question do you wish you’d been asked?</h3>
<p><b>Q:</b> If I typed &#8220;youtube&#8221; into your awesomebar would you be embarrassed at what showed up?   </p>
<p><b>A:</b> Nope! First hit: Macklemore&#8217;s Thrift Shop.  Second hit: LMFAO&#8217;s Sexy and I know it.  Third hit: I clicked it and it says it has been removed because it violated Youtube&#8217;s TOS.  So, that one might have been embarrassing, I&#8217;m not sure.</p>
<h3>Favourite city that&#8217;s not Portland?</h3>
<p>The easy answer is wherever my friends are, but as I&#8217;m staring outside at the cold wind and the looming rain I&#8217;d say somewhere warm like some anonymous fishing town in Mexico.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.org/webdev/2013/03/28/better-know-a-webdev-wil-clouser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox Marketplace: Feb 22nd – March 7th</title>
		<link>http://blog.mozilla.org/webdev/2013/03/08/firefox-marketplace-feb-22nd-march-7th/</link>
		<comments>http://blog.mozilla.org/webdev/2013/03/08/firefox-marketplace-feb-22nd-march-7th/#comments</comments>
		<pubDate>Fri, 08 Mar 2013 21:32:59 +0000</pubDate>
		<dc:creator>Andy McKay</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.mozilla.org/webdev/?p=3320</guid>
		<description><![CDATA[This is a weekly post focusing on the status of the Firefox Marketplace. Because of Mobile World Congress there were no production pushes last week. So this post covers the last two weeks. Total bugs open: 476 Total bugs opened &#8230; <a class="go" href="http://blog.mozilla.org/webdev/2013/03/08/firefox-marketplace-feb-22nd-march-7th/">Continue reading</a>]]></description>
				<content:encoded><![CDATA[<p>This is a weekly post focusing on the status of the <a href="https://marketplace.firefox.com">Firefox Marketplace</a>. Because of <a href="http://www.mozilla.org/en-US/firefox/partners/">Mobile World Congress</a> there were no production pushes last week. So this post covers the last two weeks.</p>
<ul>
<li>Total bugs open: <a href="https://bugzilla.mozilla.org/buglist.cgi?bug_status=UNCONFIRMED;bug_status=NEW;bug_status=ASSIGNED;bug_status=REOPENED;product=marketplace;list_id=5331358">476</a></li>
<li>Total bugs opened last two weeks: <a href="https://bugzilla.mozilla.org/buglist.cgi?chfieldfrom=2013-02-22;chfield=[Bug%20creation];chfieldto=2013-03-07;product=marketplace;list_id=5697618">213</a></li>
<li>Total bugs closed last week: <a href="https://bugzilla.mozilla.org/buglist.cgi?chfieldfrom=2013-02-22;chfield=resolution;chfieldto=2013-03-07;chfieldvalue=FIXED;product=marketplace;list_id=5697624">138</a></li>
</ul>
<p>A few of the many changes:</p>
<ul>
<li>Anonymous installs, app creation and user registration being recorded for metrics (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=836586">bug 836586</a> and more).</li>
<li>If an app is public the API will return details to anonymous users <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=827986">bug 827986</a>).</li>
<li>App validator API no longer requires authentication (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=826835">bug 826835</a>).</li>
<li>Ratings API added (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=841199">bug 841199</a>).</li>
<li>Mobile review pages added for reviewers (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=839543">839543</a>).</li>
<li>Multiple improvements to the devhub documentation.</li>
<li>Simulated in-app payments can now be done (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=839652">839652</a>).</li>
<li>Marketplace locked to portrait orientation (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=844186">844186</a>).</li>
</ul>
<p>The Firefox Marketplace is building a packaged app which allow the browsing and installing of apps. <a href="https://github.com/mozilla/fireplace/">Fireplace</a> is the start of that. To allow the packagead app to communicate with the marketplace we are rapidly expanding the <a href="http://zamboni.readthedocs.org/en/latest/topics/api.html">API</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.org/webdev/2013/03/08/firefox-marketplace-feb-22nd-march-7th/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Static File Shootout: Apache RewriteRules vs. Flask</title>
		<link>http://blog.mozilla.org/webdev/2013/03/08/3303/</link>
		<comments>http://blog.mozilla.org/webdev/2013/03/08/3303/#comments</comments>
		<pubDate>Fri, 08 Mar 2013 19:30:03 +0000</pubDate>
		<dc:creator>Erik Rose</dc:creator>
				<category><![CDATA[performance]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.mozilla.org/webdev/?p=3303</guid>
		<description><![CDATA[Ever wonder just how much you gain by having Apache serve your static files? I had a particularly hairy set of RewriteRules to support this in my project and a fairly simple Python routine as an alternative, so I ran &#8230; <a class="go" href="http://blog.mozilla.org/webdev/2013/03/08/3303/">Continue reading</a>]]></description>
				<content:encoded><![CDATA[<p>Ever wonder just how much you gain by having Apache serve your static files? I had a particularly hairy set of RewriteRules to support this in my project and a fairly simple Python routine as an alternative, so I ran a few benchmarks to find out.</p>
<p><a href="http://dxr.mozilla.org/">DXR</a> is a code navigation and static analysis tool for the Firefox codebase. It consists of two parts:</p>
<ul>
<li>A Flask app which runs under Apache via mod_wsgi</li>
<li>An offline build process which generates a syntax-highlighted version of every Firefox source file as HTML and lays them down on disk</li>
</ul>
<p>These generated files are the ones served by RewriteRules in production:<br />
<script src="https://gist.github.com/erikrose/5118912.js"></script><br />
However, for convenience during development, we also have a trivial Python routine to serve those files:<br />
<script src="https://gist.github.com/erikrose/5118928.js"></script><br />
I pitted the RewriteRules against the Python controller on a local VM, so keep in mind that all the standard caveats of complex systems apply. That said, let&#8217;s see what happened!</p>
<p>Having heard complaints about NFS-based VirtualBox shared directories (where my generated files lived), I expected both solutions to be bottlenecked on IO. To my surprise, I saw a pronounced difference between them.</p>
<p>The RewriteRules serve static pages in an average of 6 ms at a concurrency of 10. This is a representative test run of <tt>ab</tt>. The tables at the bottom are the most important parts:</p>
<pre>(py27)[15:16:12 ~/Checkouts/dxr]% ab -c 10 -n 1000 http://33.33.33.77/code/README.mkd
This is ApacheBench, Version 2.3 &lt;$Revision: 655654 $&gt;
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 33.33.33.77 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests

Server Software:        Apache/2.2.22
Server Hostname:        33.33.33.77
Server Port:            80

Document Path:          /code/README.mkd
Document Length:        7348 bytes

Concurrency Level:      10
Time taken for tests:   0.573 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      7635628 bytes
HTML transferred:       7355348 bytes
Requests per second:    1744.93 [#/sec] (mean)
Time per request:       5.731 [ms] (mean)
Time per request:       0.573 [ms] (mean, across all concurrent requests)
Transfer rate:          13011.36 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    2   0.4      2       4
Processing:     1    4   4.9      4     124
Waiting:        1    4   3.1      4      99
Total:          2    6   4.9      5     124

Percentage of the requests served within a certain time (ms)
  50%      5
  66%      6
  75%      6
  80%      6
  90%      6
  95%      7
  98%      7
  99%      8
 100%    124 (longest request)</pre>
<p>Routing the requests through Python instead drives the mean up to 14 ms:</p>
<pre> 50%     14
 66%     15
 75%     16
 80%     17
 90%     19
 95%     21
 98%     23
 99%     25
100%     32 (longest request)</pre>
<p>This is with <tt>WSGIDaemonProcess example.com processes=2 threads=2</tt>, which, after a little experimentation, I determined is close to optimal for my 4-CPU VM. It makes some intuitive sense: one thread for each logical core. The host box has 4 physical cores with hyperthreading, so there are plenty to go around.</p>
<p>Turning the concurrency down to 2 had surprising results: Python actually got slightly faster than Apache: 3 ms avg. This could be measurement noise.</p>
<pre> 50%      3
 66%      3
 75%      4
 80%      4
 90%      4
 95%      5
 98%      7
 99%      8
100%    222 (longest request)</pre>
<p><tt>-c 4</tt> yields 6 ms:</p>
<pre> 50%      6
 66%      7
 75%      8
 80%      8
 90%     10
 95%     11
 98%     12
 99%     12
100%     14 (longest request)</pre>
<p>And, more generally, there is a linear performance trailoff as concurrency increases:</p>
<p><a href="http://blog.mozilla.org/webdev/files/2013/03/Screen-Shot-2013-03-08-at-9.58.07-AM.png"><img class="alignnone wp-image-3302" alt="There's a linear relationship between concurrent requests and mean response time." src="http://blog.mozilla.org/webdev/files/2013/03/Screen-Shot-2013-03-08-at-9.58.07-AM.png" width="464" height="233" /></a></p>
<p>This was a surprise, as I expected more of a cliff when I exceeded the complement of 4 WSGI threads.</p>
<p>When we keep our concurrency down, it turns out that Apache doesn&#8217;t necessarily run the RewriteRules any faster than Python executes <tt>browse()</tt>. However, at high concurrency, Apache does pull ahead of Python, presumably because it has more threads to go around. That will probably hold true in production, since raw Apache processes eat less RAM than WSGI children and will thus have their threads capped less stringently.</p>
<p>Is a gain of twenty-some milliseconds for likely concurrency levels worth the added complexity—and logic duplication—of the RewriteRules? I think not. To get an idea of what 20 ms feels like, the human audio wetware juuuust begins to recognize two adjacent sounds as distinct when they are 20 ms apart: any closer, and they blend into a continuous tone. (<a href="http://en.wikipedia.org/wiki/Hearing_range#Humans">Some sources</a> go as low as 12Hz.) There are <a href="http://www.websiteoptimization.com/speed/tweak/psychology-web-performance/">some usability studies</a> that estimate a 1% dropoff in conversion rate for every extra 100 ms a page takes to load, but no one bothers to measure very fast-loading pages, and I would expect to reach a &#8220;fast enough&#8221; plateau eventually. Even if the linear relationship were overturned on real hardware, real hardware should be faster, making the latency differences (within reasonable concurrencies) even less than 20 ms. The &#8220;go ahead and use Python&#8221; conclusion should hold.</p>
<p>Finally, it&#8217;s worth mentioning that I&#8217;m still serving what are classically in the category of &#8220;static resources&#8221;—CSS, JS, images, and the like—with Apache, because we can do so in one simple <tt>Alias</tt> directive. What&#8217;s to lose?</p>
<p>Obviously, this is a boisterously multidimensional search space, comprising virtualization, threads, hardware, and IO abstraction, and I had <tt>ab</tt> running on the same physical box, so take these exact results as a single data point. However, they do establish a nice ceiling that lets us stop worrying about wringing every last drop out of the web server.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.org/webdev/2013/03/08/3303/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
