<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Caffeinated Simpleton</title>
	
	<link>http://justin.harmonize.fm</link>
	<description>A cup of coffee and a soapbox is like a bottle of Jack and a gun.</description>
	<lastBuildDate>Sun, 19 Jun 2011 22:56:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/CaffeinatedSimpleton" /><feedburner:info uri="caffeinatedsimpleton" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>My Radical-Right Agenda</title>
		<link>http://feedproxy.google.com/~r/CaffeinatedSimpleton/~3/lwCqoGWhmrQ/</link>
		<comments>http://justin.harmonize.fm/index.php/2011/06/my-radical-right-agenda/#comments</comments>
		<pubDate>Sun, 19 Jun 2011 22:55:25 +0000</pubDate>
		<dc:creator>justin</dc:creator>
				<category><![CDATA[Politics]]></category>

		<guid isPermaLink="false">http://justin.harmonize.fm/?p=384</guid>
		<description><![CDATA[I find it difficult to have a reasoned political debate in San Francisco. This is, as far as I have seen, the most liberal area in the country, to the point where people don&#8217;t even understand the idea that non-Democrats might actually live amongst them. I am not a Democrat, nor do I count myself as a [...]]]></description>
			<content:encoded><![CDATA[<p>I find it difficult to have a reasoned political debate in San Francisco. This is, as far as I have seen, the most liberal area in the country, to the point where people don&#8217;t even understand the idea that non-Democrats might actually live amongst them. I am not a Democrat, nor do I count myself as a member of the increasingly zealous, emotionally charged Republican party, despite what I might tell the unfortunate Democratic volunteers tasked with asking me for money. Instead I am for limited government. This is not because I don&#8217;t think government can be a force for good in the world, or because I believe that privatization of all things will yield better results, I just believe that the government is horribly inefficient and not truly accountable. Governments can only be held accountable when the electorate is well informed, and most (including myself), are willfully uninformed. Without accountability, we should limit government to those things that will consistently result in an ever improving society. For domestic issues, I think this boils down to two specific areas that need fixed: immigration and education.</p>
<h3>Educational opportunity for all</h3>
<p>Oftentimes domestic government policy is oriented around helping those that cannot help themselves. If we grant the premise that government is bad at things, then it goes without saying that they&#8217;re bad at helping people that can&#8217;t help themselves. I believe that education is the great equalizer, with access to education available to all, then it is up to the individual to seize those opportunities and achieve whatever they are able to. One of the greatest crimes we can allow to continue as a society is to deny people the opportunity to help themselves, and yet without the ability of each citizen to access the best possible education affordably, we are doing exactly that. Fixing this situation doesn&#8217;t even seem that hard, all that needs to be improved is access and affordability.</p>
<p>Fixing access is the harder part. Access to education means at a bare minimum permitting a person to get an education. I genuinely believe this is mostly solved. Whether you are black or white, male or female, gay or straight, you are allowed to enter any school in this country. This took us over 150 years to get right, but I believe that we are well on our way. Good job team!</p>
<p>The other parts of access relate to quantity of quality education. Without enough quality education available, we are forced to limit access through either price, lottery, or geographic location. I had a quality education because I lived near a wealthy suburb that paid good teachers well and was pleasant to work at. In San Francisco, there is a lottery to see who will go to what school. Some are good, some are, generously, less good. Most cities just do not have quality public schools and the only way to escape that is to pay ridiculous sums for a quality private education.</p>
<p>To fix this we need more good teachers. The current system does not encourage good teachers. I do not really care how we fix this, we just need to do something, and do it quickly. Making it easier for highly educated professionals to go and teach is one way. This means the regulatory requirements need to be lessened, with more control given to the school systems to determine who would and would not make a good teacher. It also requires paying teachers better. When teachers are seen as martyrs instead of professionals, we have a problem. Not everybody can afford to be a martyr.</p>
<p>Politically, increasing teacher quality through sweeping reform is difficult. The teachers&#8217; unions are quite powerful and seem to be opposed to all kinds of constructive reforms. This is why I am a supporter of school vouchers. If we cannot make public schools better in an expedient fashion, then we must try something else, and vouchers are a good way of pumping more money into a system that might be able to fix these issues. I understand a lot of the arguments against vouchers, but they all fall, in my mind, to the simple need to do <em>something</em>.</p>
<p>Affordability can go hand in hand with access, but tends to apply more to higher education. A quality higher education is necessarily expensive, and is not necessarily the right choice for every person. Not everybody needs to go to Harvard, but everybody that wants to go to Harvard and has the qualities Harvard is looking for in students should be able to do so. There are currently many programs to help students gain a higher education, but I feel that we need to be much more aggressive about it. A student should go through their entire primary education with the assumption that they can afford whatever college they desire so that they may focus on deciding which college will help them achieve whatever goals they may have. This means aggressively expanding the Pell Grant system. Pell Grants are laughably small for anybody that does not go to a state school. This means lower interest rates on student loans, and longer periods of time before it&#8217;s required to pay them back. This means more programs that forgive student debt, whether it be Peace Corps, Americorps, becoming a public defender, or even going into teaching. This means matching a student&#8217;s part-time pay. This means providing travel vouchers. This means providing free child care. This means tax breaks for everybody that helps an individual achieve a college education. This means bending over backwards to make sure those that are able to make an impact are given the education necessary to do so.</p>
<h3>Immigration Reform</h3>
<p>In addition to making our own population more able to advance our society, we need to allow others to freely do so as well. America may be losing some stature on the world stage, but it is still largely seen as a shining beacon of freedom and opportunity, if only you can get there. Without enough educators, doctors, nurses, engineers, and innovators, we are fools not to throw open the gates and announce to the world that if you think you can make it in America, we are going to let you try. The process should be as easy as getting a drivers license, which itself should be a whole lot easier. The only thing that seems to be preventing this now is a fear of low-cost migrant workers taking jobs, and in my mind the cost of that fear is far too high. Competition is good, it makes us strive to be our best when we&#8217;re winning, and forces us to change our approach when we&#8217;re losing. Immigrants oftentimes don&#8217;t have the preconceived notions of comfort and well-being that so many Americans have, many of them will work extremely hard to make it here. They will start businesses that will provide millions of new jobs and bring innovations to our country that will bring trillions of dollars to US shores. The best and the brightest should know that America is where they can have their dreams realized, without the hassle of convincing America that it wants them at all.</p>
<p>And that&#8217;s it. After that, I really just want government to leave us alone. The issues of the day pale in importance to these issues. Healthcare, Social Security, the next Keynesian jobs bill, they are all politically easy and ultimately problematic, band-aids for a society afraid of its diminishing promise but unable to make the hard changes necessary to reverse course. My far right agenda is simple: do less and allow people to achieve more.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?a=lwCqoGWhmrQ:wHeIfa-7hOs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?a=lwCqoGWhmrQ:wHeIfa-7hOs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?a=lwCqoGWhmrQ:wHeIfa-7hOs:3Id5NbicZDU"><img src="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?i=lwCqoGWhmrQ:wHeIfa-7hOs:3Id5NbicZDU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CaffeinatedSimpleton/~4/lwCqoGWhmrQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://justin.harmonize.fm/index.php/2011/06/my-radical-right-agenda/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://justin.harmonize.fm/index.php/2011/06/my-radical-right-agenda/</feedburner:origLink></item>
		<item>
		<title>Type Conversion Pedanticism in JavaScript</title>
		<link>http://feedproxy.google.com/~r/CaffeinatedSimpleton/~3/KhC4MdqWUbs/</link>
		<comments>http://justin.harmonize.fm/index.php/2010/11/type-conversion-pedanticism-in-javascript/#comments</comments>
		<pubDate>Tue, 30 Nov 2010 10:23:37 +0000</pubDate>
		<dc:creator>justin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://justin.harmonize.fm/?p=371</guid>
		<description><![CDATA[I got in a brief conversation in the node.js IRC channel today about how weird type conversion is in JavaScript. Specifically, this code was suspect: What this shows is that when a Boolean object is used in an if statement, it always evaluates to true, but when it&#8217;s used in a type coercing operator (such [...]]]></description>
			<content:encoded><![CDATA[<p>I got in a brief conversation in the <a href="http://nodejs.org/">node.js</a> IRC channel today about how weird type conversion is in JavaScript. Specifically, this code was suspect:</p>
<p><script src="https://gist.github.com/721409.js"> </script></p>
<p>What this shows is that when a Boolean object is used in an <code>if</code> statement, it always evaluates to <code>true</code>, but when it&#8217;s used in a type coercing operator (such as <code>==</code>), it converts to the value it represents. Why?</p>
<p>The reason is actually pretty straightforward, even though it&#8217;s not obvious when looking at it. <code>if</code> statements convert the result of their expression to a boolean primitive, whereas <code>==</code> converts the right side expression into the type of the left side and checks for equivalency. So <code>if</code> statements don&#8217;t do type conversion at all until the expression is evaluated, and then it implicitly converts the result of that expression into a boolean primitive.</p>
<p>JavaScript is really just doing this:</p>
<p><script src="https://gist.github.com/721428.js?file=how-if-works.js"></script></p>
<p>Where the weirdness comes in is how type converting an object works. If you <a href="http://interglacial.com/javascript_spec/a-9.html">look at the JavaScript spec</a>, you can see that converting an Object to a boolean is always <code>true</code>. And guess what? Instances of <code>Boolean</code> are objects:</p>
<p><script src="https://gist.github.com/721439.js?file=boolean-objects.js"></script></p>
<p>Since new <code>Boolean</code> instances are objects, they will always be <code>true</code> when converted to a boolean primitive, which is exactly what the <code>if</code> statement is doing.<br />
<script src="https://gist.github.com/721473.js?file=converting-boolean-instances.js"></script></p>
<p>So then, why does <code>new Boolean(false) == false</code> result in <code>true</code>? Well it&#8217;s because the rules are different for <code>==</code>. Let&#8217;s say you&#8217;re doing <code>false == new Boolean(false)</code>. This will result in <code>true</code> because the left side of the expression is a primitive, so the interpreter will convert the Boolean instance, not to a boolean, but to a primitive. When converting an object to a value, the interpreter will:</p>
<blockquote><p>Return a default value for the Object. The default value of an object is retrieved by calling the internal [[DefaultValue]] method of the object, passing the optional hint PreferredType. The behaviour of the [[DefaultValue]] method is defined by this specification for all native ECMAScript objects (8.6.2.6).</p></blockquote>
<p>And, you guessed it, the default value of a Boolean instance is just the boolean primitive that it represents. So, after conversion, we&#8217;re testing <code>false</code> against <code>false</code> which is of course true.</p>
<p>The other direction also works. If we&#8217;re doing <code>(new Boolean(false)) == false </code>, then the interpreter will convert <code>false</code> to an <code> Object</code>. The spec specifies that to convert a boolean primitive to an object, it should:</p>
<blockquote><p>Create a new Boolean object whose [[value]] property is set to the value of the boolean.</p></blockquote>
<p>So then we have two equivalent Boolean instances being compared, which again results in <code>true</code></p>
<p><script src="https://gist.github.com/721480.js?file=boolean-type-summary.js"></script></p>
<p>Pretty crazy, but it kind of makes sense when you think about it. Maybe.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?a=KhC4MdqWUbs:2YdFRzSp5bw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?a=KhC4MdqWUbs:2YdFRzSp5bw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?a=KhC4MdqWUbs:2YdFRzSp5bw:3Id5NbicZDU"><img src="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?i=KhC4MdqWUbs:2YdFRzSp5bw:3Id5NbicZDU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CaffeinatedSimpleton/~4/KhC4MdqWUbs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://justin.harmonize.fm/index.php/2010/11/type-conversion-pedanticism-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://justin.harmonize.fm/index.php/2010/11/type-conversion-pedanticism-in-javascript/</feedburner:origLink></item>
		<item>
		<title>Bujagali: Incredibly Fast JavaScript Templating</title>
		<link>http://feedproxy.google.com/~r/CaffeinatedSimpleton/~3/wEK56sMfYj8/</link>
		<comments>http://justin.harmonize.fm/index.php/2010/10/bujagali-incredibly-fast-javascript-templating/#comments</comments>
		<pubDate>Tue, 19 Oct 2010 07:31:08 +0000</pubDate>
		<dc:creator>justin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Bujagali]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://justin.harmonize.fm/?p=354</guid>
		<description><![CDATA[&#8220;Fuck it, let&#8217;s do it live&#8221; Today&#8217;s complex web apps have a complicated mish-mash of server-side templates combined with client-side JavaScript. Often times there are certain calls to the server that return HTML, and others that return JSON or XML for client-side use. This not only distorts the &#8220;view&#8221; portion of MVC, but it can [...]]]></description>
			<content:encoded><![CDATA[<h3>&#8220;Fuck it, let&#8217;s do it live&#8221;</h3>
<p>Today&#8217;s complex web apps have a complicated mish-mash of server-side templates combined with client-side JavaScript. Often times there are certain calls to the server that return HTML, and others that return JSON or XML for client-side use. This not only distorts the &#8220;view&#8221; portion of MVC, but it can also be hard to develop for and, increasingly, slow. At <a title="Rdio" href="http://rdio.com" target="_blank">rdio</a>, we thought that we may be able to see substantial performance improvements across the board if we changed our templating engine from <a href="http://jinja.pocoo.org/" target="_blank">Jinja2</a> on the server-side to a custom, client-side templating engine. We found this to be quite true in the end, and the majority of the pages found on <a href="http://rdio.com">rdio</a> today use <a href="http://github.com/rdio/bujagali" target="_blank">Bujagali</a> (the name we gave our system).</p>
<h3>Goals</h3>
<p>The goals for the project were pretty ambitious.</p>
<ul>
<li>Trivial to convert from Jinja to Bujagali
<ul>
<li>Support template inheritance</li>
<li>Support importing shared code</li>
<li>Support filters (essentially just functions accessible from the template)</li>
</ul>
</li>
<li>Make heavy use of client&#8217;s cache</li>
<li>Reduce bandwidth usage to being as close as possible to the size of the actual data required to render</li>
<li>Perform really, really fast on good browsers</li>
<li>Not have terrible performance in IE</li>
<li>Optionally render server-side to support googlebot and other limited JS environments</li>
</ul>
<p>We achieved these goals, and you can learn how to use the engine and play around with the source <a href="http://github.com/rdio/bujagali/">on github</a>. Be warned, however, that documentation is sparse right now.</p>
<p>If you want to learn how all the insides work, keep reading.</p>
<h3>Architecture</h3>
<p>The architecture is pretty simple on the surface. It comes down to heavy caching, robust versioning, a laissez-faire syntax, and flexibility in runtime environment.</p>
<p>A quick note about measuring performance: it&#8217;s hard. Bujagali is optimized to perform better over time, to get you your data faster by utilizing smaller payloads, and to actually be fast once we were shoving data into strings. To top it off, it performs differently depending on your client. It&#8217;s hard to do an apples-to-apples comparison of overall template performance in a case like this, but suffice it to say that we measured performance extensively at <a href="http://rdio.com">rdio</a> and Bujagali is way, way faster in most cases than the previous Jinja2-based system. I hope to write more about performance in the future.</p>
<h5>Caching</h5>
<p>When it comes to caching, there&#8217;s one overriding rule: templates themselves are very cacheable, data is not. I also did not assume that the application JavaScript was very cacheable since in rdio&#8217;s case it&#8217;s not. After all, we roll out new versions of the site every day and since the application JavaScript is compressed into one file, your browser almost always has to reload the JavaScript whenever we roll out a new version. I wanted to avoid this in the case of templates for a couple of reasons. First of all, most of the templates change quite a bit less frequently than the JavaScript itself, and second, including all markup on the site would increase the size of the rapidly-changing JS file enormously.</p>
<p>To maximize cacheability of the templates, we turn to the browser cache itself. Each template is just a JavaScript file that contains a JavaScript function of the same name. By including the version of the file in the file name and telling the browser to cache it til we&#8217;re all long dead, we can assure that the turnaround time for the browser to get the template loaded into the program is really low. In fact in some versions of IE, loading a script that is contained in the cache is a synchronous operation. This is better explained through a bit of code.</p>
<p><script src="http://gist.github.com/633720.js?file=load.js"></script> As long as we carefully keep track of versions, we can be sure that the function loaded by the above script is the one that we want and that if the template does not change, it will never require another trip to the server to retrieve. In practice, this is a huge win as the full markup of your site really only has to be transferred once.</p>
<h5>Versioning</h5>
<p>The next overriding principle was strict versioning. This was pretty much necessary as a result of the heavy caching. Every time data is passed into Bujagali to be rendered, it must specify what version of the template it expects to be rendered against. By providing this information every time, we can be sure that the templates always work right in pretty much every possible proxy and caching set-up.  A cool side effect of this is hot-swappable templates. If you modify a template server side and an ajax request comes in for data that&#8217;s supposed to render against that freshly modified template, Bujagali will reload the template and render it seamlessly, no refresh required.</p>
<h5>Laissez-Faire Syntax</h5>
<p>The final part of designing Bujagali was figuring out what we would actually allow in the templates. Jinja is very strict about what you can and cannot do. Bujagali is not. You can just write arbitrary JavaScript, and in fact writing a template in Bujagali feels a lot more like writing JS than it does HTML. This isn&#8217;t because I think there should be logic in your templates (I don&#8217;t), but I think that it&#8217;s up to the developer to decide what constitutes &#8220;program logic&#8221; and what constitutes &#8220;view logic&#8221;. Having a full-fledged language can be very useful in a template, and so arbitrary JavaScript is perfectly acceptable in Bujagali. It&#8217;s a language you already know and it won&#8217;t get in your way.  An example comes from one of rdio&#8217;s own templates:<br />
 <script src="http://gist.github.com/633752.js?file=nav_bar.js"></script></p>
<h5>Flexibility in Runtime Environment</h5>
<p>Despite the fact that Bujagali allows you to execute arbitrary javascript, it does not make a lot of guarantees about the environment. Bujagali requires the <a href="http://documentcloud.github.com/underscore/">Underscore.js</a> library, so it will always be available to templates, but beyond that it makes no guarantees (although it is extensible, so you can ensure that your own objects and helpers are available). This restriction gives us the flexibility to render templates either on the client side or on the server side using a server-side JavaScript environment like <a href="http://nodejs.org/">node.js</a>.</p>
<p>This restriction on environment does have some practical benefits that keep the templates &#8220;clean&#8221;, despite the arbitrary JS that is permitted. Without access to the DOM or the rest of the running program, side effects from the templates themselves are limited. This restriction is not actually enforced by Bujagali itself, however, instead you&#8217;ll just get burned if you don&#8217;t stick to the restriction and then try to use your template in a different context.</p>
<h3>Try it out</h3>
<p>I&#8217;ll write more about actually using Bujagali in the future. However, the code is available now <a href="http://github.com/rdio/bujagali/" target="_blank">on github</a>. The documentation is a bit thrown together right now, but it&#8217;s hopefully enough to get you started. There&#8217;s some infrastructure required since, unlike a normal templating system, this system spans the boundary between client and server. Luckily the code provided should make it fairly easy to get going if you already know what you&#8217;re doing.</p>
<p>It should be stated that this isn&#8217;t exactly a templating system for the faint of heart. Best of luck to all who venture on to github.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?a=wEK56sMfYj8:5D6E6dOblL0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?a=wEK56sMfYj8:5D6E6dOblL0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?a=wEK56sMfYj8:5D6E6dOblL0:3Id5NbicZDU"><img src="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?i=wEK56sMfYj8:5D6E6dOblL0:3Id5NbicZDU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CaffeinatedSimpleton/~4/wEK56sMfYj8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://justin.harmonize.fm/index.php/2010/10/bujagali-incredibly-fast-javascript-templating/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		<feedburner:origLink>http://justin.harmonize.fm/index.php/2010/10/bujagali-incredibly-fast-javascript-templating/</feedburner:origLink></item>
		<item>
		<title>Cobra is Ready to Release</title>
		<link>http://feedproxy.google.com/~r/CaffeinatedSimpleton/~3/mi8_mMd_m8o/</link>
		<comments>http://justin.harmonize.fm/index.php/2010/02/cobra-is-ready-to-release/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 08:06:40 +0000</pubDate>
		<dc:creator>justin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Cobra]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://justin.harmonize.fm/?p=346</guid>
		<description><![CDATA[I did a little work on Cobra today and pushed the code around a little bit. Things that changed: Reorganized into a single closure. This helps keep internal details internal. Minimize with Closure Compiler JSLint now passes I definitely recommend the JSLint VIM plugin if you&#8217;re a vimmer. Works in node.js (and most likely any [...]]]></description>
			<content:encoded><![CDATA[<p>I did a little work on Cobra today and pushed the code around a little bit. Things that changed:</p>
<ul>
<li>Reorganized into a single closure. This helps keep internal details internal.</li>
<li>Minimize with <a href="http://code.google.com/closure/compiler/" target="_blank">Closure Compiler</a></li>
<li><a href="http://www.jslint.com/" target="_blank">JSLint</a> now passes
<ul>
<li>I definitely recommend the <a href="http://github.com/hallettj/jslint.vim" target="_blank">JSLint VIM plugin</a> if you&#8217;re a vimmer.</li>
</ul>
</li>
<li>Works in <a href="http://nodejs.org/" target="_blank">node.js</a> (and most likely any server-side JavaScript implementation)</li>
<li>Works in Internet Explorer.
<ul>
<li>I had never really tested this, but after fixing the things that JSLint found, the tests just passed.</li>
<li>Still need to test in IE 6. I don&#8217;t have a machine with IE 6 unfortunately.</li>
</ul>
</li>
<li>Added to documentation to clarify a few things.</li>
</ul>
<p>At this point, I think the library&#8217;s safe for others to use. I tagged a 0.5 version, and I&#8217;ll be calling it 1.0 after it gets into a few more projects. Feel free to try it out!</p>
<p>You can find <a href="http://github.com/jmtulloss/cobra">Cobra on github</a>, or you can <a href="http://github.com/jmtulloss/cobra/zipball/0.5">download version 0.5 now</a> (<a href="http://github.com/jmtulloss/cobra/tarball/0.5">tgz</a>).</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?a=mi8_mMd_m8o:Y7qgOP-0iwA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?a=mi8_mMd_m8o:Y7qgOP-0iwA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?a=mi8_mMd_m8o:Y7qgOP-0iwA:3Id5NbicZDU"><img src="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?i=mi8_mMd_m8o:Y7qgOP-0iwA:3Id5NbicZDU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CaffeinatedSimpleton/~4/mi8_mMd_m8o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://justin.harmonize.fm/index.php/2010/02/cobra-is-ready-to-release/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://justin.harmonize.fm/index.php/2010/02/cobra-is-ready-to-release/</feedburner:origLink></item>
		<item>
		<title>Sports Bring Peace</title>
		<link>http://feedproxy.google.com/~r/CaffeinatedSimpleton/~3/dosPV_tDdVg/</link>
		<comments>http://justin.harmonize.fm/index.php/2010/02/sports-bring-peace/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 04:35:53 +0000</pubDate>
		<dc:creator>justin</dc:creator>
				<category><![CDATA[What I'm thinking]]></category>
		<category><![CDATA[Christopher Hitchens]]></category>
		<category><![CDATA[instincts]]></category>
		<category><![CDATA[sports]]></category>
		<category><![CDATA[World Peace]]></category>

		<guid isPermaLink="false">http://justin.harmonize.fm/?p=330</guid>
		<description><![CDATA[In a typically whiny and smug editorial in this week&#8217;s Newsweek, Christopher Hitchens rants that sports are the cause of much needless political strife and that celebrating the athletes that make these spectacles possible degrades us all. He equates sports fans to children or some sort of uneducated, redneck mob that follows manufactured allegiances to murder, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://justin.harmonize.fm/wp-content/uploads/2010/02/torch-mob.jpg"><img class="alignright size-full wp-image-333" title="Your typical sports fans." src="http://justin.harmonize.fm/wp-content/uploads/2010/02/torch-mob.jpg" alt="" width="350" height="298" /></a>In a typically whiny and smug <a href="http://www.newsweek.com/id/233007" target="_blank">editorial in this week&#8217;s Newsweek</a>, <a id="aptureLink_QXckUmtqJm" href="http://en.wikipedia.org/wiki/Christopher%20Hitchens">Christopher Hitchens</a> rants that sports are the cause of much needless political strife and that celebrating the athletes that make these spectacles possible degrades us all. He equates sports fans to children or some sort of uneducated, redneck mob that follows manufactured allegiances to murder, war, and ignorance. This all is, of course, ridiculous, not to mention offensive to the thoughtful, well-educated individuals who understand and care about sports.</p>
<p>Hitchens&#8217; main line of reasoning stems from a few anecdotes that he brings together to create an overly pessimistic picture of sports creating international tension. This kind of journalism is sickening, but typical, as it poses a number of loosely similar stories as facts that reach a hard conclusion without even suggesting alternative sides of the story. It is nothing more than tabloid-esque entertainment, but nevertheless I am compelled to present a different vision of sports in America and the world as a whole.</p>
<p><a href="http://justin.harmonize.fm/wp-content/uploads/2010/02/chimpgun.jpg"><img class="alignleft size-full wp-image-340" title="Early humans before sports." src="http://justin.harmonize.fm/wp-content/uploads/2010/02/chimpgun.jpg" alt="" width="300" height="210" /></a>Since humanity has formed into nations, cultures, religions, and a number of other ways of organizing themselves, there has been a basic problem. In a world in which it is more likely that you do not know somebody than you do know them, how do we interact, probe each others strengths and weaknesses, find common ground, and establish community with people we have no interaction with? Discussing economics, religion, or politics is more likely to breed conflict than mutual understanding. You cannot compete with somebody who is willing to die rather than give ground on a subject. Competitions, as a natural tribal instinct, had to evolve into a different form. I am always going to want to best by sister at any give topic. My family will want to best the neighbors. The town will want to best the next town over. The state will want to best the next state. If we ever find alien life forms, Earth will want to show their superiority. There should be a way to fulfill this natural need to compete without killing everyone. Sports is that way.</p>
<p>This point seems to play right into sports opponents hands. They would say that sports are still a reflection of animal instincts that we can grow out of, that&#8217;s it&#8217;s somehow base. I strongly disagree. Sports are the civilized competition, the way we teach and learn how to resolve differences without resorting to violence. Sports are islands of peace in a world riddled with genuine conflict. They provide tribal community without pushing us towards its violence.</p>
<p>The key to sports peaceful nature is that they, in and of themselves, don&#8217;t matter. They are not a higher cause. When they become representative of a higher cause, trouble ensues, but when they are kept to the level of competition for competition&#8217;s sake, then there is no reason for animosity to endure, or to break into violence. This allows for community on both sides of the competition, which allows us to ignore the potentially violent differences individuals have in their everyday lives.</p>
<p><a href="http://justin.harmonize.fm/wp-content/uploads/2010/02/uiuc.png"><img class="alignright size-full wp-image-338" title="University of Illinois at Urbana-Champaign" src="http://justin.harmonize.fm/wp-content/uploads/2010/02/uiuc.png" alt="" width="115" height="149" /></a>College is a great example. While I probably do not have an causes that I will violently enforce, many people that are thrown together on the same university do. Israelis and Palestinians sit next to each other in lecture. Blacks and whites, Armenians and Turks, and hundreds of other traditionally irreconcilable cultures, religions, and nationalities interact with each other every day. How is it possible to create a cohesive community out of such a widely varied population? Sports. A few chosen athletes are tasked with representing this created community in a way that we can all join together and push past our differences. This community now has a face, something to fight for, but not in a violent way. We can peacefully come together around this one cause.</p>
<p><a href="http://justin.harmonize.fm/wp-content/uploads/2010/02/bovswoody1.jpg"><img class="alignleft size-full wp-image-336" title="Bo Vs Woody" src="http://justin.harmonize.fm/wp-content/uploads/2010/02/bovswoody1.jpg" alt="" width="351" height="212" /></a>The same concept applies to localities, states, and nations. If I meet an older, latino, blue-collar worker on a bus or in a bar, I have nothing obviously in common with this man. Throw on an Ohio State sweatshirt, and suddenly we can talk for hours. What&#8217;s more, throw a Michigan sweatshirt on the man, and we can still have a civil conversation. We are rivals, but not the kind that you can&#8217;t have a beer with. In fact, I am offered an understanding of how the man thinks that I would not normally have. I know he hates me the same way I hate him, and we can bond over that. The same principle applies to a San Francisco shirt in San Francisco, or a Die Mannschaft jersey in Germany.</p>
<p>Sports at their core are about peaceful competition. So how is there so much violence? The violence is caused by the same things that cause violence outside of sports, sports are sometimes just mixed up into the equation. Violence is frequently caused by money, religion, cultural differences, and a whole slew of other things. When the sports teams representing two sides that are already entangled in a conflict meet, one of two things can happen. The competition can remind everybody of their shared interests, or they can serve as a catalyst to a violent conflict. While I believe that the majority of the data suggests the former, I have no proof of this. The important point is, the violence is not caused by the sport itself. It&#8217;s caused by the things that always drive us apart. Sports themselves, when played out as they are intended, can only bring peace.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?a=dosPV_tDdVg:tEsK31b5DYA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?a=dosPV_tDdVg:tEsK31b5DYA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?a=dosPV_tDdVg:tEsK31b5DYA:3Id5NbicZDU"><img src="http://feeds.feedburner.com/~ff/CaffeinatedSimpleton?i=dosPV_tDdVg:tEsK31b5DYA:3Id5NbicZDU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/CaffeinatedSimpleton/~4/dosPV_tDdVg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://justin.harmonize.fm/index.php/2010/02/sports-bring-peace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://justin.harmonize.fm/index.php/2010/02/sports-bring-peace/</feedburner:origLink></item>
	</channel>
</rss>

