<?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>A geek with a hat</title>
	
	<link>http://swizec.com/blog</link>
	<description>Drinker of tea</description>
	<lastBuildDate>Mon, 20 Feb 2012 12:03:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/AGeekWithAHat2" /><feedburner:info uri="ageekwithahat2" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>FANN – neural networks made easy</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/TDVbJldOUzI/3714</link>
		<comments>http://swizec.com/blog/fann-neural-networks-made-easy/swizec/3714#comments</comments>
		<pubDate>Mon, 20 Feb 2012 12:03:08 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3714</guid>
		<description><![CDATA[Over the weekend I was struck with the realization that I don&#8217;t know how to use neural networks in practice, damn it. Even though a few months ago I realized what neural networks are, even though I&#8217;ve tried implementing them, even though I&#8217;ve used them in a class setting &#8230; How the hell do you [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_3718" class="wp-caption alignright" style="width: 310px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/Selection_053.png"><img class="size-medium wp-image-3718" title="Convergence!" src="http://swizec.com/blog/wp-content/uploads/2012/02/Selection_053-300x174.png" alt="Convergence!" width="300" height="174" /></a><p class="wp-caption-text">Convergence!</p></div>
<p>Over the weekend I was struck with the realization that I don&#8217;t know <em>how to use <a class="zem_slink" title="Neural network" href="http://en.wikipedia.org/wiki/Neural_network" rel="wikipedia">neural networks</a> in practice, damn it. </em>Even though a few months ago <a title="I think I finally understand what a neural network is" href="http://swizec.com/blog/i-think-i-finally-understand-what-a-neural-network-is/swizec/2891" target="_blank">I realized what neural networks are</a>, even though I&#8217;ve <a title="I suck at implementing neural networks in octave" href="http://swizec.com/blog/i-suck-at-implementing-neural-networks-in-octave/swizec/2929" target="_blank">tried implementing them</a>, even though I&#8217;ve used them in a class setting &#8230;</p>
<p>How the hell do you use these things in real life!?</p>
<p>Implement from scratch? &#8230; no that can&#8217;t be it.</p>
<p>Find a library, write some code, run some tests, fiddle with features, run a test, fiddle with features, realize everything is slow, decide to use more layers, fiddle with features, play around with activation functions, run a test, fiddle with features, rewrite the code because it&#8217;s a mess, fiddle with features, run a test, run the network, run more tests and so on and on <em>ad nauseum</em>.</p>
<p>That can&#8217;t be it either &#8230;</p>
<h2>FANN</h2>
<p>Looking far and wide for a good library to use I stumbled upon <a href="http://leenissen.dk/fann/wp/" target="_blank">FANN &#8211; Fast Artificial Neural Networks</a>.</p>
<blockquote><p>Fast Artificial Neural Network Library is a free open source neural network library, which implements multilayer artificial neural networks in C with support for both fully connected and sparsely connected networks. Cross-platform execution in both fixed and floating point are supported. It includes a framework for easy handling of <a class="zem_slink" title="Training set" href="http://en.wikipedia.org/wiki/Training_set" rel="wikipedia">training data</a> sets. It is easy to use, versatile, well documented, and fast. Bindings to more than <a href="http://leenissen.dk/fann/wp/language-bindings/">15 programming languages</a> are available. An easy to read introduction <a href="http://fann.sf.net/fann_en.pdf">article</a> and a <a href="http://leenissen.dk/fann/html/index.html" target="_top">reference manual</a> accompanies the library with examples and recommendations on how to use the library. Several graphical <a href="http://leenissen.dk/fann/wp/graphical-interface/">user interfaces</a> are also available for the library.</p></blockquote>
<p>Perfect!</p>
<p>Not only has someone gone to the trouble of implementing everything and making sure it works &#8211; nothing sucks more than figuring out whether you&#8217;re using your learning software wrong or it&#8217;s just buggy &#8211; they even gave it all the fiddly features I need!</p>
<p>It gets better! There&#8217;s a slew of graphical interfaces -&gt; You get to play with the fiddly bits without even knowing what you&#8217;re doing! Yes!</p>
<p>Put the data in the fann format, load it up, and away you go. Playing around until you figure out what you&#8217;re looking for, then you can just implement the same thing with the FANN binding of your choice.</p>
<div id="attachment_3715" class="wp-caption alignnone" style="width: 801px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/Selection_050.png"><img class="size-full wp-image-3715" title="It can suggest a good training algo" src="http://swizec.com/blog/wp-content/uploads/2012/02/Selection_050.png" alt="It can suggest a good training algo" width="791" height="429" /></a><p class="wp-caption-text">It can suggest a good training algo</p></div>
<div id="attachment_3717" class="wp-caption alignnone" style="width: 769px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/Selection_052.png"><img class="size-full wp-image-3717" title="You get to set up the neural network" src="http://swizec.com/blog/wp-content/uploads/2012/02/Selection_052.png" alt="You get to set up the neural network" width="759" height="291" /></a><p class="wp-caption-text">You get to set up the neural network</p></div>
<div id="attachment_3716" class="wp-caption alignnone" style="width: 774px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/Selection_051.png"><img class="size-full wp-image-3716" title="Fiddly bits!" src="http://swizec.com/blog/wp-content/uploads/2012/02/Selection_051.png" alt="Fiddly bits!" width="764" height="462" /></a><p class="wp-caption-text">Fiddly bits!</p></div>
<div id="attachment_3718" class="wp-caption alignnone" style="width: 772px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/Selection_053.png"><img class="size-full wp-image-3718" title="Watch it converge in real time" src="http://swizec.com/blog/wp-content/uploads/2012/02/Selection_053.png" alt="Watch it converge in real time" width="762" height="443" /></a><p class="wp-caption-text">Watch it converge in real time</p></div>
<h2>Done in a few hours</h2>
<p>FANN really saved my skin last night. At least the <a class="zem_slink" title="Graphical user interface" href="http://en.wikipedia.org/wiki/Graphical_user_interface" rel="wikipedia">GUI</a> did. I still haven&#8217;t solved my problem &#8211; trying to predict how many people will read a whole post &#8211; but it took me literally a couple of minutes to realize that the same network can&#8217;t be used to predict two outputs since it won&#8217;t even converge.</p>
<p>That&#8217;s something very specific to the problem.</p>
<p>I also realized the networks were overfitting my data, then performing poorly on the test.</p>
<p>Another specific thing.</p>
<p>It is because of this incredibly problem-specific nature of most work involving neural networks that having tools like these is really important. Who wants to fiddle around with implementing all this stuff by hand for several hours before even running the first tests?</p>
<p>I probably ran twenty or thirty different configurations in the space of three hours last night. Could I have done that without a simple tool? Probably not &#8211; wouldn&#8217;t even have the first configuration implemented by now.</p>
<p>Now if only the GUI tool calculated precision and recall instead of mean standard error &#8230;</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://swizec.com/blog/i-think-i-finally-understand-what-a-neural-network-is/swizec/2891">I think I finally understand what a neural network is</a> (swizec.com)</li>
<li class="zemanta-article-ul-li"><a href="http://swizec.com/blog/i-suck-at-implementing-neural-networks-in-octave/swizec/2929">I suck at implementing neural networks in octave</a> (swizec.com)</li>
<li class="zemanta-article-ul-li"><a href="http://horicky.blogspot.com/2012/02/characteristics-of-machine-learning.html">Characteristics of Machine Learning Model</a> (horicky.blogspot.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/8595741/neural-network-should-the-algorithm-be-rewritten-for-every-case">Neural network: should the algorithm be rewritten for every case?</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/8697054/is-it-possible-for-encog-or-neuroph-to-run-on-android">Is it possible for Encog or Neuroph to run on Android?</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://swizec.com/blog/sabbatical-week-day-3-raining-datatypes/swizec/3293">Sabbatical week day 3: Raining datatypes</a> (swizec.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/8682766/c-machine-learning-framework">C++ machine learning framework</a> (stackoverflow.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=3b9f04bc-86a6-49e2-b0f1-6044eb94681d" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/TDVbJldOUzI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/fann-neural-networks-made-easy/swizec/3714/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/fann-neural-networks-made-easy/swizec/3714</feedburner:origLink></item>
		<item>
		<title>I walked all over a lake!</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/XnIFg3vDWX4/3686</link>
		<comments>http://swizec.com/blog/i-walked-all-over-a-lake/swizec/3686#comments</comments>
		<pubDate>Sat, 18 Feb 2012 15:02:20 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Bled]]></category>
		<category><![CDATA[Julian Alps]]></category>
		<category><![CDATA[Lake]]></category>
		<category><![CDATA[Lake Bled]]></category>
		<category><![CDATA[Recreation]]></category>
		<category><![CDATA[Slovenia]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3686</guid>
		<description><![CDATA[You&#8217;ve heard of Lake Bled right? The only lake in Slovenia containing the only island in Slovenia? Right!? Oh it&#8217;s just one of the most beautifulest places in Slovenia. Yesterday I walked all over the bad boy! The really amazing thing about Lake Bled is that every couple of years it completely freezes over. To [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;ve heard of <a class="zem_slink" title="Lake Bled" href="http://maps.google.com/maps?ll=46.3644444444,14.0947222222&amp;spn=0.1,0.1&amp;q=46.3644444444,14.0947222222 (Lake%20Bled)&amp;t=h" rel="geolocation">Lake Bled</a> right? The only lake in <a class="zem_slink" title="Slovenia" href="http://maps.google.com/maps?ll=46.05,14.5&amp;spn=10.0,10.0&amp;q=46.05,14.5 (Slovenia)&amp;t=h" rel="geolocation">Slovenia</a> containing the only island in Slovenia? Right!? Oh it&#8217;s just one of the most beautifulest places in Slovenia.</p>
<div id="attachment_3698" class="wp-caption alignright" style="width: 310px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/photo-11.jpg"><img class="size-medium wp-image-3698" title="Lake Bled" src="http://swizec.com/blog/wp-content/uploads/2012/02/photo-11-300x224.jpg" alt="Lake Bled" width="300" height="224" /></a><p class="wp-caption-text">Lake Bled</p></div>
<p>Yesterday I walked all over the bad boy!</p>
<p>The really amazing thing about Lake Bled is that every couple of years it completely freezes over. To the point you can take a walk right up to the island and endure one of the biggest brainfucks possible.</p>
<p>Every fiber in my body fought against that first step. There you are, standing on the shore and &#8230; you take another step. And it works. You&#8217;re on water. It&#8217;s a lake. And you&#8217;re standing on it!</p>
<p>Then you take a nice long walk to the island &#8211; about a kilometer and a half one way. The whole thing is just profoundly <em>weird.</em></p>
<p>Being out there in the middle of the lake isn&#8217;t too strange, feels kind of normal until you look back and realize everything looks <em>wrong</em>. You&#8217;ve been coming here your whole life, but it was &#8230; different.</p>
<p>The way back is even odder. Land slowly inching towards you with every step you take and your brain slowly but surely realizing that something odd is going on here.</p>
<p>Then you have some delicious cake.</p>
<p>&nbsp;</p>
<div id="attachment_3702" class="wp-caption alignnone" style="width: 600px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/Screen-Shot-2012-02-18-at-3.39.28-PM.png"><img class=" wp-image-3702 " title="Lake walking" src="http://swizec.com/blog/wp-content/uploads/2012/02/Screen-Shot-2012-02-18-at-3.39.28-PM.png" alt="Lake walking" width="590" height="554" /></a><p class="wp-caption-text">Lake walking</p></div>
<div id="attachment_3687" class="wp-caption alignnone" style="width: 727px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/photo.jpg"><img class=" wp-image-3687 " title="Shore view" src="http://swizec.com/blog/wp-content/uploads/2012/02/photo-1024x764.jpg" alt="Shore view" width="717" height="535" /></a><p class="wp-caption-text">Shore view</p></div>
<div id="attachment_3688" class="wp-caption alignnone" style="width: 727px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/photo-1.jpg"><img class=" wp-image-3688 " title="Looks like a polar expedition" src="http://swizec.com/blog/wp-content/uploads/2012/02/photo-1-1024x764.jpg" alt="Looks like a polar expedition" width="717" height="535" /></a><p class="wp-caption-text">Looks like a polar expedition</p></div>
<div id="attachment_3689" class="wp-caption alignnone" style="width: 727px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/photo-2.jpg"><img class=" wp-image-3689 " title="Looking back" src="http://swizec.com/blog/wp-content/uploads/2012/02/photo-2-1024x764.jpg" alt="Looking back" width="717" height="535" /></a><p class="wp-caption-text">Looking back</p></div>
<div id="attachment_3704" class="wp-caption alignnone" style="width: 545px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/photo-31.jpg"><img class=" wp-image-3704 " title="Castle Bled" src="http://swizec.com/blog/wp-content/uploads/2012/02/photo-31-764x1024.jpg" alt="Castle Bled" width="535" height="717" /></a><p class="wp-caption-text">Castle Bled</p></div>
<div id="attachment_3691" class="wp-caption alignnone" style="width: 727px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/photo-4.jpg"><img class=" wp-image-3691 " title="Moar ice" src="http://swizec.com/blog/wp-content/uploads/2012/02/photo-4-1024x764.jpg" alt="Moar ice" width="717" height="535" /></a><p class="wp-caption-text">Moar ice</p></div>
<div id="attachment_3705" class="wp-caption alignnone" style="width: 545px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/photo-51.jpg"><img class=" wp-image-3705 " title="There was also a huge crack" src="http://swizec.com/blog/wp-content/uploads/2012/02/photo-51-764x1024.jpg" alt="There was also a huge crack" width="535" height="717" /></a><p class="wp-caption-text">There was also a huge crack</p></div>
<div id="attachment_3693" class="wp-caption alignnone" style="width: 727px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/photo-6.jpg"><img class=" wp-image-3693 " title="Not the usual view of Bled" src="http://swizec.com/blog/wp-content/uploads/2012/02/photo-6-1024x764.jpg" alt="Not the usual view of Bled" width="717" height="535" /></a><p class="wp-caption-text">Not the usual view of Bled</p></div>
<div id="attachment_3695" class="wp-caption alignnone" style="width: 727px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/photo-8.jpg"><img class=" wp-image-3695 " title="Island view to the other side" src="http://swizec.com/blog/wp-content/uploads/2012/02/photo-8-1024x764.jpg" alt="Island view to the other side" width="717" height="535" /></a><p class="wp-caption-text">Island view to the other side</p></div>
<div id="attachment_3706" class="wp-caption alignnone" style="width: 545px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/photo-91.jpg"><img class=" wp-image-3706 " title="A random cyclist" src="http://swizec.com/blog/wp-content/uploads/2012/02/photo-91-764x1024.jpg" alt="A random cyclist" width="535" height="717" /></a><p class="wp-caption-text">A random cyclist</p></div>
<div id="attachment_3699" class="wp-caption alignnone" style="width: 727px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/photo-12.jpg"><img class=" wp-image-3699 " title="Finally, a swan" src="http://swizec.com/blog/wp-content/uploads/2012/02/photo-12-1024x764.jpg" alt="Finally, a swan" width="717" height="535" /></a><p class="wp-caption-text">Finally, a swan</p></div>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.amusingplanet.com/2012/01/bled-island-in-slovenia.html">Bled Island in Slovenia</a> (amusingplanet.com)</li>
<li class="zemanta-article-ul-li"><a href="http://thealzblog.wordpress.com/2012/01/15/villa-under-extension-in-bled-slovenia/">Villa &#8216;under&#8217; Extension in Bled, Slovenia</a> (thealzblog.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://blog.travelpod.com/travel-blog-entries/katevoss/1/1328566236/tpod.html">Lakes &amp; Caves in Ljubliana &#8211; Ljubljana, Slovenia</a> (travelpod.com)</li>
<li class="zemanta-article-ul-li"><a href="http://angelinthenorth.wordpress.com/2011/11/21/beautiful-bled/">Beautiful Bled</a> (angelinthenorth.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://cosytravels.wordpress.com/2011/12/19/our-top-10-destinations-of-2011-part-1/">Our top 10 destinations of 2011 &#8211; Part 1</a> (cosytravels.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://meganaronson.wordpress.com/2012/02/17/be-a-lake-not-a-glass/">Be A Lake, Not A Glass</a> (meganaronson.wordpress.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=972059ba-3eb8-46e4-919a-3a727e48727d" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/XnIFg3vDWX4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/i-walked-all-over-a-lake/swizec/3686/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/i-walked-all-over-a-lake/swizec/3686</feedburner:origLink></item>
		<item>
		<title>Two business things Slovenia needs to change</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/QB6hv4z_T4g/3668</link>
		<comments>http://swizec.com/blog/two-business-things-slovenia-needs-to-change/swizec/3668#comments</comments>
		<pubDate>Wed, 15 Feb 2012 11:24:18 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[Former Yugoslavia]]></category>
		<category><![CDATA[News agency]]></category>
		<category><![CDATA[Slavery]]></category>
		<category><![CDATA[Slovenia]]></category>
		<category><![CDATA[Student]]></category>
		<category><![CDATA[Student Unions]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3668</guid>
		<description><![CDATA[This post is aimed at my local readers, the rest can look at it as a curiosity from an awesome small country that is fumbling all over itself trying to be even awesomer. Slave labor We don&#8217;t have Mexicans, but we do have students. A whole social caste of people ripe for abuse because they [...]]]></description>
			<content:encoded><![CDATA[<p>This post is aimed at my local readers, the rest can look at it as a curiosity from an awesome small country that is fumbling all over itself trying to be even awesomer.</p>
<h2>Slave labor</h2>
<p>We don&#8217;t have Mexicans, but we do have <a class="zem_slink" title="Student" href="http://en.wikipedia.org/wiki/Student" rel="wikipedia">students</a>. A whole <a class="zem_slink" title="Caste" href="http://en.wikipedia.org/wiki/Caste" rel="wikipedia">social caste</a> of people ripe for abuse because they don&#8217;t realize their worth and hey, what better way to keep operating costs low than to employ a bunch of these guys, pay them below-minimum wage and tell them it&#8217;s even worse elsewhere?</p>
<div class="wp-caption alignright" style="width: 250px"><a href="http://www.flickr.com/photos/36988361@N08/4296232936"><img class="zemanta-img-inserted zemanta-img-configured" title="Students in the incubation room at the Woodbin..." src="http://swizec.com/blog/wp-content/uploads/2012/02/4296232936_fb73460a56_m12.jpg" alt="Students in the incubation room at the Woodbin..." width="240" height="180" /></a><p class="wp-caption-text">Students in the incubation room at the Woodbine Agricultural School, New Jersey (Photo credit: Center for Jewish History, NYC)</p></div>
<p>Not cool!</p>
<p>Originally student work was invented to give students some degree of autonomy, to make getting through college cheaper and easier. It&#8217;s since been quite corrupted &#8230; whole companies running on nothing but <a class="zem_slink" title="Slavery" href="http://en.wikipedia.org/wiki/Slavery" rel="wikipedia">slave labor</a>.</p>
<p>My recent survey about <a href="http://swiz.ec/yhzzr7" target="_blank">how much money comp sci students make</a> shows that most make less than 10 euro an hour, glaringly obvious even on just a cursory glance.</p>
<p>These aren&#8217;t internships mind you. A lot of them are full blown computer engineers, often-times making companies&#8217; core products completely on their own or with a help of a couple other students.</p>
<p>It&#8217;s sickening.</p>
<p>Even worse is that when I published the survey, a lot of students pinged me and said <em>&#8220;Hey, don&#8217;t you think you set the bar somewhat high? Most of us don&#8217;t even make the 7 euro lower bound you set up &#8230;&#8221;</em></p>
<p>No, for fuck&#8217;s sake no! This is money we&#8217;re talking about! You shouldn&#8217;t be paid how much everyone else is being paid, this isn&#8217;t some competition in fairness, this is cold hard cash! Demand to be fucking paid how much you are worth to the company.</p>
<p>I can (sort of) understand a waiter working for 4 or 5 euro an hour. But anyone paying less than 10 for any nongeneric type of service should be laughed out of business.</p>
<p>And <a class="zem_slink" title="Businessperson" href="http://en.wikipedia.org/wiki/Businessperson" rel="wikipedia">business people</a> &#8230; shame on you!</p>
<p>If you get a student who is any good and they timidly ask for 7 euro an hour because they consider that quite a bit of money. Tell them they&#8217;re being stupid and demand to give them 15 euro. Congratulations, you just earned an extremely happy and loyal worker. And it&#8217;s still cheaper than giving them full employment.</p>
<p>When paying students, always keep in mind they rarely work more than half-time. They need to make a living off this!</p>
<h2>Speed of business</h2>
<p>Another thing that really gets on my nerves in Slovenia is that everything is <em>so slow</em>. Sending an invoice to a client in Slovenia feels like sending it down a black hole.</p>
<div class="wp-caption alignright" style="width: 250px"><a href="http://www.flickr.com/photos/24549021@N08/2342478549"><img class="zemanta-img-inserted zemanta-img-configured" title="Invoice, Chas M Stieff Manufacturer of Grand &amp;..." src="http://swizec.com/blog/wp-content/uploads/2012/02/2342478549_6175f46fd8_m13.jpg" alt="Invoice, Chas M Stieff Manufacturer of Grand &amp;..." width="240" height="185" /></a><p class="wp-caption-text">Invoice, Chas M Stieff Manufacturer of Grand &amp; Upright Pianos (Photo credit: Lynchburg College Archives)</p></div>
<p>The average response time I&#8217;ve experienced is &#8230; <em>a long time</em>. Hell, I am legally mandated to give you two weeks of time to pay up and most <a class="zem_slink" title="Business" href="http://en.wikipedia.org/wiki/Business" rel="wikipedia">businesses</a> are very <em>very </em>careful not to pay anything sooner than that. The problem is so big the only thing <a class="zem_slink" title="Students' union" href="http://en.wikipedia.org/wiki/Students%27_union" rel="wikipedia">student unions</a> do is make sure people get paid quickly by just fronting the cash.</p>
<p>I checked. There are <a class="zem_slink" title="Invoice" href="http://en.wikipedia.org/wiki/Invoice" rel="wikipedia">invoices</a> from <em>a year ago</em> that are still marked as &#8220;fronted by student union&#8221;.</p>
<p>Sickening!</p>
<p>You know what happens when you send an invoice to a proper country? You get paid the next day. Last night someone wired me the money literally 20 minutes after I clicked <em>send</em> on the invoice email.</p>
<p>Of course then I had to wait roughly 15 hours for my bank to actually process the transfer of a few electrons &#8230;</p>
<h2>Conclusion</h2>
<p>Slovenia is awesome and I love it to bits, but I sure as hell get the feeling it doesn&#8217;t want me here. And hey, the top of the crop of our entrepreneurs, businesses and pretty much anyone worth their salt &#8230; is leaving.</p>
<p>I wonder why.</p>
<p>PS: if looking at the data from that survey makes me any angrier I will hurt people.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.businessinsider.com/the-only-island-in-slovenia-may-be-the-most-awesome-private-island-in-the-world-2012-2">The Only Island In Slovenia May Be The Most Awesome Private Island In The World</a> (businessinsider.com)</li>
<li class="zemanta-article-ul-li"><a href="http://studenteventsblog.wordpress.com/2012/02/06/student-unions/">Student Unions</a> (studenteventsblog.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.prweb.com/releases/2011/7/prweb8649378.htm">Slo(www)Bus for Playful Exploration of Slovenia</a> (prweb.com)</li>
<li class="zemanta-article-ul-li"><a href="http://seattletimes.nwsource.com/html/nationworld/2016937139_apeusloveniawomenmps.html?syndication=rss">Record number of women in Slovenia parliament</a> (seattletimes.nwsource.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=51092f8d-c661-4e48-aea8-c95c26dac146" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/QB6hv4z_T4g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/two-business-things-slovenia-needs-to-change/swizec/3668/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/two-business-things-slovenia-needs-to-change/swizec/3668</feedburner:origLink></item>
		<item>
		<title>Possibly the ugliest python ever to escape my brain</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/VbS_-GEDBDQ/3661</link>
		<comments>http://swizec.com/blog/possibly-the-ugliest-python-ever-to-escape-my-brain/swizec/3661#comments</comments>
		<pubDate>Mon, 13 Feb 2012 12:29:46 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3661</guid>
		<description><![CDATA[Lensing data from one format to another always produces the most horrible code &#8230; here&#8217;s some I wrote last night: # some other code here &#160; def stitch&#40;*iterables&#41;: return &#91;&#40;iterables&#91;0&#93;&#91;i&#93;&#91;0&#93;, sum&#40;&#91;l&#91;i&#93;&#91;1&#93; for l in iterables&#93;&#41;&#41; for i in xrange&#40;len&#40;iterables&#91;0&#93;&#41;&#41;&#93; &#160; def one&#40;z&#41;: d = dict&#40;stitch&#40;*&#91;&#91;b for b in zip&#40;a.keys&#40;&#41;, a.values&#40;&#41;&#41; if b&#91;0&#93; in &#91;'count', 'step_conv_ratio', [...]]]></description>
			<content:encoded><![CDATA[<p>Lensing <a class="zem_slink" title="Data" href="http://en.wikipedia.org/wiki/Data" rel="wikipedia">data</a> from one format to another always produces the most horrible code &#8230; here&#8217;s some I wrote last night:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">    <span style="color: #808080; font-style: italic;"># some other code here</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> stitch<span style="color: black;">&#40;</span><span style="color: #66cc66;">*</span>iterables<span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: black;">&#91;</span><span style="color: black;">&#40;</span>iterables<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#91;</span>i<span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>, <span style="color: #008000;">sum</span><span style="color: black;">&#40;</span><span style="color: black;">&#91;</span>l<span style="color: black;">&#91;</span>i<span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span> <span style="color: #ff7700;font-weight:bold;">for</span> l <span style="color: #ff7700;font-weight:bold;">in</span> iterables<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
                <span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">xrange</span><span style="color: black;">&#40;</span><span style="color: #008000;">len</span><span style="color: black;">&#40;</span>iterables<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><span style="color: black;">&#93;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> one<span style="color: black;">&#40;</span>z<span style="color: black;">&#41;</span>:
        d = <span style="color: #008000;">dict</span><span style="color: black;">&#40;</span>stitch<span style="color: black;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: black;">&#91;</span><span style="color: black;">&#91;</span>b <span style="color: #ff7700;font-weight:bold;">for</span> b <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">zip</span><span style="color: black;">&#40;</span>a.<span style="color: black;">keys</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>, a.<span style="color: black;">values</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">if</span> b<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span> <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: black;">&#91;</span><span style="color: #483d8b;">'count'</span>, <span style="color: #483d8b;">'step_conv_ratio'</span>, <span style="color: #483d8b;">'overall_conv_ratio'</span><span style="color: black;">&#93;</span><span style="color: black;">&#93;</span> <span style="color: #ff7700;font-weight:bold;">for</span> a <span style="color: #ff7700;font-weight:bold;">in</span> z<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
        d<span style="color: black;">&#91;</span><span style="color: #483d8b;">'overall_conv_ratio'</span><span style="color: black;">&#93;</span> = d<span style="color: black;">&#91;</span><span style="color: #483d8b;">'overall_conv_ratio'</span><span style="color: black;">&#93;</span>/<span style="color: #008000;">len</span><span style="color: black;">&#40;</span>funnel<span style="color: black;">&#91;</span><span style="color: #483d8b;">'meta'</span><span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'dates'</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
        d<span style="color: black;">&#91;</span><span style="color: #483d8b;">'step_conv_ratio'</span><span style="color: black;">&#93;</span> = d<span style="color: black;">&#91;</span><span style="color: #483d8b;">'step_conv_ratio'</span><span style="color: black;">&#93;</span>/<span style="color: #008000;">len</span><span style="color: black;">&#40;</span>funnel<span style="color: black;">&#91;</span><span style="color: #483d8b;">'meta'</span><span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'dates'</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">return</span> d
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #008000;">map</span><span style="color: black;">&#40;</span>one,
              <span style="color: #008000;">zip</span><span style="color: black;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: black;">&#91;</span>v<span style="color: black;">&#91;</span><span style="color: #483d8b;">'steps'</span><span style="color: black;">&#93;</span><span style="color: black;">&#91;</span>:entry<span style="color: black;">&#91;</span><span style="color: #483d8b;">'counts'</span><span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'p'</span><span style="color: black;">&#93;</span><span style="color: black;">&#93;</span> <span style="color: #ff7700;font-weight:bold;">for</span> v <span style="color: #ff7700;font-weight:bold;">in</span> funnel<span style="color: black;">&#91;</span><span style="color: #483d8b;">'data'</span><span style="color: black;">&#93;</span>.<span style="color: black;">values</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></div></div>

<div class="wp-caption alignright" style="width: 195px"><a href="http://en.wikipedia.org/wiki/File:Funnel_of_the_Mauretania.jpg"><img class="zemanta-img-inserted zemanta-img-configured " title="The funnel of the Mauretania." src="http://swizec.com/blog/wp-content/uploads/2012/02/Funnel_of_the_Mauretania3.jpg" alt="The funnel of the Mauretania." width="185" height="320" /></a><p class="wp-caption-text">Also a funnel</p></div>
<p>Can you guess what all of that does? Me neither, let me try to explain.</p>
<h2>WTF!</h2>
<p>Firstly, the basic problem I&#8217;m trying to solve is fetching some funnel data from <a class="zem_slink" title="Mixpanel" href="http://www.mixpanel.com" rel="homepage">Mixpanel</a>, which returns all the data I need, but it is split into different days and I&#8217;d really like to have it all mashed together. Due to the design of funnels in their <a class="zem_slink" title="Application programming interface" href="http://en.wikipedia.org/wiki/Application_programming_interface" rel="wikipedia">API</a>, they also return too much data, which spoils what I&#8217;m looking for.</p>
<p>Their format is something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'Signup flow'</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'data'</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'2010-05-24'</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'analysis'</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'completion'</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">0.064679359580052493</span><span style="color: #339933;">,</span>
                                               <span style="color: #3366CC;">'starting_amount'</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">762</span><span style="color: #339933;">,</span>
                                               <span style="color: #3366CC;">'steps'</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">3</span><span style="color: #339933;">,</span>
                                               <span style="color: #3366CC;">'worst'</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
                                  <span style="color: #3366CC;">'steps'</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'count'</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">762</span><span style="color: #339933;">,</span>
                                             <span style="color: #3366CC;">'goal'</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">'pages'</span><span style="color: #339933;">,</span>
                                             <span style="color: #3366CC;">'overall_conv_ratio'</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">1.0</span><span style="color: #339933;">,</span>
                                             <span style="color: #3366CC;">'step_conv_ratio'</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">1.0</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
                                            <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'count'</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">69</span><span style="color: #339933;">,</span>
                                             <span style="color: #3366CC;">'goal'</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">'View signup'</span><span style="color: #339933;">,</span>
                                             <span style="color: #3366CC;">'overall_conv_ratio'</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">0.09055118110236221</span><span style="color: #339933;">,</span>
                                             <span style="color: #3366CC;">'step_conv_ratio'</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">0.09055118110236221</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
                                            <span style="color: #006600; font-style: italic;">// etc.},</span>
                   <span style="color: #3366CC;">'2010-05-31'</span><span style="color: #339933;">:</span> <span style="color: #006600; font-style: italic;">// etc.</span>
          <span style="color: #3366CC;">'meta'</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'dates'</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'2010-05-24'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'2010-05-31'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span></pre></div></div>

<p>What I want is something where &#8220;Signup flow&#8221; would be just a list of steps where count is a sum of all counts for that step and conversion ratios are the average between all days. Yes this discards some useful data, but it&#8217;s not too relevant for what I&#8217;m trying to analyze.</p>
<h2>Justified?</h2>
<p>Hopefully I can defend this code, explain why it&#8217;s ugly.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #008000;">map</span><span style="color: black;">&#40;</span>one,
    <span style="color: #008000;">zip</span><span style="color: black;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: black;">&#91;</span>v<span style="color: black;">&#91;</span><span style="color: #483d8b;">'steps'</span><span style="color: black;">&#93;</span><span style="color: black;">&#91;</span>:entry<span style="color: black;">&#91;</span><span style="color: #483d8b;">'counts'</span><span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'p'</span><span style="color: black;">&#93;</span><span style="color: black;">&#93;</span> <span style="color: #ff7700;font-weight:bold;">for</span> v <span style="color: #ff7700;font-weight:bold;">in</span> funnel<span style="color: black;">&#91;</span><span style="color: #483d8b;">'data'</span><span style="color: black;">&#93;</span>.<span style="color: black;">values</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>This code takes the data for each day, iterates over it to take only the <em>steps</em> key, cuts its list at an appropriate length (the funnel&#8217;s got 60+ steps, I have extra data to tell me how much is actually applicable). Then zips all the steps together.</p>
<p>Now we have a list of step <a class="zem_slink" title="Tuple" href="http://en.wikipedia.org/wiki/Tuple" rel="wikipedia">tuples</a> &#8211; all the first steps, second steps and so on.</p>
<p>Then we apply the one function on each tuple:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> one<span style="color: black;">&#40;</span>z<span style="color: black;">&#41;</span>:
        d = <span style="color: #008000;">dict</span><span style="color: black;">&#40;</span>stitch<span style="color: black;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: black;">&#91;</span><span style="color: black;">&#91;</span>b <span style="color: #ff7700;font-weight:bold;">for</span> b <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">zip</span><span style="color: black;">&#40;</span>a.<span style="color: black;">keys</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>, a.<span style="color: black;">values</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">if</span> b<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span> <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: black;">&#91;</span><span style="color: #483d8b;">'count'</span>, <span style="color: #483d8b;">'step_conv_ratio'</span>, <span style="color: #483d8b;">'overall_conv_ratio'</span><span style="color: black;">&#93;</span><span style="color: black;">&#93;</span> <span style="color: #ff7700;font-weight:bold;">for</span> a <span style="color: #ff7700;font-weight:bold;">in</span> z<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
        d<span style="color: black;">&#91;</span><span style="color: #483d8b;">'overall_conv_ratio'</span><span style="color: black;">&#93;</span> = d<span style="color: black;">&#91;</span><span style="color: #483d8b;">'overall_conv_ratio'</span><span style="color: black;">&#93;</span>/<span style="color: #008000;">len</span><span style="color: black;">&#40;</span>funnel<span style="color: black;">&#91;</span><span style="color: #483d8b;">'meta'</span><span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'dates'</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
        d<span style="color: black;">&#91;</span><span style="color: #483d8b;">'step_conv_ratio'</span><span style="color: black;">&#93;</span> = d<span style="color: black;">&#91;</span><span style="color: #483d8b;">'step_conv_ratio'</span><span style="color: black;">&#93;</span>/<span style="color: #008000;">len</span><span style="color: black;">&#40;</span>funnel<span style="color: black;">&#91;</span><span style="color: #483d8b;">'meta'</span><span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'dates'</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">return</span> d</pre></div></div>

<p>Right, so the first thing that happens is we turn a dictionary into a list of <em>(key, value)</em> tuples, then this is filtered so only the ones we&#8217;re actually interested in remain (count and the conversion ratios).</p>
<p>These are then stitched together:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> stitch<span style="color: black;">&#40;</span><span style="color: #66cc66;">*</span>iterables<span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: black;">&#91;</span><span style="color: black;">&#40;</span>iterables<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#91;</span>i<span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>, <span style="color: #008000;">sum</span><span style="color: black;">&#40;</span><span style="color: black;">&#91;</span>l<span style="color: black;">&#91;</span>i<span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span> <span style="color: #ff7700;font-weight:bold;">for</span> l <span style="color: #ff7700;font-weight:bold;">in</span> iterables<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
                <span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">xrange</span><span style="color: black;">&#40;</span><span style="color: #008000;">len</span><span style="color: black;">&#40;</span>iterables<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><span style="color: black;">&#93;</span></pre></div></div>

<p>Looks pretty bad, but really just turns a list of <em>(key, value)</em> tuples into a list of <em>(key, sum of corresponding values)</em> tuples.</p>
<p>Finally, the conversion values are turned into the average by simply dividing with the number of days this funnel was tracked for.</p>
<h2>Better way?</h2>
<p>This is the cleanest and most elegant way I could come up with to solve this problem &#8211; there&#8217;s bound to be something cleaner and easier. Actually, <em>please</em> tell me there&#8217;s a better way!</p>
<p>Generally speaking, is there even a good approach to take for converting data returned from somewhere into the kind of data you need somewhere else? Or are we doomed to forever spend most of our time figuring out how to get API&#8217;s talking to one another?</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://usapartisan.com/2012/02/07/a-quality-assessment-of-us-jobs-reveals-the-ugliest-picture-yet/">A &#8220;Quality Assessment&#8221; Of US Jobs Reveals The Ugliest Picture Yet</a> (usapartisan.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/8542010/ironpython-lists-tuples-dictionaries-crash-wcf-communications">IronPython Lists, Tuples, Dictionaries crash WCF communications</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/8875195/python-entry-widget-tuple-combo">python entry widget tuple combo</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/8658995/recursively-create-tuples-from-lists">recursively create tuples from lists</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/8107254/regarding-list-of-tuples-and-file">Regarding list of tuples and file</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://socialmediacorporatesolutions.wordpress.com/2012/02/13/feeding-the-funnel-with-facebook/">Feeding The Funnel With Facebook</a> (socialmediacorporatesolutions.wordpress.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=2991a8b4-c6f1-4e7d-b19f-d376285fcee7" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/VbS_-GEDBDQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/possibly-the-ugliest-python-ever-to-escape-my-brain/swizec/3661/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/possibly-the-ugliest-python-ever-to-escape-my-brain/swizec/3661</feedburner:origLink></item>
		<item>
		<title>Study Break! What students do for mental breaks from studying</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/QZcHDcuyJqM/3658</link>
		<comments>http://swizec.com/blog/study-break-what-students-do-for-mental-breaks-from-studying/swizec/3658#comments</comments>
		<pubDate>Sun, 12 Feb 2012 14:53:22 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Guestpost]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3658</guid>
		<description><![CDATA[This is a guest post by Debbie Lawrence &#8211; a content editor who primarily writes about online schools. You can contact her at dlawrence2[@]quinstreet.com with questions, comments, and suggestions. After spending hours in the library studying your notes and researching key words and concepts on Wikipedia, students are recommended to take ten-minute study breaks every [...]]]></description>
			<content:encoded><![CDATA[<p><em>This is a guest post by Debbie Lawrence &#8211; a content editor who primarily writes about <a href="http://www.schools.com/" target="_blank">online schools</a>. You can contact her at dlawrence2[@]quinstreet.com with questions, comments, and suggestions. </em></p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://en.wikipedia.org/wiki/File:Triplecrown_Video_Games.jpg"><img class="zemanta-img-inserted zemanta-img-configured" title="Triple crown award for WikiProject Video games." src="http://swizec.com/blog/wp-content/uploads/2012/02/300px-Triplecrown_Video_Games.jpg" alt="Triple crown award for WikiProject Video games." width="300" height="120" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
<p>After spending hours in the library studying your notes and researching key words and concepts on Wikipedia, students are recommended to take ten-minute study breaks every hour to re-stimulate their brain and reboot their minds for more material cramming. Some people have the willpower to study for hours on end without any distractions or breaks. However, a majority of people are not this type of superhuman and can only stay focused after having some form of a break to revitalize their studying sessions.</p>
<p>There are a variety of good ideas that you can use to restore the information you have already spent countless hours studying. Here are a few tips to give your eyes a rest from staring at computer screens and scribbled notes while simultaneously reminding yourself that life matters beyond the classroom.</p>
<p><strong>Online Distractions:</strong> Among the various blogs and humorous websites that are accessible on the internet, popular sites such as StumbleUpon, Tumblr, The Oatmeal, Hunch, and The Onion are just a few of the <a href="http://www.schools.com/articles/30-best-websites-for-procrastination.html" target="_blank">most popular procrastinating websites</a> that people can easily get stuck on.</p>
<h2>Study Break Tips For Fun</h2>
<p>Social Media Networking Sites: We all do it, and for some, it’s simply a therapeutic activity for mindless thinking and Facebook stalking. Maybe even getting updates of sports games on Twitter or talking with your friends about future events and activities on Facebook chat, G-chat, Instant Messenger, etc.</p>
<p><strong>Video Games:</strong> Although more popular for males, there are a variety of brain-stimulating positive effects that are produced via playing video games. According to Peter Vorderer and Jennings Bryant in Playing Video Games: Motives, Responses, and Consequences, rapid information processing, inductive discovery and problem solving skills in a multimedia setting, cognitive development, and spatial visualizations are acquired solely for learning process techniques. Other qualities that may be acquired via video gaming include memory retention, motivation, sociability, and academic performance therapy.</p>
<p><strong>Watch TV:</strong> Many people turn on the TV to catch their favorite TV shows and series. It helps get their mind off vocabulary memorization and stressful concepts. Watching TV episodes online is another popular choice with sites such as CastTV and Hulu who offer free viewings with high-quality resolutions.</p>
<h2>Essential Study Break Tips</h2>
<p><strong>Snack, Food, and Drinks:</strong> Replenishing your body with simple snacks, such as protein bars or a bag of chips will only last for a short period of time. For some, cooking is a therapeutic activity and a healthier option to replenish their body and mind. For others, cooking is like neuroscience and they would rather go out and buy food or order take-out. Either way, your body needs substance to refuel and maintain focus (no one can study with a gurgling stomach). According to <a href="http://www.fitnessandfreebies.com/" target="_blank">fitnessandfreebies.com</a>, bananas supply potassium to make you more alert and aid in retaining information, and the same goes for blueberries.</p>
<p><strong>Exercise!</strong> Many people thrive on natural endorphins from exercising to reboot their studying sessions. Even if you don’t make it to the gym, or you go for a short visit, exercising helps clear your mind and helps you unwind naturally while simultaneously revitalizing your mind and body. Biking, hiking, surfing, running, swimming, and playing sports with friends are great outdoor activities to consider.</p>
<p><strong>Sleep:</strong> A study by the <a href="http://www.sleepfoundation.org/article/hot-topics/adolescent-sleep-needs-and-patterns" target="_blank">National Sleep Foundation</a> estimates that only 20 percent of teenagers get the recommended nine hours of sleep. However all-nighters sometimes just can’t be avoided and so taking thirty-minute naps every four hours will replenish your mind and help you think clearly. Chugging coffee to stay up is a clear sign that you need some form of sleep, and if you’ve reached the point where you feel wired but aren’t retaining any information, I would say it’s time for some “Sleepy Time Tea” and a short nap. Trust me, you’ll feel 120 percent better if you give your mind a break and allow it to restore to it’s normal state.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://josoftblog.wordpress.com/2012/02/03/tips-to-stay-awake-while-studying/">Tips to Stay Awake While Studying</a> (josoftblog.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://deuxhearts.wordpress.com/2012/02/04/midterms/">Midterms!</a> (deuxhearts.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://x3everythingchangebutyourname.wordpress.com/2012/02/12/relaxed/">Relaxed</a> (x3everythingchangebutyourname.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://career-advice.monster.co.uk/career-development/education-training/top-5-study-aids-to-keep-you-focussed/article.aspx">What gets your brain ticking? Top 5 study aids revealed</a> (career-advice.monster.co.uk)</li>
<li class="zemanta-article-ul-li"><a href="http://studentlife.ryerson.ca/blog/exam-prep-sex-stimulates-studying-stamina-in-students/">Exam Prep: Sex Stimulates Studying Stamina in Students</a> (studentlife.ryerson.ca)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=0b79d883-f1ce-4e75-94d4-12e7a709edc2" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/QZcHDcuyJqM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/study-break-what-students-do-for-mental-breaks-from-studying/swizec/3658/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/study-break-what-students-do-for-mental-breaks-from-studying/swizec/3658</feedburner:origLink></item>
		<item>
		<title>Why every entrepreneur should take up boxing</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/JmrlTaoYVGU/3646</link>
		<comments>http://swizec.com/blog/why-all-entrepreneurs-should-take-up-boxing/swizec/3646#comments</comments>
		<pubDate>Fri, 10 Feb 2012 11:22:10 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Battlestar Galactica]]></category>
		<category><![CDATA[Boxing]]></category>
		<category><![CDATA[Ferdie Pacheco]]></category>
		<category><![CDATA[Joe Frazier]]></category>
		<category><![CDATA[Muhammad Ali]]></category>
		<category><![CDATA[Paul Graham]]></category>
		<category><![CDATA[Punch (combat)]]></category>
		<category><![CDATA[Thrilla in Manila]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3646</guid>
		<description><![CDATA[A punch to the face. That&#8217;s what it feels like when you release something and nobody likes it. A hard punch to the face. That&#8217;s what it feels like when you miss a block in boxing. Launching products and boxing have so much in common they are pretty much the same thing. Both are about overcoming [...]]]></description>
			<content:encoded><![CDATA[<p>A <a class="zem_slink" title="Punch (combat)" href="http://en.wikipedia.org/wiki/Punch_%28combat%29" rel="wikipedia">punch</a> to the face.</p>
<div id="attachment_3648" class="wp-caption alignright" style="width: 310px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/Muhammad-Ali-Wallpaper.jpg"><img class="size-medium wp-image-3648" title="Victory" src="http://swizec.com/blog/wp-content/uploads/2012/02/Muhammad-Ali-Wallpaper-300x225.jpg" alt="Victory" width="300" height="225" /></a><p class="wp-caption-text">Victory</p></div>
<p>That&#8217;s what it feels like when you release something and nobody likes it.</p>
<p>A hard punch to the face.</p>
<p>That&#8217;s what it feels like when you miss a block in <a class="zem_slink" title="Boxing" href="http://en.wikipedia.org/wiki/Boxing" rel="wikipedia">boxing</a>.</p>
<p>Launching products and boxing have so much in common they are pretty much the same thing. Both are about overcoming immense adversity through sheer skill, tactic and strategy. Both are simple and yet the hardest thing you have ever done. Ever.</p>
<h2>Boxing</h2>
<p>Punch the other guy more than he punches you.</p>
<p>At your disposal are three simple attacking tools &#8211; a straight punch, a hook and an uppercut. You also have three defensive tools &#8211; a slip, a bob and a block.</p>
<p>That&#8217;s it.</p>
<p>Your job is to combine all of these into a successful strategy that will ensure the other guy is in more pain than you are. All while making sure you can still move when you&#8217;re done.</p>
<p>Physically, boxing is the hardest thing you have ever done. Imagine having sex for an hour. Now imagine compressing all that activity into 20 minutes. That&#8217;s the kind of intensity boxers endure.</p>
<h2>Entrepreneurship</h2>
<p>Make something people want.</p>
<p>At your disposal are three simple attacking tools &#8211; selling, coding and marketing. You also have three defensive tools &#8211; metrics, talking to users and investors.</p>
<p>Your job is to combine all of these into a successful strategy that will ensure you sell more stuff than your competitors. All while making sure there is enough money in the bank to pay for everyone&#8217;s food.</p>
<p>Mentally, entrepreneurship is the hardest thing you have ever done. <a class="zem_slink" title="Paul Graham (computer programmer)" href="http://paulgraham.com" rel="homepage">Paul Graham</a> likened startup life to having one&#8217;s whole career compacted into about three years of insane activity.</p>
<h2>What boxing can teach you</h2>
<div id="attachment_3652" class="wp-caption alignright" style="width: 370px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/kaput.gif"><img class="size-full wp-image-3652" title="Kaput" src="http://swizec.com/blog/wp-content/uploads/2012/02/kaput.gif" alt="Kaput" width="360" height="329" /></a><p class="wp-caption-text">Kaput</p></div>
<blockquote><p>The nature of boxing, the nature of the sport, is never to quit.</p>
<p>A man&#8217;s fight to the death, short of the death preferrably. But sometimes to the death.</p>
<p>On the other side, it&#8217;s about you continuing on no matter how bad it looks. That&#8217;s what the whole thing is about.<br />
~ <a class="zem_slink" title="Ferdie Pacheco" href="http://en.wikipedia.org/wiki/Ferdie_Pacheco" rel="wikipedia">Ferdie Pacheco</a>, Ali&#8217;s ringside guy</p></blockquote>
<p>One of the defining moments of boxing, for me, is in the 13th round of <a class="zem_slink" title="Thrilla in Manila" href="http://en.wikipedia.org/wiki/Thrilla_in_Manila" rel="wikipedia">Thrilla in Manilla</a> &#8211; Ali and <a class="zem_slink" title="Joe Frazier" href="http://www.joefrazier.com/" rel="homepage">Frazier</a>&#8216;s last fight &#8211; when Ali hits Frazier with such force his mouthpiece is shot out of his mouth into the fifth row of spectators.</p>
<p>Without batting an eye, Frazier just punches back. Then continues without a mouthpiece for the last two minutes of the round. Then comes back for more in 14th round. This time practically blind.</p>
<p>I&#8217;m not saying you need to go into a grueling 12 round professional boxing fight to learn about determination and forcing yourself through all obstacles &#8211; just your average boxing practice will suffice.</p>
<p>A minute of working furiously on a <a class="zem_slink" title="Punching bag" href="http://en.wikipedia.org/wiki/Punching_bag" rel="wikipedia">punching bag</a> will teach you plenty about determination and stick-to-itness.</p>
<p>The first twenty seconds are joyful, glorious, the next ten seconds you start to get tired, by the 40th second you can barely move your arms, by the 50th second you are breathing like a locomotive and can&#8217;t memorize a 5 punch sequence. Come second 60 and all you can think about is collapsing to the floor.</p>
<p>You must do 20 pushups instead.</p>
<p>Launching a product follows a similar pattern &#8211; first comes jubilous coding and hacking marathons, you could go without sleep for years and just punch out code like a madman! After a week you&#8217;re tired, you need sleep and the code you produce is ugly &#8211; done on autopilot.</p>
<p>Then you finish. The product is awesome! All you can think of is that warm bed of yours.</p>
<p>Now you must market.</p>
<h2>Immediate boxing benefits</h2>
<p>Keeping fit and staying healthy is <a title="Why you don’t exercise every day" href="http://swizec.com/blog/why-you-dont-exercise-every-day/swizec/3456">pretty damn important for everyone</a>, not just entrepreneurs. This is something we can all agree on in 2012 right?</p>
<div class="wp-caption alignright" style="width: 279px"><img class=" " title="Real man" src="http://swizec.com/blog/wp-content/uploads/2012/02/savelife223.png" alt="Real man" width="269" height="321" /><p class="wp-caption-text">Real man</p></div>
<p>Boxing is an incredibly effective <a class="zem_slink" title="Anaerobic exercise" href="http://en.wikipedia.org/wiki/Anaerobic_exercise" rel="wikipedia">anaerobic exercise</a>. Constantly flailing your arms around, dancing on your feet and moving your body around like that is said to burn about 900 calories an hour &#8211; that&#8217;s a whole pizza!</p>
<p>And it&#8217;s fun!</p>
<p>What I really love about boxing is actually how relaxing it is for the brain. In that hour and a half in a boxing gym the rest of the world doesn&#8217;t exist &#8211; there&#8217;s nothing but me, my gloves and that guy trying to rearrange my face.</p>
<p>Whatever problems you have with the latest product, whatever fights you&#8217;re in, any and all worries, they all vanish the moment you put on those gloves. There&#8217;s no room for them anyway.</p>
<h2>Punch someone</h2>
<p>But the greatest thing boxing gives you is that you get to punch someone in the face!</p>
<p>On the <a class="zem_slink" title="Battlestar Galactica" href="http://www.hulu.com/battlestar-galactica" rel="hulu">Battlestar Galactica</a> the crew would spar in the ring to settle personal grudges. Startups could benefit from the same &#8211; any organization where tensions run high and there&#8217;s a lot of pressure from otuside could.</p>
<p>You love your cofounders, but sometimes you just want to punch them in the face, right?</p>
<p><a href="http://swizec.com/blog/wp-content/uploads/2012/02/2346288052_44b7311cf7.jpg"><img class="size-full wp-image-3654 alignnone" title="Battlestar Galactica Sparring" src="http://swizec.com/blog/wp-content/uploads/2012/02/2346288052_44b7311cf7.jpg" alt="Battlestar Galactica Sparring" width="450" height="302" /></a></p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.thegrio.com/sports/legendary-boxer-joe-frazier-dies-after-fight-with-cancer.php">Legendary boxer Joe Frazier dies after fight with cancer</a> (thegrio.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.mysanantonio.com/news/article/Teenage-girl-from-Afghanistan-to-box-at-Olympics-3238198.php">Teenage girl from Afghanistan to box at Olympics</a> (mysanantonio.com)</li>
<li class="zemanta-article-ul-li"><a href="http://newyork.cbslocal.com/2011/11/07/keidel-the-smoke-of-smokin%e2%80%99-joe-frazier/">Keidel: The Smoke of Smokin&#8217; Joe Frazier</a> (newyork.cbslocal.com)</li>
<li class="zemanta-article-ul-li"><a href="http://bleacherreport.com/articles/930529-joe-frazier-muhammad-ali-why-historic-rivalry-will-never-be-matched">You: Joe Frazier, Muhammad Ali: Why Historic Rivalry Will Never Be Matched</a> (bleacherreport.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=ef232933-4755-4561-a881-95b64118e709" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/JmrlTaoYVGU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/why-all-entrepreneurs-should-take-up-boxing/swizec/3646/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/why-all-entrepreneurs-should-take-up-boxing/swizec/3646</feedburner:origLink></item>
		<item>
		<title>Amazing air machines</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/FLBW-DpSnVo/3640</link>
		<comments>http://swizec.com/blog/amazing-air-machines/swizec/3640#comments</comments>
		<pubDate>Wed, 08 Feb 2012 11:12:12 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Science Wednesday]]></category>
		<category><![CDATA[Heat exchanger]]></category>
		<category><![CDATA[Lightning]]></category>
		<category><![CDATA[Massachusetts Institute of Technology]]></category>
		<category><![CDATA[Nikola Tesla]]></category>
		<category><![CDATA[Resonance]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tesla coil]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3640</guid>
		<description><![CDATA[As a computer guy I often forget that there is a whole world out there beyond pictures of cats, big-O and trying to create things that should be impossible. When it strikes my fancy, I sometimes realize there&#8217;s also mathematics. But sometimes you come across something so simple, so very much in the realm of [...]]]></description>
			<content:encoded><![CDATA[<p>As a computer guy I often forget that there is a whole world out there beyond pictures of cats, big-O and trying to create things that should be impossible. When it strikes my fancy, I sometimes realize there&#8217;s also mathematics.</p>
<p>But sometimes you come across something so simple, so very much in the realm of macro-physics, it blows your mind and you spend a couple of hours looking for even more pieces of remarkably simple, yet incomprehensible, technology.</p>
<h2><a class="zem_slink" title="Tesla valve" href="http://en.wikipedia.org/wiki/Tesla_valve" rel="wikipedia">Tesla valve</a> with no moving parts</h2>
<div class="wp-caption alignnone" style="width: 510px"><img title="Tesla valve patent" src="http://swizec.com/blog/wp-content/uploads/2012/02/1329559us-teslas-valvular-conduit-figure25.gif" alt="Tesla valve patent" width="500" height="355" /><p class="wp-caption-text">Tesla valve patent</p></div>
<p>It lets some air through so it&#8217;s not a perfect valve, but it is still perfectly useful for a lot of applications. Honestly, I don&#8217;t understand <em>what</em> goes on in there, but the idea seems to be to have the fluid back in on itself and pretty much stop itself. The stronger the force in one direction, the stronger the force in the opposite direction. Brilliant.</p>
<p>Somebody printed the valve and gave it a test</p>
<p><iframe src="http://www.youtube.com/embed/25ElCGkQLTU" frameborder="0" width="560" height="315"></iframe></p>
<h2><a class="zem_slink" title="Vortex tube" href="http://en.wikipedia.org/wiki/Vortex_tube" rel="wikipedia">Vortex tube</a></h2>
<p>Cool things you can do with air and no moving parts don&#8217;t stop there though. There&#8217;s also something called a Vortex tube.</p>
<div class="wp-caption alignnone" style="width: 826px"><img class=" " title="A vortex tube" src="http://swizec.com/blog/wp-content/uploads/2012/02/Tube_de_Ranque-Hilsch9.png" alt="A vortex tube" width="816" height="251" /><p class="wp-caption-text">A vortex tube</p></div>
<p>The vortex tube accepts pressurised gas on one end and then with no moving parts separates this flow into a stream of very hot gas and a stream of very cold gas. It could potentially be used to both heat and cool some things &#8230; completely without moving parts. Just cool, hardcore, flow dynamics.</p>
<p>It baffles the brain. It really does. So much so that physicists have yet to reach a consensus on how a vortex tube even works.</p>
<h2>Thermoacoustic <a class="zem_slink" title="Heat engine" href="http://en.wikipedia.org/wiki/Heat_engine" rel="wikipedia">heat engine</a></h2>
<p>And then it gets even better with a thermoacoustic heat engine &#8211; using high energy sound waves to pump heat from one end of a tube to another, or even using the heat difference to produce a loud noise.</p>
<div class="wp-caption alignnone" style="width: 410px"><img title="Thermoacoustics" src="http://swizec.com/blog/wp-content/uploads/2012/02/400px-Machine-thermoacoustique8.png" alt="Thermoacoustics" width="400" height="215" /><p class="wp-caption-text">Thermoacoustics</p></div>
<blockquote><p>A thermoacoustic device basically consists of <a title="Heat exchanger" href="http://en.wikipedia.org/wiki/Heat_exchanger">heat exchangers</a>, a <a title="Resonator" href="http://en.wikipedia.org/wiki/Resonator">resonator</a>, and a stack (on standing wave devices) or <a title="Regenerative heat exchanger" href="http://en.wikipedia.org/wiki/Regenerative_heat_exchanger">regenerator</a> (on travelling wave devices). Depending on the type of engine a <a title="Speaker driver" href="http://en.wikipedia.org/wiki/Speaker_driver">driver</a> or <a title="Loudspeaker" href="http://en.wikipedia.org/wiki/Loudspeaker">loudspeaker</a> might be used as well to generate sound waves.</p>
<p>Consider a tube closed at both ends. Interference can occur between two waves traveling in opposite directions at certain frequencies. The interference causes <a title="Resonance" href="http://en.wikipedia.org/wiki/Resonance">resonance</a> creating a standing wave. Resonance only occurs at certain frequencies called <a class="zem_slink" title="Resonance" href="http://en.wikipedia.org/wiki/Resonance" rel="wikipedia">resonance frequencies</a>, and these are mainly determined by the length of the resonator.</p>
<p>The stack is a part consisting of small parallel channels. When the stack is placed at a certain location in the resonator, while having a standing wave in the resonator, a temperature difference can be measured across the stack. By placing heat exchangers at each side of the stack, heat can be moved. The opposite is possible as well, by creating a temperature difference across the stack, a <a class="zem_slink" title="Sound" href="http://en.wikipedia.org/wiki/Sound" rel="wikipedia">sound wave</a> can be induced. The first example is a simple heat pump, while the second is a prime mover.</p></blockquote>
<h2>Jet engines with no moving parts</h2>
<p>And apparently there&#8217;s a whole subset of jet engines that don&#8217;t use any moving parts. Of course you&#8217;ve heard of a <a class="zem_slink" title="Scramjet" href="http://en.wikipedia.org/wiki/Scramjet" rel="wikipedia">scram jet</a>, but there&#8217;s more.</p>
<p>There exists such a thing as a <a class="zem_slink" title="Valveless pulse jet" href="http://en.wikipedia.org/wiki/Valveless_pulse_jet" rel="wikipedia">valveless pulse jet</a> &#8211; I don&#8217;t know exactly what this means, but it sounds pretty amazing.</p>
<p><iframe src="http://www.youtube.com/embed/EEHw9lInIfg" frameborder="0" width="420" height="315"></iframe></p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.techeblog.com/index.php/tech-gadget/5-mind-blowing-quantum-levitation-experiments">5 Mind-Blowing Quantum Levitation Experiments</a> (techeblog.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.techeblog.com/index.php/tech-gadget/guy-builds-awesome-twin-tesla-coil-setup-at-home">Guy Builds Awesome Twin Tesla Coil Setup at Home</a> (techeblog.com)</li>
<li class="zemanta-article-ul-li"><a href="http://hackaday.com/2012/02/07/diy-solid-state-tesla-coil/">DIY Solid State Tesla Coil</a> (hackaday.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.geekologie.com/2011/11/sing-in-the-rain-kid-makes-musical-tesla.php">Sing In The Rain!: Kid Makes Musical Tesla Coil Hat</a> (geekologie.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.engadget.com/2011/11/15/mit-student-creates-tesla-coil-musical-hat-for-halloween-surviv/">MIT student creates tesla coil musical hat for Halloween, survives</a> (engadget.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=c9d8239c-49a5-487c-af18-e412f864313e" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/FLBW-DpSnVo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/amazing-air-machines/swizec/3640/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/amazing-air-machines/swizec/3640</feedburner:origLink></item>
		<item>
		<title>The greatest story I have to tell</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/iGse5F8QQLc/3631</link>
		<comments>http://swizec.com/blog/the-greatest-story-i-have-to-tell/swizec/3631#comments</comments>
		<pubDate>Tue, 07 Feb 2012 15:56:32 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[Insanity]]></category>
		<category><![CDATA[California]]></category>
		<category><![CDATA[Caltrain]]></category>
		<category><![CDATA[DNA Lounge]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[Palo Alto]]></category>
		<category><![CDATA[Palo Alto California]]></category>
		<category><![CDATA[San Francisco]]></category>
		<category><![CDATA[Silicon Valley]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3631</guid>
		<description><![CDATA[War veterans tell the best stories &#8211; testosterone-filled men crammed in compact spaces doing something dangerous/awesome produce the best stories. Geeks? We have deployments to Silicon Valley, that&#8217;s where our best stories come from. The greatest story my life has to offer comes from my first stint at Silicon Valley &#8211; this summer, interning for [...]]]></description>
			<content:encoded><![CDATA[<p>War veterans tell the best stories &#8211; testosterone-filled men crammed in compact spaces doing something dangerous/awesome produce the best stories.</p>
<div class="wp-caption alignright" style="width: 352px"><img class="  " title="The bike central to this story" src="http://swizec.com/blog/wp-content/uploads/2012/02/11fdb5d3700d4fbd96b168de05ed2c21_77.jpg" alt="The bike central to this story" width="342" height="342" /><p class="wp-caption-text">The bike central to this story</p></div>
<p>Geeks? We have deployments to <a class="zem_slink" title="Silicon Valley" href="http://maps.google.com/maps?ll=37.37,-122.04&amp;spn=1.0,1.0&amp;q=37.37,-122.04 (Silicon%20Valley)&amp;t=h" rel="geolocation">Silicon Valley</a>, that&#8217;s where our best stories come from.</p>
<p>The greatest story my life has to offer comes from my first stint at Silicon Valley &#8211; this summer, interning for a <a class="zem_slink" title="Y Combinator" href="http://www.ycombinator.com" rel="homepage">YCombinator</a> team. I&#8217;ve probably mentioned it before in passing, but it needs a proper writeup.</p>
<h2>The Story</h2>
<p>After a month of being stuck in a four bedroom house with six guys and only going out once every week or so &#8230; to <a class="zem_slink" title="Palo Alto, California" href="http://maps.google.com/maps?ll=37.4291666667,-122.138055556&amp;spn=0.1,0.1&amp;q=37.4291666667,-122.138055556 (Palo%20Alto%2C%20California)&amp;t=h" rel="geolocation">Palo Alto</a>, I needed something better.</p>
<p>Palo Alto is where fun goes to die. Marvelous for startups, venture capital just waiting to dump shitloads of money on hapless startups &#8211; shake a tree and money falls out.</p>
<p>It is a sea of guys. Nerdy, geeky, guys. Whatever girls there are, aren&#8217;t looking for people like me. Why would they? I haven&#8217;t cashed out of a startup and I don&#8217;t even have a car, let alone a Porsche.</p>
<p>After a month it was finally time. I&#8217;m going to San Francisco and having some proper fun. Researched some clubs on <a class="zem_slink" title="Google Maps" href="http://maps.google.com" rel="homepage">Google Maps</a>, asked around a little bit, and found a place I liked &#8211; the <a class="zem_slink" title="DNA Lounge" href="http://maps.google.com/maps?ll=37.7710083333,-122.412694444&amp;spn=0.01,0.01&amp;q=37.7710083333,-122.412694444 (DNA%20Lounge)&amp;t=h" rel="geolocation">DNA Lounge</a>.</p>
<p>Looked like a nice alter club with cool music, good people and a lack of gold-diggers. There might even be a girl in there wearing sneakers instead of high heels! Score!</p>
<p>Next Saturday I hopped on a bike, cycled to the nearest <a class="zem_slink" title="Caltrain" href="http://en.wikipedia.org/wiki/Caltrain" rel="wikipedia">Caltrain</a> station and when I got to San Francisco it was already dark. But hey, what could possibly go wrong? Just a lonesome guy on a bike in a huge city at night!</p>
<h2>The Club</h2>
<p>The club was everything I had imagined and more. There was a line out the front just like in the movies, bouncers everywhere and I even had to show my ID! Sweet, right? They didn&#8217;t even bat an eyelid when I showed them my expired <a class="zem_slink" title="Identity document" href="http://en.wikipedia.org/wiki/Identity_document" rel="wikipedia">ID card</a>from Slovenia; I love that in a bouncer.</p>
<div id="attachment_3636" class="wp-caption alignright" style="width: 430px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/1074032723_aJTtC-M.jpeg"><img class=" wp-image-3636 " title="Bootie at DNA Lounge" src="http://swizec.com/blog/wp-content/uploads/2012/02/1074032723_aJTtC-M.jpeg" alt="Bootie at DNA Lounge" width="420" height="280" /></a><p class="wp-caption-text">Bootie at DNA Lounge</p></div>
<p>Inside &#8230; a sea of women. There were women everywhere, bouncing to good music, drinking overpriced cocktails and the atmosphere was just amazing. For every guy in the club there were at least two chicks. A magnificent sight to behold!</p>
<p>But I&#8217;m kind of shy so when there is a sea of women I just enjoy the company and mostly dance by myself. And then I notice &#8211; hey, I&#8217;m dancing with someone! There is a cute chick and I think I&#8217;m dancing with her! Am I dancing with her? Hey she just grabbed my hand, I <em>am</em> dancing with her! Awesome!!</p>
<p>Before I knew it, I was sitting on the sidelines chatting with a cute chick in my lap and her friend. I think I remember telling her about where I&#8217;m from and what I&#8217;m doing in the US. And she told me what she was studying and that she was soon leaving for Africa &#8230; to study monkeys or something.</p>
<p>Doesn&#8217;t matter. There was a chick in my lap and all I cared about was &#8230; nothing. There were words coming out of her mouth and I just didn&#8217;t care.</p>
<p>She may have told me her name too &#8230;</p>
<p>Then. Last call. Club closes. Chick disappears into the night. Suddenly all alone in a huge foreign city in the middle of the night with nowhere to go.</p>
<p>The chick&#8217;s words start coming back to me &#8220;Hey, you know, San Francisco is a pretty big place. You really don&#8217;t want to be alone at night &#8230; at least not in some areas&#8221;</p>
<p>I didn&#8217;t remember what areas. There were boobs! How <em>could</em> I remember!?</p>
<p>I didn&#8217;t really have a plan for the rest of the night, so in my inebriated state it seemed like a cool idea to hop on the borrowed bike and cycle back to Palo Alto.</p>
<p>At 3am.</p>
<p>56 kilometers.</p>
<p>Roads I&#8217;ve never even seen before.</p>
<p>But hey, google maps can help right! Oh wait, I only have wi-fi on my phone, no 3G. Eh, the cache is good enough, I&#8217;ll just cache the whole map.</p>
<p>Only 20% battery left. Marvelous!</p>
<p>Plotted a rough course, cached as much as I could, hopped on the bike and off I was into the night.</p>
<h2>An adventure!</h2>
<div id="attachment_3632" class="wp-caption alignnone" style="width: 524px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/Screen-Shot-2012-02-07-at-4.47.27-PM.png"><img class=" wp-image-3632 " title="Adventure!" src="http://swizec.com/blog/wp-content/uploads/2012/02/Screen-Shot-2012-02-07-at-4.47.27-PM.png" alt="Adventure!" width="514" height="481" /></a><p class="wp-caption-text">Adventure!</p></div>
<p>I cycled and I cycled. San Francisco was sleeping. Met three people all night. They seemed either too scary or too drunk to talk to.</p>
<p>I found myself near something resembling the docks. There was an ocean and what looked like peers and some ships &#8211; not the big kind, but still ships. Isn&#8217;t this where a lot of people get killed in the movies?</p>
<p>But I pressed on and got into a more normal looking area. Single storey buildings everywhere, places that looked like businesses, not very residential. But hey, I wasn&#8217;t worried, it didn&#8217;t look too dangerous this time.</p>
<p>After about 40 minutes of cycling I was out in the open. No more houses, just distant lights. On one side was the ocean, on the other what looked like an open meadow with no discernible features.</p>
<p>And it was dark. So very very dark. No street lights anywhere. Just the full moon and stars &#8211; luckily California isn&#8217;t a very cloudy place.</p>
<p>Without lights all I could use to navigate was a white line on the side of the road. A meter of white line disappearing into the night in front of me.</p>
<h2>Dark</h2>
<p>Darkness. Black tarmac. White line.</p>
<div id="attachment_3635" class="wp-caption alignright" style="width: 361px"><a href="http://swizec.com/blog/wp-content/uploads/2012/02/IMGP2951_thumb1.jpeg"><img class=" wp-image-3635 " title="Pretty much the view" src="http://swizec.com/blog/wp-content/uploads/2012/02/IMGP2951_thumb1.jpeg" alt="Pretty much the view" width="351" height="265" /></a><p class="wp-caption-text">Pretty much the view</p></div>
<p>That white line was the only thing keeping me alive. I hugged it as much as I could, veer too much to the right and you&#8217;re out of road &#8211; can&#8217;t even see the edge. Veer too much to the left and you&#8217;re in traffic &#8230; traffic that can&#8217;t see you until they almost run you over.</p>
<p>A hill started. Now I was in deep shit. Small bump in the road and I&#8217;m eating tarmac &#8211; life slipping away by the drop most likely. I later checked the Runkeeper recording &#8211; I was doing 40 kilometers an hour.Enough to seriously die without a helmet on.</p>
<p>Oh and did I mention it was cold? Very cold! Hands wrapped in sleeves, holding the handlebars &#8230; sort of. Scarf around my face. Nothing warmer but a sweater to wear. And I held on for dear life.</p>
<p>A few cars passed me. Some lorries. Scary.</p>
<p>There is so much roar coming from your tyres you can&#8217;t hear approaching vehicles. Something just whizzes out of your peripheral vision and is gone before you fully realize what happened.</p>
<p>Every time you get spooked and veer to the right a bit. But there&#8217;s an invisible road edge there. Veer too much and *poof*, gone.</p>
<p>I was very happy when street lights started somewhere around the <a class="zem_slink" title="San Francisco International Airport" href="http://maps.google.com/maps?ll=37.6188888889,-122.375&amp;spn=0.03,0.03&amp;q=37.6188888889,-122.375 (San%20Francisco%20International%20Airport)&amp;t=h" rel="geolocation">SFO airport</a>. I could see! But it felt like I was in some seedy part of town again. Switching from that big road to El Camino was pretty interesting.</p>
<p>A backroad somewhere near the airport. Strange crossroads. Gang cars everywhere. At least they looked like the typical car mexican gangs drive in movies, wouldn&#8217;t know if they actually were gang cars. Might be a stereotype.</p>
<p>Oh and Google Maps didn&#8217;t cache this bit.</p>
<p>El Camino is a good road. I like it. Just following it I would eventually come to Palo Alto and that nothing could possibly go wrong from this point onward.</p>
<p>Well, you know, other than getting run over by a car. Killed by some weirdo in a backtown. Or just dying from exhaustion.</p>
<p>I didn&#8217;t even have a bottle of water with me! Nothing. Just my hat, the bike and sheer determination to get home and survive the greatest adventure I was ever on.</p>
<p>Eventually daylight started. The cold was replaced with just too much warmth for my clothes but not enough to take anything off. I could see! Life was simple again.</p>
<h2>Just keep pedalling.</h2>
<p>By this point I was getting very tired. Had been cycling for hours and I&#8217;m not in the best of shapes &#8211; especially not for cycling.</p>
<p>This part of the trip is slightly hazy. I dozed off a couple times, but magically kept pedalling. It was muscle memory by now, didn&#8217;t even have to think about it. Pedalling? Oh that&#8217;s just something legs do on their own, not my business.</p>
<p>I got to Palo Alto, found the house and at 7am. 1% of battery left. An hour before the first Caltrain leaves from <a class="zem_slink" title="San Francisco" href="http://maps.google.com/maps?ll=37.7793,-122.4192&amp;spn=0.1,0.1&amp;q=37.7793,-122.4192 (San%20Francisco)&amp;t=h" rel="geolocation">San Francisco.</a></p>
<p>After about two liters of Cedevita and a shower I collapsed into bed. Couldn&#8217;t think straight to save my life.</p>
<p>The next day I was woken up at 10am. It was all hands on deck to help prepare a picnic for all the Silicon Valley friends of the startup.</p>
<p>How I survived that day, I&#8217;m not sure. All I remember is an all-consuming numbness in my legs and an inability to stand.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.mercurynews.com/breaking-news/ci_19906706">Man punched during Palo Alto soccer game</a> (mercurynews.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.mercurynews.com/peninsula/ci_19741327">Wushu takes flight at Palo Alto&#8217;s Nixon Elementary</a> (mercurynews.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.sfgate.com/cgi-bin/article.cgi?f=/c/a/2011/11/26/BA2L1M4JH5.DTL">New fatal on Caltrain line in Palo Alto</a> (sfgate.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=f5c50df4-886a-4fc9-a03d-118a1963b574" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/iGse5F8QQLc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/the-greatest-story-i-have-to-tell/swizec/3631/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/the-greatest-story-i-have-to-tell/swizec/3631</feedburner:origLink></item>
		<item>
		<title>Udacity – learn how to give an autonomous car its brain</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/1pOVboLP0FM/3627</link>
		<comments>http://swizec.com/blog/udacity-learn-how-to-give-an-autonomous-car-its-brain/swizec/3627#comments</comments>
		<pubDate>Mon, 06 Feb 2012 20:42:56 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3627</guid>
		<description><![CDATA[A few days ago an email birdie delivered this amazing piece of news: In short, Sebastian Thrun of ai-class.com, Stanford and Google-autonomus-cars fame is launching a new class to teach everyone about creating cars that can drive themselves. Well, to create their brains &#8230; but considering Mythbusters create an RC car every three weeks, the [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago an email birdie delivered this amazing piece of news:</p>
<p><iframe src="http://www.youtube.com/embed/bdCnb0EFAzk" frameborder="0" width="560" height="315"></iframe></p>
<p>In short, <a class="zem_slink" title="Sebastian Thrun" href="http://en.wikipedia.org/wiki/Sebastian_Thrun" rel="wikipedia">Sebastian Thrun</a> of <a href="http://ai-class.com">ai-class.com</a>, <a class="zem_slink" title="Stanford University" href="http://maps.google.com/maps?ll=37.43,-122.17&amp;spn=0.01,0.01&amp;q=37.43,-122.17 (Stanford%20University)&amp;t=h" rel="geolocation">Stanford</a> and <a href="http://en.wikipedia.org/wiki/Google_driverless_car" target="_blank">Google-autonomus-cars</a> fame is launching <a href="http://www.udacity.com/" target="_blank">a new class</a> to teach everyone about creating cars that can drive themselves. Well, to create their brains &#8230; but considering Mythbusters create an RC car every three weeks, the mechanics are probably a solved problem.</p>
<p>Having taken the artificial intelligence class last semester, there is no doubt in my mind <em>this class will be <strong>awesome.</strong></em> The combination of world class professors and an online setting just works so much better than any other class I&#8217;ve been to &#8230; hell I&#8217;ve said before that <a title="Can I please take all my classes online?" href="http://swizec.com/blog/can-i-please-take-all-my-classes-online/swizec/3147">I wish all my classes were online</a> from now on.</p>
<p>And the cool thing about Udacity as a whole?</p>
<p>They&#8217;re aiming to revolutionize <a class="zem_slink" title="Higher education" href="http://en.wikipedia.org/wiki/Higher_education" rel="wikipedia">university education</a>! Starting off with autonomus cars and basic computer science this semester, it will eventually cover the whole computer science spectrum and even provide students with actual certified degrees. Like a &#8220;real&#8221; university.</p>
<p>I wonder how long it will take before I can ratify classes by Sebastian Thrun at my university, but the sooner the better because I expect to be spending much more time on his classes this semester than on most of my <em>real</em> classes.</p>
<p>That said, I&#8217;m looking for classmates. Studying is more fun when you can share!</p>
<p>Did I mention <a title="Science Wednesday: Self-driving cars" href="http://swizec.com/blog/science-wednesday-self-driving-cars/swizec/3178" target="_blank">autonomous cars are super awesome</a>?</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://blog.konstrukshon.com/architectural-technologist-sebastian-thrun-set-up-his-own-free-for-all-university/">Architectural Technologist &#8211; Sebastian Thrun &#8211; set up his own, free-for-all university.</a> (konstrukshon.com)</li>
<li class="zemanta-article-ul-li"><a href="http://seekerblog.com/2012/02/06/udacity-reinventing-education-2/">Udacity: Reinventing Education (2)</a> (seekerblog.com)</li>
<li class="zemanta-article-ul-li"><a href="http://diyscholar.wordpress.com/2012/01/24/the-audacity-of-udacity/">The audacity of Udacity</a> (diyscholar.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.i-programmer.info/news/150-training-a-education/3729-online-computer-science-education-for-free.html">Online Computer Science Education for Free</a> (i-programmer.info)</li>
<li class="zemanta-article-ul-li"><a href="http://www.downes.ca/post/57085/rd">Stanford AI Professor Thrun Leaves University to Start Udacity, an Online Learning Startup</a> (downes.ca)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=1f642bbd-5b27-4284-a1a4-4ce27c3d2507" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/1pOVboLP0FM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/udacity-learn-how-to-give-an-autonomous-car-its-brain/swizec/3627/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/udacity-learn-how-to-give-an-autonomous-car-its-brain/swizec/3627</feedburner:origLink></item>
		<item>
		<title>Top 10 iPhone Apps for Web Designers</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/FlAxR0YYjyg/3624</link>
		<comments>http://swizec.com/blog/top-10-iphone-apps-for-web-designers/swizec/3624#comments</comments>
		<pubDate>Fri, 03 Feb 2012 11:33:53 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Guestpost]]></category>
		<category><![CDATA[App Store]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[Handhelds]]></category>
		<category><![CDATA[IPhone]]></category>
		<category><![CDATA[Smartphones]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3624</guid>
		<description><![CDATA[This is a guest post by Jan Pierce - a 4th grade teacher who has over 20 years of experience in the classroom. Her interests include educational technology and online learning. She also owns the site Elementary Education Degree for students interested in earning a degree in elementary education. 1. Ego – This is an essential [...]]]></description>
			<content:encoded><![CDATA[<p><em>This is a guest post by Jan Pierce - a 4th grade teacher who has over 20 years of experience in the classroom. Her interests include educational technology and online learning. She also owns the site <a href="http://www.elementaryeducationdegree.com">Elementary Education Degree</a> for students interested in earning a degree in elementary education.</em></p>
<p><strong>1. </strong><a href="http://itunes.apple.com/us/app/ego/id306785502?mt=8"><strong>Ego</strong></a><strong> – </strong>This is an essential app for anyone in the web business. Ego allows you to check statistics like visits, feed subscriptions, Twitter followers, and more on a daily or hourly basis. Instead of visiting a bunch of different websites, all you need to do is open this single application. It supports sites like Google Analytics, Twitter, Squarespace, Vimeo, and more. ($1.99)</p>
<p><strong>2. </strong><a href="http://itunes.apple.com/us/app/palettes/id297157708?mt=8"><strong>Palettes</strong></a><strong> – </strong>Don’t you wish you had a way to capture a color you see online? Now you can with this application. Take a color directly from any online image and create a palette, or import a palette from another photo program. This is a great way to use Professional color schemes without wasting time to create them for every site you make. (Free)</p>
<p><strong>3. </strong><a href="http://itunes.apple.com/us/app/whatthefont/id304304134?mt=8"><strong>WhatTheFont</strong></a><strong> – </strong>Identify fonts wherever you go with this handy application. Take a photo of a word and find out what its font is in seconds to help you gain quick inspiration for your own sites. This app has gained a cult status among web designers for a very good reason. (Free)</p>
<p><strong>4. </strong><a href="http://itunes.apple.com/us/app/ftp-on-the-go/id286479936?mt=8"><strong>FTP On The Go</strong></a><strong> – </strong>This app allows you to perform maintenance on your website, no matter where you are. You can also edit files on an FTP server and check other applications while staying in the FTP all. This is one of the most downloaded web business apps on the market. ($6.99)</p>
<p><strong>5. </strong><a href="http://itunes.apple.com/us/app/zeptopad-free-brainstorming/id299173403?mt=8"><strong>ZeptoPad</strong></a><strong> – </strong>Forget the tiny keypad on your iPhone. This app lets you draw on the screen with you finger to brainstorm and jot down notes. You can also save what you make in a JPEG format to send to your friends and colleagues. (Free)</p>
<p><strong>6. </strong><a href="http://itunes.apple.com/us/app/css-cheat-sheet/id301093674?mt=8"><strong>CSS Cheatsheet</strong></a><strong> – </strong>Even experienced developers need to look up CSS commands every once in a while. This is a reference sheet for those on the go who just need a little reminder so that they don’t have to waste their time searching online. ($0.99)</p>
<p><strong>7. </strong><a href="http://itunes.apple.com/us/app/seo-pro/id377980606?mt=8"><strong>SEO Pro</strong></a><strong> – </strong>Track the progress of all your domains by viewing various page rank factors from Google, Yahoo, and more. Since this app allows you to monitor unlimited urls, you can even track your competitors’ sites as well. ($0.99)</p>
<p><strong>8. </strong><a href="http://itunes.apple.com/us/app/worktimer/id293280857?mt=8"><strong>WorkTimer</strong></a><strong> – </strong>Do you have trouble keeping track of how many hours you work on each of your projects? This app will track them for you so that you can provide clients with accurate billing information. At the end of each month, you can send out emails with project records. ($0.99)</p>
<p><strong>9. </strong><a href="http://itunes.apple.com/us/app/cliqcliq-colors/id291725775?mt=8"><strong>CliqCliq Colors</strong></a><strong> – </strong>Find and edit colors with a precise, easy-to-use functionality. Quickly convert scales and formats that are compatible with all the major types of photo editing software. You can also extract colors from your iPhone photos or Flickr. (Free)</p>
<p><strong>10. </strong><a href="http://itunes.apple.com/us/app/analytics-app/id303689911?mt=8"><strong>Analytics</strong></a><strong> – </strong>If you already have a Google Analytics account, this app will bring all of its amazing features to your iPhone. View 55 different reports as well as information for site traffic and e-commerce. You won’t find an analytics app nearly as detail-oriented as this one. ($6.99)</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://appleissimo.com/2012/01/25/iphone-ipad-tutorial-how-to-get-settings-shortcuts-on-your-home-screen/">iPhone / iPad Tutorial &#8211; How To Get Settings Shortcuts On Your Home Screen</a> (appleissimo.com)</li>
<li class="zemanta-article-ul-li"><a href="http://hypebeast.com/2012/02/nooka-iphone-application/">Nooka iPhone Application</a> (hypebeast.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.phonehour.com/how-to/how-to-control-your-pc-with-your-iphone/">How To Control Your PC with Your iPhone</a> (phonehour.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.cultofmac.com/144193/apple-going-to-war-against-devs-who-use-white-iphones-to-advertise-apps/">Is Apple Going To War Against Devs Who Use White iPhones To Advertise Their Apps?</a> (cultofmac.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=add1a9cb-5491-48a5-8f9e-0974c3696f29" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/FlAxR0YYjyg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/top-10-iphone-apps-for-web-designers/swizec/3624/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/top-10-iphone-apps-for-web-designers/swizec/3624</feedburner:origLink></item>
		<item>
		<title>TEDxBled pitch</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/i-pMdpNjvDA/3621</link>
		<comments>http://swizec.com/blog/tedxbled-pitch/swizec/3621#comments</comments>
		<pubDate>Thu, 02 Feb 2012 13:31:32 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Self-organization]]></category>
		<category><![CDATA[TED]]></category>
		<category><![CDATA[TEDx]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3621</guid>
		<description><![CDATA[TEDxBled is right around the corner and it&#8217;s accepting random people to come give a talk. There&#8217;s a competition going on and out of everyone who submits a video they&#8217;ll pick the best two to come dazzle the audience. Since this is a pretty cool opportunity and I almost have something worthwhile to say I [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://www.facebook.com/TEDxBled" target="_blank">TEDxBled</a> is right around the corner and it&#8217;s accepting random people to come give a talk. There&#8217;s a competition going on and out of everyone who submits a video they&#8217;ll pick the best two to come dazzle the audience.</p>
<p>Since this is a pretty cool opportunity and I almost have something worthwhile to say I decided to pitch a talk about my <a title="A message from your future self" href="http://swizec.com/blog/a-message-from-your-future-self/swizec/3377">giving your future self a voice</a> idea. It&#8217;s nowhere near the high level of altruism and awesomeness of <a href="http://challengefuture.org/quick/32" target="_blank">the other ideas pitched so far</a>, but hey &#8230; we can&#8217;t all be spectacular right?</p>
<p>Talking into a computer is insanely weird for me, I prefer a crowd &#8211; it&#8217;s somehow easier, probably because I can feel for a connection, get a few cheap laughs and generally feel how I&#8217;m doing and whether I should change the pace around or whatever.</p>
<p>After a few takes I came up with this:</p>
<p><iframe src="http://www.youtube.com/embed/CZKWoS90xC0" frameborder="0" width="480" height="360"></iframe></p>
<p>The voice is crappy, the lighting sucks because you can&#8217;t see my face well, but if I tried going for a different shot I&#8217;d have to clean my room and that just sounds too much like an excuse to avoid studying for exams.</p>
<p>It&#8217;s a long shot and I probably won&#8217;t be asked to present, but at least I tried <img src='http://swizec.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://swizec.com/blog/tedxyouth-ljubljana-report/swizec/3039">TEDxYouth Ljubljana report</a> (swizec.com)</li>
<li class="zemanta-article-ul-li"><a href="http://mumbrella.com.au/tedx-speaker-auditions-to-come-to-sydney-but-no-product-hawkers-jargon-junkies-dullards-motivator-wannabes-spouters-of-new-age-fluff-72768">TEDx speaker auditions to come to Sydney &#8211; but no product-hawkers, jargon-junkies, dullards, motivator wannabes or spouters of new-age fluff</a> (mumbrella.com.au)</li>
<li class="zemanta-article-ul-li"><a href="http://meinewalt.wordpress.com/2011/11/16/tedx-coming-to-nagpur/">TEDx coming to Nagpur</a> (meinewalt.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://midd-blog.com/2011/11/05/tedx-2011-embracing-risk/">TEDx 2011: Embracing Risk (Live-Blog)</a> (midd-blog.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=55ac8aa5-50b2-4b06-99b1-f3dfd328a345" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/i-pMdpNjvDA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/tedxbled-pitch/swizec/3621/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/tedxbled-pitch/swizec/3621</feedburner:origLink></item>
		<item>
		<title>Everyone should learn [about] programming</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/QWDvhbq07Ns/3608</link>
		<comments>http://swizec.com/blog/everyone-should-learn-about-programming/swizec/3608#comments</comments>
		<pubDate>Wed, 01 Feb 2012 12:41:38 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Inspiration]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3608</guid>
		<description><![CDATA[What use have an artist, a baker, a winemaker, a firefighter and a brewer with programming? None. Yet. An article surfaced on HackerNews yesterday arguing that Programming is the new High School Diploma, the main argument being two facts: Computers are everywhere Automation is pushing out middle-tier jobs The basic idea is really simple &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>What use have an artist, a baker, a winemaker, a firefighter and a brewer with <a class="zem_slink" title="Computer programming" href="http://en.wikipedia.org/wiki/Computer_programming" rel="wikipedia">programming</a>? None.</p>
<div class="wp-caption alignright" style="width: 356px"><img class=" " title="A brewer" src="http://swizec.com/blog/wp-content/uploads/2012/02/sissons_brewer_199710.jpg" alt="A brewer" width="346" height="246" /><p class="wp-caption-text">A brewer</p></div>
<p>Yet.</p>
<p>An article surfaced on <a class="zem_slink" title="Hacker News" href="http://news.ycombinator.com/" rel="homepage">HackerNews</a> yesterday arguing that <a href="http://news.ycombinator.com/item?id=3528940">Programming is the new High School Diploma</a>, the main argument being two facts:</p>
<ol>
<li>Computers are everywhere</li>
<li>Automation is pushing out middle-tier jobs</li>
</ol>
<p>The basic idea is really simple &#8211; in the not very distant future programming will and should be as important as basic literacy is today. Not just basic computer literacy, but programming in the sense of combining and extending apps in novel ways to fit your problem area.</p>
<p>There are a lot of professions for which automation is almost impossible to imagine &#8211; an artist, a firefighter, a winemaker, brewer, baker; the list goes on and on. In fact this was the top voted rebuttal of the whole story. A lot of professions need so much human touch it is inconceivable they would ever need programming.</p>
<h2>Someone else can do the coding</h2>
<p>And if parts of their jobs do become automated, they still won&#8217;t need programming because there will be special people to program special tools for these professions and just show them how they&#8217;re used.</p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:DC_firefighter.jpg"><img class="zemanta-img-inserted zemanta-img-configured" title="Washington, D.C. firefighter" src="http://swizec.com/blog/wp-content/uploads/2012/02/300px-DC_firefighter2.jpg" alt="Washington, D.C. firefighter" width="300" height="336" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
<p>All well and good, but that&#8217;s missing the point entirely.</p>
<p>There is no need for an artist, or a baker, or anyone working in meatspace to be a good programmer. They have no need for <a class="zem_slink" title="Pointer (computing)" href="http://en.wikipedia.org/wiki/Pointer_%28computing%29" rel="wikipedia">pointer arithmetic</a>, <a class="zem_slink" title="Functional programming" href="http://en.wikipedia.org/wiki/Functional_programming" rel="wikipedia">functional programming</a>, <a class="zem_slink" title="P versus NP problem" href="http://en.wikipedia.org/wiki/P_versus_NP_problem" rel="wikipedia">P=NP</a> or knowing javascript and python&#8217;s list comprehensions.</p>
<p>They just don&#8217;t.</p>
<p>Somebody else can do all that stuff &#8211; an actual expert. But how much does a programmer sitting at home, watching code and cat pictures all day, know about the problems of a baker or an artist? Or about fighting fires?</p>
<h2>Problem areas</h2>
<p>You can&#8217;t solve problems you don&#8217;t know exist!</p>
<p>Someone with problems who doesn&#8217;t know of a whole field of solutions can&#8217;t ask for help either.</p>
<p>And so we reach an impasse. On the one hand you have an industry full of people so hungry for problems they create better and better ways to share ever more boring stuff, and on the other hand you have &#8230; the other ~70% of the population drowning in real, hard, solvable problems.</p>
<p>While you can check foursquare to see where your friends are, there are firefighters who would (probably?) love nothing more than a real-time map of where all their buddies are in a building. And what are the best and brightest of the world doing? Nothing much, I heard there&#8217;s a meme making rounds about something or another.</p>
<p>High school is about broadness and giving pupils a little bit of everything. Some history to understand the problems with large-scale ethnicism, a little bit of biology to help you talk to the doctor, a dash of this and that. All in all, none of us become experts in every field we study in high school, but studying them gives us a better understanding of the world.</p>
<div class="wp-caption alignleft" style="width: 191px"><img title="A chef" src="http://swizec.com/blog/wp-content/uploads/2012/02/chef1.jpg" alt="A chef" width="181" height="300" /><p class="wp-caption-text">A chef</p></div>
<p>And yet high school deprives us of even the simplest knowledge of a field touching <em>everything</em> in our lives.</p>
<p>To innovate, to even begin to really use this amazing tool, we need to give the general populace the ability to begin the process of automation &#8211; that spark of <em>Hey, this is kind of repetitive, I wonder if a computer could do it.</em></p>
<p>Chances are it could.</p>
<p>In fact, we know a computer can solve any problem we consider solvable &#8230; even subsets of those that aren&#8217;t solvable. But you first need someone who knows how to actually solve a problem.</p>
<p>That&#8217;s why most problems <a class="zem_slink" title="Programmer" href="http://en.wikipedia.org/wiki/Programmer" rel="wikipedia">programmers</a> solve are those other programmers have. It&#8217;s like an echo chamber out there, nothing but better and quicker ways to make development easier. These are then used to make development even easier and suddenly it&#8217;s become <em>impossible</em> to keep up with the world of computing.</p>
<p>Most other industries innovate much more slowly. Most of them can&#8217;t solve their own problems and they don&#8217;t even realize a solution exists because they don&#8217;t realize they have a problem. The greatest handbrake on innovation is a worker with too narrow a worldview to understand their job could be made better.</p>
<h2>What you can do?</h2>
<p>Because changing how high school works is hard, I have a suggestion for something you can do <strong>right now</strong>! Only needs three steps too</p>
<ol>
<li>Find a nonprogrammer friend</li>
<li>Take them out for a beer</li>
<li>Teach them about programming</li>
</ol>
<p>Give them the bug of automation. Do it with passion. Do it well. When they start looking at the world in terms of <em>Hmm &#8230; I wonder how this could be made better, easier, more interesting. </em>They will start coming back with real problems. Problems out of their solution scope, but something <em>you</em> can work on.</p>
<p>And hey, startup opportunity! You now have somebody with a real problem looking for a real solution! Hooray.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.nj.com/news/index.ssf/2012/01/firefighters_investigate_secon.html">Firefighters investigate second suspicious fire at vacant New Brunswick high school</a> (nj.com)</li>
<li class="zemanta-article-ul-li"><a href="http://zeroturnaround.com/blog/developer-productivity-report-part-1-developer-timesheet/">imabonehead: Developer Productivity Report &#8211; Part 1: Developer Timesheet | zeroturnaround.com</a> (zeroturnaround.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.answers.com/topic/corpus-answers-guides-how-to-become-a-firefighter">How to Become a Firefighter</a> (answers.com)</li>
<li class="zemanta-article-ul-li"><a href="http://swizec.com/blog/programmers-are-fucking-lazy/swizec/2648">Programmers are fucking lazy</a> (swizec.com)</li>
<li class="zemanta-article-ul-li"><a href="http://swizec.com/blog/programmers-are-born-not-made/swizec/3369">Programmers are born not made</a> (swizec.com)</li>
<li class="zemanta-article-ul-li"><a href="http://cdixon.org/2012/01/31/who-should-learn-to-program/">Who should learn to program?</a> (cdixon.org)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=663f89e2-33c8-49cd-9b31-27270739f9ab" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/QWDvhbq07Ns" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/everyone-should-learn-about-programming/swizec/3608/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/everyone-should-learn-about-programming/swizec/3608</feedburner:origLink></item>
		<item>
		<title>Three cool things</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/z_IGJ-Ng1Go/3603</link>
		<comments>http://swizec.com/blog/three-cool-things/swizec/3603#comments</comments>
		<pubDate>Tue, 31 Jan 2012 10:19:54 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[The Web]]></category>
		<category><![CDATA[Foursquare]]></category>
		<category><![CDATA[Handhelds]]></category>
		<category><![CDATA[IOS]]></category>
		<category><![CDATA[IPhone]]></category>
		<category><![CDATA[Social network]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3603</guid>
		<description><![CDATA[In lieu of a proper blogpost today you get three cool things, because I have to pass two exams an hour apart. 1) Arrivals Arrivals is an incredibly cool Foursquare app &#8211; probably the best I have ever seen. The idea is simple, take your foursquare data, turn your friends into aeroplanes, make an arrivals [...]]]></description>
			<content:encoded><![CDATA[<p>In lieu of a proper blogpost today you get three cool things, because I have to pass two exams an hour apart.</p>
<h2>1) Arrivals</h2>
<p><a href="http://www.iamdanw.com/wrote/arrivals-for-foursquare/" target="_blank">Arrivals</a> is an incredibly cool Foursquare app &#8211; probably the best I have ever seen. The idea is simple, take your foursquare data, turn your friends into aeroplanes, make an arrivals board like at an airport.</p>
<p>And that&#8217;s pretty much it. The app doesn&#8217;t do a whole lot, it runs in a browser and I love it because it does a single thing, but does it perfectly and in a cool way.</p>
<div class="wp-caption alignnone" style="width: 500px"><img class=" " title="Arrivals for Foursquare" src="http://swizec.com/blog/wp-content/uploads/2012/01/606491964bf311e1abb01231381b65e3_710.jpg" alt="Arrivals for Foursquare" width="490" height="490" /><p class="wp-caption-text">Arrivals for Foursquare</p></div>
<h2>2) Design for programmers</h2>
<p><a href="http://method.ac/" target="_blank">Method of Action</a> is something I only discovered last night and haven&#8217;t had the chance to play around with that much yet. It looks like a very promising way for programmers (people like me) to learn enough about design to hold their own in a conversation with a designer.</p>
<p>But more importantly, looks like it will enable us to throw together mockups and to at least understand what designers <em>do</em>. We love ranting on and on about how none of those stupid <a class="zem_slink" title="Luser" href="http://en.wikipedia.org/wiki/Luser" rel="wikipedia">lusers</a> understand what a programmer&#8217;s life is like &#8211; time to reciprocate <img src='http://swizec.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Oh and the <a href="http://type.method.ac/" target="_blank">Kern</a>, <a href="http://shape.method.ac/" target="_blank">Shape</a> and <a href="http://color.method.ac/" target="_blank">Color</a> games are already super fun to play.</p>
<div id="attachment_3605" class="wp-caption alignnone" style="width: 695px"><a href="http://swizec.com/blog/wp-content/uploads/2012/01/Screen-Shot-2012-01-31-at-11.18.29-AM.png"><img class=" wp-image-3605 " title="Method of Action" src="http://swizec.com/blog/wp-content/uploads/2012/01/Screen-Shot-2012-01-31-at-11.18.29-AM.png" alt="Method of Action" width="685" height="297" /></a><p class="wp-caption-text">Method of Action</p></div>
<h2>3) Buffer&#8217;s iOS app</h2>
<p>My favourite twitter tool <a href="http://blog.bufferapp.com/the-complete-guide-to-the-brand-new-buffer-iphone-app" target="_blank">Buffer has now got an iPhone app</a>. If you don&#8217;t know about Buffer yet, shame on you! It&#8217;s only the tool that played a great role in increasing my blog traffic baseline by roughly 1000% last year. Yes, that&#8217;s a thousand percent.</p>
<p>Diminishing returns aside, it&#8217;s still a very powerful tool.</p>
<div class="wp-caption alignnone" style="width: 368px"><img class="  " title="Mine was just emptied so the screenshot was lame" src="http://swizec.com/blog/wp-content/uploads/2012/01/IMG_01763.png" alt="Mine was just emptied so the screenshot was lame" width="358" height="538" /><p class="wp-caption-text">Mine was just emptied so the screenshot was lame</p></div>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://mashable.com/2012/01/30/arrivals-for-foursquare-displays-check-ins-on-old-style-airport-board/">Arrivals for Foursquare Displays Check-ins on Old-Style Airport Board</a> (mashable.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.ilounge.com/index.php/news/comments/foursquare-update-introduces-radar-for-ios-5/">News: Foursquare update introduces Radar for iOS 5</a> (ilounge.com)</li>
<li class="zemanta-article-ul-li"><a href="http://mashable.com/2012/01/30/impending-clear-interview/">Clear To Do App Has Some Surprising Design Inspirations</a> (mashable.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.lockergnome.com/social/2011/12/05/foursquare-is-a-waste-of-time/">Foursquare is a Waste of Time</a> (lockergnome.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=7c028505-7458-4a31-8f52-c2ddd33306f7" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/z_IGJ-Ng1Go" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/three-cool-things/swizec/3603/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/three-cool-things/swizec/3603</feedburner:origLink></item>
		<item>
		<title>Heroku, mongo, node.js – a problem</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/SZf_trI4ZDM/3565</link>
		<comments>http://swizec.com/blog/heroku-mongo-node-js-a-problem/swizec/3565#comments</comments>
		<pubDate>Mon, 30 Jan 2012 11:57:44 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Heroku]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[MongoDB]]></category>
		<category><![CDATA[Node.js]]></category>
		<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3565</guid>
		<description><![CDATA[A couple facts about three cool technologies node.js is a powerful way of writing backend code in JavaScript; why JavaScript? Because you have the kind of problem that benefits from asynchronous code (the average web app) and you like using the same  brain for backend and frontend work mongoDB is an awesome NoSQL data store [...]]]></description>
			<content:encoded><![CDATA[<p>A couple facts about three cool technologies</p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://en.wikipedia.org/wiki/File:The_Hunt_of_the_Unicorn_Tapestry_7.jpg"><img class="zemanta-img-inserted zemanta-img-configured" title="The Unicorn Is Penned, Unicorn Tapestries, c. ..." src="http://swizec.com/blog/wp-content/uploads/2012/01/300px-The_Hunt_of_the_Unicorn_Tapestry_71.jpg" alt="The Unicorn Is Penned, Unicorn Tapestries, c. ..." width="300" height="445" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
<div class="mceTemp"></div>
<ul>
<li><a class="zem_slink" title="Node.js" href="http://nodejs.org/" rel="homepage">node.js</a> is a powerful way of writing backend code in <a class="zem_slink" title="JavaScript" href="http://en.wikipedia.org/wiki/JavaScript" rel="wikipedia">JavaScript</a>; why JavaScript? Because you have the kind of problem that benefits from asynchronous code (the average web app) and you like using the same  brain for backend and frontend work</li>
<li><a class="zem_slink" title="MongoDB" href="http://www.mongodb.org/" rel="homepage">mongoDB</a> is an awesome <a class="zem_slink" title="NoSQL" href="http://en.wikipedia.org/wiki/NoSQL" rel="wikipedia">NoSQL</a> data store for objects. It is an especially great companion to JavaScript since its internal storage are <a class="zem_slink" title="JSON" href="http://json.org/" rel="homepage">JSON</a>-objects. JSON has plays particularly well with JavaScript due to certain similarities (some even think the JSON language is a subset of JavaScript, <a title="JSON: The JavaScript subset that isn't" href="http://timelessrepo.com/json-isnt-a-javascript-subset" target="_blank">although it&#8217;s not</a>)</li>
<li><a class="zem_slink" title="Heroku" href="http://www.heroku.com/" rel="homepage">Heroku</a> is the simplest way to deploy web apps. Originally designed for Ruby, it gained node.js support last spring/summer. There are <a href="http://www.joyent.com/" target="_blank">alternatives</a>, but heroku presents itself as a particularly good pick for various reasons (it <em>feels</em> right)</li>
</ul>
<p>Combining these three technologies should be a walk in the park. <a class="zem_slink" title="Sliced bread" href="http://en.wikipedia.org/wiki/Sliced_bread" rel="wikipedia">The best thing since sliced bread</a> and unicorn farts should rain down the heavens upon you for even thinking of using node.js, mongo and heroku in unison.</p>
<h2>Not so much.</h2>
<div class="mceTemp"></div>
<p>The culprit &#8211; the bleeding edge, baby!</p>
<p>Mongo&#8217;s only been widely-ish popular for a year, node.js still isn&#8217;t widely and Heroku is traditionally a <a class="zem_slink" title="Ruby on Rails" href="http://rubyonrails.org" rel="homepage">RoR</a> hosting environment so there are things that aren&#8217;t quite smooth yet.</p>
<p>Getting mongoDB support on Heroku means using an external party &#8211; what heroku calls an add-on &#8211; <a href="https://mongohq.com/home" target="_blank">MongoHQ</a>. It&#8217;s a mongoDB hosting provider that gives you access to a database and lets you loose.</p>
<p>But MongoHQ requires authentication.</p>
<p>My favourite mongoDB driver for node.js &#8230; doesn&#8217;t support authentication. At least it doesn&#8217;t support authentication easily, in fact it doesn&#8217;t support authentication so much that it isn&#8217;t officially documented. The only reference to getting this working is <a href="http://j-query.blogspot.com/2011/04/mongohq-and-node.html" target="_blank">some guy&#8217;s blogpost from April 2011</a>. This is an actively developed library by the way, the last commit to <a href="https://github.com/christkv/node-mongodb-native" target="_blank">node-mongodb-native</a>&#8216;s github was yesterday.</p>
<p>Some say I should be using <a href="https://github.com/LearnBoost/mongoose" target="_blank">mongoose</a> instead, but that would most likely require rewriting the whole application at this point. Not to mention I don&#8217;t like mongoose&#8217;s <a class="zem_slink" title="Object-relational mapping" href="http://en.wikipedia.org/wiki/Object-relational_mapping" rel="wikipedia">ORM</a>-like approach because that&#8217;s just a little too <a class="zem_slink" title="SQL" href="http://www.iso.org/iso/catalogue_detail.htm?csnumber=45498" rel="homepage">SQL</a> for my liking. Why would you force a traditional data store way of doing things onto something as refreshing as Mongo?</p>
<p>To make things worse, a while ago (about a year it seems), mongo introduced a new <a href="http://www.mongodb.org/display/DOCS/Connections" target="_blank">mongo:// url schema</a> for connecting to their database &#8230; not even all the official drivers support it yet.</p>
<p>Don&#8217;t you just love the bleeding edge? Competing libraries, standards shifting under your feet and things never quite working out!</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://r.zemanta.com/?u=http%3A//www.infoworld.com/d/application-development/nodejs-inventor-extends-javascript-programming-beyond-browsers-184963&amp;a=72148407&amp;rid=0ba152c5-e257-4f06-a4aa-d8c62e2e08c5&amp;e=0cb31b66c2e367c75b2971631959db44">Node.js inventor extends JavaScript programming beyond browsers</a> (infoworld.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.lukew.com/ff/entry.asp?1482">The Four Horsemen of JavaScript</a> (lukew.com)</li>
<li class="zemanta-article-ul-li"><a href="http://nodemanual.org/latest/">A community-driven manual for Node.js</a> (nodemanual.org)</li>
<li class="zemanta-article-ul-li"><a href="http://nosql.mypopescu.com/post/14453905385/attacking-nosql-and-node-js-server-side-javascript">Attacking NoSQL and Node.js: Server-Side JavaScript Injection (SSJS)</a> (nosql.mypopescu.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/8904409/running-node-js-on-a-port-other-than-port-80">Running node.js on a port other than port 80</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://joyeur.com/2012/01/23/cloud9s-plans-for-node-js-community/">Cloud9′s Plans for Node.js Community</a> (joyeur.com)</li>
<li class="zemanta-article-ul-li"><a href="http://hacks.mozilla.org/2012/01/javascript-on-the-server-growing-the-node-js-community/">JavaScript on the server: Growing the Node.js Community</a> (hacks.mozilla.org)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=0ba152c5-e257-4f06-a4aa-d8c62e2e08c5" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/SZf_trI4ZDM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/heroku-mongo-node-js-a-problem/swizec/3565/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/heroku-mongo-node-js-a-problem/swizec/3565</feedburner:origLink></item>
		<item>
		<title>Lychrel numbers</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/ttbZewW39X8/3559</link>
		<comments>http://swizec.com/blog/lychrel-numbers/swizec/3559#comments</comments>
		<pubDate>Fri, 27 Jan 2012 12:24:19 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Algorithm]]></category>
		<category><![CDATA[collatzconjecture]]></category>
		<category><![CDATA[Haskell]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Number Theory]]></category>
		<category><![CDATA[Palindrome]]></category>
		<category><![CDATA[Project Euler]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3559</guid>
		<description><![CDATA[Last night I discovered another cool mathematical concept akin to the Collatz conjecture - Lychrel numbers. The idea of a lychrel number is pretty straightforward: Take a number, add its reverse, continue until you reach a palindrome number. If you never reach a palindrome, then this is a Lychrel number. Something like this: 349 + 943 = [...]]]></description>
			<content:encoded><![CDATA[<p>Last night I discovered another cool mathematical concept akin to the <a class="zem_slink" title="Collatz conjecture" href="http://en.wikipedia.org/wiki/Collatz_conjecture" rel="wikipedia">Collatz conjecture</a> - <a href="http://en.wikipedia.org/wiki/Lychrel_numbers" target="_blank">Lychrel numbers</a>.</p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:CollatzFractal.png"><img class="zemanta-img-inserted zemanta-img-configured" title="Collatz map fractal in a neighbourhood of the ..." src="http://swizec.com/blog/wp-content/uploads/2012/01/300px-CollatzFractal4.png" alt="Collatz map fractal in a neighbourhood of the ..." width="300" height="180" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
<p>The idea of a lychrel number is pretty straightforward: Take a number, add its reverse, continue until you reach a <a class="zem_slink" title="Palindromic number" href="http://en.wikipedia.org/wiki/Palindromic_number" rel="wikipedia">palindrome number</a>. If you never reach a <a class="zem_slink" title="Palindrome" href="http://en.wikipedia.org/wiki/Palindrome" rel="wikipedia">palindrome</a>, then this is a <a class="zem_slink" title="Lychrel number" href="http://en.wikipedia.org/wiki/Lychrel_number" rel="wikipedia">Lychrel number</a>.</p>
<p>Something like this:</p>
<blockquote><p>349 + 943 = 1292,<br />
1292 + 2921 = 4213<br />
4213 + 3124 = 7337<br />
not lychrel</p></blockquote>
<p>If you&#8217;ve ever done any theoretical computer science, you&#8217;ll immediately spot a problem. This isn&#8217;t a very good algorithm. Problem is with that &#8220;never&#8221; word in the description &#8211; an algorithm is a finite set of steps, when you need an infinite amount of steps to reach a conclusion that&#8217;s &#8230; not very useful.</p>
<p>Honestly I am not certain what class of problems lychrel numbers fall into. The &#8220;not a lychrel number&#8221; is a half-<a class="zem_slink" title="Decision problem" href="http://en.wikipedia.org/wiki/Decision_problem" rel="wikipedia">decidable problem</a>. It will always tell you when <em>a number is not lychrel</em> but it will never terminate when it is. If my understanding is correct, this would make &#8220;is a lychrel number&#8221; an non-decidable problem.</p>
<p><a class="zem_slink" title="Project Euler" href="http://projecteuler.net/" rel="homepage">Project Euler</a> is kind enough to limit the problem a little bit and make it a fun algorithm to write before bed when your brain is half dead. <em>Find all lychrel candidates under 10,000 assuming it should never take more than 50 iterations.</em></p>
<p>Solving <em>that</em> problem becomes rather trivial in <a class="zem_slink" title="Haskell (programming language)" href="http://haskell.org" rel="homepage">Haskell</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;">&nbsp;
<span style="font-weight: bold;">reverse</span>' <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">read</span> <span style="color: #339933; font-weight: bold;">.</span> <span style="font-weight: bold;">reverse</span> <span style="color: #339933; font-weight: bold;">.</span> <span style="font-weight: bold;">show</span>
&nbsp;
palindrome n <span style="color: #339933; font-weight: bold;">=</span> n <span style="color: #339933; font-weight: bold;">==</span> <span style="font-weight: bold;">reverse</span>' n
&nbsp;
<span style="color: #5d478b; font-style: italic;">-- max denotes max recursion depth</span>
lychrel n <span style="font-weight: bold;">max</span>
  <span style="color: #339933; font-weight: bold;">|</span> <span style="font-weight: bold;">max</span> <span style="color: #339933; font-weight: bold;">&lt;=</span> <span style="color: red;">0</span> <span style="color: #339933; font-weight: bold;">=</span> True
  <span style="color: #339933; font-weight: bold;">|</span> palindrome<span style="color: #339933; font-weight: bold;">$</span>n<span style="color: #339933; font-weight: bold;">+</span>r <span style="color: #339933; font-weight: bold;">=</span> False
  <span style="color: #339933; font-weight: bold;">|</span> <span style="font-weight: bold;">otherwise</span> <span style="color: #339933; font-weight: bold;">=</span> lychrel <span style="color: green;">&#40;</span>n<span style="color: #339933; font-weight: bold;">+</span>r<span style="color: green;">&#41;</span> <span style="color: green;">&#40;</span>max<span style="color: #339933; font-weight: bold;">-</span><span style="color: red;">1</span><span style="color: green;">&#41;</span>
    <span style="color: #06c; font-weight: bold;">where</span> r <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">reverse</span>' n
&nbsp;
lychrels <span style="font-weight: bold;">max</span> <span style="color: #339933; font-weight: bold;">=</span>
  <span style="font-weight: bold;">length</span> <span style="color: green;">&#91;</span>x <span style="color: #339933; font-weight: bold;">|</span> x <span style="color: #339933; font-weight: bold;">&lt;-</span> <span style="color: green;">&#91;</span><span style="color: red;">1</span><span style="color: #339933; font-weight: bold;">..</span><span style="font-weight: bold;">max</span><span style="color: green;">&#93;</span><span style="color: #339933; font-weight: bold;">,</span> lychrel x <span style="color: red;">50</span><span style="color: green;">&#93;</span></pre></div></div>

<p>Oh and actually the first number that needs more than 50 iterations to converge into a palindrome is 10677, so the problem is pretty safely stated.</p>
<p>For a final bit of fun, the number 4994, itself a palindrome, is a lychrel candidate.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://swizec.com/blog/collatz-haskell-and-memoization/swizec/3382">Collatz, Haskell and Memoization</a> (swizec.com)</li>
<li class="zemanta-article-ul-li"><a href="http://flowingdata.com/2011/10/04/all-numbers-lead-to-one/">All numbers lead to one</a> (flowingdata.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.livescience.com/16846-rare-date-today-10-000-years-palindrome.html">Rare Date: Today Is Once-in-10,000-Years Palindrome</a> (livescience.com)</li>
<li class="zemanta-article-ul-li"><a href="http://mathsetc.wordpress.com/2011/07/23/problematic-views-futuring-maths/">problematic views, futuring maths.</a> (mathsetc.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.msnbc.msn.com/id/45258660/ns/technology_and_science-science/">Why 11/11/11 is mathematically amazing</a> (msnbc.msn.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=cdcdcc77-5738-4067-bfc8-273be2152cda" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/ttbZewW39X8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/lychrel-numbers/swizec/3559/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/lychrel-numbers/swizec/3559</feedburner:origLink></item>
		<item>
		<title>A month wasted</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/-rypFwnqFCg/3545</link>
		<comments>http://swizec.com/blog/a-month-wasted/swizec/3545#comments</comments>
		<pubDate>Thu, 26 Jan 2012 13:26:18 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Essays]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3545</guid>
		<description><![CDATA[This post is about exams, being in college and jumping through arbitrary hoops set up by arbitrary old men so they can feel arbitrarily important. But most of all it&#8217;s about everyone wasting a month of their lives for something that surely a better alternative exists for. I may have written about this before. I am [...]]]></description>
			<content:encoded><![CDATA[<p>This post is about exams, being in college and jumping through <a class="zem_slink" title="Arbitrariness" href="http://en.wikipedia.org/wiki/Arbitrariness" rel="wikipedia">arbitrary</a> hoops set up by arbitrary old men so they can feel arbitrarily important. But most of all it&#8217;s about everyone wasting a month of their lives for something that surely a better alternative exists for. I <a title="I suck at [formal] education or does education suck?" href="http://swizec.com/blog/i-suck-at-formal-education-or-does-education-suck/swizec/2564" target="_blank">may</a> <a title="A longboard and a school system" href="http://swizec.com/blog/a-longboard-and-a-school-system/swizec/2438" target="_blank">have</a> <a title="Doing a startup taught me the value of staying in school" href="http://swizec.com/blog/doing-a-startup-taught-me-the-value-of-staying-in-school/swizec/1819" target="_blank">written</a> about this before.</p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:University_of_Tokyo_Admittance_Celebrations_2011-03-10.JPG"><img class="zemanta-img-inserted zemanta-img-configured" title="English: A crowd has gathered to take part of ..." src="http://swizec.com/blog/wp-content/uploads/2012/01/300px-University_of_Tokyo_Admittance_Celebrations_2011-03-10.jpg" alt="English: A crowd has gathered to take part of ..." width="300" height="225" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
<p>I am notorious for sucking at passing exams. I am perhaps even more notorious for disrespecting authority and arbitrary tests of skill. There might be some bias. You have been warned.</p>
<p>My hate of tests started early, when I was doing those <a class="zem_slink" title="Test (assessment)" href="http://en.wikipedia.org/wiki/Test_%28assessment%29" rel="wikipedia">aptitude tests</a> for first grade I stopped after five minutes saying something like &#8220;Here. That&#8217;s enough for you. Bye&#8221;.</p>
<p>When you do that at six the examiner goes <em>&#8220;Oh my! What a smart little boy, so defiant and thinking for himself!&#8221;</em>, at 24 the usual reaction is more along the lines of <em>&#8220;Omg what an idiot, who let him out of grade school? The guy can&#8217;t even solve the simplest of problems!&#8221;</em></p>
<p>However, exams are upon us and it is once more time to jump through hoops and prove ourselves worthy of being allowed to jump through some more hoops. Just so old men can pat each other on the back and feel good about having taught people something.</p>
<h2>A waste of time!</h2>
<p>I don&#8217;t think there&#8217;s a single person in the world who likes exam season, not even the <a class="zem_slink" title="Professor" href="http://en.wikipedia.org/wiki/Professor" rel="wikipedia">professors</a> and <a class="zem_slink" title="Teaching assistant" href="http://en.wikipedia.org/wiki/Teaching_assistant" rel="wikipedia">teaching assistants</a>. Just a week ago everyone&#8217;s lives were better.</p>
<p>The professors were working on their <a class="zem_slink" title="Research" href="http://en.wikipedia.org/wiki/Research" rel="wikipedia">research</a> and figuring out cool ways to impart <a class="zem_slink" title="Knowledge" href="http://en.wikipedia.org/wiki/Knowledge" rel="wikipedia">knowledge</a> on young impressionable minds. The teaching assistants were also working on their research, while doing a bit of slave work for the professors, imparting knowledge on young impressionable minds and possibly grading some homework.</p>
<p>Most of the <a class="zem_slink" title="Student" href="http://en.wikipedia.org/wiki/Student" rel="wikipedia">students</a>&#8216; lives revolved around going to class and having knowledge imparted on their young impressionable minds. Some of them were doing research on the side, or some sort of pet project or another, some have jobs &#8211; most of them working on exactly the kind of thing they&#8217;ll be doing after they graduate &#8211; at least that&#8217;s how it is in my line of work.</p>
<p>The better students were also studying the more interesting subjects in more detail, because what is said in class just doesn&#8217;t feed their hunger for knowledge.</p>
<div class="wp-caption alignleft" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:StateLibQld_1_100348.jpg"><img class="zemanta-img-inserted zemanta-img-configured" title="English: School children doing exams inside a ..." src="http://swizec.com/blog/wp-content/uploads/2012/01/300px-StateLibQld_1_1003481.jpg" alt="English: School children doing exams inside a ..." width="300" height="215" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
<p>Some of the students &#8211; there might be less of these now that I&#8217;m not a freshman anymore &#8211; had impressive WoW and <a class="zem_slink" title="The Elder Scrolls V: Skyrim" href="http://www.elderscrolls.com/" rel="homepage">Skyrim</a> characters.</p>
<p>Enter exam season, stage left, all our lives got twisted upside down.</p>
<p>Suddenly everyone&#8217;s productive lives are put on hold for a month while we take the time to jump through hoops and politely ask permission to jump through more.</p>
<p>For a month:</p>
<ul>
<li>professors have to observe students jump through hoops instead of advancing their field</li>
<li>teaching assistants must create those hoops and grade the jumping instead of doing research</li>
<li>instead of going to cool lectures, students must study</li>
<li>instead of being productive on cool projects, students must jump</li>
<li>when a hoop is presented a student must not ask &#8220;Why the fuck?&#8221;, no, they must ask &#8220;Can you please turn that on fire as well? And can I do a piruette through it please?&#8221;</li>
</ul>
<h2>It&#8217;s insane. And stupid.</h2>
<p>You come there, often times early in the morning, and are given an exam. Then you are expected to solve four tasks. Each of them must be solved perfeclty on the first try. You have 90 minutes. Good luck.</p>
<p>Remember how they say interviewing candidates should not be based on trivia knowledge or solving &#8220;simple&#8221; tasks perfectly on the first try under time and situation pressure? [<a href="http://www.joelonsoftware.com/articles/fog0000000073.html" target="_blank">Joel on Software - Guerrilla Guide to Interviewing</a>]</p>
<p>Then why is it considered a good idea to test knowledge of _a whole subject_ like that? There&#8217;s no way a normal human being even stands a chance.</p>
<p>I&#8217;m lying, of course there is.</p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:Yushima_tenmangu_ema.jpg"><img class="zemanta-img-inserted zemanta-img-configured" title="English: A wall of &quot;ema&quot; votive plat..." src="http://swizec.com/blog/wp-content/uploads/2012/01/300px-Yushima_tenmangu_ema1.jpg" alt="English: A wall of &quot;ema&quot; votive plat..." width="300" height="225" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
<p>When you dumb down the whole field into formulaic application of a few algorithms and memorizing a few equations, suddenly everything becomes testable like that. But is this really in the spirit of what we&#8217;re trying to achieve here?</p>
<p>I mean, we are, after all, trying to prove who is and who isn&#8217;t worthy of being the creme of high thought in this nation and who gets to advance the field, funding for research, stuff like that.</p>
<p>A bunch of mindless automatons following instructions and dutifully obeying authority are sure to do just that! Wait, why do we have computers again?</p>
<p>I can understand this happening in high school &#8230; a bit &#8230; but college? Seriously? Your idea of a good <a class="zem_slink" title="Higher education" href="http://en.wikipedia.org/wiki/Higher_education" rel="wikipedia">college education</a> is making sure I know how to follow instructions and apply some basic proofs/algorithms/formulas by hand?</p>
<p>Fuck. That. Shit.</p>
<p>Is there a solution? I don&#8217;t know, but I&#8217;ve always liked the idea of being given a semester to do a big project involving what we&#8217;re being taught in class. It&#8217;s a lot more interesting and a better way to learn about something.</p>
<p>PS: there are many bright exceptions to this behavior at my college, it&#8217;s just that none of those exams stick in memory because I pass them with a good grade almost without trying.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://stcathmsrosette.wordpress.com/2012/01/25/memo-to-junior-4s-re-exams/">Memo to Junior 4s re Exams</a> (stcathmsrosette.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://berbececristian.wordpress.com/2012/01/24/something-new/">Something new</a> (berbececristian.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="https://nairanotes.wordpress.com/2011/11/22/common-mistakes-made-by-students-during-exam-period/">Common Mistakes Made By Students During Exam Period</a> (nairanotes.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://thoughtofvg.wordpress.com/2012/01/17/first-postexams-and-what-they-are-good-for/">First post/exams and what they are good for</a> (thoughtofvg.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://educationandstuff.wordpress.com/2012/01/25/exam-time/">Exam Time</a> (educationandstuff.wordpress.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=3a3735c0-5800-4a6a-a537-73ae48b3f53b" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/-rypFwnqFCg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/a-month-wasted/swizec/3545/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/a-month-wasted/swizec/3545</feedburner:origLink></item>
		<item>
		<title>A visit to the dentist</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/dzmFlJHFA5w/3528</link>
		<comments>http://swizec.com/blog/a-visit-to-the-dentist/swizec/3528#comments</comments>
		<pubDate>Wed, 25 Jan 2012 17:40:23 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3528</guid>
		<description><![CDATA[It took me six months to work up the courage to make an appointment for the dentist. After some initial confusionI finally managed to bump into someone and magically make an appointment before I could realize what was going on. I was told to come back in a month. Today. The experience taught me two things: [...]]]></description>
			<content:encoded><![CDATA[<p>It took me six months to work up the courage to make an appointment for the <a class="zem_slink" title="Dentist" href="http://en.wikipedia.org/wiki/Dentist" rel="wikipedia">dentist</a>. After some <a title="Going to the dentist is like trying out a new opensource project" href="http://swizec.com/blog/going-to-the-dentist-is-like-trying-out-a-new-opensource-project/swizec/2881">initial confusion</a>I finally managed to bump into someone and magically make an appointment before I could realize what was going on.</p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:Medieval_dentistry.jpg"><img class="zemanta-img-inserted zemanta-img-configured" title="An image from 1300s (A.D.) England depicting a..." src="http://swizec.com/blog/wp-content/uploads/2012/01/300px-Medieval_dentistry3.jpg" alt="An image from 1300s (A.D.) England depicting a..." width="300" height="300" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
<p>I was told to come back in a month.</p>
<p><em style="font-size: 1.2em;">Today.</em></p>
<p>The experience taught me two things:</p>
<ol>
<li>My teeth are made of magic</li>
<li>I am far more afraid of dentists than I had thought</li>
</ol>
<p>Ever heard of the expression <em>white with fear</em>? Turns out it can actually happen. Just like Tom turns completely white when a train is rushing towards him, so too my face turned white when I was sitting in that damn chair. Nearly fainted too.</p>
<p>I never did like dentists much &#8211; seven years since my last appointment after all &#8211;  but to <em>nearly faint</em> from fear? Nausea, tunnel vision, white face; the whole shebang! Didn&#8217;t even feel that bad, but you know shit&#8217;s going down when the dentist removes your glasses &#8220;just in case&#8221; and puts a wet rag on your forehead.</p>
<p>Lucky for me, I have magical teeth and the tally from all the years of neglect is just:</p>
<ul>
<li>one broken filling</li>
<li>three <a class="zem_slink" title="Wisdom tooth" href="http://en.wikipedia.org/wiki/Wisdom_tooth" rel="wikipedia">wisdom teeth</a> with some caries</li>
<li>inflamed gums</li>
</ul>
<p>None of that <em>OMG my wisdom teeth are breaking my head and trying to destroy everything!!!</em> I honestly expected much worse, but hey, I&#8217;ll take the deal <img src='http://swizec.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>It also turns out I suck at keeping my mouth open and will be having much fun the next time I visit &#8230; something about working on the back teeth and not being able to get the drill completely vertical and maybe not even being able to work on them &#8230;</p>
<p>Now my face feels funny from the injection, the <em>optional</em> injection. Can&#8217;t imagine the amounts of pain there would be had I not told them that yes, yes I do want that injection thing. You did notice I almost fainted when you were just <em>cleaning</em> my teeth right? WHY ARE YOU ASKING ME THIS!?</p>
<p>Those things take a while to really kick in. She was almost done drilling before I stopped feeling everything and even then just the air blowing over my teeth hurt like <em>hell.</em> Not to even mention the disinfectant.</p>
<p>Another appointment in a few weeks and then I guess I&#8217;m good to go for another seven years. Right?</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.bellasugar.com/Crest-Weekly-Intensive-Cleaning-Toothpaste-Review-2627319">No Dentist Appointment? No Problem.</a> (bellasugar.com)</li>
<li class="zemanta-article-ul-li"><a href="http://uclaislamicstudies.com/2012/01/17/wisdom-teeth-extraction-complications/">Wisdom Teeth Extraction Complications</a> (uclaislamicstudies.com)</li>
<li class="zemanta-article-ul-li"><a href="http://ask.metafilter.com/204770/Should-my-sevenyearold-sons-dentist-knock-him-out">Should my seven-year-old son&#8217;s dentist knock him out?</a> (ask.metafilter.com)</li>
<li class="zemanta-article-ul-li"><a href="https://kilnviews.wordpress.com/2012/01/24/hiding-from-the-hygienist/">Hiding from the hygienist</a> (kilnviews.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://oppathfinder.com/2012/01/18/military-dentists/">Military Dentists</a> (oppathfinder.com)</li>
<li class="zemanta-article-ul-li"><a href="http://ask.metafilter.com/205838/weird-feelings-in-my-teeth">weird feelings in my teeth!</a> (ask.metafilter.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=37822309-8d88-4a79-bbd3-f8614d613f94" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/dzmFlJHFA5w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/a-visit-to-the-dentist/swizec/3528/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/a-visit-to-the-dentist/swizec/3528</feedburner:origLink></item>
		<item>
		<title>I Don’t Know</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/SU9bowPLWYg/3517</link>
		<comments>http://swizec.com/blog/i-dont-know/swizec/3517#comments</comments>
		<pubDate>Tue, 24 Jan 2012 12:09:51 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[Albert Einstein]]></category>
		<category><![CDATA[BBC]]></category>
		<category><![CDATA[Feynman]]></category>
		<category><![CDATA[Knowledge]]></category>
		<category><![CDATA[Richard Feynman]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3517</guid>
		<description><![CDATA[I. Don&#8217;t. Know. Three simple words. Almost impossible to say. As developers, as entrepreneurs, as men we never want to admit we don&#8217;t know. If you don&#8217;t know, you are weak and an army of angry huns will come to steal your women, your business and your honor. When founders don&#8217;t know what the hell they&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://www.youtube.com/embed/Na-KzVwu6es" frameborder="0" width="420" height="315"></iframe></p>
<p>I. Don&#8217;t. Know.</p>
<p>Three simple words. Almost impossible to say. As developers, as entrepreneurs, as <em>men</em> we never want to admit we don&#8217;t know. If you don&#8217;t know, you are weak and an army of angry huns will come to steal your women, your business and your honor.</p>
<p>When founders don&#8217;t know what the hell they&#8217;re doing, people leave, investors say &#8220;maybe&#8221; and users aren&#8217;t showing up. <em>Especially</em> if they openly admit they don&#8217;t know.</p>
<div class="mceTemp"></div>
<div class="mceTemp"></div>
<p>But just as some consider not knowing a sign of weakness, <em>always</em> knowing is definitely a sign of weakness. Selling your best guess as absolute fact works very well in the short term, in fact it works spectacularly well &#8211; there&#8217;s a reason there are whole books devoted to the practice of eliminating excuses from your speech. Phrases like  <em>I think,</em> <em>in my opinion</em> et cetera.</p>
<div class="wp-caption alignright" style="width: 382px"><img class=" " title="Island of knowledge" src="http://swizec.com/blog/wp-content/uploads/2012/01/Maldives-Island_1111082i1.jpg" alt="Island of knowledge" width="372" height="240" /><p class="wp-caption-text">Island of knowledge</p></div>
<p>While it&#8217;s important to commit to what you say without hedging and ways to weasel out when you&#8217;re proven wrong. It&#8217;s even more important to admit when you don&#8217;t know. In fact all that hedging just defends you from admitting you are wrong and <em>don&#8217;t know.</em></p>
<div class="mceTemp"></div>
<p>The best thinkers of our species, like <a class="zem_slink" title="Richard Feynman" href="http://en.wikipedia.org/wiki/Richard_Feynman" rel="wikipedia">Feynman</a>, <a class="zem_slink" title="Albert Einstein" href="http://en.wikipedia.org/wiki/Albert_Einstein" rel="wikipedia">Einstein</a> and others, are <em>glorified</em> for their ability to embrace what they don&#8217;t know. To look <a class="zem_slink" title="Ignorance" href="http://en.wikipedia.org/wiki/Ignorance" rel="wikipedia">ignorance</a> straight in the face and spit in its eye. Most of us cower from such an opportunity, we like nothing more than to stand firmly in the middle of what we know and never looking beyond the horizon lest there be monsters.</p>
<div class="mceTemp"></div>
<p>Someone once said <em>Every man lives on an island of knowledge in a sea of ignorance. The bigger your island, the longer the shore of ignorance</em>.</p>
<p>Most people can&#8217;t even comprehend how much they don&#8217;t know about a subject, because the more you know about something, the more you understand the intricacies involved. A common saying amongst developers is <em>What the fuck man!? How can That Startup spend so much money on that simple problem, it&#8217;s just &lt;x&gt;, &lt;y&gt;, &lt;z&gt; and you&#8217;re done. I could do it in a week!</em></p>
<p>Chances are, you don&#8217;t know what the hell you are talking about. The hardest problems seem the simplest when given only a cursory glance. So put down the ego for a moment and <em>prove it.</em> Prove that the problem is simple.</p>
<p>You can&#8217;t learn what you already know. <img src='http://swizec.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.brainpickings.org/index.php/2011/10/07/richard-feynman-on-beauty-honors-and-curiosity/">Richard Feynman on Beauty, Honors, and Curiosity</a> (brainpickings.org)</li>
<li class="zemanta-article-ul-li"><a href="http://crcpastorchad.wordpress.com/2011/10/04/beauty-and-doubt/">Beauty and doubt</a> (crcpastorchad.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://callumjameshackett.wordpress.com/2011/12/27/physicists-and-artists/">Physicists and Artists</a> (callumjameshackett.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.brainpickings.org/index.php/2011/12/14/bbcs-richard-feynman-no-ordinary-genius/">No Ordinary Genius: BBC Captures Richard Feynman&#8217;s Legacy</a> (brainpickings.org)</li>
<li class="zemanta-article-ul-li"><a href="http://iantimberlake.wordpress.com/2011/12/29/inspiring-and-powerful-science-quotes/">Inspiring and Powerful Science Quotes</a> (iantimberlake.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.quantumdiaries.org/2011/10/10/quantum-man-richard-feynmans-life-in-science/">Quantum Man: Richard Feynman&#8217;s Life in Science</a> (quantumdiaries.org)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=7a25ffe7-e8f9-437e-bb23-543e63b1c4e9" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/SU9bowPLWYg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/i-dont-know/swizec/3517/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/i-dont-know/swizec/3517</feedburner:origLink></item>
		<item>
		<title>Appcelerator Titanium might’ve made it to my toolbox</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/WDRBhJRWU3Q/3506</link>
		<comments>http://swizec.com/blog/appcelerator-titanium-mightve-made-it-to-my-toolbox/swizec/3506#comments</comments>
		<pubDate>Mon, 23 Jan 2012 12:09:29 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Appcelerator]]></category>
		<category><![CDATA[Appcelerator Titanium]]></category>
		<category><![CDATA[Integrated development environment]]></category>
		<category><![CDATA[IOS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Titanium]]></category>
		<category><![CDATA[User interface]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3506</guid>
		<description><![CDATA[Last time I played around with Appcelerator Titanium I didn&#8217;t get a chance to really put it through its paces. Mostly because I wasn&#8217;t getting anywhere &#8230; I remember spending hours, even days, just figuring out how to get a Hello World to run in a simulator. Yesterday was my lucky day! Not only did I [...]]]></description>
			<content:encoded><![CDATA[<p>Last time I played around with <a class="zem_slink" title="Appcelerator Titanium" href="http://www.appcelerator.com/" rel="homepage">Appcelerator Titanium</a> I didn&#8217;t get a chance to <a href="http://swizec.com/blog/i-learned-two-things-today-11-8/swizec/2150">really put it through its paces</a>. Mostly because I wasn&#8217;t getting anywhere &#8230; I remember spending hours, even days, just figuring out how to get a <a class="zem_slink" title="Hello world program" href="http://en.wikipedia.org/wiki/Hello_world_program" rel="wikipedia">Hello World</a> to run in a simulator.</p>
<div class="wp-caption alignright" style="width: 250px"><a href="http://www.flickr.com/photos/91198056@N00/5638371774"><img class="zemanta-img-inserted zemanta-img-configured" title="MoBods Scoop! Development ;-)" src="http://swizec.com/blog/wp-content/uploads/2012/01/5638371774_324ec18c31_m4.jpg" alt="MoBods Scoop! Development ;-)" width="240" height="179" /></a><p class="wp-caption-text">Image by Podknox via Flickr</p></div>
<div class="mceTemp"></div>
<p>Yesterday was my lucky day! Not only did I get something to run, I actually made something useful. Or rather, I was given a working app and told to add some features and generally make it better a tiny little bit.</p>
<p>Took me way too long &#8211; expected when dealing with technology you know <em>nothing</em> about &#8211; but at 6am today I had <a href="http://www.pickup.io/" target="_blank">Pickup</a> connecting to the server on the user&#8217;s own private channel and talking nicely to the <a class="zem_slink" title="Chrome extension" href="http://googlevoiceblog.blogspot.com/2010/01/new-google-voice-extension-for-chrome.html" rel="homepage">Chrome extension</a>.</p>
<p>By the way this isn&#8217;t my project, I just helped out, but from what I saw last night, you <em>want</em> to sign up for the beta. Promise!</p>
<h2>Titanium good</h2>
<ol>
<li>It&#8217;s <a class="zem_slink" title="JavaScript" href="http://en.wikipedia.org/wiki/JavaScript" rel="wikipedia">Javascript</a>, if you haven&#8217;t noticed I <em>love</em> javascript</li>
<li>The same app works both on android and <a class="zem_slink" title="IOS" href="http://www.apple.com/ios" rel="homepage">iOS</a></li>
<li>Titanium API&#8217;s are generally simpler than what I&#8217;ve seen of native iOS</li>
<li>Properly using the <a class="zem_slink" title="User interface" href="http://en.wikipedia.org/wiki/User_interface" rel="wikipedia">user interface</a> API&#8217;s gives you a native look&amp;feel</li>
</ol>
<h2>Titanium bad</h2>
<ol>
<li>The <a class="zem_slink" title="Integrated development environment" href="http://en.wikipedia.org/wiki/Integrated_development_environment" rel="wikipedia">IDE</a>; I don&#8217;t like being forced to use an IDE and I very much hate being forced to use a <em>crappy</em> IDE.</li>
<li>Everything looks like it would be pretty much impossible to develop with my usual <a class="zem_slink" title="Text editor" href="http://en.wikipedia.org/wiki/Text_editor" rel="wikipedia">text editor</a> method</li>
<li>Code once, run everywhere is good in principle, but it usually ends up lacking the polish of a real native app, especially since android and iOS have slightly different <a class="zem_slink" title="User interface" href="http://en.wikipedia.org/wiki/User_interface" rel="wikipedia">UI</a> guidelines and traditions</li>
</ol>
<h2>Conclusion</h2>
<p>All in all,  there&#8217;s a lot of potential in this Titanium stuff despite the shortcomings. I might just start adding a mobile part to my future projects &#8230; there&#8217;s certainly some that could use it.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.mobile-ent.biz/news/read/appcelerator-bags-15m-series-c-round/016007">Appcelerator bags $15m series C round</a> (mobile-ent.biz)</li>
<li class="zemanta-article-ul-li"><a href="http://blog.elemdage.com/technology/one-mans-html5-developer-workflow">One Man&#8217;s HTML5 Developer Workflow</a> (elemdage.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.fiercedeveloper.com/story/appcelerator-acquires-html5-development-platform-particle-code/2011-10-24">Appcelerator acquires HTML5 development platform Particle Code</a> (fiercedeveloper.com)</li>
<li class="zemanta-article-ul-li"><a href="http://venturebeat.com/2011/11/01/appcelerator-raises-15m/">Appcelerator raises $15M, now largest third-party app publisher on iOS, Android</a> (venturebeat.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=41f5b6aa-6958-4ac1-95b3-78f47d955e65" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/WDRBhJRWU3Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/appcelerator-titanium-mightve-made-it-to-my-toolbox/swizec/3506/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/appcelerator-titanium-mightve-made-it-to-my-toolbox/swizec/3506</feedburner:origLink></item>
		<item>
		<title>This Haskell is wrong. Why?</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/RdloDhIPROc/3489</link>
		<comments>http://swizec.com/blog/this-haskell-is-wrong-why/swizec/3489#comments</comments>
		<pubDate>Fri, 20 Jan 2012 17:47:23 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Haskell]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Puzzle]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3489</guid>
		<description><![CDATA[The problem I&#8217;m trying to solve is the simple but lovely euler 62. The cube, 41063625 (3453), can be permuted to produce two other cubes: 56623104 (3843) and 66430125 (4053). In fact, 41063625 is the smallest cube which has exactly three permutations of its digits which are also cube. Find the smallest cube for which [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignright" style="width: 310px"><a href="http://en.wikipedia.org/wiki/File:5-cube_scrambled.png"><img class="zemanta-img-inserted zemanta-img-configured" title="English: 5D virtual 3^5 sequential move puzzle..." src="http://swizec.com/blog/wp-content/uploads/2012/01/300px-5-cube_scrambled2.png" alt="English: 5D virtual 3^5 sequential move puzzle..." width="300" height="293" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
<p>The problem I&#8217;m trying to solve is the simple but lovely <a href="http://projecteuler.net/problem=62" target="_blank">euler 62</a>.</p>
<blockquote><p>The cube, 41063625 (345<sup>3</sup>), can be permuted to produce two other cubes: 56623104 (384<sup>3</sup>) and 66430125 (405<sup>3</sup>). In fact, 41063625 is the smallest cube which has exactly three permutations of its digits which are also cube.</p>
<p>Find the smallest cube for which exactly five permutations of its digits are cube.</p></blockquote>
<p>A bit of fun coding after a statistics midterm last night and the solution should be in the bag. Except it isn&#8217;t, I am doing something wrong somehow and I can&#8217;t figure out what! Hopefully someone a bit better than me can shed some light whether my proposed solution is wrong or I just suck at <a class="zem_slink" title="Haskell (programming language)" href="http://haskell.org" rel="homepage">Haskell</a>.</p>
<h2>Algorithm</h2>
<ol>
<li>Generate cubes up to 10,000</li>
<li>Every cube is a pair of a digit-ordered string <em>n^3</em> and <em>n, </em>for instance <em>(&#8220;279&#8243;,9)</em></li>
<li>Order cubes by the string number presentation</li>
<li>Group together all cubes with the same <em>n^3</em></li>
<li>Pick out groups with the size of 5</li>
<li>Sort by <em>n</em></li>
<li>Pick the smallest number</li>
</ol>
<p>Should work in principle right? So why doesn&#8217;t the website accept my answer <em>(5027)</em>? My guess is I&#8217;m doing something wrong in the sorting and grouping department and I was hoping someone with a bit more knowledge of Haskell could point out where I&#8217;m being stupid.</p>
<h2>Code</h2>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;"><span style="color: #06c; font-weight: bold;">import</span> Data<span style="color: #339933; font-weight: bold;">.</span>List
&nbsp;
cubes<span style="color: #339933; font-weight: bold;">::</span><span style="color: green;">&#40;</span><span style="color: #cccc00; font-weight: bold;">Num</span> a<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">=&gt;</span> a <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: green;">&#91;</span><span style="color: green;">&#40;</span><span style="color: #cccc00; font-weight: bold;">String</span><span style="color: #339933; font-weight: bold;">,</span> a<span style="color: green;">&#41;</span><span style="color: green;">&#93;</span>
cubes <span style="color: red;">1</span> <span style="color: #339933; font-weight: bold;">=</span> <span style="color: green;">&#91;</span><span style="color: green;">&#40;</span><span style="font-weight: bold;">show</span> <span style="color: red;">1</span><span style="color: #339933; font-weight: bold;">,</span> <span style="color: red;">1</span><span style="color: green;">&#41;</span><span style="color: green;">&#93;</span>
cubes n <span style="color: #339933; font-weight: bold;">=</span> <span style="color: green;">&#40;</span>sort<span style="color: #339933; font-weight: bold;">$</span>show<span style="color: green;">&#40;</span>n<span style="color: #339933; font-weight: bold;">^</span><span style="color: red;">3</span><span style="color: green;">&#41;</span><span style="color: #339933; font-weight: bold;">,</span> n<span style="color: green;">&#41;</span>:<span style="color: green;">&#40;</span>cubes <span style="color: #339933; font-weight: bold;">$</span> n<span style="color: #339933; font-weight: bold;">-</span><span style="color: red;">1</span><span style="color: green;">&#41;</span>
&nbsp;
sortStrNum <span style="color: green;">&#40;</span>s1<span style="color: #339933; font-weight: bold;">,</span> n1<span style="color: green;">&#41;</span> <span style="color: green;">&#40;</span>s2<span style="color: #339933; font-weight: bold;">,</span> n2<span style="color: green;">&#41;</span>
  <span style="color: #339933; font-weight: bold;">|</span> <span style="font-weight: bold;">length</span> s1 <span style="color: #339933; font-weight: bold;">==</span> <span style="font-weight: bold;">length</span> s2 <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">compare</span> s1 s2
  <span style="color: #339933; font-weight: bold;">|</span> <span style="font-weight: bold;">otherwise</span> <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">compare</span> <span style="color: green;">&#40;</span><span style="font-weight: bold;">length</span> s1<span style="color: green;">&#41;</span> <span style="color: green;">&#40;</span><span style="font-weight: bold;">length</span> s2<span style="color: green;">&#41;</span>
&nbsp;
permuted<span style="color: #339933; font-weight: bold;">_</span>cubes n <span style="color: #339933; font-weight: bold;">=</span>
  groupBy <span style="color: green;">&#40;</span>\a b <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="font-weight: bold;">fst</span> a <span style="color: #339933; font-weight: bold;">==</span> <span style="font-weight: bold;">fst</span> b<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">$</span> sortBy sortStrNum <span style="color: #339933; font-weight: bold;">$</span> cubes n
&nbsp;
fives n <span style="color: #339933; font-weight: bold;">=</span>
  <span style="font-weight: bold;">filter</span> <span style="color: green;">&#40;</span>\xs <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="font-weight: bold;">length</span> xs <span style="color: #339933; font-weight: bold;">==</span> <span style="color: red;">5</span><span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">$</span> permuted<span style="color: #339933; font-weight: bold;">_</span>cubes n
&nbsp;
comparing p x y <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">compare</span> <span style="color: green;">&#40;</span>p x<span style="color: green;">&#41;</span> <span style="color: green;">&#40;</span>p y<span style="color: green;">&#41;</span>
&nbsp;
smallest <span style="color: #339933; font-weight: bold;">=</span>
  <span style="font-weight: bold;">head</span> <span style="color: #339933; font-weight: bold;">$</span> sortBy <span style="color: green;">&#40;</span>comparing <span style="font-weight: bold;">snd</span><span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">$</span> <span style="font-weight: bold;">head</span> <span style="color: #339933; font-weight: bold;">$</span> fives <span style="color: red;">100000</span></pre></div></div>

<p>The whole thing looks kind of alright to me, no matter how much I poke around it doesn&#8217;t seem like something is misbehaving &#8230; but it still is.</p>
<p>Ideas?</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://swizec.com/blog/collatz-haskell-and-memoization/swizec/3382">Collatz, Haskell and Memoization</a> (swizec.com)</li>
<li class="zemanta-article-ul-li"><a href="http://swizec.com/blog/learning-me-a-haskell/swizec/3272">Learning me a Haskell</a> (swizec.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/8905037/converting-haskell-polymorphic-cosine-function-to-f">Converting Haskell Polymorphic Cosine function to F#</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/8155929/mutable-possibly-parallel-haskell-code-and-performance-tuning">Mutable, (possibly parallel) Haskell code and performance tuning</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/8275171/will-this-haskell-code-take-too-much-memory">Will this Haskell code take too much memory?</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/8751188/exceptions-in-haskell">Exceptions in Haskell</a> (stackoverflow.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=727c4e4d-a97d-47a9-a6d5-d7017d2e3bfe" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/RdloDhIPROc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/this-haskell-is-wrong-why/swizec/3489/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/this-haskell-is-wrong-why/swizec/3489</feedburner:origLink></item>
		<item>
		<title>Blogging, hats, stuff</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/dBFmcb_B2ro/3483</link>
		<comments>http://swizec.com/blog/blogging-hats-stuff/swizec/3483#comments</comments>
		<pubDate>Thu, 19 Jan 2012 10:59:19 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3483</guid>
		<description><![CDATA[Yesterday I gave a talk at Kiberpipa on the awesome #wwwh weekly event. The talk was about this blog and how after that one insanely popular posteveryone suddenly decided I know what I&#8217;m doing and should tell others how its done. Video at bottom It&#8217;s funny how difficult coming up with a talk is when [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignright" style="width: 386px"><img class=" " title="Presenting" src="http://swizec.com/blog/wp-content/uploads/2012/01/5AVGVH1VUM5DXZFON5TXZN4EWVHI1EK5D5AMTZIUON1SQBHW1.jpg" alt="Presenting" width="376" height="504" /><p class="wp-caption-text">Presenting</p></div>
<p>Yesterday I gave a talk at <a class="zem_slink" title="Kiberpipa" href="http://maps.google.com/maps?ll=46.056184,14.503798&amp;spn=0.005,0.005&amp;q=46.056184,14.503798 (Kiberpipa)&amp;t=h" rel="geolocation">Kiberpipa</a> on the awesome <a href="https://twitter.com/#!/search?q=%23wwwh" target="_blank">#wwwh</a> weekly event. The talk was about this blog and how after <a title="Why programmers work at night" href="http://swizec.com/blog/why-programmers-work-at-night/swizec/3198">that one insanely popular post</a>everyone suddenly decided I know what I&#8217;m doing and should tell others how its done.</p>
<p><em style="font-size: 1.4em;">Video at bottom</em></p>
<p>It&#8217;s funny how difficult coming up with a talk is when somebody tweets you <em>Hey, you should totally come give a talk about blogging.</em> The problem with these kinds of talk is that you don&#8217;t really know what you&#8217;ll be trying to say. Every time you&#8217;re up there on stage you should have a message &#8211; something to convince the audience of.</p>
<p>Just giving a general talk <em>sucks</em> for that. It invariably turns into something a bit like this post &#8211; a rambling conglomerate of sentences that sort of go together. Always reminds me of that one line in a movie: <em>You talk a lot, but you don&#8217;t say much.</em></p>
<p>I guess the overall message of my talk was this:</p>
<p><em style="font-size: 1.3em;">Patience! It takes a lot of patience and sticking-to-it-ness, don&#8217;t do if it isn&#8217;t inherently fun for you.</em></p>
<p>Despite all of that I think the talk was a smashing success. Sure I forgot to even mention hats &#8211; was supposed to mention changing the blog&#8217;s name from Cthulhu and Other Crazies to A Geek With a Hat &#8230; oops? In general the talk ended up a bit rambley, even finished with &#8220;Wait, there was something else I wanted to say &#8230; oh well. Questions?&#8221;</p>
<p>That&#8217;s not a very strong ending. The originally planned ending was: <em>But hey, at least I&#8217;m no longer The Author on hackernews, but Swizec</em></p>
<p>All in all, rhetoric sucked, body language was attrocious, hands found their way into pockets several times, but people laughed a few times, asked a bunch of questions and I think everyone had fun. This one girl even asked for actual advice and I thank her for thinking I know enough to give advice about this stuff.</p>
<p>The slides for <a href="http://speakerdeck.com/u/swizec/p/blogging-hats-stuff" target="_blank">Blogging, hats, stuff</a> are over at Speakerdeck whose embeds don&#8217;t work with WordPress &#8230; there is also a video.</p>
<p><iframe src="http://kiberpipa.openlectures.net/SU_Swizec_Teller-Bloganje_klobuki/video/1/iframe/" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="100%" height="270px"></iframe></p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://brian.kingsonline.net/talk/2011/10/web-hour-zemanta-mozilla-success/">Web Hour + Zemanta + Mozilla = Success</a> (brian.kingsonline.net)</li>
<li class="zemanta-article-ul-li"><a href="http://r.zemanta.com/?u=http%3A//money.cnn.com/2012/01/13/technology/sal_khan_best_advice.fortune/index.htm&amp;a=71417522&amp;rid=d059e249-7cef-4f9a-9287-844dce83e91a&amp;e=23df49d4c5da66b3b023eda0ebdb9d56">Sal Khan: The best advice I ever got</a> (money.cnn.com)</li>
<li class="zemanta-article-ul-li"><a href="http://markos.gaivo.net/blog/?p=807">6th anniversary of wwwh</a> (markos.gaivo.net)</li>
<li class="zemanta-article-ul-li"><a href="http://doingthewritething.wordpress.com/2012/01/17/odd-like-us/">Odd Like Us</a> (doingthewritething.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.tablix.org/~avian/blog/archives/2012/01/video_of_my_433_mhz_receiver_talk/">Video of my 433 MHz receiver talk</a> (tablix.org)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=d059e249-7cef-4f9a-9287-844dce83e91a" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/dBFmcb_B2ro" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/blogging-hats-stuff/swizec/3483/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/blogging-hats-stuff/swizec/3483</feedburner:origLink></item>
		<item>
		<title>Are you a boy scout coder?</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/Nav-bzi8oAA/3471</link>
		<comments>http://swizec.com/blog/are-you-a-boy-scout-coder/swizec/3471#comments</comments>
		<pubDate>Tue, 17 Jan 2012 11:14:08 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Boy Scout]]></category>
		<category><![CDATA[Scout]]></category>
		<category><![CDATA[Source code]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3471</guid>
		<description><![CDATA[The Boy Scouts have a rule: &#8220;Always leave the campground cleaner than you found it.&#8221; If you find a mess on the ground, you clean it up regardless of who might have made the mess. /../ the original form by Robert Stephenson Smyth Baden-Powell, was &#8220;Try and leave this world a little better than you [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>The Boy Scouts have a rule: &#8220;Always leave the campground cleaner than you found it.&#8221; If you find a mess on the ground, you clean it up regardless of who might have made the mess. /../ the original form by Robert Stephenson Smyth Baden-Powell, was &#8220;Try and leave this world a little better than you found it.&#8221;</p>
<p>What if we followed a similar rule in our code: &#8220;Always check a module in cleaner than when you checked it out.&#8221; No matter who the original author was, what if we always made some effort, no matter how small, to improve the module. What would be the result?</p>
<p>by <a title="Uncle Bob" href="http://programmer.97things.oreilly.com/wiki/index.php/Uncle_Bob">Uncle Bob</a> at <a href="http://programmer.97things.oreilly.com/wiki/index.php/The_Boy_Scout_Rule">O&#8217;Reilly commons</a></p></blockquote>
<div class="wp-caption alignright" style="width: 281px"><a href="http://commons.wikipedia.org/wiki/File:Baden-Powell_family_%281917%29.jpg"><img class="zemanta-img-inserted zemanta-img-configured" title="Lieut. Gen. Robert Stephenson Smyth Baden-Powe..." src="http://swizec.com/blog/wp-content/uploads/2012/01/Baden-Powell_family_%281917%29.jpg" alt="Lieut. Gen. Robert Stephenson Smyth Baden-Powe..." width="271" height="296" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
<p>When I first saw this rule in Clean Code I loved it! It&#8217;s just such an awesome rule. You come into a file, you clean it up a little bit. Remove a stupid comment, indent something better &#8230; anything.</p>
<p>It makes the world a better place and everyone a happy camper right?</p>
<p>Well, this might be great in theory and work well when you are employed by a company where you will spend the next few years of your life. The software you&#8217;re working on will live and grow with you, with your team. <em>You</em> are the guy shouting &#8220;Fuck this! Who the fuck made this code! This is bloody impossible to maintain!&#8221; a year from now.</p>
<p>For a freelancer the situation is a bit different.</p>
<p>Here you are, plomped into the middle of an ongoing project. Decisions have been made, rabbit holes have been followed. The deadline is in a month and as a crack team of one specialist on a tight deadline, you&#8217;re making nice gold per hour.</p>
<p>Right there in front of you. A mess. Code so ugly, so horrible, it would make a grown man cry. You&#8217;re just supposed to add a feature. Figure out the mess, add two or three lines of code, cross your fingers and hope for the best.</p>
<p>Or should you rewrite the whole function?</p>
<p>Rewriting would be the Right Thing &#8482; to do. The code will be more maintainable, easier to test, it will save your client a bunch of money down the line. You won&#8217;t be maintaining this so you have a responsible towards everyone coming after you to fix something.</p>
<p>But, right now, right this very instance, you are strong-arming the poor client to pay more. Sure, you&#8217;re making the code better, but they care about that one feature. Should you really spend three hours rewriting the code instead of one hour adding something and hoping for the best?</p>
<p>On the other hand: When the messy code breaks, and it <em>will</em> break, it will be your fault. You&#8217;re the last guy who touched it. Not rewriting will come back to haunt you. The guy who maintains your code will curse you in their sleep and dream of delicious murder. And it&#8217;s not even your code!</p>
<p>So what do you do?</p>
<p>Personally I always try to rewrite crappy code. Add testing suites. Anything I can do to make the <a class="zem_slink" title="Codebase" href="http://en.wikipedia.org/wiki/Codebase" rel="wikipedia">codebase</a> better. But I always carefully explain the situation to my client. <em>Why</em> am I doing this, <em>how</em> is it benefiting <strong>the client</strong>. It&#8217;s important to make them understand I&#8217;m not just inventing work to rake in more gold.</p>
<p>Clients are surprisingly permissive most of the time and I can sleep better at night. win-win!</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.swaroopch.com/blog/coders-at-work/">Two nuggets from Coders at Work book</a> (swaroopch.com)</li>
<li class="zemanta-article-ul-li"><a href="http://majorknitter.typepad.com/major_knitter/2012/01/boy-scout-popcorn-for-the-troops.html">Boy Scout Popcorn for the Troops</a> (majorknitter.typepad.com)</li>
<li class="zemanta-article-ul-li"><a href="http://arstechnica.com/gaming/news/2012/01/maniac-tentacle-mindbenders-of-atlantis-how-scummvm-kept-adventure-gaming-alive.ars">Feature: Maniac Tentacle Mindbenders: How ScummVM&#8217;s unpaid coders kept adventure gaming alive</a> (arstechnica.com)</li>
<li class="zemanta-article-ul-li"><a href="http://developers.slashdot.org/story/12/01/14/008236/code-cleanup-culls-libreoffice-cruft">Code Cleanup Culls LibreOffice Cruft</a> (developers.slashdot.org)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=cd0845b8-94e0-47d9-ae15-be9f3afa1482" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/Nav-bzi8oAA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/are-you-a-boy-scout-coder/swizec/3471/feed</wfw:commentRss>
		<slash:comments>22</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/are-you-a-boy-scout-coder/swizec/3471</feedburner:origLink></item>
		<item>
		<title>Shoes</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/E2vacvy5-70/3466</link>
		<comments>http://swizec.com/blog/shoes/swizec/3466#comments</comments>
		<pubDate>Mon, 16 Jan 2012 17:41:46 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Athletic shoe]]></category>
		<category><![CDATA[Clothing]]></category>
		<category><![CDATA[Footwear]]></category>
		<category><![CDATA[Hiking boot]]></category>
		<category><![CDATA[Shoe]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3466</guid>
		<description><![CDATA[Shoes are wonderful technology, they protect our feet, they make us look good and there&#8217;s a whole culture associated with wearing those things. A culture I, as a man, will never understand. Apparently there is a million and one way to wear the wrong kind of shoes to the wrong kind of outfit. For instance, my [...]]]></description>
			<content:encoded><![CDATA[<p>Shoes are wonderful technology, they protect our feet, they make us look good and there&#8217;s a whole culture associated with wearing those things. A culture I, as a man, will <em>never</em> understand.</p>
<div class="wp-caption alignright" style="width: 377px"><img class=" " title="Shoes on their deathbed" src="http://swizec.com/blog/wp-content/uploads/2012/01/5764ba26406311e180c9123138016265_74.jpg" alt="Shoes on their deathbed" width="367" height="367" /><p class="wp-caption-text">Shoes on their deathbed</p></div>
<p>Apparently there is a million and one way to wear the wrong kind of shoes to the wrong kind of outfit. For instance, my scruffy shoes &#8230; don&#8217;t go with any outfit. Or so I&#8217;ve been told. I like to think they go with every outfit exactly <em>because</em> they&#8217;re scruffy and falling apart. Gives them a bit of character.</p>
<p>But, they are about to die, so I have to find a replacement this week. The thing I don&#8217;t understand is: Why do women need so many? A good pair of black leather sneakers covers pretty much every occasion.</p>
<ol>
<li>They&#8217;re comfy, so you can use them for walking to places</li>
<li>Because they&#8217;re black leather, they look nice when clean and can be used for business</li>
<li>Because they look kinda nice, they can be used for <a class="zem_slink" title="Semi-formal" href="http://en.wikipedia.org/wiki/Semi-formal" rel="wikipedia">semi-formal</a> stuff too. Anything that isn&#8217;t black- or white- tie really.</li>
<li>If you aren&#8217;t a sissy most sport can be done in them as well</li>
</ol>
<p>The only other pair of shoes you might need is a pair of <a class="zem_slink" title="Sandal" href="http://en.wikipedia.org/wiki/Sandal" rel="wikipedia">sandals</a>, if you&#8217;re too sissy to go barefoot at the beach in the summer. And while some advocate using a pair of <a class="zem_slink" title="Waterproofing" href="http://en.wikipedia.org/wiki/Waterproofing" rel="wikipedia">water-proof</a> shoes for special weather, you don&#8217;t actually need that. Shoes dry out over night and pretty much all types of shoe I&#8217;ve seen gets soaking wet the moment you start thinking of them as being water-proof.</p>
<p><a class="zem_slink" title="Wellington boot" href="http://en.wikipedia.org/wiki/Wellington_boot" rel="wikipedia">Rubber boots</a> old people use for gardening might be an exception, but those get soaking wet from the inside anyway, so what&#8217;s the point?</p>
<p>Last night I asked an internet about the need for multiple shoes and got a rather interesting answer from some girl:</p>
<blockquote><p>For me I think I have</p>
<p>3 pairs of heeled sandals (to wear with skirts, dresses, or summer clothes)<br />
2 pairs of flip flops<br />
4 pairs of black boots<br />
1 pair of grey boots (for when black doesn&#8217;t work with what I&#8217;m wearing)<br />
2 pairs of black heels (for dress or black dress pants, ones more business then the other)<br />
2 pairs of black low heeled shoes (business or going somewhere that might include walking)<br />
1 pair of tennis shoes<br />
1 pair of pink heels<br />
1 pair of cobalt blue heels<br />
1 pair of teal heels<br />
2 pairs of low heeled dance shoes<br />
2 pair of latin heeled dance shoes<br />
1 pair of jazz<br />
1 pair of highland<br />
1 pair of low heeled sandals</p>
<p>Those are the ones I can think of off hand.</p></blockquote>
<p>That&#8217;s just too many shoes! Where does she even keep them all? And who has time to buy all those things anyway? And the mental energy it takes to go out and look for shoes &#8230; women are truly insane.</p>
<p>An answer from the most well-dressed guy I know was far better in my view:</p>
<blockquote><p>In general, men don&#8217;t need too many shoes short of shoes needed for hobbies. I have two pairs of black shoes, two pairs of brown shoes, and a pair of evening shoes; the rest are activity-specific. Riding boots, hiking boots, dance shoes, boat shoes, cold/wet-climate hiking boots, and so on are only necessary for specific purposes.</p></blockquote>
<p>That makes sense, having shoes for specific purposes doesn&#8217;t really count as having another pair of shoes does it? I certainly wouldn&#8217;t think of listing my diving fins or rollerblades under &#8220;pairs of shoes&#8221; even though they are technically footwear &#8230;</p>
<p>Now excuse me while I go meditate on my misery of having to buy a new pair of shoes this week.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.fabsugar.com/Shop-Leopard-Print-Shoes-19318554">Fierce Obsession -15 Pairs of Irresistible Leopard-Print Shoes</a> (fabsugar.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.savingsjunction.com/the-2011-autumn-guide-to-good-value-and-in-style-shoes/">The 2011 Autumn Guide to Good Value and In Style Shoes</a> (savingsjunction.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.savings.com/blog/post/Wardrobe-Oxygen-Fall-Fashion-Footwear-Trends-Splurge-or-Save.html">Wardrobe Oxygen: Fall Fashion Footwear Trends &#8211; Splurge or Save?</a> (savings.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.fabsugar.com/Shoe-Buying-Tips-8512313">If the Shoe Fits</a> (fabsugar.com)</li>
<li class="zemanta-article-ul-li"><a href="http://anexerciseindiscipline.wordpress.com/2011/12/10/look-they-got-toes/">Look! They Got Toes!</a> (anexerciseindiscipline.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://autumnsunshineandgabrielleangel.wordpress.com/2011/10/01/shoes-in-my-closet-by-gabrielle-angel/">Shoes in my Closet&#8230;~By Gabrielle Angel</a> (autumnsunshineandgabrielleangel.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://ask.metafilter.com/205313/Which-Shoes-Were-Made-For-Walking">Which Shoes Were Made For Walking?</a> (ask.metafilter.com)</li>
<li class="zemanta-article-ul-li"><a href="http://fortyoneplease.wordpress.com/2012/01/15/giuseppe-zanotti-no-heel-crystal-studded-sandal/">Giuseppe Zanotti No Heel Crystal-Studded Sandal</a> (fortyoneplease.wordpress.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=8f0ffbb0-31f3-4acd-957e-2aba17284718" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/E2vacvy5-70" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/shoes/swizec/3466/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/shoes/swizec/3466</feedburner:origLink></item>
		<item>
		<title>Why you don’t exercise every day</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/-A1cGw62DM0/3456</link>
		<comments>http://swizec.com/blog/why-you-dont-exercise-every-day/swizec/3456#comments</comments>
		<pubDate>Sun, 15 Jan 2012 13:34:41 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Gym]]></category>
		<category><![CDATA[Motivation]]></category>
		<category><![CDATA[Physical exercise]]></category>
		<category><![CDATA[Richard Branson]]></category>
		<category><![CDATA[Tim Ferriss]]></category>
		<category><![CDATA[Timothy Ferriss]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3456</guid>
		<description><![CDATA[Because you are an idiot. But that&#8217;s harsh, so let me explain why this makes you an idiot. There was an article posted to HN yesterdayabout why people don&#8217;t go to the gym, it included a simple motivational technique of paying yourself to go. After commenting that the only thing it takes to go to [...]]]></description>
			<content:encoded><![CDATA[<p><em style="font-size: 1.2em;">Because you are an idiot.</em></p>
<div class="wp-caption alignright" style="width: 317px"><img class=" " title="Can you save a life?" src="http://swizec.com/blog/wp-content/uploads/2012/01/savelife22.png" alt="Can you save a life?" width="307" height="366" /><p class="wp-caption-text">Can you save a life?</p></div>
<p>But that&#8217;s harsh, so let me explain why this makes you an idiot. There was <a href="http://news.ycombinator.com/item?id=3464853" target="_blank">an article posted to HN yesterday</a>about why people don&#8217;t go to the gym, it included a simple motivational technique of paying yourself to go.</p>
<p>After commenting that the only thing it takes to go to the gym every day is <em>to go to the gym every day</em>, I was downvoted to oblivion. But there&#8217;s really nothing more to it than that. You can sugar coat it whichever way you want, you can come up with dozens of motivational techniques &#8211; in the end, all it takes is going.</p>
<p>Even if you don&#8217;t go to the gym every day, you should still make sure to exercise daily. Here&#8217;s how you do it:</p>
<ol>
<li>Day 1 &#8211; exercise when you wake up</li>
<li>Day 2 &#8211; exercise when you wake up</li>
<li>Day 3 &#8211; exercise when you wake up</li>
<li>Day 4 &#8211; eh you&#8217;ve exercised three days in a row, might as well do it again</li>
<li>Day N &#8211; do the default thing [of exercising]</li>
</ol>
<p>After a couple of days you have to make a conscius <em>effort</em> not to exercise. The default action is simply to exercise and as humans we love nothing more than not having to make a decision. This is also known as the <a href="http://theclosetentrepreneur.com/seinfelds-secret-motivational-technique" target="_blank">Seinfeld motivational technique</a> by the way.</p>
<p>Exercise also does a better job of waking you up than coffee, thought I&#8217;d mention that.</p>
<p>BUT!</p>
<h2>I don&#8217;t have time</h2>
<p><a class="zem_slink" title="Richard Branson" href="http://www.crunchbase.com/person/richard-branson" rel="crunchbase">Richard Branson</a> is one of the busiest humans alive, this is what he has to say about exercising daily:</p>
<blockquote><p><a class="zem_slink" title="Timothy Ferriss" href="http://www.fourhourworkweek.com/" rel="homepage">Tim Ferriss</a> tells this story about how Richard Branson was once asked the single biggest thing most people could do to increase productivity. Due to the fact that he&#8217;s one of the busiest men on the planet, every single person in the audience leaned forward with bated breath. His answer? Exercise daily. It improves the quality of your sleep, so you need less. It makes you more emotionally stable, so you&#8217;re more motivated. And most importantly, it increases mental clarity, so you&#8217;re more focused through-out the day. Branson said that it gives him multiple hours more productivity every day. It&#8217;s bull to say you don&#8217;t have enough time every day to exercise; if you&#8217;re that busy then in fact you don&#8217;t have enough time to NOT exercise.</p></blockquote>
<p>And if you&#8217;re anything like the average person who spends a bunch of time commuting, watching television and browsing the online &#8230; you have no right to complain about lack of time.</p>
<h2>It cuts into family time</h2>
<p>A popular complaint in the HN discussion was that exercise cuts into quality time with their families.</p>
<p>Sure &#8230; but one day your building will catch fire, or you&#8217;ll have a car crash, or _something_. Can you be there for your family when family time involves saving the people you love from death?</p>
<p>No, your flabby office worker muscles won&#8217;t cut it and that beer+pizza belly won&#8217;t help either. <a href="http://artofmanliness.com/2009/09/15/every-man-should-be-able-to-save-his-own-life-5-fitness-benchmarks-a-man-must-master/" target="_blank">Every man should be able to save his life</a>, and the lives of those he loves! Since this is the 21st century, women should too.</p>
<h2>Exercise is hard!</h2>
<p>Nobody cares. You&#8217;re fat, you&#8217;re flabby and you are useless in an emergency. Spending 30 minutes every day doing some basic exercises is <em>nothing</em> compared to the dividends it pays in pretty much all areas of your life.</p>
<p>And if you don&#8217;t care about any of that, then do it to make the world a prettier place, one flabby human at a time.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.lifehack.org/articles/productivity/how-to-supercharge-your-productivity-the-richard-branson-way.html">How to Supercharge your Productivity the Richard Branson Way</a> (lifehack.org)</li>
<li class="zemanta-article-ul-li"><a href="http://www.webmd.com/fitness-exercise/features/exercise-motivation?src=RSS_PUBLIC">Exercise Motivation: How to Get It, How to Keep It</a> (webmd.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.fitsugar.com/Low-Impact-Exercises-Morning-Workouts-19414062">5 Low-Impact Exercises to Jump-Start Your Day</a> (fitsugar.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.joyofspa.com/mind-body-exercise-and-emergence">Mind, Body, Exercise and Emergence</a> (joyofspa.com)</li>
<li class="zemanta-article-ul-li"><a href="http://nanapamela.wordpress.com/2012/01/14/some-call-it-cheating-i-call-it-staying-warm-and-dry/">Some call it cheating. I call it staying warm and dry</a> (nanapamela.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://coachcalvert.wordpress.com/2012/01/06/exercise-workshop/">Exercise workshop&#8230;</a> (coachcalvert.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://trainingdaily.runnersworld.com/2012/01/why-exercise-is-healthy-for-mice-at-least/">Why Exercise Is Healthy&#8230;for Mice, at Least</a> (trainingdaily.runnersworld.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=e93f614a-7984-4f7c-bf86-7653bd2218bd" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/-A1cGw62DM0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/why-you-dont-exercise-every-day/swizec/3456/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/why-you-dont-exercise-every-day/swizec/3456</feedburner:origLink></item>
		<item>
		<title>Geeks of america, please start fighting SOPA</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/oxBG-hhi5fM/3426</link>
		<comments>http://swizec.com/blog/geeks-of-america-please-start-fighting-sopa/swizec/3426#comments</comments>
		<pubDate>Thu, 12 Jan 2012 11:41:32 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Copyright]]></category>
		<category><![CDATA[Go Daddy]]></category>
		<category><![CDATA[GoDaddy]]></category>
		<category><![CDATA[Internet service provider]]></category>
		<category><![CDATA[Namecheap]]></category>
		<category><![CDATA[PayPal]]></category>
		<category><![CDATA[United States]]></category>
		<category><![CDATA[United States Department of Justice]]></category>
		<category><![CDATA[Wikipedia]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3426</guid>
		<description><![CDATA[The Stop Online Piracy Act is a bill in the US aimed at protecting intellectual property online. As originally proposed the bill would (skip to Something Useful if you know this stuff) /../ allow the U.S. Department of Justice, as well as copyright holders, to seek court orders against websites accused of enabling or facilitating copyright infringement. [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://en.wikipedia.org/wiki/SOPA" target="_blank">Stop Online Piracy Act</a> is a bill in the US aimed at protecting intellectual property online. As originally proposed the bill would <em>(skip to <a href="#something_useful">Something Useful</a> if you know this stuff)</em></p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:1891_New_Orleans_Italian_lynching.jpg"><img class="zemanta-img-inserted zemanta-img-configured" title="An episode of the lynching of the Italians in ..." src="http://swizec.com/blog/wp-content/uploads/2012/01/300px-1891_New_Orleans_Italian_lynching5.jpg" alt="An episode of the lynching of the Italians in ..." width="300" height="421" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
<blockquote><p>/../ allow the U.S. Department of Justice, as well as <strong>copyright holders</strong>, to seek <strong>court orders</strong> against websites accused of enabling or facilitating <strong>copyright infringement</strong>. Depending on who requests the court orders, the actions could include <strong>barring online advertising</strong> networks and <strong>payment facilitators</strong> such as PayPal from <strong>doing business</strong> with the <strong>allegedly infringing</strong> website, barring <strong>search engines from linking</strong> to such sites, and requiring <strong>Internet service providers</strong> to <strong>block access</strong> to such sites. The bill would make <strong>unauthorized streaming</strong> of copyrighted content <strong>a crime</strong>, with a maximum penalty of five years in prison for 10 pieces of music or movies within six months. The bill also <strong>gives immunity</strong> to Internet services that <strong>voluntarily take action</strong> against websites dedicated to infringement, while <strong>making liable</strong> for damages any <strong>copyright holder</strong> who knowingly <strong>misrepresents</strong> that a website is dedicated to infringement</p></blockquote>
<p>Not too bad, if you have a site dedicated to copyright infringement you pretty much get taken offline and put out of business. However, according to The Internet, it is extremely easy to fall under that definition. All it takes is a single piece of user generated content to be infringing and BAM! the whole website goes down.</p>
<p>You know all those videos of cute kittens with a copyrighted song in the background that you see on <a class="zem_slink" title="YouTube" href="http://www.youtube.com/" rel="homepage">YouTube</a>? Yeah, that means youtube.com is put out of business.</p>
<p>Oops.</p>
<p>As a European there isn&#8217;t really anything I can do about this. But <em>americans</em> can and should!</p>
<h2>The lynch mob</h2>
<div class="wp-caption alignleft" style="width: 310px"><a href="http://en.wikipedia.org/wiki/File:WillJamesMob.gif"><img class="zemanta-img-inserted zemanta-img-configured" title="The crowd at the lynching of Will James in Cai..." src="http://swizec.com/blog/wp-content/uploads/2012/01/300px-WillJamesMob4.gif" alt="The crowd at the lynching of Will James in Cai..." width="300" height="190" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
<p>The internet lynch mob has been mobilized. The angle of attack? Boycott supporters of SOPA. A month ago <a class="zem_slink" title="Go Daddy" href="http://www.godaddy.com/" rel="homepage">GoDaddy</a> suffered a mass exoddus of users and <a class="zem_slink" title="Namecheap" href="http://www.namecheap.com/" rel="homepage">Namecheap</a> turned it into one of the most brilliant marketing stunts I have ever seen.</p>
<p>Also GoDaddy has made surprising strides in their UI/UX design over the last month, more changes for the better and awesomer than I have seen in the last &#8230; five? Six? years.</p>
<p>On January 18th reddit.com is going into a blackout, briefly even Wikipedia considered blacking itself out. There is talk google.com and facebook.com will/should be doing the same. Isn&#8217;t that awesome? All these huge sites are against SOPA and are doing <em>something</em>.</p>
<p>Fighting against rich 50-somethings who don&#8217;t care about the internet beyond what their grandchildren tell them about cute kitten memes by disabling various parts of it? &#8230; yeah, very effective, you can only imagine!</p>
<p>So a few sites are blacked out, and on the next family gathering the congressperson will hear that their granddaughter was kind of upset for a day because she couldn&#8217;t feed an electronic sheep or something.</p>
<p>Even if traditional media manages to throw a big hullabaloo about it &#8230; what do you think a mexican standof between the government and the internet will look like? All these companies bleeding <em>millions of dollars</em> every single day, while the congresspeople play golf and chat about how awesome winter break was and plotting how to backstab all the big players next time &#8217;round.</p>
<p>By the time they have to be re-elected again the whole thing will have blown over and no damage will have been done. Well except for the big sites, who now have a bunch of influental people angry at them.</p>
<p><a name="something_useful"></a></p>
<h2>Do something useful instead</h2>
<p>Instead of being a tempest in a teacup, how about all you american geeks start <em>actually fighting</em> this thing eh? You should!</p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://en.wikipedia.org/wiki/File:Lobbying_Data.png"><img class="zemanta-img-inserted zemanta-img-configured" title="Direct lobbying statistics in the United State..." src="http://swizec.com/blog/wp-content/uploads/2012/01/300px-Lobbying_Data3.png" alt="Direct lobbying statistics in the United State..." width="300" height="184" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
<p>Here&#8217;s a small tip I got from a guy who was old enough to pay attention when geeks of Europe fought against software patents and won</p>
<ol>
<li>Go to Washington</li>
<li>Find names of congresspeople</li>
<li>Find out their habits</li>
<li>Crash their lunches, crash their breakfast, crash their golf game, crash every social event they have</li>
<li>Tell them SOPA sucks (perhaps in more eloquent words)</li>
</ol>
<p>The RIAA and MPAA are <em>doing this</em>. They are taking people out to lunches, they are telling them how awesome SOPA is, they are telling them how this will save the economy, their precious sportscar and how it will make everyone happy to give them even more money.</p>
<p>Geeks aren&#8217;t, at least not enough that anyone would know about it.</p>
<p>We can all agree the internet is an awesome and great communication tool. But <em>real</em> change, <em>real</em> influence &#8230; that happens face-to-face. So go out there and be face-to-face with the people who think the internet is a novelty.</p>
<p>Please, for everyone. Do it.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="https://www.pcworld.com/article/247037/why_arent_other_sopa_supporters_being_punished_like_godaddy.html">Why Aren&#8217;t Other SOPA Supporters Being Punished Like GoDaddy?</a> (pcworld.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.wired.com/threatlevel/2012/01/geeks-sopa/">Geeks to Testify (Finally!) About SOPA Blacklisting Implications</a> (wired.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.intomobile.com/2012/01/10/boycott-sopa-for-android-app-challenges-all-who-oppose/">Boycott SOPA for Android app challenges all who oppose</a> (intomobile.com)</li>
<li class="zemanta-article-ul-li"><a href="http://mashable.com/2011/12/23/breaking-godaddy-no-longer-supports-sopa/">BREAKING: GoDaddy No Longer Supports SOPA</a> (mashable.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.macworld.com/article/164512/2011/12/godaddy_pulls_its_support_from_sopa.html">GoDaddy pulls its support from SOPA</a> (macworld.com)</li>
<li class="zemanta-article-ul-li"><a href="http://arstechnica.com/tech-policy/news/2012/01/reddit-going-dark-for-a-day-to-protest-sopa-online-censorship-bill.ars">Reddit going dark for a day to protest SOPA online censorship bill</a> (arstechnica.com)</li>
<li class="zemanta-article-ul-li"><a href="http://danwin.com/2012/01/the-sopa-debate-and-how-its-affected-by-congresss-understanding-of-child-porn/">The SOPA Debate and Congress&#8217;s Understanding of Child Porn</a> (danwin.com)</li>
<li class="zemanta-article-ul-li"><a href="http://r.zemanta.com/?u=http%3A//www.cbsnews.com/8301-205_162-57348677/godaddy-stumbles-into-an-anti-sopa-brushfire/&amp;a=68314600&amp;rid=c0333579-3c54-45c4-afb8-e207bf955e27&amp;e=f8ac8c34d79d8415718f2c5c986a6d9b">GoDaddy stumbles into an anti-SOPA brushfire</a> (cbsnews.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.readwriteweb.com/archives/how_sopa_would_kill_art_creativity_online.php">How SOPA Would Kill Art &amp; Creativity Online</a> (readwriteweb.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=c0333579-3c54-45c4-afb8-e207bf955e27" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/oxBG-hhi5fM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/geeks-of-america-please-start-fighting-sopa/swizec/3426/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/geeks-of-america-please-start-fighting-sopa/swizec/3426</feedburner:origLink></item>
		<item>
		<title>Minimum substring cover problem</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/6Zu2QKVoXDQ/3406</link>
		<comments>http://swizec.com/blog/minimum-substring-cover-problem/swizec/3406#comments</comments>
		<pubDate>Wed, 11 Jan 2012 19:48:20 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Science Wednesday]]></category>
		<category><![CDATA[Algorithm]]></category>
		<category><![CDATA[Approximation algorithm]]></category>
		<category><![CDATA[Combinatorics]]></category>
		<category><![CDATA[Linear programming]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[NP-hard]]></category>
		<category><![CDATA[Substring]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3406</guid>
		<description><![CDATA[A major part of my thesisinvolves finding an algorithm to discover a good substring cover of text in order to properly syllabify said text. But what is the substring cover problem anyway and what does it entail? The Minimum Substring Cover Problem paper from Hermelin, Rawitz, Rizzi and Vialette dating back to 2007 (judging by [...]]]></description>
			<content:encoded><![CDATA[<p>A major part of <a href="https://github.com/Swizec/Le-Thesis">my thesis</a>involves finding an algorithm to discover a good substring cover of text in order to properly syllabify said text. But what is the substring cover problem anyway and what does it entail?</p>
<div class="wp-caption alignright" style="width: 223px"><a href="http://www.flickr.com/photos/94416001@N00/11259239"><img class="zemanta-img-inserted zemanta-img-configured" title="algorithms doodle" src="http://swizec.com/blog/wp-content/uploads/2012/01/11259239_fe6b60af02_m5.jpg" alt="algorithms doodle" width="213" height="240" /></a><p class="wp-caption-text">Image by Shreyans Bhansali via Flickr</p></div>
<p><a href="http://cs.haifa.ac.il/~dhermeli/Publications/WAOA2007.pdf" target="_blank">The Minimum Substring Cover Problem</a> paper from Hermelin, Rawitz, Rizzi and Vialette dating back to 2007 (judging by the filename) serves as a good entry point into this topic.</p>
<p>There are actually a lot of cover problems, the most famous being Minimum <a class="zem_slink" title="Set cover problem" href="http://en.wikipedia.org/wiki/Set_cover_problem" rel="wikipedia">Set Cover</a> and <a class="zem_slink" title="Vertex cover" href="http://en.wikipedia.org/wiki/Vertex_cover" rel="wikipedia">Minimum Vertex Cover</a> problems. In this type of problems we are faced with two sets of elements and we want to cover one of the sets with another, by using the &#8220;least&#8221; elements from the covering set. I put &#8220;least&#8221; in quotes because the definition depends on what we want &#8211; maybe we want to use the least number of elements, perhaps we want the shortest elements &#8230; whatever.</p>
<p>For an example consider this:</p>
<pre>S = ['a', 'aab', 'aba']
C(S) = ['a', 'b', 'aa', 'ab', 'ba', 'aab', 'aba']</pre>
<p>We can easily see that <em>C(S)</em> is a set of all the possible coverings of S &#8211; using a combination of strings from C we can construct every string in S. This part isn&#8217;t very difficult to calculate.</p>
<p>Everything gets slightly hairier when you look for minimum covers:</p>
<pre>C_1 = ['a', 'b']  # 3-cover (need 3 strings to cover the longest string in S)
C_2 = ['a', 'ab'] # 2-cover (need 2 strings to cover the longest string in S)</pre>
<p>Depending on how you choose the weight, both C_1 and C_2 are <em>minimum substring covers</em> of S. Considering &#8220;least&#8221; to mean <em> least amount of strings</em> then both are of weight 2, but if you consider &#8220;least&#8221; to mean <em>the total length of strings</em> then C_1 is better.</p>
<p>You could easily argue C_2 is better, because it uses the least amount of elements to cover the whole set S. 1+3+3 = 7 for C_1 and 1+2+2 = 5 for C_2.</p>
<p>Ok, so now we know that finding the minimum substring cover of a set of strings depends a whole lot on what you actually want. Always a good sign, having a well-known problem where people can&#8217;t even agree on what the best solution looks like.</p>
<p>The paper goes on to explain in great theoretical detail that, because this problem is similar to minimum vertex cover, minimum set cover and similar problems, it is <a class="zem_slink" title="NP-hard" href="http://en.wikipedia.org/wiki/NP-hard" rel="wikipedia">NP-hard</a> to approximate. This means that the problem is at least as hard as the hardest problems in NP, but it doesn&#8217;t necessarily mean that there is no polynomial solution &#8211; it just hasn&#8217;t been found yet.</p>
<p>Luckily, if we constrain some parameters of the problem, it becomes/remains <a class="zem_slink" title="APX" href="http://en.wikipedia.org/wiki/APX" rel="wikipedia">APX-hard</a> &#8211; <em>problems in this class have efficient algorithms that can find an answer within some fixed percentage of the optimal answer. </em></p>
<p>The article then proposes two <a class="zem_slink" title="Approximation algorithm" href="http://en.wikipedia.org/wiki/Approximation_algorithm" rel="wikipedia">approximation algorithms</a> for finding minimum substring covers of S.</p>
<h2>Local-Ratio Algorithms</h2>
<p>This algorithm follows from the local-ratio lemma, which in the case of substring cover means</p>
<blockquote><p>Let C be a cover for S, and let w_1 and w_2 be weight functions for C(S). If C is an alpha-approximate, both with respect to w_1 and with respect to w_2, then C is also alpha-approximate with respect to w_1+w_2.</p></blockquote>

<div class="wp_syntax"><div class="code"><pre class="pseudocode" style="font-family:monospace;">Data: A set of strings S, a weight function w:C(S) -&gt; Q+, an integer l &gt;= 2
Result: An l-cover C for S (l is the number of substrings covering the longest s in S)
begin
&nbsp;
C &lt;- {c in C(S) : w(c) = 0}.
if C is an l-cover of S then return C.
Let s in S be a string not l-covered by C of maximum length.
C_s &lt;- {c in C(S)\C : c is a substring of s}.
Set eps = min{w)(c_  c in C_s}.
Define w_1(c) = eps if c in C_s, 0 otherwise.
C &lt;- LR(S, w_2, l).
if C\{s} is an l-cover for S then C &lt;- C\{s}.
return C.
&nbsp;
end</pre></div></div>

<p>This algorithm is guaranteed to terminate after a polynomial amount of recursive calls and it returns a (((m+1) binomial 2) &#8211; 1)-approximate l-cover of S.</p>
<p>In sensible terms the algorithm basically does this: Add everything with zero weight to a partial solution, if this isn&#8217;t the solution, it selects an uncovered substring in S and tries to cover it by examining all substrings in C_s.</p>
<h2><a class="zem_slink" title="Linear programming" href="http://en.wikipedia.org/wiki/Linear_programming" rel="wikipedia">Linear Programming</a> Rounding</h2>
<p>Originally the linear programming rounding algorithm was developed by Hajiaghayi et all. for the Minimum Multicolored Subgraph problem when l=2. It has now been expanded for any constant value of l.</p>
<p>This section is extremely light on practical results and just shows a bunch of mathematics that supposedly prove how the algorithm can be extended and that the final result is an O(log^(1/l) n * m^((l/1)^2/l))-approximate algorithm.</p>
<p>From what I can understand this algorithm approaches the problem with the idea that they are basically looking for l-factorizations of strings.</p>
<p>According to this section, the minimum substring cover can be formulated using the following integer linear program:</p>
<pre>
min    SUM_(c in C(s)) w(c)x_c
s.t.   SUM_(f in F_l(s)) y_f >= 1          every s in S
       SUM_(c in f in F_l(s)) y_f <= x_c   every s in S, every c substring of s
       x_c, y_f in {0,1}                   every c in C(S), every f in F_l(S)

# F_l(S) is the set of all factorizations of S
</pre>
<p>Then there are a bunch of proofs that this algorithm works and is indeed very awesome ... but by this time my eyes started glazing over and the September deadline for my thesis started looking <em>very</em> near.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/7467186/apply-substring-on-values-in-linq">Apply substring on values in LINQ</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/8046107/objective-c-substring-range-exception">Objective-c Substring Range Exception</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/7904270/substr-and-explode-in-javascript">Substr and explode in JavaScript</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://spokutta.wordpress.com/2012/01/05/1311/">On linear programming formulations for the TSP polytope</a> (spokutta.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://ntz-develop.blogspot.com/2011/03/fuzzy-string-search.html">Fuzzy string search</a> (ntz-develop.blogspot.com)</li>
<li class="zemanta-article-ul-li"><a href="http://11011110.livejournal.com/238766.html">Top ten algorithms preprints of 2011</a> (11011110.livejournal.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/8456010/efficiently-replace-a-fixed-position-substring-with-a-string-of-equal-or-larger">Efficiently replace a fixed position substring with a string of equal or larger length</a> (stackoverflow.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=a0995159-d508-465f-9dd9-b53632d16b06" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/6Zu2QKVoXDQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/minimum-substring-cover-problem/swizec/3406/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/minimum-substring-cover-problem/swizec/3406</feedburner:origLink></item>
		<item>
		<title>The No brown M&amp;M’s rule</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/nTeOYxvkxqM/3390</link>
		<comments>http://swizec.com/blog/the-no-brown-mms-rule/swizec/3390#comments</comments>
		<pubDate>Tue, 10 Jan 2012 15:44:07 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Revision control]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Van Halen]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3390</guid>
		<description><![CDATA[There once was a band, let&#8217;s call them Van Halen, who had a very long and complex contract for venues. Partly because they were famous and venues would do anything to get them, partly because people could literally die. The contract was full of useful things like &#8220;The floor should support such and such weight&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>There once was a band, let&#8217;s call them <a class="zem_slink" title="Van Halen" href="http://www.van-halen.com" rel="homepage">Van Halen</a>, who had a very long and complex contract for venues. Partly because they were famous and venues would do anything to get them, partly because people could literally die.</p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:Van_Halen_-_Jump_2007-11-10.jpg"><img class="zemanta-img-inserted zemanta-img-configured" title="Van Halen performs their song &quot;Jump&quot;..." src="http://swizec.com/blog/wp-content/uploads/2012/01/300px-Van_Halen_-_Jump_2007-11-102.jpg" alt="Van Halen performs their song &quot;Jump&quot;..." width="300" height="225" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
<div class="mceTemp"></div>
<p>The contract was full of useful things like &#8220;The floor should support such and such weight&#8221; and &#8220;We need power outlets there and there and there [or our guitars won't work and you'll have a shitty show]&#8221;</p>
<p>In the middle of nowhere was a demand for <em>a bowl of M&amp;M&#8217;s backstage, without any brown pieces</em>.</p>
<p>An outlandish request, by flamboyant rockstars stretching their decadence? Not really, just a very good way to make sure the contract was followed to the letter and, you know, they&#8217;d survive the show. Find a brown piece &#8211; go check over the whole production. You <em>will</em> find something wrong.</p>
<p>With the current startup climate developers are the modern rockstars. We may not get all the groupies and we may be quite well behaved for the most part &#8211; but it&#8217;s time we started making fun outlandish requests don&#8217;t you think?</p>
<p>Designers are usually seen as the extravagant bit of the startup world, getting all the cool toys, working from rooms filled with inspiration and mojo &#8230; developers concern themselves much less with these things &#8211; give us a good set of monitors, free reign on our computer, some peace and quiet and we&#8217;ll be happy.</p>
<p>But when there are so many opportunities out there, you need a brown M&amp;M so you don&#8217;t end up wasting even a day at a company that doesn&#8217;t quite live up to expectations.</p>
<p>For me, the brown M&amp;M is <a class="zem_slink" title="Revision control" href="http://en.wikipedia.org/wiki/Revision_control" rel="wikipedia">version control</a>.</p>
<p>If a company isn&#8217;t using git or mercurial, I can be pretty certain there will be other problems as well. Everything from a shoddy codebase, to expecting my physical presence before my brain has had a chance to boot in the morning.</p>
<p>Usually the use of old-ish tools also correlates with a corporate feel to the company, which goes directly against <a href="http://swizec.com/blog/why-i-only-work-with-startups/swizec/2936">my rule of only working with [small] startups</a>. Plus it usually means I won&#8217;t be given freedom in choosing the best technology stack for the job, but will have something mandated from above.</p>
<p>I could probably go on, but you can imagine the rest. Use of <a class="zem_slink" title="Apache Subversion" href="http://subversion.apache.org/" rel="homepage">SVN</a> or, god forbid, nothing, is a deal breaker for me and it&#8217;s the symptom I can discover very early in the process &#8230; haven&#8217;t gone so far as putting it in the contract yet.</p>
<p>Do you use a brown M&amp;M technique to assess potential clients?</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.fourhourworkweek.com/blog/2012/01/01/no-brown-mms-david-lee-roth-and-the-power-of-checklists/">No Brown M&amp;M&#8217;s! David Lee Roth and the Power of Checklists</a> (fourhourworkweek.com)</li>
<li class="zemanta-article-ul-li"><a href="http://r.zemanta.com/?u=http%3A//www.guardian.co.uk/music/musicblog/2012/jan/04/valen-halen-david-lee-roth&amp;a=69445001&amp;rid=b1fa680b-accb-4c9c-9a28-6e4812ae6347&amp;e=f775e713b9d76aa8a86b40cca9fd4251">A classic interview with Van Halen</a> (guardian.co.uk)</li>
<li class="zemanta-article-ul-li"><a href="http://www.noisecreep.com/2011/11/30/van-halens-brown-M-Ms-rider-demand/">Van Halen&#8217;s &#8216;No Brown M&amp;Ms&#8217; Rider Demand Explained by Promoter</a> (noisecreep.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=b1fa680b-accb-4c9c-9a28-6e4812ae6347" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/nTeOYxvkxqM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/the-no-brown-mms-rule/swizec/3390/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/the-no-brown-mms-rule/swizec/3390</feedburner:origLink></item>
		<item>
		<title>Collatz, Haskell and Memoization</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/8glxtTMjPGQ/3382</link>
		<comments>http://swizec.com/blog/collatz-haskell-and-memoization/swizec/3382#comments</comments>
		<pubDate>Mon, 09 Jan 2012 11:43:22 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[collatzconjecture]]></category>
		<category><![CDATA[Haskell]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Memoization]]></category>
		<category><![CDATA[Number Theory]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Project Euler]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3382</guid>
		<description><![CDATA[After an awesome longboarding session yesterday afternoon I decided to play around with infinite sequences in Haskell &#8211; it&#8217;s supposed to be one of the more (most?) powerful features of Haskell &#8211; because it&#8217;s a lazy language apparently. My first impulse of creating a primes generator was nipped in the bud by a long page [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignright" style="width: 321px"><a href="http://xkcd.com/710/"><img title="xkcd collatz conjecture" src="http://swizec.com/blog/wp-content/uploads/2012/01/collatz_conjecture3.png" alt="xkcd collatz conjecture" width="311" height="452" /></a><p class="wp-caption-text">xkcd collatz conjecture</p></div>
<p>After an awesome <a class="zem_slink" title="Longboarding" href="http://en.wikipedia.org/wiki/Longboarding" rel="wikipedia">longboarding</a> session yesterday afternoon I decided to play around with <a class="zem_slink" title="Sequence" href="http://en.wikipedia.org/wiki/Sequence" rel="wikipedia">infinite sequences</a> in <a class="zem_slink" title="Haskell (programming language)" href="http://haskell.org" rel="homepage">Haskell</a> &#8211; it&#8217;s supposed to be one of the more (most?) powerful features of Haskell &#8211; because it&#8217;s a <a class="zem_slink" title="Evaluation strategy" href="http://en.wikipedia.org/wiki/Evaluation_strategy" rel="wikipedia">lazy language</a> apparently.</p>
<p>My first impulse of creating a primes generator was nipped in the bud by a long page of <a href="http://www.haskell.org/haskellwiki/Prime_numbers" target="_blank">prime number generators in Haskell</a>. Scary, complex, mindboggling.</p>
<p><a class="zem_slink" title="Project Euler" href="http://projecteuler.net/" rel="homepage">Project Euler</a> posed a much better challenge: <em>Which starting number, under one million, produces the longest collatz chain?</em></p>
<p>The solution I came up with was a simple brute force generator of infinitely many collatz sequences. Then I would take the first 1,000,000 find the maximum and that&#8217;s that.</p>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;">collatz <span style="color: #339933; font-weight: bold;">::</span> <span style="color: #cccc00; font-weight: bold;">Integer</span> <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: green;">&#91;</span><span style="color: #cccc00; font-weight: bold;">Integer</span><span style="color: green;">&#93;</span>
collatz <span style="color: red;">1</span> <span style="color: #339933; font-weight: bold;">=</span> <span style="color: green;">&#91;</span><span style="color: green;">&#93;</span>
collatz n
    <span style="color: #339933; font-weight: bold;">|</span> <span style="font-weight: bold;">odd</span> n <span style="color: #339933; font-weight: bold;">=</span> <span style="color: red;">3</span><span style="color: #339933; font-weight: bold;">*</span>n<span style="color: #339933; font-weight: bold;">+</span><span style="color: red;">1</span>:collatz<span style="color: green;">&#40;</span><span style="color: red;">3</span><span style="color: #339933; font-weight: bold;">*</span>n<span style="color: #339933; font-weight: bold;">+</span><span style="color: red;">1</span><span style="color: green;">&#41;</span>
    <span style="color: #339933; font-weight: bold;">|</span> <span style="font-weight: bold;">even</span> n <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">div</span> n <span style="color: red;">2</span>:collatz<span style="color: green;">&#40;</span><span style="font-weight: bold;">div</span> n <span style="color: red;">2</span><span style="color: green;">&#41;</span>
&nbsp;
chains <span style="color: #339933; font-weight: bold;">=</span> <span style="color: green;">&#91;</span>collatz x <span style="color: #339933; font-weight: bold;">|</span> x <span style="color: #339933; font-weight: bold;">&lt;-</span> <span style="color: green;">&#91;</span><span style="color: red;">1</span><span style="color: #339933; font-weight: bold;">..</span><span style="color: green;">&#93;</span><span style="color: green;">&#93;</span></pre></div></div>

<p>Didn&#8217;t help.</p>
<p>So I started looking for the maximum a bit differently &#8211; take all the sequences, sort them by length and take the last one.</p>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;">longest <span style="font-weight: bold;">max</span> <span style="color: #339933; font-weight: bold;">=</span>
  <span style="font-weight: bold;">last</span> <span style="color: #339933; font-weight: bold;">$</span> sortBy <span style="color: green;">&#40;</span>comparing <span style="font-weight: bold;">snd</span><span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">$</span> <span style="font-weight: bold;">zip</span> <span style="color: green;">&#91;</span><span style="color: red;">1</span><span style="color: #339933; font-weight: bold;">..</span><span style="color: green;">&#93;</span> <span style="color: #339933; font-weight: bold;">$</span> <span style="font-weight: bold;">map</span> <span style="font-weight: bold;">length</span> <span style="color: #339933; font-weight: bold;">$</span> <span style="font-weight: bold;">take</span> <span style="font-weight: bold;">max</span> chains</pre></div></div>

<p>Great! It worked! But it takes ~26 seconds!</p>
<p>Well sorting maybe isn&#8217;t the best idea ever, so let&#8217;s try creating a list of sequences where the list&#8217;s tail only contains those sequences that are longer than the head. A sprinkle of dropWhile and it was done.</p>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;">longest' <span style="color: green;">&#40;</span>max<span style="color: #339933; font-weight: bold;">_</span>i<span style="color: #339933; font-weight: bold;">,</span> max<span style="color: #339933; font-weight: bold;">_</span>l<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">=</span>
  <span style="color: #06c; font-weight: bold;">let</span> l <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">head</span> <span style="color: #339933; font-weight: bold;">$</span> <span style="font-weight: bold;">dropWhile</span> <span style="color: green;">&#40;</span>\<span style="color: green;">&#40;</span>i<span style="color: #339933; font-weight: bold;">,</span>l<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">-&gt;</span> l <span style="color: #339933; font-weight: bold;">&lt;=</span> max<span style="color: #339933; font-weight: bold;">_</span>l<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">$</span> <span style="font-weight: bold;">zip</span> <span style="color: green;">&#91;</span>max<span style="color: #339933; font-weight: bold;">_</span>i<span style="color: #339933; font-weight: bold;">..</span><span style="color: green;">&#93;</span> <span style="color: #339933; font-weight: bold;">$</span> <span style="font-weight: bold;">map</span> <span style="font-weight: bold;">length</span> <span style="color: #339933; font-weight: bold;">$</span> chains' max<span style="color: #339933; font-weight: bold;">_</span>i
  <span style="color: #06c; font-weight: bold;">in</span> l:longest' l</pre></div></div>

<p>~25 seconds!</p>
<p>That&#8217;s odd &#8230; even odder still is running both algorithms one after another only takes 33 seconds. Huh?</p>
<p>It would seem I&#8217;m using <a class="zem_slink" title="Memoization" href="http://en.wikipedia.org/wiki/Memoization" rel="wikipedia">memoization</a> incorrectly. I&#8217;ve heard it performs funny in recursive functions. The theory I formulated last night was that because haskell was lazy each execution chain was constructed to its end and the intermittent memoized values never got used until the whole function was called again.</p>
<p>Looking at the code samples this morning, though, I discovered this:</p>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;">collatz <span style="color: #339933; font-weight: bold;">::</span> <span style="color: #cccc00; font-weight: bold;">Integer</span> <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: green;">&#91;</span><span style="color: #cccc00; font-weight: bold;">Integer</span><span style="color: green;">&#93;</span>
collatz <span style="color: #339933; font-weight: bold;">=</span> memoize col <span style="color: #06c; font-weight: bold;">where</span>
  col <span style="color: red;">1</span> <span style="color: #339933; font-weight: bold;">=</span> <span style="color: green;">&#91;</span><span style="color: green;">&#93;</span>
  col n
    <span style="color: #339933; font-weight: bold;">|</span> <span style="font-weight: bold;">odd</span> n <span style="color: #339933; font-weight: bold;">=</span> <span style="color: red;">3</span><span style="color: #339933; font-weight: bold;">*</span>n<span style="color: #339933; font-weight: bold;">+</span><span style="color: red;">1</span>:collatz<span style="color: green;">&#40;</span><span style="color: red;">3</span><span style="color: #339933; font-weight: bold;">*</span>n<span style="color: #339933; font-weight: bold;">+</span><span style="color: red;">1</span><span style="color: green;">&#41;</span>
    <span style="color: #339933; font-weight: bold;">|</span> <span style="font-weight: bold;">even</span> n <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">div</span> n <span style="color: red;">2</span>:collatz<span style="color: green;">&#40;</span><span style="font-weight: bold;">div</span> n <span style="color: red;">2</span><span style="color: green;">&#41;</span></pre></div></div>

<p>As you can see, I don&#8217;t call the memoized function internally. Just goes to show what a night&#8217;s sleep can do to one&#8217;s coding abilities. I bashed my head against this problem for four hours yesterday and I never noticed I was recursing to the wrong function!</p>
<p>Interestingly enough, fixing that makes the algorithm spaz out and die after 16 seconds. The only output I get is &#8220;Killed&#8221;. Curious.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://mrhonner.com/2011/11/18/graphing-the-collatz-conjecture/">Graphing the Collatz Conjecture</a> (mrhonner.com)</li>
<li class="zemanta-article-ul-li"><a href="http://existentialtype.wordpress.com/2011/04/24/the-real-point-of-laziness/">The Point of Laziness in Programing Languages</a> (existentialtype.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://swizec.com/blog/learning-me-a-haskell/swizec/3272">Learning me a Haskell</a> (swizec.com)</li>
<li class="zemanta-article-ul-li"><a href="http://geeklogs.posterous.com/what-is-memoization">Memoization explained using a python implementation of fibonacci</a> (geeklogs.posterous.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=6f7c0838-57e3-4b8a-a0c3-3ef0dc670559" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/8glxtTMjPGQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/collatz-haskell-and-memoization/swizec/3382/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/collatz-haskell-and-memoization/swizec/3382</feedburner:origLink></item>
		<item>
		<title>A message from your future self</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/gGDZg77ZRT8/3377</link>
		<comments>http://swizec.com/blog/a-message-from-your-future-self/swizec/3377#comments</comments>
		<pubDate>Fri, 06 Jan 2012 12:00:02 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Functional programming]]></category>
		<category><![CDATA[Haskell]]></category>
		<category><![CDATA[Implementations]]></category>
		<category><![CDATA[Moving average]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3377</guid>
		<description><![CDATA[About two weeks ago I watched a TED talk on the battle between one&#8217;s present and future self. The idea being that a lot of our problems can be summed up to this: Your present self is here, he wants cool things, your future self is greatly affected by these decisions, but he can&#8217;t do [...]]]></description>
			<content:encoded><![CDATA[<p>About two weeks ago I watched a TED talk on the battle between one&#8217;s present and future self. The idea being that a lot of our problems can be summed up to this: Your present self is here, he wants cool things, your future self is greatly affected by these decisions, but he can&#8217;t do anything about it.</p>
<p><object width="526" height="374" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="wmode" value="transparent" /><param name="bgColor" value="#ffffff" /><param name="flashvars" value="vu=http://video.ted.com/talk/stream/2011S/Blank/DanielGoldstein_2011S-320k.mp4&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/DanielGoldstein_2011S-embed.jpg&amp;vw=512&amp;vh=288&amp;ap=0&amp;ti=1310&amp;lang=&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=daniel_goldstein_the_battle_between_your_present_and_fu;year=2011;theme=how_the_mind_works;theme=what_makes_us_happy;event=TEDSalon+NY2011;tag=Behavioral+Economics;tag=Business;tag=Culture;tag=economics;tag=finance;tag=self;&amp;preAdTag=tconf.ted/embed;tile=1;sz=512x288;" /><param name="src" value="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" /><param name="pluginspace" value="http://www.macromedia.com/go/getflashplayer" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><embed width="526" height="374" type="application/x-shockwave-flash" src="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" allowFullScreen="true" allowScriptAccess="always" wmode="transparent" bgColor="#ffffff" flashvars="vu=http://video.ted.com/talk/stream/2011S/Blank/DanielGoldstein_2011S-320k.mp4&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/DanielGoldstein_2011S-embed.jpg&amp;vw=512&amp;vh=288&amp;ap=0&amp;ti=1310&amp;lang=&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=daniel_goldstein_the_battle_between_your_present_and_fu;year=2011;theme=how_the_mind_works;theme=what_makes_us_happy;event=TEDSalon+NY2011;tag=Behavioral+Economics;tag=Business;tag=Culture;tag=economics;tag=finance;tag=self;&amp;preAdTag=tconf.ted/embed;tile=1;sz=512x288;" pluginspace="http://www.macromedia.com/go/getflashplayer" allowfullscreen="true" allowscriptaccess="always" /></object></p>
<p>Over the holidays I gave Future Swizec a voice. Every three days he sends me an email to tell me what sort of financial situation he will find himself in after two weeks of Present Swizec doing stupid shit. That&#8217;s not very far into the future, but it&#8217;s just enough to do something about it, while not being too far away to think <em>Meh, that&#8217;s in ten years, I&#8217;ll deal with it nine years from now.</em></p>
<p>If you want to give Future You this kind of voice have a look at my <a href="https://github.com/Swizec/Personal-Runway" target="_blank">Personal Runway project on github</a>. If you think this is a cool idea, but don&#8217;t want to set it up yourself &#8211; email me! I might just make this <a class="zem_slink" title="Proof of concept" href="http://en.wikipedia.org/wiki/Proof_of_concept" rel="wikipedia">proof of concept</a> into a minimum viable product if there is any interest <img src='http://swizec.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I first ran it when I had just finished paying all my bills, which was a huge expense, so Future Swizec sent me this email:</p>
<div id="attachment_3379" class="wp-caption alignnone" style="width: 587px"><a href="http://swizec.com/blog/wp-content/uploads/2012/01/Selection_047.png"><img class="wp-image-3379 " title="Future Swizec" src="http://swizec.com/blog/wp-content/uploads/2012/01/Selection_047.png" alt="Future Swizec" width="577" height="302" /></a><p class="wp-caption-text">Future Swizec</p></div>
<p>Maybe he should be less happy about only having 5euro, but right now he&#8217;s super every time his balance isn&#8217;t negative. Perhaps Future Swizec needs a gray area.</p>
<h2>How it works</h2>
<p>Right now the predictions are somewhat rudimentary, for instance I don&#8217;t take into account the fact money doesn&#8217;t magically show up in my account after every billable hour. Another thing not taken into account are periodic expenses, super large spikes also throw it off somewhat.</p>
<p>The basic idea is this:</p>
<ol>
<li>Smooth out the data with a <a class="zem_slink" title="Moving average" href="http://en.wikipedia.org/wiki/Moving_average" rel="wikipedia">rolling average</a> to get a curve</li>
<li>Calculate an <a class="zem_slink" title="Expected value" href="http://en.wikipedia.org/wiki/Expected_value" rel="wikipedia">expected value</a> for the next day after known data</li>
<li>Expand the window for expected value by two (one into the future, one into the past) and calculate the next expected value</li>
</ol>
<p>Weights are calculated according to the simplest <a class="zem_slink" title="Series (mathematics)" href="http://en.wikipedia.org/wiki/Series_%28mathematics%29" rel="wikipedia">infinite series</a> I could think of that always sums to one no matter how many elements are needed. But I also split it in half and shuffle it about at the pivot, so the strongest weight is moved back in the data when calculating days. So in a sense, when calculating the 1st unknown value, the last known has highest weight. Then the penultimate known and so forth.</p>
<p>The algorithm is pretty simple in <a class="zem_slink" title="Haskell (programming language)" href="http://haskell.org" rel="homepage">Haskell</a></p>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;">&nbsp;
<span style="color: #5d478b; font-style: italic;">-- ((n-i)*2)/((n-1)*n)</span>
weights <span style="color: #339933; font-weight: bold;">::</span> <span style="color: green;">&#40;</span><span style="color: #cccc00; font-weight: bold;">Num</span> b<span style="color: #339933; font-weight: bold;">,</span> <span style="color: #cccc00; font-weight: bold;">Fractional</span> b<span style="color: #339933; font-weight: bold;">,</span> <span style="color: #cccc00; font-weight: bold;">Enum</span> b<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">=&gt;</span> b <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: green;">&#91;</span>b<span style="color: green;">&#93;</span>
weights n <span style="color: #339933; font-weight: bold;">=</span>
  <span style="font-weight: bold;">map</span> <span style="color: green;">&#40;</span>\i <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: green;">&#40;</span><span style="color: green;">&#40;</span>n<span style="color: #339933; font-weight: bold;">-</span>i<span style="color: green;">&#41;</span><span style="color: #339933; font-weight: bold;">*</span><span style="color: red;">2</span><span style="color: green;">&#41;</span><span style="color: #339933; font-weight: bold;">/</span><span style="color: green;">&#40;</span><span style="color: green;">&#40;</span>n<span style="color: #339933; font-weight: bold;">-</span><span style="color: red;">1</span><span style="color: green;">&#41;</span><span style="color: #339933; font-weight: bold;">*</span>n<span style="color: green;">&#41;</span><span style="color: green;">&#41;</span> <span style="color: green;">&#91;</span><span style="color: red;">1.0</span><span style="color: #339933; font-weight: bold;">..</span>n<span style="color: green;">&#93;</span>
&nbsp;
rotate <span style="color: #339933; font-weight: bold;">::</span> <span style="color: #cccc00; font-weight: bold;">Int</span> <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: green;">&#91;</span>a<span style="color: green;">&#93;</span> <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: green;">&#91;</span>a<span style="color: green;">&#93;</span>
rotate n l <span style="color: #339933; font-weight: bold;">=</span> t<span style="color: #339933; font-weight: bold;">++</span>h
  <span style="color: #06c; font-weight: bold;">where</span> <span style="color: green;">&#40;</span>h<span style="color: #339933; font-weight: bold;">,</span>t<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">splitAt</span> <span style="color: green;">&#40;</span><span style="color: green;">&#40;</span><span style="font-weight: bold;">length</span> l<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">-</span> n<span style="color: green;">&#41;</span> l
&nbsp;
expected <span style="color: #339933; font-weight: bold;">::</span> <span style="color: green;">&#40;</span><span style="color: #cccc00; font-weight: bold;">Fractional</span> a<span style="color: #339933; font-weight: bold;">,</span> <span style="color: #cccc00; font-weight: bold;">Enum</span> a<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">=&gt;</span> <span style="color: #cccc00; font-weight: bold;">Int</span> <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: green;">&#91;</span>a<span style="color: green;">&#93;</span> <span style="color: #339933; font-weight: bold;">-&gt;</span> a
expected pivot xs <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">sum</span> <span style="color: #339933; font-weight: bold;">$</span> <span style="font-weight: bold;">map</span> <span style="color: green;">&#40;</span>\<span style="color: green;">&#40;</span>w<span style="color: #339933; font-weight: bold;">,</span>v<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">-&gt;</span> w<span style="color: #339933; font-weight: bold;">*</span>v<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">$</span> <span style="font-weight: bold;">zip</span> <span style="color: green;">&#40;</span>rotate pivot <span style="color: green;">&#40;</span>weights <span style="color: #339933; font-weight: bold;">$</span> <span style="font-weight: bold;">fromIntegral</span> <span style="color: #339933; font-weight: bold;">$</span> <span style="font-weight: bold;">length</span> xs<span style="color: green;">&#41;</span><span style="color: green;">&#41;</span> xs</pre></div></div>

<p>Of course someone who actually knows Haskell would write it much better.</p>
<p>And there you have it, a simple way to talk with Future Swizec. There is still some tweaking to do and hopefully I can find more people to run this on and see how it works out for them as well.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.roadrunnerrecords.com/blabbermouth.net/news.aspx?mode=Article&amp;newsitemID=167732">DEVIN TOWNSEND: &#8216;I&#8217;m More On Autopilot Than Ever Before Now&#8217;</a> (roadrunnerrecords.com)</li>
<li class="zemanta-article-ul-li"><a href="http://swizec.com/blog/sabbatical-week-day-3-raining-datatypes/swizec/3293">Sabbatical week day 3: Raining datatypes</a> (swizec.com)</li>
<li class="zemanta-article-ul-li"><a href="http://news.ycombinator.com/item?id=3428195">Ask HN: What&#8217;s your experience with remote working? as employees/employers?</a> (news.ycombinator.com)</li>
<li class="zemanta-article-ul-li"><a href="http://swizec.com/blog/making-a-mobius-cake/ponywithhiccups/2737">Making a Möbius cake</a> (swizec.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/8664411/haskell-the-last-statement-in-a-do-construct-must-be-an-expression">Haskell : &#8220;The last statement in a &#8216;do&#8217; construct must be an expression&#8221;</a> (stackoverflow.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=44227b78-3df1-44c8-9c91-6dde805ece94" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/gGDZg77ZRT8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/a-message-from-your-future-self/swizec/3377/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/a-message-from-your-future-self/swizec/3377</feedburner:origLink></item>
		<item>
		<title>Programmers are born not made</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/PwqoR8i5taA/3369</link>
		<comments>http://swizec.com/blog/programmers-are-born-not-made/swizec/3369#comments</comments>
		<pubDate>Thu, 05 Jan 2012 15:51:38 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Opinion]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=3369</guid>
		<description><![CDATA[Programmers are a special breed, good programmers especially &#8211; our craft is more an art than we like to admit when trying to wrestle it into a Hard Engineering Discipline &#8482;. It&#8217;s actually more like mathematics, music or the wizardry Kaylee does in Firefly. Good programmers have a special feel, a talent that is difficult [...]]]></description>
			<content:encoded><![CDATA[<p>Programmers are a special breed, <em>good</em> <a class="zem_slink" title="Programmer" href="http://en.wikipedia.org/wiki/Programmer" rel="wikipedia">programmers</a> especially &#8211; our craft is more an art than we like to admit when trying to wrestle it into a Hard Engineering Discipline &#8482;. It&#8217;s actually more like mathematics, music or the wizardry Kaylee does in <a class="zem_slink" title="Firefly (TV series)" href="http://en.wikipedia.org/wiki/Firefly_%28TV_series%29" rel="wikipedia">Firefly</a>.</p>
<div class="wp-caption alignright" style="width: 230px"><a href="http://en.wikipedia.org/wiki/File:Passion_cover.jpg"><img class="zemanta-img-inserted zemanta-img-configured" title="Passion (novel)" src="http://swizec.com/blog/wp-content/uploads/2012/01/Passion_cover3.jpg" alt="Passion (novel)" width="220" height="333" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
<p>Good programmers have a special feel, a talent that is difficult to explain and even harder to attain.</p>
<p>A few weeks ago <a href="https://twitter.com/#!/zidarsk8" target="_blank">@zidarsk8</a> came rushing to me <em>&#8220;Dude! There&#8217;s this guy! I&#8217;ve been teaching him coding! He&#8217;s already better than me! Hasn&#8217;t even heard of a variable before a month ago! It&#8217;s so frikkin&#8217; awesome!&#8221;</em></p>
<p>He made me promise to blog about it. Why is it some people just <em>get</em> it? What&#8217;s so special about them? Can anybody be taught to program or does it really take a special breed to become even a competent programmer, let alone a good one?</p>
<p>I remember tutoring a high school kid about a year ago. About to fail his <a class="zem_slink" title="Computer programming" href="http://en.wikipedia.org/wiki/Computer_programming" rel="wikipedia">programming</a> class (CE high school, we have those), he came running to me. In a month I was to teach him everything I know, or at least enough to pass the class.</p>
<p>Come end of the month and he knew everything about loops, variable assignment, even understood that functions are packets of code that can do stuff. My parting words to his father were <em>&#8220;Yeah, he knows everything. Just needs a bit of practice to get it.&#8221;</em></p>
<p>I doubt he ever passed the class. Or if he did it was the teacher&#8217;s mercy &#8230; and that teacher isn&#8217;t very merciful from what I remember of her in my high school times.</p>
<div class="mceTemp"></div>
<p>But this isn&#8217;t just because I&#8217;m a bad teacher &#8211; others came to me after that one kid on his recommendation and I got a <em>&#8220;Thank you! I bloody passed! yay!&#8221;</em> email from all of them &#8211; there are people who simply aren&#8217;t programmers. Never <em>will</em> be programmers. Not even mediocre ones.</p>
<h2>The non-programming sheep</h2>
<p><a class="zem_slink" title="Jeff Atwood" href="http://www.codinghorror.com/" rel="homepage">Jeff Atwood</a> wrote about <em><a href="http://www.codinghorror.com/blog/2006/07/separating-programming-sheep-from-non-programming-goats.html" target="_blank">Separating Programming Sheep from Non-Programming Goats</a></em>in 2006 where he mentions a study that claims to have found a test to predict future programming ability.</p>
<div class="mceTemp"></div>
<p>The test is really simple:</p>
<pre>a = 5
b = 20
a = b

What are a and be now?</pre>
<p>And some more questions like that. Only <strong>44%</strong> of the students formed a consistent <a class="zem_slink" title="Mental model" href="http://en.wikipedia.org/wiki/Mental_model" rel="wikipedia">mental model</a> of assignment &#8211; even a wrong one. The rest failed or didn&#8217;t answer the questions.</p>
<p>Worse still, after a semester of learning to program, the numbers were the same. Only 44% of the students understood how assignment works.</p>
<p>Some people just dont <em>get</em> it. Apparently.</p>
<p>But I think there&#8217;s an even simpler test -&gt;</p>
<h2>Passion.</h2>
<div class="wp-caption alignleft" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:Sheep.jpg"><img class="zemanta-img-inserted zemanta-img-configured" title="Sheep" src="http://swizec.com/blog/wp-content/uploads/2012/01/300px-Sheep1.jpg" alt="Sheep" width="300" height="233" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
<p>Sometimes when you give an impressionable young mind (anybody deciding to learn to code, age is irrelevant) two tools and a problem, they will use the two tools to create four more tools. Then they will get on the internets and find some more tools &#8230; soon they have twenty tools and what was the problem you wanted me to solve again?</p>
<p>That&#8217;s passion!</p>
<p>Pure unadulterated passion for programming. When you can be fascinated, even excited, about this stuff without a need to solve a problem. Hell, even if you <em>are</em> solving a problem that you know is a meaningless exercise &#8230; that&#8217;s where greatness lies.</p>
<p>It doesn&#8217;t matter what age you started coding at &#8211; many studies have shown experience is not a predictor of quality in our world &#8211; what matters is that you have a passion for this stuff.</p>
<p>Because if you&#8217;ve got the passion, then you probably have everything else you need as well.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://swizec.com/blog/programmers-are-fucking-lazy/swizec/2648">Programmers are fucking lazy</a> (swizec.com)</li>
<li class="zemanta-article-ul-li"><a href="http://bob-roberts.net/2012/01/01/becoming-a-better-developer/">Becoming a better Developer</a> (bob-roberts.net)</li>
<li class="zemanta-article-ul-li"><a href="http://jaredcosulich.wordpress.com/2011/12/11/programmer-the-best-profession/">Programmer &#8211; The Best Professsion?</a> (jaredcosulich.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://bob-roberts.net/2011/11/06/whats-in-a-name-programmer-or-developer/">What&#8217;s in a name? Programmer or Developer</a> (bob-roberts.net)</li>
<li class="zemanta-article-ul-li"><a href="http://news.ycombinator.com/item?id=3032943">Today a programmer was born. And you are my mother.</a> (news.ycombinator.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=8bbc9c9d-90c1-4e04-9492-66f28a485b8b" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/PwqoR8i5taA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/programmers-are-born-not-made/swizec/3369/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/programmers-are-born-not-made/swizec/3369</feedburner:origLink></item>
	</channel>
</rss><!-- Served from: swizec.com @ 2012-02-20 13:04:34 by W3 Total Cache -->

