<?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>fredericiana &#187; OSU OSL Crosspost</title>
	<atom:link href="http://fredericiana.com/category/english/osl/feed/" rel="self" type="application/rss+xml" />
	<link>http://fredericiana.com</link>
	<description>Open Source, The Web, And German-American Oddities</description>
	<lastBuildDate>Wed, 01 Sep 2010 16:52:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Next Steps for the Copy ShortURL Addon</title>
		<link>http://fredericiana.com/2010/07/20/next-steps-for-the-copy-shorturl-addon/</link>
		<comments>http://fredericiana.com/2010/07/20/next-steps-for-the-copy-shorturl-addon/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 18:13:25 +0000</pubDate>
		<dc:creator>Fred</dc:creator>
				<category><![CDATA[Mozilla Crosspost]]></category>
		<category><![CDATA[OSU OSL Crosspost]]></category>
		<category><![CDATA[Tech Talk]]></category>
		<category><![CDATA[addons]]></category>
		<category><![CDATA[copyshorturl]]></category>

		<guid isPermaLink="false">http://fredericiana.com/?p=2885</guid>
		<description><![CDATA[The Copy ShortURL Add-on has been on AMO for a week now and was recently approved to be public, so now I have a user base to please I am inclined to drop the code onto github, where I&#8217;d get a proper version history along with a bug tracker. Update: It&#8217;s on github now! For [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="https://addons.mozilla.org/en-US/firefox/addon/197224/">Copy ShortURL Add-on</a> has been on AMO for a week now and was recently approved to be public, so now I have a user base to please <img src='http://fredericiana.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>I am inclined to drop the code onto github, where I&#8217;d get a proper version history along with a bug tracker. <strong>Update:</strong> <a href="http://github.com/fwenzel/copy-shorturl/">It&#8217;s on github now!</a></p>
<p>For now though, here are a few <strong>ideas</strong> I have for the add-on, in no particular order and with no promise that I&#8217;m about to implement any of this right away:</p>
<ul>
<li><strong>Allow other URL shortening services.</strong> tinyURL is all fun and games, and I chose it over bit.ly because it does not require an API key &#8212; but if you have one at hand, you should be able to use any service you like. Even if only by setting an about:config preference.</li>
<li><strong>Incorporate selected sites</strong> that support short URLs but do not publish them as a header. Zappos (zapp.me), for example. Others seem to have a short URL available (such as: NY Times (nyti.ms), Amazon (amzn.to),  ESPN (es.pn)) but only use them on their twitter account and not on every webpage, so there might be nothing we can do <img src='http://fredericiana.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> .</li>
<li>When shortening, need to make sure not to use the <em>current</em> URL but the <strong>canonical URL</strong> if such a header exists. (<a href="http://github.com/fwenzel/copy-shorturl/issues/issue/3">Fixed!</a>)</li>
</ul>
<p>Let me know what you think! I&#8217;d like to know if any other things come to your minds, or which of the above you&#8217;d find especially useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://fredericiana.com/2010/07/20/next-steps-for-the-copy-shorturl-addon/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Copy Short URL Add-on</title>
		<link>http://fredericiana.com/2010/07/10/copy-short-url-add-on/</link>
		<comments>http://fredericiana.com/2010/07/10/copy-short-url-add-on/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 17:25:33 +0000</pubDate>
		<dc:creator>Fred</dc:creator>
				<category><![CDATA[Mozilla Crosspost]]></category>
		<category><![CDATA[OSU OSL Crosspost]]></category>
		<category><![CDATA[Tech Talk]]></category>
		<category><![CDATA[addons]]></category>
		<category><![CDATA[copyshorturl]]></category>
		<category><![CDATA[jetpack]]></category>

		<guid isPermaLink="false">http://fredericiana.com/?p=2874</guid>
		<description><![CDATA[Update: The add-on is now on AMO! Check it out! Also, feedback is greatly appreciated! This week during the Mozilla Summit in Whistler, British Columbia, there was a &#8220;Rocket Your Firefox&#8221; Jetpack contest: The idea, make a new add-on using the Jetpack SDK, submit it, win a prize. So I went ahead and made a [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong> The add-on is now on AMO! <a href="https://addons.mozilla.org/en-US/firefox/addon/197224/">Check it out!</a> Also, feedback is greatly appreciated!</p>
<hr />
<p>This week during the <a href="https://wiki.mozilla.org/Summit2010">Mozilla Summit</a> in Whistler, British Columbia, there was a <a href="https://wiki.mozilla.org/Summit2010/Rocket_Your_Firefox">&#8220;Rocket Your Firefox&#8221;</a> <a href="http://jetpack.mozillalabs.com/">Jetpack</a> contest: The idea, make a new add-on using the Jetpack SDK, submit it, win a prize.</p>
<p>So I went ahead and made a jetpack called &#8220;Copy Short URL&#8221; and it does what it sounds like:</p>
<blockquote><p>On any webpage, you get a new item in the right click menu called &#8220;copy short URL&#8221;. When you click it, the add-on looks for a canonical short URL exposed in the page header. Currently, a number of major websites expose their own short URLs for any entry on their webpages, among these: youtube (&#8220;youtu.be/&#8230;&#8221;), flickr (&#8220;flic.kr/&#8230;&#8221;), Arstechnica, Techcrunch, and many more.</p>
<p>If, however, the site does not name its own short URL, the add-on automatically falls back to making a short URL using tinyurl.com.</p>
<p>Either way, after a fraction of a second, you end up with a short URL in your clipboard, ready to be used in forum posts, tweets, or wherever else you please.</p></blockquote>
<p>My add-on won the contest in the &#8220;most useful&#8221; category. The prize was an awesome jetpack sweatshirt:</p>
<p><img src="http://fredericiana.com/wp-content/uploads/2010/07/jetpack-sweatshirt-front-278x300.jpg" alt="" title="Jetpack Sweatshirt" width="278" height="300" class="alignleft size-medium wp-image-2876" /></p>
<p><img src="http://fredericiana.com/wp-content/uploads/2010/07/jetpack-sweatshirt-back-249x300.jpg" alt="" title="Jetpack Sweatshirt" width="249" height="300" class="alignnone size-medium wp-image-2875" /></p>
<p>If you want to check out the add-on, it is currently available (open source, of course) on the <a href="https://builder.mozillalabs.com/addons/by/112675/">add-ons builder website</a>. I also uploaded the <a href="https://addons.mozilla.org/en-US/firefox/addon/197224/">add-on</a> to AMO.</p>
<p>Hope you find it useful!</p>
]]></content:encoded>
			<wfw:commentRss>http://fredericiana.com/2010/07/10/copy-short-url-add-on/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Under the Hood of Firefox Input</title>
		<link>http://fredericiana.com/2010/06/23/under-the-hood-of-firefox-input/</link>
		<comments>http://fredericiana.com/2010/06/23/under-the-hood-of-firefox-input/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 16:03:08 +0000</pubDate>
		<dc:creator>Fred</dc:creator>
				<category><![CDATA[Mozilla Crosspost]]></category>
		<category><![CDATA[OSU OSL Crosspost]]></category>
		<category><![CDATA[Tech Talk]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[feedback]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[input]]></category>

		<guid isPermaLink="false">http://fredericiana.com/?p=2834</guid>
		<description><![CDATA[Note: Several people asked where the link is to actually add feedback to the site. This is, of course, a good point. As mentioned in the comments: The designated entry point for the feedback application is going to be an extension bundled with Firefox 4 Beta. For more information, please read Aakash&#8217;s blog post. To [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Note:</strong> Several people asked where the link is to actually <em>add feedback</em> to the site. This is, of course, a good point. As mentioned in the comments: The designated entry point for the feedback application is going to be an extension bundled with Firefox 4 Beta. For more information, please read <a href="http://aakash.doesthings.com/2010/06/25/hi-my-name-is-firefox-input/">Aakash&#8217;s blog post</a>. To <strong>try out</strong> the application already, feel free to add <a href="http://input.stage.mozilla.com/happy">happy</a> or <a href="http://input.stage.mozilla.com/sad">sad</a> feedback to the test site.</p>
<hr />
<p>This morning, we published the <a href="http://input.mozilla.com">Firefox Input</a> application. It is a little web application soliciting feedback from our <a href="http://www.mozilla.com/en-US/firefox/all-beta.html">Firefox Beta Program</a> users. The aim is to make it as easy as possible for people to tell us what specifically they like or dislike about an upcoming version of Firefox.</p>
<p><a href="http://fredericiana.com/wp-content/uploads/2010/06/fx-input-dashboard.jpg"><img src="http://fredericiana.com/wp-content/uploads/2010/06/fx-input-dashboard-300x210.jpg" alt="" title="Firefox Input: Dashboard" width="300" height="210" class="aligncenter size-medium wp-image-2835" /></a></p>
<p>The application was, as far as software goes, developed very rapidly: We made it from requirements to production in a mere three weeks. What made this possible was a number of reusable components that allowed us to avoid reinventing the wheel and stay focused on making the application awesome.</p>
<p><a href="http://fredericiana.com/wp-content/uploads/2010/06/fx-input-happy.jpg"><img src="http://fredericiana.com/wp-content/uploads/2010/06/fx-input-happy-300x100.jpg" alt="" title="Firefox Input: Happy Feedback" width="300" height="100" class="aligncenter size-medium wp-image-2842" /></a></p>
<p><a href="http://fredericiana.com/wp-content/uploads/2010/06/fx-input-sad.jpg"><img src="http://fredericiana.com/wp-content/uploads/2010/06/fx-input-sad-300x110.jpg" alt="" title="Firefox Input: Sad Feedback" width="300" height="110" class="aligncenter size-medium wp-image-2843" /></a></p>
<p>A few key components of the Input application:</p>
<ul>
<li><strong><a href="http://www.djangoproject.com/">Django</a>.</strong> I can&#8217;t stress this enough, but Django is a fantastic web application framework. It makes it incredibly easy to set up a web application quickly and securely. Their built-in admin pages save me days of work that I would otherwise have to spend to allow project admins to edit the application data.</li>
<li><strong><a href="http://jinja.pocoo.org/2/">Jinja2</a> and <a href="http://github.com/jbalogh/jingo/">Jingo</a>.</strong> The only big drawback of Django is its template language: The instant you make nontrivial web applications, it gets in your way. Luckily, like all parts of Django it is replaceable: Jinja2 and Jeff Balogh&#8217;s <em>jingo</em> interface comes to the rescue. The two of them are already in use over at <a href="https://addons.mozilla.org">AMO</a> and also serve us well on Input.</li>
<li><strong>Term extraction.</strong> Firefox Input extracts key words from all feedback. Sure, you can just split the sentences into words, but if you want to avoid collecting all sorts of meaningless particles (&#8220;the&#8221;, &#8220;a&#8221;, &#8220;if&#8221;, &#8230;), it becomes a little more complicated. We are using the <a href="http://pypi.python.org/pypi/topia.termextract/">topia.termextract</a> library, which gladly does the heavy lifting for us. Only caveat: It only works for English, so once the application is localized, we need a different solution for the other languages.</li>
<li><strong>Search.</strong> For the longest time, there was no generic way to do search in a Django app (other than straight SQL queries). In the meantime, <a href="http://haystacksearch.org/">haystack</a> has started to fill that gap. We use it on Input in conjunction with <a href="http://bitbucket.org/mchaput/whoosh/wiki/Home">Whoosh</a>, a pure-Python search library. That is very easy to set up, at the expense of scalability &#8212; if we outgrow it, however, it will be easy to switch search engines with virtually no code changes at all. Thumbs up!</li>
<li><strong>Product details.</strong> Only very recently we released a <a href="http://blog.mozilla.com/webdev/2010/06/01/django-mozilla-product-details-because-short-library-names-are-for-wimps/">Mozilla product details library</a> for Django, and this is the first application to rely intimately on up-to-date product data: Input only lets users of the latest beta versions of Firefox add feedback, so it auto-updates its product data periodically to gather feedback for the newest versions as quickly as possible.</li>
</ul>
<p>As always, the <a href="http://github.com/fwenzel/reporter">source code</a> of Firefox Input is openly and freely available. If you notice any problems with it, feel free to fork it on github, or <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Webtools&#038;component=Input">file a bug</a> in our <a href="https://bugzilla.mozilla.org/buglist.cgi?resolution=---&#038;query_format=advanced&#038;component=Input&#038;product=Webtools">bug tracker</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://fredericiana.com/2010/06/23/under-the-hood-of-firefox-input/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Hot-plugging a SATA drive under Linux</title>
		<link>http://fredericiana.com/2010/06/15/hot-plugging-a-sata-drive-under-linux/</link>
		<comments>http://fredericiana.com/2010/06/15/hot-plugging-a-sata-drive-under-linux/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 08:14:39 +0000</pubDate>
		<dc:creator>Fred</dc:creator>
				<category><![CDATA[OSU OSL Crosspost]]></category>
		<category><![CDATA[Tech Talk]]></category>

		<guid isPermaLink="false">http://fredericiana.com/?p=2812</guid>
		<description><![CDATA[Hard drives (or controllers, rather) capable of hot-swapping (that is, plugging and un-plugging a drive into a running system) used to be a feature reserved for expensive professional RAID installations. With the advent of SATA in the mainstream, that has changed. Supposedly any SATA hard drive can be hot-plugged now. But what if you actually [...]]]></description>
			<content:encoded><![CDATA[<p>Hard drives (or controllers, rather) capable of <a href="http://en.wikipedia.org/wiki/Hot_swapping">hot-swapping</a> (that is, plugging and un-plugging a drive into a running system) used to be a feature reserved for expensive professional RAID installations.</p>
<p>With the advent of SATA in the mainstream, that has changed. <em>Supposedly</em> any SATA hard drive can be hot-plugged now. But what if you actually try and nothing happens? Chances are your controller doesn&#8217;t let the OS know about the newly found drive on its own.</p>
<p>Try this to rescan the SCSI hosts (each SATA port appears as a SCSI bus):</p>
<pre><code>echo "0 0 0" >/sys/class/scsi_host/host&lt;n&gt;/scan</code></pre>
<p>and to remove a drive:</p>
<pre><code>echo x > /sys/bus/scsi/devices/&lt;n&gt;:0:0:0/delete</code></pre>
<p>Replace <code>&lt;n&gt;</code> with the right numbers for your system, respectively.</p>
<p>Also, just to state the obvious, don&#8217;t do that to a mounted drive, ever. Especially not the one that holds your system partition <img src='http://fredericiana.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p class="credits">(<a href="http://forums.whirlpool.net.au/forum-replies-archive.cfm/1041574.html">via</a>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://fredericiana.com/2010/06/15/hot-plugging-a-sata-drive-under-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Three ways to add a robots.txt to your Django project</title>
		<link>http://fredericiana.com/2010/06/09/three-ways-to-add-a-robots-txt-to-your-django-project/</link>
		<comments>http://fredericiana.com/2010/06/09/three-ways-to-add-a-robots-txt-to-your-django-project/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 11:40:51 +0000</pubDate>
		<dc:creator>Fred</dc:creator>
				<category><![CDATA[Mozilla Crosspost]]></category>
		<category><![CDATA[OSU OSL Crosspost]]></category>
		<category><![CDATA[Tech Talk]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[robots]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://fredericiana.com/?p=2791</guid>
		<description><![CDATA[Need to add a robots.txt file to your Django project to tell Google and friends what and what not to index on your site? Here are three ways to add a robots.txt file to Django. 1) The (almost) one-liner In an article on e-scribe.com, Paul Bissex suggest to add this rule to your urls.py file: [...]]]></description>
			<content:encoded><![CDATA[<p>Need to add a <a href="http://en.wikipedia.org/wiki/Robots_exclusion_standard">robots.txt</a> file to your Django project to tell Google and friends what and what not to index on your site?</p>
<p>Here are three ways to add a robots.txt file to Django.</p>
<h2>1) The (almost) one-liner</h2>
<p>In an <a href="http://news.e-scribe.com/431">article</a> on e-scribe.com, Paul Bissex suggest to add this rule to your <code>urls.py</code> file:</p>
<pre><code>from django.http import HttpResponse

urlpatterns = patterns('',
    ...
    (r'^robots\.txt$', lambda r: HttpResponse("User-agent: *\nDisallow: /", mimetype="text/plain"))
)
</code></pre>
<p>The advantage of this solution is, it is a simple one-liner disallowing all bots, with no extra files to be created, and no clutter anywhere. It&#8217;s as simple as it gets.</p>
<p>The disadvantage, obviously, is the missing scalability. The instant you have more than one rule to add, this approach quickly balloons out of hand. Also, one could argue that <code>urls.py</code> is not the right place for <em>content</em> of any kind.</p>
<h2>2) Direct to template</h2>
<p>This one is the most intuitive approach: Just drop a <code>robots.txt</code> file into your main templates directory and link to it via <code>direct_to_template</code>:</p>
<pre><code>from django.views.generic.simple import direct_to_template

urlpatterns = patterns('',
    ...
    (r'^robots\.txt$', direct_to_template,
     {'template': 'robots.txt', 'mimetype': 'text/plain'}),
)
</code></pre>
<p>Just remember to set the MIME type appropriately to <code>text/plain</code>, and off you go.</p>
<p>Advantage is its simplicity, and if you already have a robots.txt file you want to reuse, there&#8217;s no overhead for that.</p>
<p>Disadvantage: If your robots file changes somewhat frequently, you need to push changes to your web server every time. That can get tedious. Also, this approach does not save you from typos or the like.</p>
<h2>3) The django-robots app</h2>
<p>Finally, there&#8217;s a full-blown django app available that you can install and drop into your <code>INSTALLED_APPS</code>: It is called <a href="http://pypi.python.org/pypi/django-robots">django-robots</a>.</p>
<p>For small projects, this would be overkill, but if you have a lot of rules, or if you need a site admin to change them without pushing changes to the web server, this is your app of choice.</p>
<h2>Which one is right for me?</h2>
<p>Depending on how complicated your rule set is, either one of the solutions may be the best fit for you. Just choose the one that you are the most comfortable with and that fits the way you are using robots.txt in your application.</p>
]]></content:encoded>
			<wfw:commentRss>http://fredericiana.com/2010/06/09/three-ways-to-add-a-robots-txt-to-your-django-project/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Everything but &#8220;open&#8221;</title>
		<link>http://fredericiana.com/2010/06/08/everything-but-open/</link>
		<comments>http://fredericiana.com/2010/06/08/everything-but-open/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 17:38:03 +0000</pubDate>
		<dc:creator>Fred</dc:creator>
				<category><![CDATA[Mozilla Crosspost]]></category>
		<category><![CDATA[OSU OSL Crosspost]]></category>
		<category><![CDATA[Tech Talk]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[open]]></category>
		<category><![CDATA[standards]]></category>

		<guid isPermaLink="false">http://fredericiana.com/?p=2780</guid>
		<description><![CDATA[Note: Several commenters have provided valuable feedback that I am responding to with updates to this post and in the comments. Make sure to read both! On yesterday&#8217;s WWDC keynote, Steve Jobs introduced &#8220;FaceTime&#8221; and explained its base technologies with the following words: &#8220;Now it&#8217;s based on a handful of standards&#8230; but this is going [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Note:</strong> Several commenters have provided valuable feedback that I am responding to with updates to this post and in the comments. Make sure to read both!</p>
<hr />
<p>On yesterday&#8217;s WWDC keynote, Steve Jobs introduced &#8220;FaceTime&#8221; and explained its base technologies with the following words:</p>
<p><img src="http://fredericiana.com/wp-content/uploads/2010/06/engadget-apple-wwdc-2010-open.jpg" alt="" title="Engadget: Apple WWDC 2010 Keynote" width="600" height="398" class="alignnone size-full wp-image-2781" /></p>
<blockquote><p>&#8220;Now it&#8217;s based on a handful of standards&#8230; but this is going to be an <strong>open industry standard</strong>.&#8221;</p></blockquote>
<p>I wish Steve Jobs would cease calling H.264 and similar standards <strong>&#8220;open&#8221;</strong>. Technologies that cost <a href="http://shaver.off.net/diary/2010/01/23/html5-video-and-codecs/">millions of dollars</a> to use are, by <a href="http://en.wikipedia.org/wiki/Open_standard">definition</a>, <strong>not open</strong>. He can hope it&#8217;ll become an &#8220;industry standard&#8221; (as in, used by companies apart from Apple), fair enough. But he can&#8217;t say it is going to be &#8220;open&#8221;. That&#8217;s like a college kid calling the grocery store &#8220;free&#8221; just because daddy gave them an unlimited credit card. And it&#8217;s doing a huge disservice to the Open <del datetime="2010-06-09T11:42:29+00:00">Source</del><ins datetime="2010-06-09T11:42:29+00:00">standards</ins> community by misusing the term in the worst possible way.</p>
<p class="credits">Quote and photograph courtesy of <a href="http://www.engadget.com/2010/06/07/steve-jobs-live-from-wwdc-2010/">Engadget</a>. Thanks!</p>
<hr />
<p><strong>Update, 4/9/2010:</strong> For a while, I removed the above text in order not to express unwarranted criticism towards the speaker. After several rounds of user feedback, however, I decided to keep the original text and update/annotate this post as necessary.</p>
<p><strong>Update</strong> on the definition of openness:</p>
<p>As <a href="http://fredericiana.com/2010/06/08/everything-but-open/#comment-263142">Sandy</a> pointed out in the comments, there are many definition of <a href="http://en.wikipedia.org/wiki/Open_standard">what standards are considered &#8220;open&#8221;</a> and depending on which of these you follow, varying licensing fees, as long as you don&#8217;t exclude anyone with enough money to buy them, are still valid for calling a standard &#8220;open&#8221;. I disagree with that view, but it is a possible interpretation.</p>
<p>Commenter <a href="http://fredericiana.com/2010/06/08/everything-but-open/#comment-263160">Dave</a> mentions that Steve Jobs usually makes sure to call actual open standards &#8220;open&#8221; and calls H.264 and similar technologies &#8220;industry standards&#8221; instead. He is therefore likely to know the difference between the two, even though calling an entire stack &#8220;open&#8221; in spite of some of its components not matching that definition is a strange, or even misleading, point of view.</p>
<p>Finally, <a href="http://fredericiana.com/2010/06/08/everything-but-open/#comment-263155">Jo</a> argues that the mere fact that other vendors can build devices to connect to the FaceTime stack instead of it being limited to Apple products only makes it &#8220;open&#8221;. In other words, this use of &#8220;open&#8221; would be a synonym of &#8220;standards compliant&#8221;. I believe that is still a very limited view on openness, but at least it is more open than the alternative: a locked-down proprietary solution.</p>
<p><a href="http://fredericiana.com/2010/06/08/everything-but-open/#comment-263152">Peter</a> also reminds us of the technical limitations: Since all mobile devices need hardware support for video encoding and decoding, Apple had to settle for H.264 a long time ago, and even if they wanted, they could not simply switch over to a different codec. Most people (me included) also seem to agree that H.264 is &#8212; from a purely technical standpoint &#8212; a good choice for the FaceTime stack.</p>
]]></content:encoded>
			<wfw:commentRss>http://fredericiana.com/2010/06/08/everything-but-open/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Easy on the bandwidth, easy on the server: Pull-style updates in django-mozilla-product-details</title>
		<link>http://fredericiana.com/2010/06/01/easy-on-the-bandwidth-easy-on-the-server-pull-style-updates-in-django-mozilla-product-details/</link>
		<comments>http://fredericiana.com/2010/06/01/easy-on-the-bandwidth-easy-on-the-server-pull-style-updates-in-django-mozilla-product-details/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 17:33:24 +0000</pubDate>
		<dc:creator>Fred</dc:creator>
				<category><![CDATA[Mozilla Crosspost]]></category>
		<category><![CDATA[OSU OSL Crosspost]]></category>
		<category><![CDATA[Tech Talk]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[library]]></category>

		<guid isPermaLink="false">http://fredericiana.com/?p=2747</guid>
		<description><![CDATA[Over on the Mozilla Webdev blog, I just posted about a new library of ours, django-mozilla-product-details. This tongue twister allows you to periodically update the latest Mozilla product version information as well as language details from our SVN server. The geeks among you are surely wondering, isn&#8217;t that going to lead to a lot of [...]]]></description>
			<content:encoded><![CDATA[<p>Over on the Mozilla Webdev blog, I just <a href="http://blog.mozilla.com/webdev/2010/06/01/django-mozilla-product-details-because-short-library-names-are-for-wimps/">posted</a> about a new library of ours, <a href="http://github.com/fwenzel/django-mozilla-product-details">django-mozilla-product-details</a>. This tongue twister allows you to periodically update the latest Mozilla product version information as well as language details from our SVN server.</p>
<p>The geeks among you are surely wondering, <em>isn&#8217;t that going to lead to a lot of useless traffic if the data does not change as frequently as it is being updated?</em></p>
<p>You are right. Because re-downloading unchanged data is evil and because we like our servers, we are using a fun little trick to keep the data transferred as little as possible:</p>
<p><del datetime="2010-06-02T08:17:19+00:00">Every time the update script is run, we first issue a HEAD request to the SVN server: A HEAD request is a type of <a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol">HTTP</a> request that asks for some location from a server, but instead of receiving the actual data in return (an HTML document, for example, or some binary data), the server only returns the response headers, not the actual data.</p>
<p>From these headers, which are very small, we can read the <em>Last-Modified</em> timestamp and compare that to the time we last updated our local copy of the product data. If the timestamp hasn&#8217;t changed since then, there&#8217;s no need for us to download further data.</del></p>
<p>Instead of blindly downloading the data files on every update, we send the time of our last successful update along to the server, in a <code>If-Modified-Since</code> HTTP request header. If the files have changed since then, the server will send us the updated list, but if nothing has changed in the meantime, the server will just return a &#8220;<code>304 Not Modified</code>&#8221; status.</p>
<p>This is how we ensure that (almost) no matter how often you choose to update the product data, neither your nor our resources will be wasted.</p>
<p>This is not only a good idea for this specific library: Next time you consume RSS feeds or other &#8220;pull&#8221; data from various places on the Internet, make sure to query for updates before downloading unnecessary data. Caveat: This method only works if the server can handle an <em>If-Modified-Since</em> header. Servers that serve bogus timestamps or no such header at all leave you no choice but to download and investigate the feed itself.</p>
<p><strong>Update:</strong> A few readers pointed out that the If-Modified-Since request header would be an even better method to update the data conditionally than an initial HEAD request. They are, of course, right, which is why I <a href="http://github.com/fwenzel/django-mozilla-product-details/commit/d02bc6c">updated</a> the library accordingly. Thanks, everyone!</p>
]]></content:encoded>
			<wfw:commentRss>http://fredericiana.com/2010/06/01/easy-on-the-bandwidth-easy-on-the-server-pull-style-updates-in-django-mozilla-product-details/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>udevinfo on Ubuntu 10.4 &#8220;Lucid&#8221;</title>
		<link>http://fredericiana.com/2010/05/28/udevinfo-on-ubuntu-10-4-lucid/</link>
		<comments>http://fredericiana.com/2010/05/28/udevinfo-on-ubuntu-10-4-lucid/#comments</comments>
		<pubDate>Fri, 28 May 2010 06:38:30 +0000</pubDate>
		<dc:creator>Fred</dc:creator>
				<category><![CDATA[Mozilla Crosspost]]></category>
		<category><![CDATA[OSU OSL Crosspost]]></category>
		<category><![CDATA[Tech Talk]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[udev]]></category>

		<guid isPermaLink="false">http://fredericiana.com/?p=2733</guid>
		<description><![CDATA[The latest versions of Ubuntu do not appear to have the tool udevinfo anymore, which is vital to find information about devices connected to the computer. There is, however, a new tool called udevadm, and with a little syntax trick you can get it to spit out your familiar udevinfo syntax: udevadm info -a -p [...]]]></description>
			<content:encoded><![CDATA[<p>The latest versions of Ubuntu do not <a href="http://packages.ubuntu.com/search?suite=lucid&#038;arch=any&#038;mode=filename&#038;searchon=contents&#038;keywords=udevinfo">appear</a> to have the tool <code>udevinfo</code> anymore, which is vital to find information about devices connected to the computer.</p>
<p>There is, however, a new tool called <code>udevadm</code>, and with a little syntax trick you can get it to spit out your familiar udevinfo syntax:</p>
<blockquote><p><code>udevadm info -a -p `udevadm info -q path -n /dev/sdb`</code></p></blockquote>
<p>shows:</p>
<pre>Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1:1.0/host5/target5:0:0/5:0:0:0/block/sdb':
    KERNEL=="sdb"
    SUBSYSTEM=="block"
    DRIVER==""
    ATTR{range}=="16"
    ATTR{ext_range}=="256"
    ATTR{removable}=="1"
(...)

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""
</pre>
<p>If you use this more often and don&#8217;t like the idea of entering a huge line of code for such a simple command, drop the following into your <code>.bashrc</code> file (all in one line):</p>
<blockquote><p><code>udevinfo () { udevadm info -a -p `udevadm info -q path -n "$1"`; }</code></p></blockquote>
<p>Now (after starting a new session or typing <code>source ~/.bashrc</code>), a simple <code>udevinfo /dev/sdb</code> will do the trick.</p>
<p>Also helpful: A long time ago, I wrote a <a href="http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/">blog post about udev rules</a>, showing what rules I used at the time to have consistent device names for my USB drives, no matter in what order I connect or disconnect them. The devices I mention there are long gone, but I keep going back to that post every time I need to write a new udev rule.</p>
]]></content:encoded>
			<wfw:commentRss>http://fredericiana.com/2010/05/28/udevinfo-on-ubuntu-10-4-lucid/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What happens when you click the Firefox download button?</title>
		<link>http://fredericiana.com/2010/05/07/what-happens-when-you-click-the-firefox-download-button/</link>
		<comments>http://fredericiana.com/2010/05/07/what-happens-when-you-click-the-firefox-download-button/#comments</comments>
		<pubDate>Fri, 07 May 2010 13:34:16 +0000</pubDate>
		<dc:creator>Fred</dc:creator>
				<category><![CDATA[Mozilla Crosspost]]></category>
		<category><![CDATA[OSU OSL Crosspost]]></category>
		<category><![CDATA[Tech Talk]]></category>
		<category><![CDATA[bouncer]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[mirror]]></category>

		<guid isPermaLink="false">http://fredericiana.com/?p=2694</guid>
		<description><![CDATA[Everybody knows Mozilla makes Firefox. But there is a lot more software at work here at Mozilla that you might not be aware of. For example: What happens when you go to getfirefox.com and click on the download button? By clicking on the button, you ask our servers to send you a specific file, for [...]]]></description>
			<content:encoded><![CDATA[<p>Everybody knows Mozilla makes Firefox. But there is a lot more software at work here at Mozilla that you might not be aware of. For example: What happens when you go to <a href="http://getfirefox.com">getfirefox.com</a> and click on the <strong>download button</strong>?</p>
<p><img src="http://fredericiana.com/wp-content/uploads/2010/05/directions.jpg" alt="" title="directions" width="240" height="180" class="alignright size-full wp-image-2706" align="right" />By clicking on the button, you ask our servers to send you a specific file, for example: Firefox 3.6.3, for Windows, in German. On a small website, the server would just fetch the file and hand it to you. But if you need to handle millions of downloads a day like we do, a single server can&#8217;t handle it all by itself, so it gets more complicated. In order to provide you with downloads, updates, etc., as fast and conveniently as possible, Mozilla collaborates with a number of <a href="http://www.mozilla.org/community/mirrors.html">mirror providers</a> that have volunteered to host Firefox and other downloads on our behalf, thus sharing the load of our numerous downloads between a number of servers all over the world.</p>
<p>For some years now, we have been running a bundle of software called <a href="http://viewvc.svn.mozilla.org/vc/projects/bouncer/">&#8220;Bouncer&#8221;</a> to handle our downloads for us.</p>
<p>Bouncer consists of of three components: The user-facing <strong>bounce script</strong>, an <strong>administrative interface called Tuxedo</strong>, and a mirror checker called <strong>Sentry</strong>.</p>
<p>First, the <strong>bounce script</strong>. It is the only component the &#8220;ordinary user&#8221; gets to interact with. It essentially does the following after you click on a download link:</p>
<ul>
<li>It determines if the product you asked for exists.</li>
<li>Out of our list of mirrors, it picks one that has your file. Initially, it would pick one at random. Over the years, the logic has become more elaborate though: Meanwhile, it takes into account in what country you currently are, as well as how strong the mirrors are (stronger mirrors serve more downloads, weaker ones serve less).</li>
<li>A split-second later, Bouncer refers you to the server it decided on, and that server will send you the file you asked for.</li>
</ul>
<p>But wait, there is more! How does Bouncer know what products are available, for what operating systems, and in what languages? That&#8217;s where the <strong>admin interface</strong> comes in. We have a release engineering team who work hard every day to deliver the newest software versions to you in handy little packages. Previously, during every release, an engineer would manually tell Bouncer that a new version was available for download. But just last week, we improved this process by introducing a new interface to Bouncer, with a project called <a href="http://github.com/fwenzel/tuxedo/">Tuxedo</a>. The release engineering team can now, fully automatically, feed new versions into Bouncer at the time of release, with no manual intervention. With less time spent on repetitive tasks, we can spend more time making Firefox awesome.</p>
<p>Finally, the <strong>Sentry</strong> component is a script that periodically checks the health of our mirrors, and adjusts our settings accordingly. This is to ensure that a situation where you are forwarded to a mirror that is currently unavailable is very, very rare. So far, these mirror checks happen from Mozilla Headquarters, and therefore reflect the connectivity we get to the mirrors from here. In the future, we want to improve that by taking into account more how <em>our users&#8217; connectivity</em> is to the specific mirrors (for the geeks out there: <em>Network proximity != geographical proximity</em>), which has the potential to result in faster download times, less expenses for mirror providers, and general happiness.</p>
<p>As you can see, there are a lot of things happening behind the scenes before Firefox makes its way onto your computer at home, and we are constantly working on improving the way we are doing things. Plus, as always: Bouncer is completely <a href="http://github.com/fwenzel/tuxedo/">open source</a>, and we have a <a href="https://bugzilla.mozilla.org/buglist.cgi?query_format=advanced;product=Webtools;component=Bouncer;resolution=---">public bug tracker</a>, so if you notice any problems or see room for improvement, make sure to <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Webtools&#038;component=Bouncer">let us know</a>.</p>
<p class="credits">Photo credit: <a href="http://www.flickr.com/photos/philliecasablanca/3263799851/">&#8220;directions&#8221;</a>, CC-by licensed by Phillie Casablanca.</p>
]]></content:encoded>
			<wfw:commentRss>http://fredericiana.com/2010/05/07/what-happens-when-you-click-the-firefox-download-button/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t Forget to Clean Up After Yourself</title>
		<link>http://fredericiana.com/2010/03/30/dont-forget-to-clean-up-after-yourself/</link>
		<comments>http://fredericiana.com/2010/03/30/dont-forget-to-clean-up-after-yourself/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 12:38:33 +0000</pubDate>
		<dc:creator>Fred</dc:creator>
				<category><![CDATA[Mozilla Crosspost]]></category>
		<category><![CDATA[OSU OSL Crosspost]]></category>
		<category><![CDATA[Tech Talk]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[hudson]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[tests]]></category>

		<guid isPermaLink="false">http://fredericiana.com/?p=2679</guid>
		<description><![CDATA[On a growing number of projects at Mozilla, we use a tool called Hudson that runs a complete set of tests on the code with every check-in. The beauty of this is that if you accidentally break something, you (and everyone else) will know immediately, so you can fix it quickly. We also use a [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://fredericiana.com/wp-content/uploads/2010/03/hudson-butler.png" alt="" title="The Hudson Butler." width="96" height="96" class="alignright size-full wp-image-2680" />On a growing number of projects at Mozilla, we use a tool called <a href="http://hudson-ci.org/">Hudson</a> that runs a complete set of tests on the code with every check-in. The beauty of this is that if you accidentally break something, you (and everyone else) will know immediately, so you can fix it quickly. We also use a bunch of plugins with Hudson, <a href="http://wiki.hudson-ci.org/display/HUDSON/The+Continuous+Integration+Game+plugin">one of which</a> assigns points to every check-in: For example, if all tests pass, you get a positive number of points, or if you broke something, you get a negative score.</p>
<p>An innocent little commit of mine gained me a whopping <strong>-100 points</strong> (yes, that is minus 100) today.</p>
<p><strong>How did that happen?</strong> The build broke badly, not because I wrote a pile of horrendous code, or because I didn&#8217;t test before committing. In fact, I&#8217;ve made it a habit to commit like this:</p>
<blockquote><p><code>./manage.py test &#038;&#038; git push origin master</code></p></blockquote>
<p>This fun little one-liner will result in my code being pushed to the origin repository if and only if all tests pass.</p>
<p>So in my case, all tests passed locally, and then horribly broke once the server ran the tests again. After a little research, it turned out that when I deleted a now unneeded Python file, I did not remove its compiled cousin, the <code>.pyc</code> file, along with it. Sadly, this module was still <strong>imported</strong> somewhere else, and because Python still found the <code>.pyc</code> file locally, it did not mind the original <code>.py</code> file being gone, so all tests passed. On the server, however, with a completely clean environment, the file wasn&#8217;t found and resulted in the failures of dozens of tests (all of which threw an <a href="http://docs.python.org/library/exceptions.html#exceptions.ImportError">ImportError</a>).</p>
<p><strong>What&#8217;s the lesson?</strong> In the short term, I should wipe my <code>.pyc</code> files before running tests. One way to do that would be adding something like</p>
<blockquote><p><code>find . -type f -name '*.pyc' | xargs rm</code></p></blockquote>
<p>to my ever-growing <em>commit one-liner</em>, but a more general solution might want to perform this inside the test running script. On the other hand, since that script is written in Python, some of the imports that could break have already been performed by the time the script runs.</p>
<p>In general, run your tests on as clean an environment as possible. While any useful test framework will take care of your <em>database</em> having a consistent state for every test run, you also need to ensure that you start with a plane baseline of your <em>code</em> &#8212; especially if Hudson, the merciless butler, will rub it in your face if you don&#8217;t <img src='http://fredericiana.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  .</p>
]]></content:encoded>
			<wfw:commentRss>http://fredericiana.com/2010/03/30/dont-forget-to-clean-up-after-yourself/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>
