<?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>Wed, 19 Jun 2013 12:33:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<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>Peeshkot – cookie warnings, go away!</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/U6y_dilKc4A/6242</link>
		<comments>http://swizec.com/blog/peeshkot-cookie-warnings-go-away/swizec/6242#comments</comments>
		<pubDate>Wed, 19 Jun 2013 12:33:52 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[PetProjects]]></category>
		<category><![CDATA[Cookie]]></category>
		<category><![CDATA[European Union]]></category>
		<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[HTTP cookie]]></category>
		<category><![CDATA[Slovenia]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6242</guid>
		<description><![CDATA[While the NSA has been spying on our every move for years, recording hundreds of private phone calls in the US and archiving &#8220;virtually all internet usage, everywhere&#8221; the European Union passed a directive in 2009 about internet cookies. Until 2011 all member states were required to pass laws saying that when websites use cookies...  <a href="http://swizec.com/blog/peeshkot-cookie-warnings-go-away/swizec/6242" class="more-link" title="Read Peeshkot &#8211; cookie warnings, go away!">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<img src="https://www.filepicker.io/api/file/nUpYuoErSieYKXEEti7b" alt="" />
<p>While the <a class="zem_slink" title="National Security Agency" href="http://maps.google.com/maps?ll=39.109,-76.77&amp;spn=0.01,0.01&amp;q=39.109,-76.77 (National%20Security%20Agency)&amp;t=h" rel="geolocation" target="_blank">NSA</a> has been spying on our every move for years, recording hundreds of private phone calls in the US and archiving <a href="http://www.wsws.org/en/articles/2013/06/17/nsap-j17.html">&#8220;virtually all internet usage, everywhere&#8221;</a> the <a class="zem_slink" title="European Union" href="http://en.wikipedia.org/wiki/European_Union" rel="wikipedia" target="_blank">European Union</a> passed a directive in 2009 about <a class="zem_slink" title="HTTP cookie" href="http://en.wikipedia.org/wiki/HTTP_cookie" rel="wikipedia" target="_blank">internet cookies</a>.</p>
<p>Until 2011 all member states were required to pass laws saying that when websites use cookies they should ask permission. Only three states met the deadline and of those one said <em>&#8220;Fuck this, everyone, chill. The law is here, but you have like a year to comply. All&#8217;s good.&#8221;</em>. That was the UK.</p>
<p>I can&#8217;t find a source saying which of the 27 EU countries have passed the cookie law, but on June 15th <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" target="_blank">Slovenia</a> has become one of those countries annoying its internet users. This affects me. I don&#8217;t like that.</p>
<p>First thing I heard on the morning of the 16th was my mum rushing into my room <em>&#8220;OMG, what is this cookie thing? Chrome is trying to install a cookie? What the hell is going on?&#8221;</em></p>
<blockquote class="twitter-tweet"><p>Oh god. Lihkar mat vsa prestrasena pride v mojo sobo “Kaj mi to hoce neke piskotke instalirat? Kaj se dogaja?”. <a href="https://twitter.com/nmusar">@nmusar</a> I blame you.</p>
<p>— Swizec (@Swizec) <a href="https://twitter.com/Swizec/statuses/346262949217828864">June 16, 2013</a></p></blockquote>
<p>On a Sunday morning nobody should have to explain what is a cookie and that it isn&#8217;t the end of the world to a distraught technically impaired parent. Nobody.</p>
<h2>Peeshkot</h2>
<div class="wp-caption alignnone" style="width: 138px"><a href="https://chrome.google.com/webstore/detail/peeshkot/idfkeeahcifaocjonphgjmpmmfonahle"><img class=" " title="Peeshkot icon by @ponywithhiccups" src="https://www.filepicker.io/api/file/p0gQmwoMRbqgjKkogBwN" alt="Peeshkot icon by @ponywithhiccups" width="128" height="128" /></a><p class="wp-caption-text">Peeshkot icon by <a href="https://twitter.com/ponywithhiccups">@ponywithhiccups</a></p></div>
<p>So <a href="https://twitter.com/eewan">@eewan</a> and I made a solution &#8211; <a href="https://chrome.google.com/webstore/detail/peeshkot/idfkeeahcifaocjonphgjmpmmfonahle">Peeshkot</a>. Instal Peeshkot extension in your <a class="zem_slink" title="Google Chrome" href="http://https://www.google.com/chrome" rel="homepage" target="_blank">Chrome browser</a> and all cookie notices will be gone.</p>
<p>It will recognise most common implementations and make them go away, or opt-in if necessary. @eewan even made sure it will recognise most homegrown implementations with the use of some clever heuristics.</p>
<p>Especially recommended for your parents and grandparents and people with short tempers in regards to popups and flashing things.</p>
<p>We plan to add opt-out support in the near future. Although why you wouldn&#8217;t just block third party cookies if you want that sort of thing is beyond me.</p>
<p>Did I mention <a href="https://chrome.google.com/webstore/detail/peeshkot/idfkeeahcifaocjonphgjmpmmfonahle">Peeshkot</a> is open source? You can submit issues and generally <a href="https://github.com/Swizec/Peeshkot">help out on Github</a>.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=95b746e3-f532-49e2-9273-5460d93d564a" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/U6y_dilKc4A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/peeshkot-cookie-warnings-go-away/swizec/6242/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/peeshkot-cookie-warnings-go-away/swizec/6242</feedburner:origLink></item>
		<item>
		<title>The most important writing lesson I learned in 6th grade maths class</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/wLkuwW9a4M4/6237</link>
		<comments>http://swizec.com/blog/the-most-important-writing-lesson-i-learned-in-6th-grade-maths-class/swizec/6237#comments</comments>
		<pubDate>Thu, 13 Jun 2013 12:03:55 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[Mathematics]]></category>
		<category><![CDATA[Student]]></category>
		<category><![CDATA[Teacher]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6237</guid>
		<description><![CDATA[&#8220;What is a square?&#8221;, my maths teacher would ask. &#8220;A square has four equal sides at right angles and its surface area is a*a&#8221;, a pupil would answer. Happy they got all the facts right. &#8220;But what is a square? Those are just its properties.&#8221; &#8220;Errr &#8230; a square is a &#8230; shape? &#8230; that...  <a href="http://swizec.com/blog/the-most-important-writing-lesson-i-learned-in-6th-grade-maths-class/swizec/6237" class="more-link" title="Read The most important writing lesson I learned in 6th grade maths class">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignnone" style="width: 510px"><img title="My elementary school" src="https://www.filepicker.io/api/file/0H71ZANRNWT3G7eWWJId" alt="My elementary school" width="500" height="401" /><p class="wp-caption-text">My elementary school</p></div>
<p><em>&#8220;What is a square?&#8221;</em>, my maths teacher would ask.</p>
<p><em>&#8220;A square has four equal sides at right angles and its surface area is a*a&#8221;</em>, a pupil would answer. Happy they got all the facts right.</p>
<p><em>&#8220;But what <strong>is</strong> a square? Those are just its properties.&#8221;</em></p>
<p><em>&#8220;Errr &#8230; a square is a &#8230; shape? &#8230; that has four equal sides at right angles?&#8221;</em></p>
<p><em>&#8220;That&#8217;s right. A square is a shape, the rest are just properties.&#8221;</em></p>
<p>Every single one of us got that wrong. Every single time. Didn&#8217;t matter if you were a straight A pupil or barely scraping by, everyone forgot to <em>answer the question</em>.</p>
<p>The story repeated itself a year later with geometric objects.</p>
<p>If there&#8217;s one important lesson about writing I ever learned, it&#8217;s that <em>a square is a shape</em>.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=eef63233-86c9-48cf-8906-4153001d674e" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/wLkuwW9a4M4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/the-most-important-writing-lesson-i-learned-in-6th-grade-maths-class/swizec/6237/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/the-most-important-writing-lesson-i-learned-in-6th-grade-maths-class/swizec/6237</feedburner:origLink></item>
		<item>
		<title>Facebook ads: good for likes, bad for sales</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/CDoKEfukaaw/6233</link>
		<comments>http://swizec.com/blog/facebook-ads-good-for-likes-bad-for-sales/swizec/6233#comments</comments>
		<pubDate>Wed, 12 Jun 2013 12:20:06 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Marketing]]></category>
		<category><![CDATA[Advertising]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Pay per click]]></category>
		<category><![CDATA[Reddit]]></category>
		<category><![CDATA[Social network]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6233</guid>
		<description><![CDATA[Facebook Ads have a simple promise &#8211; you make an ad, you target it to a very specific demographic, your ad instantly reaches millions of people and if even a small percentage of those convert that&#8217;s still a shitload of sales. And so I went, testing the waters of online advertising with a tiny budget...  <a href="http://swizec.com/blog/facebook-ads-good-for-likes-bad-for-sales/swizec/6233" class="more-link" title="Read Facebook ads: good for likes, bad for sales">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignnone" style="width: 712px"><img title="Campaign run graph" src="https://www.filepicker.io/api/file/xfezkcGEQGK22QyduFl4" alt="Campaign run graph" width="702" height="201" /><p class="wp-caption-text">Campaign run graph</p></div>
<p><a class="zem_slink" title="Facebook" href="http://facebook.com" rel="homepage" target="_blank">Facebook Ads</a> have a simple promise &#8211; you make an ad, you target it to a very specific demographic, your ad instantly reaches millions of people and if even a small percentage of those convert that&#8217;s still a shitload of sales.</p>
<p>And so I went, testing the waters of online advertising with a tiny budget of $15 a day. Promoting <a href="https://leanpub.com/nightowls">my ebook</a> just a little bit so I know what to expect.</p>
<p>I decided to go for two ad types &#8211; the news feed and the sidebar on the right. My campaign ran for 12 days, May 27th to June 8th and had a potential reach of 32,000,000 people. All interested in technology, launching tech businesses and being early adopters.</p>
<p>Unfortunately I couldn&#8217;t target for <em>&#8220;In a relationship with somebody like the above.&#8221;</em>. Bummer, but this demographic will do.</p>
<h2>The effect</h2>
<div class="wp-caption alignnone" style="width: 633px"><img title="Effect on traffic" src="https://www.filepicker.io/api/file/5QEjVcxuRLezUjQGb11Q" alt="Effect on traffic" width="623" height="194" /><p class="wp-caption-text">Effect on traffic</p></div>
<p>In those 12 days I spent $158.91 and made 15 sales &#8211; $65.85 in royalties. A loss of almost 60%, made worse by the fact many of the sales didn&#8217;t come through facebook. But the news feed post did get 45 likes and the facebook page I haven&#8217;t made yet got 61 likes.</p>
<p>How does a page that doesn&#8217;t exist get 61 likes anyway? Guess I have to make it now.</p>
<p>All in all, my ads had a reach of 88,738 people. About 55k for the news feed ad and about 33k for the right side ad. A far cry from the 32 million potential I was offered, but hey, that $15/day budget didn&#8217;t last very long.</p>
<p>Comparing conversions for the two ads is pretty interesting as well.</p>
<p>The news feed ad got 1,418 clicks (like or link) with a <a class="zem_slink" title="Click-through rate" href="http://en.wikipedia.org/wiki/Click-through_rate" rel="wikipedia" target="_blank">click-through rate</a> of 2.44%, while the sidebar ad stacked up a measly 11 clicks for a click-through rate of just 0.012%.</p>
<p>Sidebar clicks cost more too &#8211; $0.58 vs. $0.11 for the news feed.</p>
<div class="wp-caption alignnone" style="width: 791px"><img title="Conversions" src="https://www.filepicker.io/api/file/EfMY6HFATWCyck4BcKKf" alt="Conversions" width="781" height="456" /><p class="wp-caption-text">Conversions</p></div>
<p>Despite the significant increase in traffic for the 12 days, it seems that either Facebook users aren&#8217;t very interested in buying, or my landing page is terrible at converting traffic into sales.</p>
<p>For my next experiment I&#8217;ll use <a class="zem_slink" title="AdSense" href="http://www.google.com/adsense" rel="homepage" target="_blank">Google Ads</a> and see what happens there. I think <a class="zem_slink" title="Stack Overflow" href="http://stackoverflow.com/" rel="homepage" target="_blank">StackOverflow</a> and possibly <a class="zem_slink" title="Reddit" href="http://reddit.com/" rel="homepage" target="_blank">Reddit</a> would make a good experiment as well.</p>
<hr />
<p>The raw facts for those interested:</p>
<p><strong><a class="zem_slink" title="Facebook features" href="http://en.wikipedia.org/wiki/Facebook_features" rel="wikipedia" target="_blank">News Feed</a> Ad</strong><br />
51,081 reach<br />
1,293 link clicks<br />
1,418 clicks<br />
2.44% click-through rate<br />
$0.11 per click, $153.71 spent</p>
<p>61 Page Likes<br />
45 Page Post Likes</p>
<p><strong>Right Bar Ad</strong><br />
37,657 reach<br />
11 Link Clicks<br />
9 Clicks<br />
0.012% click-through rate<br />
$0.58 per click, $5.20 spent</p>
<p>Sales made: 15<br />
<a class="zem_slink" title="Royalties" href="http://en.wikipedia.org/wiki/Royalties" rel="wikipedia" target="_blank">Royalties</a> made: $65.85</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=34a81a15-21e0-48be-81e3-07788317f1a8" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/CDoKEfukaaw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/facebook-ads-good-for-likes-bad-for-sales/swizec/6233/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/facebook-ads-good-for-likes-bad-for-sales/swizec/6233</feedburner:origLink></item>
		<item>
		<title>I infiltrated another Rails Girls event, #RailsGirlsMb</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/735clV6q1s0/6222</link>
		<comments>http://swizec.com/blog/i-infiltrated-another-rails-girls-event-railsgirlsmb/swizec/6222#comments</comments>
		<pubDate>Tue, 04 Jun 2013 10:37:27 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Travel&Events]]></category>
		<category><![CDATA[Heroku]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Maribor]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby Rails]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6222</guid>
		<description><![CDATA[Last time I infiltrated a Rails Girls event angry internet feminists gave me a lot of flak about volunteering a day to teach girls &#8211; sorry, strong independent women aged about 19 and up &#8211; about the web and programming and this crazy world of technology I breathe every day. But those harpies are angry...  <a href="http://swizec.com/blog/i-infiltrated-another-rails-girls-event-railsgirlsmb/swizec/6222" class="more-link" title="Read I infiltrated another Rails Girls event, #RailsGirlsMb">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignnone" style="width: 624px"><img title="Rails Girls Maribor heart" src="https://www.filepicker.io/api/file/LLvKgLJ7Tf6Qyxcmcloy" alt="Rails Girls Maribor heart" width="614" height="409" /><p class="wp-caption-text">Rails Girls <a class="zem_slink" title="Maribor" href="http://maps.google.com/maps?ll=46.55,15.65&amp;spn=1.0,1.0&amp;q=46.55,15.65 (Maribor)&amp;t=h" rel="geolocation" target="_blank">Maribor</a> heart</p></div>
<p>Last time <a href="http://swizec.com/blog/i-infiltrated-railsgirlsj-heres-what-it-was-like/swizec/5717" target="_blank">I infiltrated a Rails Girls event</a> angry internet feminists gave me a lot of flak about volunteering a day to teach girls &#8211; sorry, strong independent women aged about 19 and up &#8211; about the web and programming and this crazy world of technology I breathe every day.</p>
<p>But those harpies are angry about everything, let&#8217;s not worry about them. Real girls are <em>awesome</em>. They love learning cool things and don&#8217;t mind if a guys do the teaching.</p>
<p>No idea what I did last time, but I actually got invited to mentor at <a href="http://railsgirls.com/maribor" target="_blank">Rails Girls Maribor</a>. Something about having done it once before. Must&#8217;ve been the cool hat, because I was rubbish at it last time. Think the girls spent more time guiding me around than I did them.</p>
<p>But off my big mouth went and on Saturday, at 9am sharp, I showed up at the Maribor technical faculty, FERI. Well, no, I was an hour late because I <em>really</em> hate mornings and Maribor is super far for someone whose daily commute consists of getting out of bed.</p>
<div class="wp-caption alignnone" style="width: 624px"><img title="Me and my jolly lasses" src="https://www.filepicker.io/api/file/3k8emjdYSw6hNpMPrreU" alt="Me and my jolly lasses" width="614" height="458" /><p class="wp-caption-text">Me and my jolly lasses</p></div>
<p>This time will be different! I have four months of proper rails experience! This time I&#8217;ll be the awesomest mentor ever and will teach girls all the secret ruby incantations!</p>
<p>Fat chance.</p>
<p>By far the most unreliable part was the girls&#8217; typing. Telling them retyping is better for memorisation than copy pasting was a grave mistake. Not one managed to write <code>mkdir railsgirls</code>. We had two railgirls and one prailsgirls.</p>
<p>Another missed half the line for scaffolding generation and <a class="zem_slink" title="Bracket" href="http://en.wikipedia.org/wiki/Bracket" rel="wikipedia" target="_blank">curly braces</a> were forever the bane of carefully painted nails. Copy pasting worked much better and two of the girls got through the main guide before lunch.</p>
<p>Yay!</p>
<p>Unfortunately we had to concede defeat with one of the girls. Four mentors tried to solve the problem. All were defeated. Windows 8, it seems, does not play well with <a class="zem_slink" title="Ruby on Rails" href="http://rubyonrails.org" rel="homepage" target="_blank">Ruby on Rails</a> and we simply could not install some needed dependencies &#8230; no <a class="zem_slink" title="Python (programming language)" href="http://www.python.org/" rel="homepage" target="_blank">Python</a>. Yep.</p>
<p>In the end, none of my Rails experience did any good. The girls were far more interested in tweaking the visuals. But then, you can&#8217;t really learn to code in an afternoon. But you can learn to learn. By far the biggest win was showing them how to use Bootstrap documentation, <a class="zem_slink" title="Google Chrome" href="http://www.google.com/chrome" rel="homepage" target="_blank">Chrome</a> console and poking around the <a class="zem_slink" title="HTML" href="http://en.wikipedia.org/wiki/HTML" rel="wikipedia" target="_blank">HTML</a>, to figure things out on their own.</p>
<p>Nothing like teaching someone how to teach themselves. Then you get to play with your phone instead of being chirpy and communicative when the caffeine content in your blood runs out &#8230; I wish event organisers stopped forgetting some of us like tea, not coffee.</p>
<p>The girls and I also discovered a bug with the Rails Girls Guide thingy &#8211; when you put your site on <a class="zem_slink" title="Heroku" href="http://www.heroku.com/" rel="homepage" target="_blank">Heroku</a>, image uploads stop working because they rely on local disk persistency and Heroku doesn&#8217;t really <em>do</em> that. Rather a big shame &#8211; my whole group left soon after that.</p>
<p>Or I was just boring.</p>
<p>But all in all, a smashing success! If at least some of the girls use their new-found knowledge for more than just understanding their boyfriends better, the programming world will be a better place.</p>
<p>Can&#8217;t wait to do this again!</p>
<p><em>PS: both images taken from <a href="https://twitter.com/railsgirlsmb" target="_blank">@RailsGirlsMb</a> twitter stream</em></p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=c3911d06-d977-4af7-b647-35b517979806" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/735clV6q1s0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/i-infiltrated-another-rails-girls-event-railsgirlsmb/swizec/6222/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/i-infiltrated-another-rails-girls-event-railsgirlsmb/swizec/6222</feedburner:origLink></item>
		<item>
		<title>Dynamic languages have jumped the shark</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/W0CjC2fEfmY/6204</link>
		<comments>http://swizec.com/blog/dynamic-languages-have-jumped-the-shark/swizec/6204#comments</comments>
		<pubDate>Fri, 31 May 2013 12:59:14 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Dynamic programming language]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Read–eval–print loop]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[Type system]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6204</guid>
		<description><![CDATA[I still remember the heated arguments I&#8217;d have with my high school professors about dynamic languages. What do you mean python isn&#8217;t a real language? What&#8217;s wrong with you!? Dynamic languages are the coolest thing ever! Some kids fight about curfews and school rules, I fought about scripting languages being just as &#8220;real&#8221; as the...  <a href="http://swizec.com/blog/dynamic-languages-have-jumped-the-shark/swizec/6204" class="more-link" title="Read Dynamic languages have jumped the shark">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<img src="https://www.filepicker.io/api/file/jJuq5mNjQbC0ZJrdJYms" alt="Jumping the shark" />
<p>I still remember the heated arguments I&#8217;d have with my high school professors about dynamic languages. What do you mean python isn&#8217;t a <em>real</em> language? What&#8217;s wrong with you!? <a class="zem_slink" title="Dynamic programming language" href="http://en.wikipedia.org/wiki/Dynamic_programming_language" rel="wikipedia" target="_blank">Dynamic languages</a> are the coolest thing ever!</p>
<p>Some kids fight about curfews and school rules, I fought about <a class="zem_slink" title="Scripting language" href="http://en.wikipedia.org/wiki/Scripting_language" rel="wikipedia" target="_blank">scripting languages</a> being just as &#8220;real&#8221; as the likes of C and Pascal. That was ten years ago &#8211; dynamic languages were all the rage and I just started exploring the world of programming beyond what my mentors laid out in front of me.</p>
<p>Nimble scripting languages sounded like a promised land compared to the musky static languages of yore. No longer would you be forced to think about data types all the time, no longer would your code be littered with the <code>int</code> and <code>char</code> and <code>double</code> of the world, no more stifling constraints on using a variable once it&#8217;s been defined.</p>
<p>Just a pure expression of thought. Programmer and problem at peace with one another, no angry compiler will get in your way.</p>
<h2>The promised land tumbles</h2>
<p>Yesterday I realised dynamic languages have jumped the shark. The evidence has been mounting for a while, but yesterday&#8217;s mishap with <a class="zem_slink" title="Ruby on Rails" href="http://rubyonrails.org" rel="homepage" target="_blank">Ruby on Rails</a> sealed the deal.</p>
<p>Did you know that Rails environment settings, the <code>ENV</code> hash, only accepts string settings? I wanted to make a boolean flag. The only solution was to make a string <code>'false'</code>, then do a <a class="zem_slink" title="Comparison of programming languages (string functions)" href="http://en.wikipedia.org/wiki/Comparison_of_programming_languages_%28string_functions%29" rel="wikipedia" target="_blank">string comparison</a> when needed. There isn&#8217;t even a native way to cast a string to a boolean.</p>
<p>Programmer left completely to his own devices. Out in the rain. With no chance of escape.</p>
<p>The closest Ruby will let you to casting a string to a boolean is using something like <code>!!'blah'</code>, but all strings evaluate to <code>true</code>. Even empty strings.</p>
<p>Useless.</p>
<p>The situation is just as bad in other dynamic languages. <a class="zem_slink" title="JavaScript" href="http://en.wikipedia.org/wiki/JavaScript" rel="wikipedia" target="_blank">JavaScript</a> is particularly famous for its weird handling of data types.</p>
<blockquote class="twitter-tweet"><p>And this, of course, evaluates to the string &#8220;fail&#8221;.(![]+[])[+[]]+(![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]];</p>
<p>— Marcus Lagergren (@lagergren) <a href="https://twitter.com/lagergren/status/337484475204255744">May 23, 2013</a></p></blockquote>
<p>Try it. It works.</p>
<p>Part of the code returns <code>undefined</code>, which is magically transformed into a string, then other parts of the code select particular characters from that string &#8230; the mind reels in disbelief.</p>
<p>I don&#8217;t want to remember the atrocities I&#8217;ve committed in <a class="zem_slink" title="PHP" href="http://www.php.net" rel="homepage" target="_blank">PHP</a> just to convince it that yes, I do know what I&#8217;m doing, yes I do want that variable to behave like it&#8217;s a particular type.</p>
<p>Python&#8217;s strong typing at least ensures we can&#8217;t add a string to an integer, but there&#8217;s still the odd <code>5/float(2)</code> type of hack. Some people suggest going as far as littering your code with assert statements to ensure your team mates can&#8217;t do stupid things with your functions.</p>
<p>This is the exact opposite of what I was promised as an aspiring 15 year old coder.</p>
<h2>Why we wanted dynamic languages in the first place</h2>
<img src="https://www.filepicker.io/api/file/8xojSjy5S9CpVtWes2dl" alt="" width="747" height="398" />
<p>Dynamic languages promised an ease of development, a sense of thinking about solving the problem instead of worrying about talking to the computer. And the world fell in love.</p>
<p>Instead, dynamic languages delivered a hodgepodge so wibbly-wobbly it always forces you to think about data types, even about the particular quirks of how this particular language handles certain conversions. Always at the worst possible moment. Nothing is true anymore, you can&#8217;t rely on a single thing; without automated tests you&#8217;re flying blind, relying on nothing but your raw coding prowess to stave off the always imminent failure.</p>
<p>God forbid one of your team mates does something stupid.</p>
<p>But we did get away from the whole <code>int a</code> nonsense. And we did get fancy <a class="zem_slink" title="Read–eval–print loop" href="http://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop" rel="wikipedia" target="_blank">REPL</a>&#8216;s. And we did get away from the write-compile-run cycle.</p>
<p>But what have the Romans ever done for us!</p>
<h2>Static is better now</h2>
<p>Here&#8217;s the thing, though, there is now a whole new class of even awesomer languages &#8211; the modern statically strong typed languages.</p>
<p><a class="zem_slink" title="Scala (programming language)" href="http://www.scala-lang.org/" rel="homepage" target="_blank">Scala</a> and <a href="http://haskell.org">Haskell</a> have everything we&#8217;ve always wanted from a dynamic language. You never have to spell out a variable&#8217;s name, the compiler often knows better than you do anyway, and there is a REPL you can use to prototype things.</p>
<p>But unlike dynamic languages you can rely on <em>everything</em>. All the benefits of <a class="zem_slink" title="Type system" href="http://en.wikipedia.org/wiki/Type_system" rel="wikipedia" target="_blank">static type</a> analysis, most of the benefits of dynamic languages. Hell, you can get rid of the write-compile-run cycle with a simple bash script that compiles your code before running it.</p>
<p>Just remember, static languages are not just C and Java anymore. The world has moved on while we were stuck in the dynamic hell hole for the past ten years.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=83b08eef-ef3e-4b96-9d39-cf7b256a3e51" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/W0CjC2fEfmY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/dynamic-languages-have-jumped-the-shark/swizec/6204/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/dynamic-languages-have-jumped-the-shark/swizec/6204</feedburner:origLink></item>
		<item>
		<title>How I became a 3 hour per day workout nutter</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/JTWYO8WYT1M/6196</link>
		<comments>http://swizec.com/blog/how-i-became-a-3-hour-per-day-workout-nutter/swizec/6196#comments</comments>
		<pubDate>Tue, 28 May 2013 11:29:59 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[BMI]]></category>
		<category><![CDATA[Body mass index]]></category>
		<category><![CDATA[Boxing]]></category>
		<category><![CDATA[Gym]]></category>
		<category><![CDATA[Muscle]]></category>
		<category><![CDATA[Physical exercise]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6196</guid>
		<description><![CDATA[On Sunday I went to boot camp &#8211; an hour of fast paced calisthenics &#8211; followed half an hour later by boxing practice. Three hours at the gym in total. On a sunny, if cold, Sunday afternoon. I had also spent half an hour working out that morning. That evening, whimpering in bed from muscle...  <a href="http://swizec.com/blog/how-i-became-a-3-hour-per-day-workout-nutter/swizec/6196" class="more-link" title="Read How I became a 3 hour per day workout nutter">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>On Sunday I went to boot camp &#8211; an hour of fast paced <a class="zem_slink" title="Calisthenics" href="http://en.wikipedia.org/wiki/Calisthenics" rel="wikipedia" target="_blank">calisthenics</a> &#8211; followed half an hour later by <a class="zem_slink" title="Boxing" href="http://en.wikipedia.org/wiki/Boxing" rel="wikipedia" target="_blank">boxing</a> practice. Three hours at the gym in total. On a sunny, if cold, Sunday afternoon. I had also spent half an hour working out that morning.</p>
<p>That evening, whimpering in bed from muscle soreness, complaining loudly, but secretly enjoying every moment, it dawned on me that this might not be normal.</p>
<img src="https://www.filepicker.io/api/file/tAksLfZcRAmuZv2A4tIj" alt="" />
<img src="https://www.filepicker.io/api/file/etIlPIqTRSiFoFDE4sQg" alt="" />
<p>Every day the internet tells me that as a human being of a sit-down, stare-at-a-computer persuasion, I should cower from physical strain. I should be looking up to the <a href="http://frac.org/initiatives/hunger-and-obesity/obesity-in-the-us/" target="_blank">30% of the population that isn&#8217;t fat</a>, admire the perhaps 5% that&#8217;s actually in shape, and shout profanities at society for making me feel bad about my body while nomming on a bag of crisps.</p>
<p>If that&#8217;s normal, then there is definitely something wrong with me. Deeply and horrifically wrong.</p>
<p>Last week I spent 20 hours working out, the week before that it was 18. Both weeks I spent only 19 hours doing full on productive billable work. And about 18 hours writing.</p>
<p>I also count calories, watch what I eat, and I don&#8217;t even remember what a sugar craving feels like anymore.</p>
<p>I must be deeply disturbed &#8230;</p>
<p>But how does a person even get to the point where a third of their productive time is spent working out?</p>
<h2>How the hell?</h2>
<p>For me, it all started in high school. I was a scrawny kid, and I decided that this won&#8217;t do and I want some muscle. Maybe I got mugged or something, can&#8217;t remember the exact catalyst anymore.</p>
<p>So I signed up for a gym membership and started weight lifting three days a week, an hour each. But I started getting bored and the results weren&#8217;t coming quickly enough. The hour swelled up to two hours, then two and a half.</p>
<p>Okay, this isn&#8217;t sustainable, maybe I can partition my time better by working out six days a week for an hour.</p>
<p>That eventually became six days a week for two hours.</p>
<p>The results were spectacular. Like, truly magnificent. I weighed 65 kilograms and could squat just over 120 kilograms five times in a row.</p>
<p>But I wanted more. More muscle. More weight. The plateau was immense, for the life of me I couldn&#8217;t get my weight above the magic 25 <a class="zem_slink" title="Body mass index" href="http://en.wikipedia.org/wiki/Body_mass_index" rel="wikipedia" target="_blank">BMI</a> line. That&#8217;s officially the top non-obese BMI you can have by the way.</p>
<p>Then I got bored and who has time to work out six times a week when they&#8217;re launching a startup anyway?</p>
<p>So I started boxing. Just three days a week. Fun. With a proper trainer. About the same price. Marvelous!</p>
<div class="wp-caption alignnone" style="width: 730px"><img class=" " title="THE boxing photo" src="http://www.omaa.org.uk/sites/default/files/Boxing-008.jpg" alt="THE boxing photo" width="720" height="540" /><p class="wp-caption-text">THE boxing photo</p></div>
<p>In that first year or so of boxing, I fast realised boxing does much more than just get you in great physical shape. It&#8217;s also a spectacular way to get in mental shape.</p>
<p><em>People annoying you all day?</em> Violently punch it out.</p>
<p><em>Been dealing with a pesky bug for a week?</em> Violently punch it out.</p>
<p><em>Intimidating meetings hard on your confidence?</em> No worries, you can beat the crap out of anyone in the room.</p>
<p>Now, I&#8217;m not a violent man, but there&#8217;s just something so primal, so very confidence inducing, about knowing not a single person in the room is a physical match for you. I can&#8217;t really explain it, maybe it&#8217;s just the difference between being a scrawny kid that&#8217;s a head shorter than everyone, and being an agile pile of muscle that&#8217;s a head shorter than everyone.</p>
<p>And it goes so much further than just physical might and an escape into introversion. You become sort of calmer, more able to think things through &#8230; it genuinely makes you better at your intellectual work.</p>
<p>But we&#8217;re still at just 5 hours a week. The final piece of the puzzle is my first trip to the US two years ago.</p>
<p>Two weeks without boxing practice or any <a class="zem_slink" title="Physical exercise" href="http://en.wikipedia.org/wiki/Physical_exercise" rel="wikipedia" target="_blank">physical activity</a>? Now that just won&#8217;t do will it? Time to start working out in the morning, just a few situps and pressups and such. No biggie.</p>
<p>Fifteen minutes a day. Just enough to wake you up and keep you in shape somewhat, not enough to take any real amount of time. Perfect.</p>
<p>When I cam back to Slovenia. I simply didn&#8217;t stop. Eventually it ballooned to thirty minutes, then forty minutes. Lately I&#8217;ve started using <a href="http://pumpup.co/" target="_blank">PumpUp</a> to get new exercises and to get out of another plateau.</p>
<p>The morning workouts ballooned to an hour and a half. Just over an hour if I completely destroy myself and barely take a moment to breathe.</p>
<p>And so I became one of those nutters that spends at least an hour a day working out. Three hours on a good day &#8230;</p>
<p>But hey, at least I&#8217;m in shape for the inevitable zombie apocalypse or robot uprising. Right?</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=4e72e8c8-dd1e-4284-bed2-f6bbaec992ac" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/JTWYO8WYT1M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/how-i-became-a-3-hour-per-day-workout-nutter/swizec/6196/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/how-i-became-a-3-hour-per-day-workout-nutter/swizec/6196</feedburner:origLink></item>
		<item>
		<title>Follow up to The most pleasant job interview I have ever had</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/Gs8T3fJU5Ns/6190</link>
		<comments>http://swizec.com/blog/follow-up-to-the-most-pleasant-job-interview-i-have-ever-had/swizec/6190#comments</comments>
		<pubDate>Thu, 23 May 2013 14:12:55 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Canada]]></category>
		<category><![CDATA[Employment]]></category>
		<category><![CDATA[Interview]]></category>
		<category><![CDATA[Ramit Sethi]]></category>
		<category><![CDATA[Shopify]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6190</guid>
		<description><![CDATA[&#8220;Hey mum, I&#8217;m going to Canada in September to work for Shopify.&#8221; &#8220;Yeah I know, why did you take a month to realize that?&#8221; Just over a month ago I described my experience interviewing with Shopify as the most pleasant job interview I have ever had. Just three days after the interview I got an...  <a href="http://swizec.com/blog/follow-up-to-the-most-pleasant-job-interview-i-have-ever-had/swizec/6190" class="more-link" title="Read Follow up to The most pleasant job interview I have ever had">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<img src="https://www.filepicker.io/api/file/9HlBZ5SbQGeZE0urzi2s" alt="" />
<p><em>&#8220;Hey mum, I&#8217;m going to Canada in September to work for <a class="zem_slink" title="Shopify" href="http://shopify.com" rel="homepage" target="_blank">Shopify</a>.&#8221;</em></p>
<p><em>&#8220;Yeah I know, why did you take a month to realize that?&#8221;</em></p>
<p>Just over a month ago I described my experience interviewing with Shopify as <a href="http://swizec.com/blog/the-most-pleasant-job-interview-i-have-ever-had/swizec/6121">the most pleasant job interview I have ever had</a>.</p>
<p>Just three days after the interview I got an offer, but fussed over the decision for a month. Originally, to give some other opportunities a fair chance, later because some new opportunities showed up &#8230;</p>
<p>Seriously, what are the chances for a client to sell his company to a huge investment bank and wanting to bring you on board juuust as you&#8217;re thinking about moving to Canada? Crazy. I didn&#8217;t take that one because, you know, <em>bank</em>. Huge corporation. Not really my style &#8230; at least not for that kind of money.</p>
<p>Remember kids, if you&#8217;re going to sell your soul, sell it well.</p>
<p>I loved Shopify when I was there, it was the most fun and enjoyable looking environment I have ever seen. If I had to decide there and then, I&#8217;d go for it at the drop of a hat. But the more I thought about it, the more my fear of commitment acted up.</p>
<p>The main reason I freelance is the pace of switching whole technology stacks every few months. But I also have <em>a lot</em> of free time to pursue my own stuff. Deadlines for a book you say? No problem, ten billable days in a month is enough.</p>
<p>Think I won&#8217;t be able to do that anymore.</p>
<p>Oh, you like waking up at 9am, taking an hour to exercise and then two hours for writing and an hour for lunch and <em>then</em> get to work work? No problem, you&#8217;re more productive coding-wise in the afternoon/evening anyway.</p>
<p>I have a suspicion I won&#8217;t be able to do that anymore either.</p>
<p>In the end, that&#8217;s why I decided to work at Shopify. Because it scares me shitless. That which scares you the most is usually the best way forward. It&#8217;s your inner comfy coward screaming from the top of his wee lungs that way lies change.</p>
<p>Change is good. I like change.</p>
<p>At least I&#8217;ll still have the freedom to work on my own stuff &#8211; yes, I asked &#8211; and following <a class="zem_slink" title="Ramit Sethi" href="http://www.ramitsethi.com/" rel="homepage" target="_blank">Ramit Sethi</a>&#8216;s advice to ask for a few extra $k/year, I&#8217;m going to have plenty of financial independence as well. Important things those two.</p>
<p>I can&#8217;t weave this smoothly into the story so I&#8217;m just going to say it. Subscribe to Ramit&#8217;s mailing list. Do it. Read it. It will change the way you think in ever so subtle ways. I mean, when was the last time casually reading a free mailing list made you a few thousand dollars? Exactly.</p>
<p>But yeah, in September I start working for Shopify and that will be the end of my relatively short-lived full-time freelancing career. For now.</p>
<p>Now how the hell do I write a resume that will impress a government clerk deciding whether I&#8217;m good enough for a visa?</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=ccd882ae-571f-43ec-9b15-e95340b0edcf" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/Gs8T3fJU5Ns" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/follow-up-to-the-most-pleasant-job-interview-i-have-ever-had/swizec/6190/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/follow-up-to-the-most-pleasant-job-interview-i-have-ever-had/swizec/6190</feedburner:origLink></item>
		<item>
		<title>How Draft got me to pay for a free product</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/Hc4ukEUqGY4/6186</link>
		<comments>http://swizec.com/blog/how-draft-got-me-to-pay-for-a-free-product/swizec/6186#comments</comments>
		<pubDate>Tue, 21 May 2013 13:20:37 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Cool thing]]></category>
		<category><![CDATA[Writing]]></category>
		<category><![CDATA[Freewriting]]></category>
		<category><![CDATA[Nathan Kontny]]></category>
		<category><![CDATA[Subscription business model]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Writer Resources]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6186</guid>
		<description><![CDATA[Draft is a marvelous new webservice for writing. A bit like iA Writer, but for the browser. I love distraction-free writing and I&#8217;ve recently come to rely on Draft for writing my blog posts. It&#8217;s simply the best writing tool out there that I can use with my fancy keyboard (linux, no iA Writer, bad...  <a href="http://swizec.com/blog/how-draft-got-me-to-pay-for-a-free-product/swizec/6186" class="more-link" title="Read How Draft got me to pay for a free product">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><a href="https://draftin.com/">Draft</a> is a marvelous new webservice for writing. A bit like iA Writer, but for the browser.</p>
<p>I <a href="http://swizec.com/blog/stypi-the-perfect-blogging-tool/swizec/3312">love</a> <a href="http://swizec.com/blog/cool-thing-thursday-ia-writer/swizec/5517">distraction-free</a> writing and I&#8217;ve recently come to rely on Draft for writing my blog posts. It&#8217;s simply the best writing tool out there that I can use with my <a href="http://swizec.com/blog/cool-thing-thursday-a-300-euro-keyboard/swizec/5690">fancy keyboard</a> (linux, no iA Writer, bad wrists).</p>
<p>But I&#8217;m not here today to talk about the marvelous version control features, the fact I can click the equivalent of &#8220;Save back to <a class="zem_slink" title="WordPress" href="http://wordpress.org" rel="homepage" target="_blank">WordPress</a>&#8221; when I&#8217;m done writing, or even the &#8220;Get feedback from an expert&#8221; feature.</p>
<p>No, today I want to tell you about the brilliant trick Nathan Kontny used to convert me from a freeloader to the proud owner of a $4 monthly subscription.</p>
<p>I login one day, right from the WordPress dashboard (Chrome extension), and what do I see if not a big pop up sort of thing saying &#8220;Hey, you should totally subscribe!&#8221;. As a geek and a nerd I find these things tacky, overdone, and rather pushy.</p>
<p>But this was different. There was no blackout, no flashing colours, just a friendly message from the founder saying &#8220;Hey, I&#8217;m making this thing and I need your help to keep it awesome.&#8221;. More importantly, <em>he started a conversation</em>!</p>
<img src="https://www.filepicker.io/api/file/c89bJzgRlerjCMR6C1ME" alt="Draft asks me to sign up" width="606" height="431" />
<p>Sidenote: Wow, I was just delighted by how easy inserting an image is. Shift+Ctrl+I, drag image into browser. Beautiful.</p>
<p><em>khem</em></p>
<p>See, it&#8217;s not a pushy sales thing, it&#8217;s an honest ask. If you don&#8217;t want to, that&#8217;s fine too, but please tell me why.</p>
<p>I was instantly convinced.</p>
<p>Left a message saying how awesome I find the service and <em>how infinitely brilliant is the fact I can reply to a &#8220;please subscribe message&#8221;</em>. Later that day I kept my promise and subscribed.</p>
<p>Better still, later that day I got a reply.</p>
<img src="https://www.filepicker.io/api/file/agNbhVprQoSZAjZaeIau" alt="Draft replies" width="538" height="394" />
<p>You have no idea how delighted I am by this little exchange. And now I&#8217;m spending $4 a month on something I use maybe twice a week for maybe an hour to indulge in what is a glorified hobby.</p>
<p>In comparison, I pay $5 a month for <a class="zem_slink" title="Toggl.com" href="http://www.toggl.com" rel="homepage" target="_blank">Toggl</a> &#8211; the basis of thousands of dollars worth of invoices, I use <a class="zem_slink" title="GitHub" href="http://github.com" rel="homepage" target="_blank">Github</a> daily and don&#8217;t pay a dime &#8230; actually I don&#8217;t pay for most things I spend my whole days on.</p>
<p>Good job Draft, you&#8217;re doing something right. This is probably the biggest bang for buck a service has ever gotten out of me.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=5f8cc117-11b3-4973-8d8d-8481e1aec05b" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/Hc4ukEUqGY4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/how-draft-got-me-to-pay-for-a-free-product/swizec/6186/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/how-draft-got-me-to-pay-for-a-free-product/swizec/6186</feedburner:origLink></item>
		<item>
		<title>An English pet peeve</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/MXPcrxilHcw/6183</link>
		<comments>http://swizec.com/blog/an-english-pet-peeve/swizec/6183#comments</comments>
		<pubDate>Tue, 14 May 2013 11:23:02 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Writing]]></category>
		<category><![CDATA[English language]]></category>
		<category><![CDATA[Linguistics]]></category>
		<category><![CDATA[Verb]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6183</guid>
		<description><![CDATA[Remember that experiment I wrote about last week? Where I say it&#8217;s better to stand up when editing? It works! Only problem is I get kicked out of the kitchen around 4pm, just about an hour after I really properly get to work. Today I want to talk about a little pet peeve I&#8217;ve developed...  <a href="http://swizec.com/blog/an-english-pet-peeve/swizec/6183" class="more-link" title="Read An English pet peeve">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<a href="http://www.flickr.com/photos/49024304@N00/3761634093/sizes/m/in/photostream/"><img class="alignnone" title="A pet peeve by anyjazz65" src="http://farm3.staticflickr.com/2520/3761634093_803731a3d3.jpg" alt="A pet peeve by anyjazz65" width="500" height="500" /></a>
<p>Remember that experiment I wrote about last week? Where I say it&#8217;s better to stand up when editing?</p>
<p>It works! Only problem is I get kicked out of the kitchen around 4pm, just about an hour after I really properly get to work.</p>
<p>Today I want to talk about a little pet peeve I&#8217;ve developed with English over the past few days.</p>
<blockquote class="twitter-tweet"><p>Sometimes I feel English majors are the only people who would understand me, but I don’t know any <img src="http://swizec.com/blog/wp-includes/images/smilies/icon_sad.gif?3e5991" alt=':(' class='wp-smiley' /> </p>
<p>— Swizec (@Swizec) <a href="https://twitter.com/Swizec/status/332973149178187776">May 10, 2013</a></p></blockquote>
<p>Since my d3.js book is supposed to be very inclusive and inviting I use the <a class="zem_slink" title="Grammatical person" href="http://en.wikipedia.org/wiki/Grammatical_person" rel="wikipedia" target="_blank">first person plural</a> a lot. It just sounds better when going through examples to say &#8220;Here we do X&#8221; instead of a preachy &#8220;You should do X&#8221; or a self-absorbed &#8220;I did X&#8221; &#8230; you know, like this post.</p>
<p>As such there are a lot of instances where I write &#8220;Let&#8217;s do something or another&#8221;. <em>Let&#8217;s</em> being a contraction of <em>let us</em>.</p>
<p>Now <em>let</em> is a funny little verb in the English language. It&#8217;s got no fewer than eight meanings, adding some <a class="zem_slink" title="Verb phrase" href="http://en.wikipedia.org/wiki/Verb_phrase" rel="wikipedia" target="_blank">verb phrases</a> and idioms the number goes all the way up to <a href="http://dictionary.reference.com/browse/let?r=75&amp;src=ref&amp;ch=dic" target="_blank"><em>nine-teen</em></a>.</p>
<p>Talk about overloading operators, <a class="zem_slink" title="Scala (programming language)" href="http://www.scala-lang.org/" rel="homepage" target="_blank">Scala</a> can hide in shame before the might of English.</p>
<p>Let&#8217;s &#8211; see how I sneakily used the <a class="zem_slink" title="Possessive" href="http://en.wikipedia.org/wiki/Possessive" rel="wikipedia" target="_blank">possessive form</a> and not a contraction of let us &#8211; primary meaning is roughly &#8220;to allow&#8221;, so when you say &#8220;Let&#8217;s go!&#8221; you are pretty much saying &#8220;Allow us to go!&#8221;. But with slightly less imperative in your voice.</p>
<p>All fine and good.</p>
<p>But in the book I also talk about third parties a lot. It&#8217;s not just me and the reader that are having fun, behind the scenes d3.js&#8217;s functions are working hard to keep us happy. I often write &#8220;This or that function lets us do this or that&#8221;</p>
<p><em>lets us</em></p>
<p>Using &#8220;lets us&#8221; feels more appropriate than saying &#8220;allows us to&#8221; or even &#8220;enables us to&#8221;, especially when I&#8217;m supposed to be shortening my manuscript by 60 pages before publication. And it just feels snappier and better paced than the alternatives.</p>
<p>Here&#8217;s the dilemma: &#8220;lets us&#8221; works in some cases, &#8220;let&#8217;s&#8221; in others and &#8220;let&#8217;s us&#8221; is far out. Laughably wrong.</p>
<p>And one of those appears almost in every other paragraph. Paragraph after paragraph, page after page, for 180 pages.</p>
<p>Every single time I see those six letters I have to stop, take a deep breath, and make sure they are correct. Every. Single. Time.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=864e6d38-e99f-4db9-99ac-c63f63b65ab8" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/MXPcrxilHcw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/an-english-pet-peeve/swizec/6183/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/an-english-pet-peeve/swizec/6183</feedburner:origLink></item>
		<item>
		<title>Write sitting down, edit standing up</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/NfmfeyGWGnA/6175</link>
		<comments>http://swizec.com/blog/write-sitting-down-edit-standing-up/swizec/6175#comments</comments>
		<pubDate>Thu, 09 May 2013 11:29:35 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Writing]]></category>
		<category><![CDATA[editing]]></category>
		<category><![CDATA[Word count]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6175</guid>
		<description><![CDATA[On March 26th I giddily said it takes about two months to write a technical book. Still high from the recent success it seemed like the thing to do. It is now May 9th. I am editing. Well, sort of. I had thought my writing was awesome, that there will be hardly any editing needed...  <a href="http://swizec.com/blog/write-sitting-down-edit-standing-up/swizec/6175" class="more-link" title="Read Write sitting down, edit standing up">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>On March 26th I giddily said <a href="http://swizec.com/blog/it-takes-about-two-months-to-write-a-technical-book/swizec/6076" target="_blank">it takes about two months to write a technical book</a>. Still high from the recent success it seemed like the thing to do.</p>
<div class="wp-caption alignright" style="width: 274px"><img title="Hemingway writing" src="http://images.elephantjournal.com/wp-content/uploads/2010/04/Picture-359.png" alt="Hemingway writing" width="264" height="454" /><p class="wp-caption-text">Hemingway writing</p></div>
<p>It is now May 9th. I am <a class="zem_slink" title="Film editing" href="http://en.wikipedia.org/wiki/Film_editing" rel="wikipedia" target="_blank">editing</a>.</p>
<p>Well, sort of. I had thought my writing was awesome, that there will be hardly any editing needed and on 9th of April, just two weeks later, there was a reality check in my inbox.</p>
<p>It was the editor: &#8220;Hey this is really great, solid writing, I just fixed some spelling and markup for ya.&#8221;</p>
<p>And truly, all the fixes were either typos or <a class="zem_slink" title="British English" href="http://en.wikipedia.org/wiki/British_English" rel="wikipedia" target="_blank">British English</a> &#8211; they want American. Something about markets.</p>
<p>&#8220;Oh and shorten the book by 60 pages. We said 100, you wrote 180, we can do 120 tops.&#8221;</p>
<p><em>*gulp*</em></p>
<p>It is now May 9th. I am editing.</p>
<p>The stickler is that my beta readers said they&#8217;d like even <em>more</em> content in the book, definitely not less. Obviously I can&#8217;t cut any content out of the book and I can&#8217;t make the code examples shorter either. People have already complained the examples are a bit terse and hard to understand at moments.</p>
<p>I could take out some screenshots, but this is a book about creating shiny visualisations for the internet. Screenshots must stay.</p>
<p>Only thing left is the writing. I have to go through the whole book and use less words to say more.</p>
<p><em>*gulp*</em></p>
<p>Facing such a monumental task it is therefore not a surprise I&#8217;ve only spent about 30 hours editing my book in the last month. That&#8217;s averaging just an hour per day &#8211; the average for writing was two and a half.</p>
<p>And editing time isn&#8217;t even half as efficient as writing time. For every two minutes of staring bleary eyed at the screen, dragging the words through my mind like so much barbed wire, I spend five minutes prancing about on the internet feeling like I&#8217;m riding a unicorn in comparison.</p>
<p>Editing really is sheer drudgery. There is no flow. There is no inspiration. Just a constant ruthless cutting and rewording. All those little things you thought added a special flair to the writing, let your personality shine through, entertained the reader.</p>
<p>Waste. Plain old waste. Vomit of a writer who&#8217;s been staring at the screen too long.</p>
<p>It all has to go.</p>
<p>And the writing is <em>much</em> better for it. But you&#8217;re still sad to see it all go.</p>
<p>Actually, not so much sad, as indifferent. You don&#8217;t feel anything but the monotonous drudgery of rewriting something you&#8217;ve already written and not coming up with anything new. You can&#8217;t, add something new and the word count goes up not down. Can&#8217;t have that!</p>
<p>It&#8217;s been fairly successful too. I&#8217;ve finished the first two chapters. One cut down from 14 to 9 pages, the other from 51 to 40. Just by improving the writing. No loss of content.</p>
<p>But it&#8217;s just so &#8230; it&#8217;s terrible.</p>
<p>This weekend I discovered a trick, though. I was at a friend&#8217;s place and as I was editing in the kitchen I realized that the chairs are terrible and the table is the wrong height.</p>
<p>Peeved, I moved to the counter. Editing standing next to the kitchen counter, shoulders slouched to stare at the screen &#8230;</p>
<p>&#8230; before I knew it, two hours had passed and I edited five pages of text. Amazing! I had fallen into flow. <em>Editing!</em> Flow!</p>
<p>I don&#8217;t actually know if this was because of my friend&#8217;s kitchen or because I was standing while writing. But I&#8217;m going to repeat the experiment today.</p>
<p>Fingers crossed it works!</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=1c1fccc8-b519-4743-bf53-a2da2f56481a" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/NfmfeyGWGnA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/write-sitting-down-edit-standing-up/swizec/6175/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/write-sitting-down-edit-standing-up/swizec/6175</feedburner:origLink></item>
		<item>
		<title>Mouse movements in a day of coding</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/zA5vfAuHBdM/6167</link>
		<comments>http://swizec.com/blog/mouse-movements-in-a-day-of-coding/swizec/6167#comments</comments>
		<pubDate>Tue, 07 May 2013 11:17:49 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Emacs]]></category>
		<category><![CDATA[Mouse]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Workspace]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6167</guid>
		<description><![CDATA[A few weeks ago I bought a fancy new mouse to replace my fancy old mouse. Sure it&#8217;s nice and comfy, but how much do I actually use it? When you pay close to a hundred euro for something you want to make sure it&#8217;s doing its job. Yesterday I tried. For the whole day,...  <a href="http://swizec.com/blog/mouse-movements-in-a-day-of-coding/swizec/6167" class="more-link" title="Read Mouse movements in a day of coding">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I bought a fancy new <a class="zem_slink" title="Mouse (computing)" href="http://en.wikipedia.org/wiki/Mouse_%28computing%29" rel="wikipedia" target="_blank">mouse</a> to replace my fancy old mouse. Sure it&#8217;s nice and comfy, but how much do I actually use it? When you pay close to a hundred euro for something you want to make sure it&#8217;s doing its job.</p>
<p>Yesterday I tried.</p>
<p>For the whole day, when the freelancing clock was running, so was <a href="http://iographica.com/" target="_blank">IOGraph</a> &#8211; a handy tool for recording mouse movements.</p>
<a href="http://swizec.com/blog/wp-content/uploads/2013/05/a-day-of-coding.png?3e5991"><img class="alignnone  wp-image-6169" title="A day of coding" src="http://swizec.com/blog/wp-content/uploads/2013/05/a-day-of-coding-1024x363.png?3e5991" alt="A day of coding" width="717" height="254" /></a>
<p>I have dual screens, am running <a class="zem_slink" title="Ubuntu (operating system)" href="http://www.ubuntu.com" rel="homepage" target="_blank">Ubuntu</a> and use <a class="zem_slink" title="Emacs" href="http://www.gnu.org/software/emacs" rel="homepage" target="_blank">Emacs</a> to write code. Certainly the sort of environment that favours using your keyboard over your mouse and yet, the mouse gets used quite a lot.</p>
<p>The image above shows paths my mouse has taken through the day, dots show where the mouse has been standing still for a while &#8211; the bigger the dot, the longer the time &#8211; and I am honestly not certain what the circles around small black dots are. Clicks perhaps?</p>
<p>Other than the fact I use my mouse more than I thought, three patterns emerge.</p>
<ol>
<li>There is a blank space roughly down the middle where I never place my mouse &#8211; the dividing line between two monitors. You can see the left is wider than the right.</li>
<li>Despite being used a lot, the mouse spends most of its time <strong>standing still</strong>. Most of the image is taken up by relatively few very large black dots. The largest two are right where I had two terminal windows that I often switched between (one running a server instance, the other used for git). The rest are mostly on the far right where I have my browser. Apparently I like to click around, then leave the mouse there when I go back to coding? Or maybe page loads are slow?</li>
<li>Emacs takes up the left half of the screen. I sometimes put my mouse here, but rarely for long because the cursor gets in the way.</li>
</ol>
<p>You can also notice I spend a lot of time switching the last few tabs in <a class="zem_slink" title="Google Chrome" href="http://www.google.com/chrome" rel="homepage" target="_blank">Chrome</a>, possibly opening and closing them as I browse the interwebs for help with <a class="zem_slink" title="Ruby (programming language)" href="http://www.ruby-lang.org/" rel="homepage" target="_blank">Ruby</a>? That&#8217;s all the lines going to the upper right corner.</p>
<p>Here&#8217;s a screenshot of the desktop as I left it last night. Most of the tabs already closed because I have to save memory, but you can still see the rough layout of the windows I worked with. Had I some photoshop skill I&#8217;d overlay IOgraph output over the screenshot.</p>
<div id="attachment_6171" class="wp-caption alignnone" style="width: 829px"><a href="http://swizec.com/blog/wp-content/uploads/2013/05/Workspace-1_193.png?3e5991"><img class=" wp-image-6171 " title="Workspace" src="http://swizec.com/blog/wp-content/uploads/2013/05/Workspace-1_193-1024x363.png?3e5991" alt="Workspace" width="819" height="290" /></a><p class="wp-caption-text">Workspace</p></div>
<p>Now I wonder if mouse patterns are different for other languages and technology stacks &#8230; I have experimenting to do!</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=638e0b4f-5b2f-4a1e-9476-a1d85e6bdfd9" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/zA5vfAuHBdM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/mouse-movements-in-a-day-of-coding/swizec/6167/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/mouse-movements-in-a-day-of-coding/swizec/6167</feedburner:origLink></item>
		<item>
		<title>Videos from first Javascript meetup in Ljubljana</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/rxH9VvZ4GYY/6161</link>
		<comments>http://swizec.com/blog/videos-from-first-javascript-meetup-in-ljubljana/swizec/6161#comments</comments>
		<pubDate>Fri, 03 May 2013 12:15:40 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Travel&Events]]></category>
		<category><![CDATA[AngularJS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Ljubljana]]></category>
		<category><![CDATA[meetup]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[TypeScript]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6161</guid>
		<description><![CDATA[Tuesday evening saw the first JavaScript meetup in Ljubljana and I think it was a smashing success, if I do say so myself. Everyone who RSVP&#8217;d managed to make it despite the impending holidays next day. Surprising how difficult it is to count people calmly sitting in place and not moving. I&#8217;d make a terrible...  <a href="http://swizec.com/blog/videos-from-first-javascript-meetup-in-ljubljana/swizec/6161" class="more-link" title="Read Videos from first Javascript meetup in Ljubljana">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<img class="alignnone" title="Full house at #jsmeet \o/ " src="http://25.media.tumblr.com/0709450f2930b60a1bb57c71508cc989/tumblr_mm2vpzWcTb1qekjngo1_500.jpg" alt="Full house at #jsmeet \o/ " width="500" height="500" />
<p>Tuesday evening saw the first <a class="zem_slink" title="JavaScript" href="http://en.wikipedia.org/wiki/JavaScript" rel="wikipedia" target="_blank">JavaScript</a> meetup in <a class="zem_slink" title="Ljubljana" href="http://maps.google.com/maps?ll=46.0555555556,14.5083333333&amp;spn=0.1,0.1&amp;q=46.0555555556,14.5083333333 (Ljubljana)&amp;t=h" rel="geolocation" target="_blank">Ljubljana</a> and I think it was a smashing success, if I do say so myself. Everyone who RSVP&#8217;d managed to make it despite the impending holidays next day.</p>
<p>Surprising how difficult it is to count people calmly sitting in place and not moving. I&#8217;d make a terrible guardian for children on a fieldtrip, but there were somewhere between 38 and 47 people based on my various counts.</p>
<p>All the speakers did a great job of presenting their topics and I was happy to see next to no smartphone and laptop <a class="zem_slink" title="Omphaloskepsis" href="http://en.wikipedia.org/wiki/Omphaloskepsis" rel="wikipedia" target="_blank">navel gazing</a> from the audience. Rare sight at these sorts of events.</p>
<p>We learned about writing performant JavaScript, where the biggest challenge is maintaining performance across browsers and devices. Apparently writing performant JavaScript for Chrome on a quad core desktop monster is much easier than a four year old smartphone running an outdated version of Android.</p>
<p>Then it was straight to an overview of using modern MV* libraries and the difference between frameworks and libraries &#8211; a library is fairly open-minded and a framework is smarter than you so you have to obey.</p>
<p>The talk about <a class="zem_slink" title="AngularJS" href="http://www.angularjs.org/" rel="homepage" target="_blank">AngularJS</a> deepened the subject by showing a few code examples with AngularJS. Looks like it&#8217;s very easy to magically connect things on the screen, but step out of what Angular knows is best and you will have a bad time and likely way too much work.</p>
<p>In the end, the talk about <a class="zem_slink" title="TypeScript" href="http://www.typescriptlang.org/" rel="homepage" target="_blank">TypeScript</a> explained what it looks like when you port Java to JavaScript. The most interesting part for me was observing the difference in style preferences. I honestly don&#8217;t think TypeScript looks better than just using JavaScript &#8230;</p>
<p>Either way, the videos are now online. Have a look.</p>
<ul>
<li><a href="http://video.kiberpipa.org/jsmeet_slavic_performance_optimizing/" target="_blank">Bare Metal Coding: Optimising Your Javascript for Leaner, Meaner, Performance</a></li>
<li><a href="http://video.kiberpipa.org/jsmeet_bergant_mv_libraries/" target="_blank">MV* Libraries</a></li>
<li><a href="http://video.kiberpipa.org/jsmeet_zakrajsek_angularjs/" target="_blank">AngularJS</a></li>
<li><a href="http://video.kiberpipa.org/jsmeet_pirc_typescript/" target="_blank">TypeScript</a></li>
</ul>
<p>Unfortunately the videos don&#8217;t convey the great job beer and cupcakes did of keeping everyone around for a nice geeky chat.</p>
<div class="wp-caption alignnone" style="width: 510px"><img title="Javascript cupcakes" src="http://25.media.tumblr.com/bfd6cbb451b8df301fc60d6a112aafe9/tumblr_mm2zal1gcT1qekjngo1_500.jpg" alt="Javascript cupcakes" width="500" height="500" /><p class="wp-caption-text">Javascript cupcakes</p></div>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=7645a74b-c6cc-4bad-b383-c4a274202355" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/rxH9VvZ4GYY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/videos-from-first-javascript-meetup-in-ljubljana/swizec/6161/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/videos-from-first-javascript-meetup-in-ljubljana/swizec/6161</feedburner:origLink></item>
		<item>
		<title>Writing a REST client in Haskell</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/UUqSMk7h6qU/6152</link>
		<comments>http://swizec.com/blog/writing-a-rest-client-in-haskell/swizec/6152#comments</comments>
		<pubDate>Thu, 25 Apr 2013 11:36:28 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Aeson]]></category>
		<category><![CDATA[Haskell]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[Monads]]></category>
		<category><![CDATA[Parsing]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6152</guid>
		<description><![CDATA[A few days ago I decided to buy some bitcoin. Then I noticed it fluctuates a lot despite a general upwards trend. Hmmm &#8230; if I just bought at the right moment and sold at a different right moment, I could make money fall out of the void! I have since lost $5 by playing...  <a href="http://swizec.com/blog/writing-a-rest-client-in-haskell/swizec/6152" class="more-link" title="Read Writing a REST client in Haskell">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>A few days ago I decided to buy some bitcoin. Then I noticed it fluctuates a lot despite a general upwards trend. Hmmm &#8230; if I just bought at the right moment and sold at a different right moment, I could make money fall out of the void!</p>
<p>I have since lost $5 by playing and gained $30 by leaving it alone. Obviously I suck at this &#8230;</p>
<p>I know! Let&#8217;s make a bot that does this! A low frequency trading bot, that sounds like fun. And let&#8217;s write it in <a class="zem_slink" title="Haskell (programming language)" href="http://haskell.org" rel="homepage" target="_blank">Haskell</a>, just to keep things interesting. Marrying the strictest of languages with the messiest of resources &#8211; the internet &#8230; what could possibly go wrong?</p>
<p>First order of business &#8211; a REST client.</p>
<h2>REST client</h2>
<p>Before my bot can do any trading and intricate <a class="zem_slink" title="Algorithmic trading" href="http://en.wikipedia.org/wiki/Algorithmic_trading" rel="wikipedia" target="_blank">algorithmic trading</a>, it needs to talk to the marketplace of choice. I picked Bitstamp because they&#8217;re the only ones that let me do this without a US bank account.</p>
<p>Writing a REST client in most languages is simple. Reading Bitstamp&#8217;s ticker in Python looks like this:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> requests<span style="color: #66cc66;">,</span> json
&nbsp;
r <span style="color: #66cc66;">=</span> requests.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;https://www.bitstamp.net/api/ticker&quot;</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">print</span> json.<span style="color: black;">loads</span><span style="color: black;">&#40;</span>r.<span style="color: black;">content</span><span style="color: black;">&#41;</span>
<span style="color: #808080; font-style: italic;"># prints: {u'volume': u'17179.28558844', u'last': u'159.49', u'bid': u'159.49', u'high': u'161.00', u'low': u'139.00', u'ask': u'159.64'}</span></pre></td></tr></table></div>

<p>That&#8217;s it. Everything you need for a set of values nicely accessible as a dictionary.</p>
<p>In Haskell, well in Haskell figuring out how to do that took me all night, then a bit of the morning and finally a helpful tweet from a stranger to tell me just how I was misusing monads.</p>
<p>First of all, we are going to need a bunch of imports. The ones we <em>really</em> care about are the <em>http-conduit</em> library and the <em>Aeson</em> parser of <a class="zem_slink" title="JSON" href="http://json.org/" rel="homepage" target="_blank">JSON</a> strings. Everything else is there because &#8230; well I&#8217;m not sure actually, but it seems to be necessary, otherwise things don&#8217;t work.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="haskell" style="font-family:monospace;"><span style="color: #5d478b; font-style: italic;">{-# LANGUAGE OverloadedStrings #-}</span>
&nbsp;
<span style="color: #06c; font-weight: bold;">import</span> Network<span style="color: #339933; font-weight: bold;">.</span>HTTP<span style="color: #339933; font-weight: bold;">.</span>Conduit
<span style="color: #06c; font-weight: bold;">import</span> Control<span style="color: #339933; font-weight: bold;">.</span><span style="color: #cccc00; font-weight: bold;">Monad</span><span style="color: #339933; font-weight: bold;">.</span><span style="color: #cccc00; font-weight: bold;">IO</span><span style="color: #339933; font-weight: bold;">.</span>Class
<span style="color: #06c; font-weight: bold;">import</span> Data<span style="color: #339933; font-weight: bold;">.</span>ByteString<span style="color: #339933; font-weight: bold;">.</span>Lazy
<span style="color: #06c; font-weight: bold;">import</span> Data<span style="color: #339933; font-weight: bold;">.</span>Aeson
<span style="color: #06c; font-weight: bold;">import</span> Data<span style="color: #339933; font-weight: bold;">.</span>Attoparsec<span style="color: #339933; font-weight: bold;">.</span>Number
<span style="color: #06c; font-weight: bold;">import</span> Control<span style="color: #339933; font-weight: bold;">.</span>Applicative
<span style="color: #06c; font-weight: bold;">import</span> Control<span style="color: #339933; font-weight: bold;">.</span><span style="color: #cccc00; font-weight: bold;">Monad</span><span style="color: #339933; font-weight: bold;">.</span>Trans</pre></td></tr></table></div>

<p>I am not perfectly certain what the OverloadedStrings bit at the top does. It&#8217;s some sort of compiler directive and most haskell libraries I find in the wild tell me I will be a much happier man if I turn it on. Shrug.</p>
<p>All it takes now is making an <a class="zem_slink" title="Hypertext Transfer Protocol" href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol" rel="wikipedia" target="_blank">HTTP request</a> and parsing the response as JSON. Simple, right?</p>
<p>Well, Haskell is strict and you can&#8217;t just parse things all willy nilly. We need to tell the parser what we expect, what we want to do with the result and what <em>type</em> it&#8217;s going to be. Can&#8217;t just have a bag of stuff! Nope, needs to be a well defined bag of things.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="haskell" style="font-family:monospace;"><span style="color: #06c; font-weight: bold;">data</span> Ticker <span style="color: #339933; font-weight: bold;">=</span> Ticker
              <span style="color: green;">&#123;</span> high <span style="color: #339933; font-weight: bold;">::</span> Number<span style="color: #339933; font-weight: bold;">,</span>
                <span style="font-weight: bold;">last</span> <span style="color: #339933; font-weight: bold;">::</span> Number<span style="color: #339933; font-weight: bold;">,</span>
                bid <span style="color: #339933; font-weight: bold;">::</span> Number<span style="color: #339933; font-weight: bold;">,</span>
                volume <span style="color: #339933; font-weight: bold;">::</span> Number<span style="color: #339933; font-weight: bold;">,</span>
                low <span style="color: #339933; font-weight: bold;">::</span> Number<span style="color: #339933; font-weight: bold;">,</span>
                ask <span style="color: #339933; font-weight: bold;">::</span> Number
              <span style="color: green;">&#125;</span> <span style="color: #06c; font-weight: bold;">deriving</span> <span style="color: #cccc00; font-weight: bold;">Show</span></pre></td></tr></table></div>

<p>Great. We have a <em>Ticker</em> type that has a bunch of numbers and some names. That <em>Show </em>part seems to say that we&#8217;ll be able to print this out to the console. Smashing!</p>
<p>That&#8217;s not enough though, it is time for some strange hieroglyphics that tell <em>Aeson</em> how exactly parsing works.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="haskell" style="font-family:monospace;"><span style="color: #06c; font-weight: bold;">instance</span> FromJSON Ticker <span style="color: #06c; font-weight: bold;">where</span>
  parseJSON <span style="color: green;">&#40;</span>Object v<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">=</span> Ticker 
                         v <span style="color: #339933; font-weight: bold;">.</span>: <span style="background-color: #3cb371;">&quot;high&quot;</span> 
                         v <span style="color: #339933; font-weight: bold;">.</span>: <span style="background-color: #3cb371;">&quot;last&quot;</span> 
                         v <span style="color: #339933; font-weight: bold;">.</span>: <span style="background-color: #3cb371;">&quot;bid&quot;</span> 
                         v <span style="color: #339933; font-weight: bold;">.</span>: <span style="background-color: #3cb371;">&quot;volume&quot;</span> 
                         v <span style="color: #339933; font-weight: bold;">.</span>: <span style="background-color: #3cb371;">&quot;low&quot;</span> 
                         v <span style="color: #339933; font-weight: bold;">.</span>: <span style="background-color: #3cb371;">&quot;ask&quot;</span></pre></td></tr></table></div>

<p>If I understand this correctly, those strange symbols are applicatives. The <em>.: </em>does &#8230; something &#8230; and the <em>&lt;$&gt; </em>and <em>&lt;*&gt; </em>do something else. The whole bit is about defining how to convert a key in the JSON string into a value in the <em>Ticker</em> type. I think.</p>
<p>Right, let&#8217;s make a function that will talk to the server and return a <em>Ticker </em>object. Maybe. If all goes well.</p>
<blockquote class="twitter-tweet"><p>@<a href="https://twitter.com/swizec">swizec</a> yes, you actually need to do something like this:ticker = get &#8220;ticker&#8221; &gt;&gt;= return . decode :: MonadIO m =&gt; m (Maybe Ticker)</p>
<p>— 蓮 (@k0001) <a href="https://twitter.com/k0001/status/326972349196926977">April 24, 2013</a></p></blockquote>

<div class="wp_syntax"><table><tr><td class="code"><pre class="haskell" style="font-family:monospace;">ticker<span style="color: #339933; font-weight: bold;">::</span><span style="color: green;">&#40;</span>MonadIO m<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">=&gt;</span> m <span style="color: green;">&#40;</span><span style="color: #cccc00; font-weight: bold;">Maybe</span> Ticker<span style="color: green;">&#41;</span>
ticker <span style="color: #339933; font-weight: bold;">=</span> get <span style="background-color: #3cb371;">&quot;ticker&quot;</span> <span style="color: #339933; font-weight: bold;">&gt;&gt;=</span> <span style="font-weight: bold;">return</span> <span style="color: #339933; font-weight: bold;">.</span> decode</pre></td></tr></table></div>

<p>Fairly simple stuff. Take something from the internet carefully wrapped in <em>MonadIO</em>, unwrap it for a bit, feed it into <em>decode</em>, which magically uses all the stuff we defined earlier, and wrap it back into both a <em>MonadIO</em> and a <em>Maybe.</em> Parsing can fail you know.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="haskell" style="font-family:monospace;">get<span style="color: #339933; font-weight: bold;">::</span><span style="color: green;">&#40;</span>MonadIO m<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">=&gt;</span> <span style="color: #cccc00; font-weight: bold;">String</span> <span style="color: #339933; font-weight: bold;">-&gt;</span> m ByteString
get url <span style="color: #339933; font-weight: bold;">=</span> simpleHttp <span style="color: #339933; font-weight: bold;">$</span> <span style="background-color: #3cb371;">&quot;https://www.bitstamp.net/api/&quot;</span><span style="color: #339933; font-weight: bold;">++</span>url</pre></td></tr></table></div>

<p>This is the generalized <em>get</em> function that talks to Bitstamp using the <em>simpleHttp</em> function from <em>http-conduit</em>. It looks simple, but I&#8217;m sure a lot of hairy stuff is going on behind the scenes.</p>
<p>To make sure everything works, we run it.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="haskell" style="font-family:monospace;">main <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #06c; font-weight: bold;">do</span>
  ticker <span style="color: #339933; font-weight: bold;">&gt;&gt;=</span> <span style="font-weight: bold;">print</span></pre></td></tr></table></div>

<p>Nothing.</p>
<p>Yup, the output we get is Nothing. It is at this point you realize <em>someone</em> isn&#8217;t using JSON correctly and all those numbers are actually strings. Strings. Now how the hell do you tell Haskell to automagically transform those into Numbers before putting them in the Ticker object?</p>
<p>Messy messy internet.</p>
<p>But hey! Got Haskell to talk to a <a class="zem_slink" title="Representational state transfer" href="http://en.wikipedia.org/wiki/Representational_state_transfer" rel="wikipedia" target="_blank">REST API</a>. How cool is that!?</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=5492ac2c-3abf-45a3-9680-dd8c31c07973" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/UUqSMk7h6qU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/writing-a-rest-client-in-haskell/swizec/6152/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/writing-a-rest-client-in-haskell/swizec/6152</feedburner:origLink></item>
		<item>
		<title>I love being a geek</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/ZorHAXtfwOA/6146</link>
		<comments>http://swizec.com/blog/i-love-being-a-geek/swizec/6146#comments</comments>
		<pubDate>Tue, 23 Apr 2013 11:10:42 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[Enid Blyton]]></category>
		<category><![CDATA[Famous Five]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Geeks and Nerds]]></category>
		<category><![CDATA[Subcultures]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6146</guid>
		<description><![CDATA[I have always seen myself as a stereotypical geek. Kind of introverted, not very athletic, infinitely excitable about the strangest of things, spends more time with people on the internet than talking face-to-face, prefers it even. And I love being that. The infinite freedom that comes with being a geek is intoxicating. While normal people...  <a href="http://swizec.com/blog/i-love-being-a-geek/swizec/6146" class="more-link" title="Read I love being a geek">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<a href="http://www.flickr.com/photos/aaronbassett/3817371960/"><img class="alignnone" title="Geek shelf by Aaron Bassett" src="http://farm3.staticflickr.com/2554/3817371960_1d173bd07f_z.jpg" alt="Geek shelf by Aaron Bassett" width="640" height="360" /></a>
<p>I have always seen myself as a stereotypical geek. Kind of introverted, not very athletic, infinitely excitable about the strangest of things, spends more time with people on the internet than talking face-to-face, prefers it even.</p>
<p>And I love being that. The infinite freedom that comes with being a geek is intoxicating.</p>
<p>While normal people have to worry about keeping appearances, about maintaining a fine-knit web of social interaction through a series of carefully maintained half truths, I can just be myself. Because I&#8217;m a geek.</p>
<p>People pretending they like certain things, pretending they care about this or that issue, just to fit in. Just so they&#8217;ll be liked. As a geek I don&#8217;t have to do any of that.</p>
<p>As a geek I can shout at the top of my lungs <em>&#8220;I don&#8217;t understand football&#8221;</em> at the height of football fever during a world championship. Nobody minds, nobody laughs, they just explain the game. <em>&#8220;Don&#8217;t mind him, he&#8217;s a geek you see, he doesn&#8217;t get normal people stuff&#8221;</em></p>
<p>When I was about ten years old I couldn&#8217;t get enough of <a class="zem_slink" title="Five on a Treasure Island (Famous Five)" href="http://www.amazon.com/Five-Treasure-Island-Famous/dp/0340796146%3FSubscriptionId%3D0G81C5DAZ03ZR9WH9X82%26tag%3Dageewitahat-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0340796146" rel="amazon" target="_blank">The Famous Five series</a> by <a class="zem_slink" title="Enid Blyton" href="http://www.enidblytonsociety.co.uk" rel="homepage" target="_blank">Enid Blyton</a>. Library copies were always tattered to bits and that just made them better. I don&#8217;t remember much, but I do remember one character clearly &#8211; The Scientist. He was <a class="zem_slink" title="George Kirrin" href="http://en.wikipedia.org/wiki/George_Kirrin" rel="wikipedia" target="_blank">George</a>&#8216;s dad or uncle and his defining characteristic was that he was always kind of grumpy and locked up in his room where he was &#8220;doing science&#8221;.</p>
<p>Not to be bothered. Not to be disturbed. Not to even be thought about too loudly. Lunch was often taken to his room because he would forget to eat.</p>
<p>Imagine that!</p>
<p>A guy who gets peace and quiet to work. All summer. In a house full of 12 year olds. That&#8217;s the power of being a geek.</p>
<p>Geeks &#8211; the only people who get to truly be themselves even as adults. I love it! (said with my best Tennant impersonation)</p>
<p>It&#8217;s all starting to unravel for me though. People are suggesting I might want to &#8220;grow up&#8221; &#8230; whatever that means.</p>
<p>Just the other day someone mentioned I do a lot of sports. Ironically this happened at boxing practice; she spends 5 days a week there. A person who goes to practice 5 days a week thinks I do a lot of sports &#8230; I have never been so confused.</p>
<p>A few days later I had a call with someone looking for &#8220;somebody older&#8221; to be a technical lead. An old sage to look over the rabble of Stanford grads he&#8217;s built a team out of. I&#8217;M TWENTY-FIVE!</p>
<p>I hope it&#8217;s not too late for me. Save yourselves! Be geeky!</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=438c823e-3724-451f-9fb5-14ac805cded3" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/ZorHAXtfwOA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/i-love-being-a-geek/swizec/6146/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/i-love-being-a-geek/swizec/6146</feedburner:origLink></item>
		<item>
		<title>First JavaScript meetup in Ljubljana is right around the corner</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/zBVJsRTXOjI/6137</link>
		<comments>http://swizec.com/blog/first-javascript-meetup-in-ljubljana-is-right-around-the-corner/swizec/6137#comments</comments>
		<pubDate>Thu, 18 Apr 2013 11:18:35 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6137</guid>
		<description><![CDATA[A while ago I realized that whenever someone asks me if I know any javascript developers, I always come up empty. Shame on me! Using a technology heavily for many years and not really knowing anyone from the community. That&#8217;s why I decided to organise a meetup! The first purely Javascript event in Ljubljana. Sure...  <a href="http://swizec.com/blog/first-javascript-meetup-in-ljubljana-is-right-around-the-corner/swizec/6137" class="more-link" title="Read First JavaScript meetup in Ljubljana is right around the corner">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<a href="http://www.flickr.com/photos/lamantin/5143354092/sizes/m/in/photostream/"><img class="alignnone" title="Cupcakes by lamantin" src="http://farm5.staticflickr.com/4040/5143354092_9aef18b63e_o.png" alt="Cupcakes by lamantin" width="640" height="425" /></a>
<p>A while ago I realized that whenever someone asks me if I know any javascript developers, I always come up empty. Shame on me! Using a technology heavily for many years and not really knowing anyone from the community.</p>
<p>That&#8217;s why I decided to organise a meetup! The first purely Javascript event in Ljubljana. Sure there have been barcamps and webcamps and mobilecamps &#8230; plenty of occasional Javascript users come to those, but that&#8217;s not what we&#8217;re on about here. This time we want to focus on people who use Javascript <em>a lot</em>.</p>
<p><span style="font-size: 1.2em;"><a href="http://www.meetup.com/Ljubljana-JavaScript-User-Group/events/112046942/" target="_blank">Come join us</a> on the 30th of April at 7pm in Kiberpipa! It&#8217;s gonna be fun!</span></p>
<p>People doing full stack Javascript, or writing fancy frontend apps in various MV* frameworks. That sort of stuff. It&#8217;s time the community gets to know each other, or at least for me to find the community. <img src="http://swizec.com/blog/wp-includes/images/smilies/icon_smile.gif?3e5991" alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;m happy to announce that after weeks of effort (read: remembering to send an email or tweet a link once in a while) we finally have four presenters, free beer and plenty of people who promised they&#8217;d make it. Hooray!</p>
<p>There&#8217;s even going to be a lady giving one of those talks! That one did actually take a lot of effort to find &#8230; I don&#8217;t know what is it with girls, but it sure is difficult to find some willing to give a talk about something cool in front of a bunch of dudes. We&#8217;re not that scary, are we?</p>
<p>Here&#8217;s the list of talks:</p>
<ul>
<li>AngularJS (<a href="https://twitter.com/bancek">Luka Zakrajsek</a>)</li>
<li>Frontend testing with Casperjs (<a href="https://twitter.com/robertbasic">Robert Basic</a>)</li>
<li>MV* libraries (Jana Bergant)</li>
<li>Bare Metal Coding: Optimising Your Javascript for Leaner, Meaner Performance (<a href="https://twitter.com/krofdrakula">Klemen Slavič</a>)</li>
</ul>
<p>There are also going to be cupcakes!</p>
<p>What do you think a JavaScript Cupcake should look like? I really need your help with this one. Google doesn&#8217;t have a single idea. Imagine that, all these years and nobody&#8217;s tried to design a javascript cupcake before.</p>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/zBVJsRTXOjI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/first-javascript-meetup-in-ljubljana-is-right-around-the-corner/swizec/6137/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/first-javascript-meetup-in-ljubljana-is-right-around-the-corner/swizec/6137</feedburner:origLink></item>
		<item>
		<title>How CamelCase ruined my day and my dev environment</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/wz-Dz3x6-PI/6129</link>
		<comments>http://swizec.com/blog/how-camelcase-ruined-my-day-and-my-dev-environment/swizec/6129#comments</comments>
		<pubDate>Tue, 16 Apr 2013 11:25:41 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Bitcoin]]></category>
		<category><![CDATA[CamelCase]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RubyGems]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6129</guid>
		<description><![CDATA[Yesterday everything went so comically wrong I just have to share. This post might be more a confession than a tale of warning, you be the judge. My objective, convert prices in USD to prices in bitcoin. Simple. Especially after I discovered someone&#8217;s already made a gem that talks to the MtGox exchange and tells...  <a href="http://swizec.com/blog/how-camelcase-ruined-my-day-and-my-dev-environment/swizec/6129" class="more-link" title="Read How CamelCase ruined my day and my dev environment">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignright" style="width: 250px"><a href="http://www.flickr.com/photos/22823034@N00/7297820998" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="Bitcoin Magazine" src="http://farm8.static.flickr.com/7082/7297820998_d94789a144_m.jpg" alt="Bitcoin Magazine" width="240" height="135" /></a><p class="wp-caption-text">Bitcoin Magazine (Photo credit: zcopley)</p></div>
<p>Yesterday everything went so comically wrong I just have to share. This post might be more a confession than a tale of warning, you be the judge.</p>
<p>My objective, convert prices in USD to prices in bitcoin. Simple. Especially after I discovered someone&#8217;s already made a <a href="https://github.com/sferik/mtgox" target="_blank">gem that talks to the MtGox exchange</a> and tells me how much a single BTC is worth.</p>
<p>All I had to do was this:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="console" style="font-family:monospace;">Gemfile:
gem 'mtgox'
&nbsp;
bundle install
&nbsp;
Controller:
price/MtGox.ticker.sell</pre></td></tr></table></div>

<p>Simple, right?</p>
<p>Because I like to make sure I&#8217;m working from a sane state I first ran the test suite. <a class="zem_slink" title="Ruby (programming language)" href="http://www.ruby-lang.org/" rel="homepage" target="_blank">Ruby</a> core dump.</p>
<p>Right, I&#8217;ve been having these problems randomly for about a week now and they usually go away if you run the tests twice or thrice. This time, it just did not work. I got a ruby core dump, <em>you have probably encountered a ruby bug</em> every single time.</p>
<p>No wonder! My Ruby interpreter is going to be a year old in a few days! Let&#8217;s update. It all went downhill from that. And not in a pleasant adrenaline rush kind of way either.</p>
<p>After about an hour of fiddling with RVM and Ruby versions and aliasing things from <em>~/.rvm/bin/</em> to <em>/usr/bin/</em> the tests are finally running and I can begin.</p>
<p>Mtgox is not defined.</p>
<p>Hmm &#8230; okay then. I thought Rails automagically loaded all gems specified in the Gemfile. A quick google later and I discovered that I can list all loaded gems with <em>Gem.loaded_specs.keys</em>.</p>
<p>Sure thing, the gem was loaded.</p>
<p>Right, let&#8217;s make a separate ruby file and make sure things are working.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'mtgox'</span>
&nbsp;
<span style="color:#CC0066; font-weight:bold;">puts</span> Mtgox.<span style="color:#9900CC;">ticker</span>.<span style="color:#9900CC;">sell</span></pre></td></tr></table></div>

<p>No such gem &#8220;mtgox&#8221;.</p>
<p>Grrrr, okay fine. <em>gem install mtgox</em> &#8230; already installed, wtf are you doing Swizec, you have that? Oh right, I did just update my Ruby stuff and maybe broke the environment and require paths are confused.</p>
<p>Let&#8217;s try this on my mac, I haven&#8217;t done any fiddling there.</p>
<p>The mtgox gem only works with Ruby 1.9.2+, you have 1.8.7 &#8230; that&#8217;s what you get for using your expensive laptop as a Skype and <a class="zem_slink" title="Internet Relay Chat" href="http://en.wikipedia.org/wiki/Internet_Relay_Chat" rel="wikipedia" target="_blank">IRC</a> machine. I can just update this, no problem!</p>
<p>Your Homebrew is out of date. Your <a class="zem_slink" title="Xcode" href="http://developer.apple.com/tools/xcode/" rel="homepage" target="_blank">XCode</a> does not exist. I have no idea what you&#8217;re trying to do!</p>
<p>Grargh.</p>
<p>Fiddle fiddle fiddle and I eventually get Homebrew installed after at least an hour of <em>effort</em>. Let&#8217;s try that RVM thing once again.</p>
<p>After several fails with automake and sometimes just simply saying <em>&#8220;Hey, an error happened&#8221; </em>and the log looking perfectly fine I finally got it to start installing Ruby.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="console" style="font-family:monospace;">ruby-1.9.3-p392 - #configuring........
ruby-1.9.3-p392 - #compiling.
ruby-1.9.3-p392 - #installing .
ruby-1.9.3-p392 is not installed.
To install do: 'rvm install ruby-1.9.3-p392'</pre></td></tr></table></div>

<p>What?</p>
<p>Fine, I give up on you laptop, we will pick this fight another day. Back to the Ubuntu box.</p>
<p>After deleting all Ruby binaries from <em>/usr/bin</em> it finally decided to start using things in <em>~/.rvm/</em> and lo and behold, I can require the mtgox gem.</p>
<p>Mtgox is undefined.</p>
<p>God damn it! What now!? What could possibly be wrong now!?</p>
<p>Find the source. Add some puts. Yes, yes the gem <strong>is</strong> getting loaded. It&#8217;s printing to the console and I can &#8230; wait a minute. It says <em>module MtGox</em>, not <em>module Mtgox</em></p>
<p>Oh for fuck&#8217;s sake! Capital G &#8230; All this time. All this effort. And I never, not once, noticed the module was <a class="zem_slink" title="CamelCase" href="http://en.wikipedia.org/wiki/CamelCase" rel="wikipedia" target="_blank">CamelCase</a> instead of just capital first letter.</p>
<p>Sigh.</p>
<p>Oh, now running <em>bundle</em> says bundler isn&#8217;t installed <em>even though I just ran it!</em> What now &#8230;</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=95c13b44-f693-4055-889c-13011575bd3e" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/wz-Dz3x6-PI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/how-camelcase-ruined-my-day-and-my-dev-environment/swizec/6129/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/how-camelcase-ruined-my-day-and-my-dev-environment/swizec/6129</feedburner:origLink></item>
		<item>
		<title>The most pleasant job interview I have ever had</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/BeSA61RVLpg/6121</link>
		<comments>http://swizec.com/blog/the-most-pleasant-job-interview-i-have-ever-had/swizec/6121#comments</comments>
		<pubDate>Thu, 11 Apr 2013 14:11:13 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Travel&Events]]></category>
		<category><![CDATA[Canada]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Lego]]></category>
		<category><![CDATA[Ottawa]]></category>
		<category><![CDATA[Shopify]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6121</guid>
		<description><![CDATA[I love job interviews. It&#8217;s a bit of a hobby really. You get this brief chance to dip your toes in a company&#8217;s culture, to see what they&#8217;re all about and how they work. If you&#8217;re lucky, you get to talk to some awesome engineers who are much better than you. If you&#8217;re really lucky,...  <a href="http://swizec.com/blog/the-most-pleasant-job-interview-i-have-ever-had/swizec/6121" class="more-link" title="Read The most pleasant job interview I have ever had">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>I love job interviews.</p>
<p>It&#8217;s a bit of a hobby really. You get this brief chance to dip your toes in a company&#8217;s culture, to see what they&#8217;re all about and how they work. If you&#8217;re lucky, you get to talk to some awesome engineers who are much better than you.</p>
<p>If you&#8217;re <em>really</em> lucky, you even get to travel for a few days!</p>
<p>You can never have too many excuses to travel.</p>
<p><a href="http://swizec.com/blog/canada-eh/swizec/6102" target="_blank">I spent last week in Canada</a> interviewing with <a class="zem_slink" title="Shopify" href="http://shopify.com" rel="homepage" target="_blank">Shopify</a>.</p>
<h2>Shopify</h2>
<div id="attachment_6122" class="wp-caption alignnone" style="width: 650px"><a href="http://swizec.com/blog/wp-content/uploads/2013/04/lounge-mural.jpg?3e5991"><img class="size-full wp-image-6122" title="Lounge mural" src="http://swizec.com/blog/wp-content/uploads/2013/04/lounge-mural.jpg?3e5991" alt="Lounge mural" width="640" height="478" /></a><p class="wp-caption-text">Lounge mural</p></div>
<p>It all started a few months ago when <a href="http://swizec.com/blog/my-very-own-daily-wtf/swizec/5829" target="_blank">I wrote a blogpost ranting about the terrible engineering practices</a> of one of my clients and how I was hired to swoop in and fix their codebase. A few days later I get an email from somebody at Shopify along the lines of <em>&#8220;Hey, one of our developers saw your post, then saw your Github. I think we&#8217;re doing some stuff you&#8217;d find interesting. Wanna talk?&#8221;</em></p>
<p>As always when opportunity strikes, I said<em> &#8220;Sure!&#8221;</em></p>
<p>A few days later came the usual first-contact Skype call. Yeah we&#8217;re doing this and that, we&#8217;re this sort of company, we&#8217;re doing so and so. Yes I&#8217;m a cool guy, I like making things and you seem interesting, let&#8217;s talk some more.</p>
<p>This part is never too interesting. A bit like a first date, both people are sort of kind of interested, but nobody really knows what&#8217;s going on so there&#8217;s just a lot of gentle probing and poking.</p>
<p>Then comes the fun part.</p>
<p><a href="http://swizec.com/blog/a-google-phone-interview/swizec/3813" target="_blank">Just like at Google</a>, there were two technical Skype calls where I got to talk with two different engineers working on extremely different stuff. I think this part was about figuring out whether I&#8217;m more of a frontend guy or more of a backend guy.</p>
<p>I did later get to meet with both dudes again. Both called their team The Core Team &#8482;. Friendly rivalries are always a good sign!</p>
<p>Unlike Google last year, both of these Skype calls were extremely relaxed. It was just a casual chat about technology and my approach to coding, testing and solving problems. If there was a pre-prepared list of questions, I couldn&#8217;t spot any painstaking adherence to a plot.</p>
<p>One of the interviews devolved into a twenty minute explanation of how batman.js works, that was particularly lovely. Shame I still haven&#8217;t had a chance to try it out because it sounds really awesome.</p>
<p>A bit later I was invited to fly over to Ottawa and chat a bit more.</p>
<h2>Ottawa</h2>
<div id="attachment_6123" class="wp-caption alignnone" style="width: 369px"><a href="http://swizec.com/blog/wp-content/uploads/2013/04/elevator-welcome.jpg?3e5991"><img class="size-full wp-image-6123" title="Elevator welcome" src="http://swizec.com/blog/wp-content/uploads/2013/04/elevator-welcome.jpg?3e5991" alt="Elevator welcome" width="359" height="480" /></a><p class="wp-caption-text">Elevator welcome</p></div>
<p>When a company spends a few K just to talk to you for a few days, you know they mean business. Still, everyone upheld the casual tone throughout.</p>
<p>My interviews were spread over two days.</p>
<p>Casually, the first day started at noon. I was to come into the Shopify HQ have some lunch and a meeting later.</p>
<p>The HQ was just across the street from my hotel, but my room was facing the other way so I couldn&#8217;t see it. Because Google Maps doesn&#8217;t know you can walk across parking lots, it took me about ten minutes to find the entrance. Silly Maps.</p>
<p>Stepping out of the elevator I immediately fell in love with the place. Walls covered in comic book posters, memes and an assortment of geek stuff everywhere. There was even one of those Halo helmets at the reception.</p>
<p>How cool is that!</p>
<p>It doesn&#8217;t matter that I don&#8217;t really play videogames or that pretty walls and wonderful beanbags in the lounge area don&#8217;t matter much when you&#8217;re staring at a computer all day. What matters is that these are signs of a company culture I&#8217;d enjoy. None of that endless grey cubicle crap I saw on my tour of IBM two years ago.</p>
<p>The main lounge used to be a club. I&#8217;m told Lady Gaga played there once. Nowadays it&#8217;s just a huge room swarming in geeks when catering brings in the food. There&#8217;s videogames on the balcony and an endless supply of tea and coffee.</p>
<p>There&#8217;s an <em>assortment</em> of teas. Very important.</p>
<img class="alignnone" title="LEGO table" src="http://24.media.tumblr.com/e3d7cb4f5b960791b80268c3d4af40cf/tumblr_mkp6g1k5mC1qekjngo1_500.jpg" alt="LEGO table" width="500" height="500" />
<p>There is also a table devoted to <a class="zem_slink" title="Lego" href="http://www.lego.com/" rel="homepage" target="_blank">LEGO</a>. Fun.</p>
<p>After lunch I had a conversation with the guy responsible in company culture. He makes sure there are no asshats roaming around the offices. He&#8217;s also the person making sure the offices look as great as they do.</p>
<p>He misses the times when he could spend most of his time hacking on the product and doing design. I got the impression <em>everyone</em> at Shopify is a hacker, no matter their role these days.</p>
<p>Always a good sign.</p>
<p>In the evening I had dinner with a bunch of engineers and one other potential recruit. Both the recruit and I were so jetlagged we spent most of our time staring ahead of us with blank faces and trying very hard to follow the conversation.</p>
<h2>The big day</h2>
<div id="attachment_6124" class="wp-caption alignnone" style="width: 369px"><a href="http://swizec.com/blog/wp-content/uploads/2013/04/lounge.jpg?3e5991"><img class="size-full wp-image-6124" title="The lounge where I spent most of my time" src="http://swizec.com/blog/wp-content/uploads/2013/04/lounge.jpg?3e5991" alt="The lounge where I spent most of my time" width="359" height="480" /></a><p class="wp-caption-text">The lounge where I spent most of my time</p></div>
<p>Then came the big day. Once more it started very casually at half past eleven in the morning. This time with a bit of confusion about who I was supposed to talk to &#8230; meetings, changes of schedule, stuff. Hungover from too little sleep I was more confused than anyone and can&#8217;t really tell what was going on.</p>
<p>I ended up having a nice chat with a Columbian fellow from the scaling team. They make sure programmers don&#8217;t have to worry too much about scalability and can focus on solving problems. Interesting job, but not really for me.</p>
<p>The chat culminated in lunch when the whole of Shopify descended upon the lounge when catering arrived.</p>
<p>All of the six or so interviews I had that day were very pleasant. All happened in the comfort of the lounge couches and I never felt like I was being drilled on the basics of computer science or solving silly problems.</p>
<p>The most technical bit, really, was the two hour pairing session where I implemented some interesting graphs using a library based on d3.js I had never heard of before. NVD3, it makes graphing a bit simpler.</p>
<p>Very unlike Google, <a href="http://swizec.com/blog/inside-a-google-onsite-interview/swizec/4352" target="_blank">where I was cooped up in a small room with a whiteboard</a> all day and forced to produce executable code without a computer. Sure those were fun and awesome, but they were all the same.</p>
<p>At Shopify I was having <em>pleasant</em> conversations. Everyone was more open too. When I asked about their work, they gave me straight answers, explained what they&#8217;re doing and we chatted about the problems they are facing and how I&#8217;d approach them.</p>
<p>The company culture was out there, wide open for me to figure out. Everyone seemed genuinely interesting and genuinely interested in talking to me.</p>
<p>Finally I had a chat with the CTO. He realized we&#8217;ve both been talking to people all day and were getting kind of tired. So he took me out to a coffee shop for a cup of tea.</p>
<p>That was lovely. I really liked the coffee shop too.</p>
<p>Turned out we <em>were</em> both very tired &#8211; there were moments where we just looked at each other for a few minutes. Unable to find any words.</p>
<p>His is an interesting story of a guy who used to be the main hacker on the core product and eventually became one of the heads of a company of 170 people. His job these days is talking to people all day. He&#8217;s still adjusting.</p>
<p>At dinner later that day I found out that even as the CTO with a bunch of brilliant engineers, he can still spend 2 months hacking away all day with headphones on when there&#8217;s an emergency to solve.</p>
<p>After that, Shopify doesn&#8217;t crash anymore.</p>
<h2>Decisions</h2>
<p>I&#8217;m not sure I ever got a chance to talk to the engineer who made the initial recommendation based on my blogpost, but I definitely got to talk to a bunch of great people and had massive fun.</p>
<p>A few days after coming home I got a call saying they&#8217;re interested. Now I have to make a tough life changing decision between Shopify, freelancing and two other job jobs that have magically landed on my table when I was looking the other way &#8230;</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=d8c4fb75-5d46-401b-b84a-55ef9859f017" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/BeSA61RVLpg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/the-most-pleasant-job-interview-i-have-ever-had/swizec/6121/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/the-most-pleasant-job-interview-i-have-ever-had/swizec/6121</feedburner:origLink></item>
		<item>
		<title>Canada, eh?</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/749K6dO4fIc/6102</link>
		<comments>http://swizec.com/blog/canada-eh/swizec/6102#comments</comments>
		<pubDate>Tue, 09 Apr 2013 12:42:48 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Travel&Events]]></category>
		<category><![CDATA[Bytown]]></category>
		<category><![CDATA[Canada]]></category>
		<category><![CDATA[Ljubljana]]></category>
		<category><![CDATA[Ottawa]]></category>
		<category><![CDATA[Quebec]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6102</guid>
		<description><![CDATA[Job interviews are fast becoming a bit of a hobby for me. Usually just over Skype and for a shortish-term freelancing gig. Sometimes in person for a job job. Last week I went to Canada to interview with Shopify. This post is about the traveling bit, next post will be about the interview bit. Without...  <a href="http://swizec.com/blog/canada-eh/swizec/6102" class="more-link" title="Read Canada, eh?">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Job interviews are fast becoming a bit of a hobby for me. Usually just over Skype and for a shortish-term freelancing gig. Sometimes in person for a job job.</p>
<p>Last week I went to <a class="zem_slink" title="Canada" href="http://maps.google.com/maps?ll=45.4,-75.6666666667&amp;spn=10.0,10.0&amp;q=45.4,-75.6666666667 (Canada)&amp;t=h" rel="geolocation" target="_blank">Canada</a> to interview with <a class="zem_slink" title="Shopify" href="http://shopify.com" rel="homepage" target="_blank">Shopify</a>. This post is about the traveling bit, next post will be about the interview bit. Without revealing too much too soon, I can say it was one of the best interviewing experiences ever.</p>
<div id="attachment_6107" class="wp-caption alignnone" style="width: 650px"><a href="http://swizec.com/blog/wp-content/uploads/2013/04/canada-parliament.jpg?3e5991"><img class="size-full wp-image-6107" title="Canadian parliament" src="http://swizec.com/blog/wp-content/uploads/2013/04/canada-parliament.jpg?3e5991" alt="Canadian parliament" width="640" height="478" /></a><p class="wp-caption-text">Canadian parliament</p></div>
<h2>Traveling to Canada</h2>
<p>Canadians do say <em>&#8220;aboot&#8221;</em>, they also say <em>&#8220;eh&#8221;. </em>But they say eh so much and so often I was unable to figure out what it actually means. It&#8217;s not always a question, sometimes it&#8217;s more of a &#8220;yes, what I am saying did actually happen literally&#8221;. It&#8217;s a confusing little word.</p>
<p>Canadians are also just as nice as I expected watching american television. The <a class="zem_slink" title="French Canadian" href="http://en.wikipedia.org/wiki/French_Canadian" rel="wikipedia" target="_blank">French Canadians</a> are just as nice and friendly as people were in France &#8230; which is to say surprisingly little. Luckily I didn&#8217;t spend a lot of time in the french parts of Canada. I did take a walk to <a class="zem_slink" title="Quebec" href="http://maps.google.com/maps?ll=46.8161111111,-71.2241666667&amp;spn=0.1,0.1&amp;q=46.8161111111,-71.2241666667 (Quebec)&amp;t=h" rel="geolocation" target="_blank">Quebec</a> though, just to go see the cool Museum of Civilizations.</p>
<p>On Tuesday morning I awoke to a miserably cold and windy <a class="zem_slink" title="Ottawa" href="http://maps.google.com/maps?ll=45.4208333333,-75.69&amp;spn=0.1,0.1&amp;q=45.4208333333,-75.69 (Ottawa)&amp;t=h" rel="geolocation" target="_blank">Ottawa</a>. Other than the buildings and the odd car here and there Ottawa, the city of one million, looked like a ghost town. I met about one person every five minutes, despite being in the part of town crowded by bars and pubs.</p>
<p>It wasn&#8217;t too cold, just -6 really, but my jeans was nothing against the wind. Like I was walking around half naked &#8230; thank god for the giant scarf I got from mum for Christmas.</p>
<p>Apparently I visited Ottawa at a rather awkward time. It wasn&#8217;t winter and it wasn&#8217;t spring.</p>
<p>In winter they have a bunch of stuff going on at the frozen Rideau canal. Turns into a 7 kilometer skating rink! In spring, there&#8217;s a bunch of stuff going on at the <a class="zem_slink" title="Bytown" href="http://maps.google.com/maps?ll=45.42451,-75.694817&amp;spn=1.0,1.0&amp;q=45.42451,-75.694817 (Bytown)&amp;t=h" rel="geolocation" target="_blank">Bytown</a> market &#8211; daily farmer&#8217;s market stuff, plenty of events, even a busker&#8217;s festival!</p>
<p>Last week &#8230; nothing. Completely dead.</p>
<p>Weather turned for the better on Thursday and while still a chilly ~3C it was very sunny and the whole city came alive. Their one pedestrian street was full of people and walking around was an absolute pleasure. Suddenly I could see myself living here. It was no European town like I&#8217;m used to, but it was <em>alive</em>. A proper city!</p>
<p>Despite its huge surface area (100&#215;100 km I&#8217;m told) and a population about thrice that of <a class="zem_slink" title="Ljubljana" href="http://maps.google.com/maps?ll=46.0555555556,14.5083333333&amp;spn=0.1,0.1&amp;q=46.0555555556,14.5083333333 (Ljubljana)&amp;t=h" rel="geolocation" target="_blank">Ljubljana</a>, Ottawa feels a lot like Ljubljana really. Minus the ~100,000 students and put on a classic North American grid system &#8230; and younger, much much younger. The oldest parts of Ottawa still standing are from the early 1800&#8242;s. Just enough to give the city a bit of a flare, a touch of history.</p>
<p>Strange feeling that, a huge city that&#8217;s less crowded than my tiny &#8220;city&#8221;. Their museums were awesome though, at least the two I visited. Museum of Civilizations talking about how Canada evolved from the old peoples to the modern mix of people from France, British loyalists and all the old native peoples. Really loved the huge displays where you basically walk around a colonial town at 1:1 scale, then turn a corner and suddenly it&#8217;s a town in the 19th century.</p>
<p>The War Museum had a similar design going where you walk from the early native peoples wars all the way to modern peace keeping stuff, but such museums are usually dark and don&#8217;t take pretty pictures, plus they all look alike. There was an awesome assortment of tanks and artillery though. Even a jet fighter!</p>
<div id="attachment_6119" class="wp-caption alignnone" style="width: 369px"><a href="http://swizec.com/blog/wp-content/uploads/2013/04/bear-statue.jpg?3e5991"><img class="size-full wp-image-6119" title="At the only pedestrian street, there was a bear statue" src="http://swizec.com/blog/wp-content/uploads/2013/04/bear-statue.jpg?3e5991" alt="At the only pedestrian street, there was a bear statue" width="359" height="480" /></a><p class="wp-caption-text">At the only pedestrian street, there was a bear statue</p></div>
<div id="attachment_6109" class="wp-caption alignnone" style="width: 650px"><a href="http://swizec.com/blog/wp-content/uploads/2013/04/confluence-of-rivers.jpg?3e5991"><img class="size-full wp-image-6109" title="There's a huge confluence of rivers right on the border of Quebec and Ontario" src="http://swizec.com/blog/wp-content/uploads/2013/04/confluence-of-rivers.jpg?3e5991" alt="There's a huge confluence of rivers right on the border of Quebec and Ontario" width="640" height="478" /></a><p class="wp-caption-text">There&#8217;s a huge confluence of rivers right on the border of Quebec and Ontario</p></div>
<div id="attachment_6110" class="wp-caption alignnone" style="width: 650px"><a href="http://swizec.com/blog/wp-content/uploads/2013/04/totems.jpg?3e5991"><img class="size-full wp-image-6110" title="Museum of Civilizations reveals that totems are _huge_" src="http://swizec.com/blog/wp-content/uploads/2013/04/totems.jpg?3e5991" alt="Museum of Civilizations reveals that totems are _huge_" width="640" height="478" /></a><p class="wp-caption-text">Museum of Civilizations reveals that totems are _huge_</p></div>
<div id="attachment_6111" class="wp-caption alignnone" style="width: 650px"><a href="http://swizec.com/blog/wp-content/uploads/2013/04/museum-of-civilizations.jpg?3e5991"><img class="size-full wp-image-6111" title="There's also exhibitions built up as old towns" src="http://swizec.com/blog/wp-content/uploads/2013/04/museum-of-civilizations.jpg?3e5991" alt="There's also exhibitions built up as old towns" width="640" height="478" /></a><p class="wp-caption-text">There&#8217;s also exhibitions built up as old towns</p></div>
<div id="attachment_6112" class="wp-caption alignnone" style="width: 369px"><a href="http://swizec.com/blog/wp-content/uploads/2013/04/voodoo.jpg?3e5991"><img class="size-full wp-image-6112" title="Voodoo exhibition with real human skulls" src="http://swizec.com/blog/wp-content/uploads/2013/04/voodoo.jpg?3e5991" alt="Voodoo exhibition with real human skulls" width="359" height="480" /></a><p class="wp-caption-text">Voodoo exhibition with real human skulls</p></div>
<div id="attachment_6114" class="wp-caption alignnone" style="width: 650px"><a href="http://swizec.com/blog/wp-content/uploads/2013/04/jetfighter.jpg?3e5991"><img class="size-full wp-image-6114" title="On Thursday I went to the War Museum where there was a jetfighter" src="http://swizec.com/blog/wp-content/uploads/2013/04/jetfighter.jpg?3e5991" alt="On Thursday I went to the War Museum where there was a jetfighter" width="640" height="478" /></a><p class="wp-caption-text">On Thursday I went to the War Museum where there was a jetfighter</p></div>
<div id="attachment_6115" class="wp-caption alignnone" style="width: 369px"><a href="http://swizec.com/blog/wp-content/uploads/2013/04/victory-bonds.jpg?3e5991"><img class="size-full wp-image-6115" title="Most displays were too dark to take pics" src="http://swizec.com/blog/wp-content/uploads/2013/04/victory-bonds.jpg?3e5991" alt="Most displays were too dark to take pics" width="359" height="480" /></a><p class="wp-caption-text">Most displays were too dark to take pics</p></div>
<div id="attachment_6116" class="wp-caption alignnone" style="width: 369px"><a href="http://swizec.com/blog/wp-content/uploads/2013/04/housey1.jpg?3e5991"><img class="size-full wp-image-6116" title="On my way back I found a cute housey" src="http://swizec.com/blog/wp-content/uploads/2013/04/housey1.jpg?3e5991" alt="On my way back I found a cute housey" width="359" height="480" /></a><p class="wp-caption-text">On my way back I found a cute housey</p></div>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=1b5ae7ff-277d-4a1b-bf54-be09bfdf7dd8" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/749K6dO4fIc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/canada-eh/swizec/6102/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/canada-eh/swizec/6102</feedburner:origLink></item>
		<item>
		<title>Why you don’t have a flight transfer in North America</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/oYlmInK90Rk/6100</link>
		<comments>http://swizec.com/blog/why-you-dont-have-a-flight-transfer-in-north-america/swizec/6100#comments</comments>
		<pubDate>Tue, 02 Apr 2013 15:51:40 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6100</guid>
		<description><![CDATA[I met him at the Montreal airport bus stop. I never learned his name, but for the next five hours we were friends. &#8220;Oh you&#8217;re going to Ottawa too? Cool!&#8221; &#8230; &#8220;Yeah, looks like the bus is running a bit late. How come you&#8217;re taking a bus from the airport anyway?&#8221; He was from Poland, visiting...  <a href="http://swizec.com/blog/why-you-dont-have-a-flight-transfer-in-north-america/swizec/6100" class="more-link" title="Read Why you don&#8217;t have a flight transfer in North America">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>I met him at the <a class="zem_slink" title="Montréal–Pierre Elliott Trudeau International Airport" href="http://maps.google.com/maps?ll=45.4705555556,-73.7408333333&amp;spn=0.03,0.03&amp;q=45.4705555556,-73.7408333333 (Montr%C3%A9al%E2%80%93Pierre%20Elliott%20Trudeau%20International%20Airport)&amp;t=h" rel="geolocation" target="_blank">Montreal airport</a> bus stop.<em> </em>I never learned his name, but for the next five hours we were friends.</p>
<p><em>&#8220;Oh you&#8217;re going to <a class="zem_slink" title="Ottawa" href="http://maps.google.com/maps?ll=45.4208333333,-75.69&amp;spn=0.1,0.1&amp;q=45.4208333333,-75.69 (Ottawa)&amp;t=h" rel="geolocation" target="_blank">Ottawa</a> too? Cool!&#8221;</em></p>
<p>&#8230;</p>
<p><em>&#8220;Yeah, looks like the bus is running a bit late. How come you&#8217;re taking a bus from the airport anyway?&#8221;</em></p>
<p>He was from Poland, visiting <a class="zem_slink" title="Canada" href="http://maps.google.com/maps?ll=45.4,-75.6666666667&amp;spn=10.0,10.0&amp;q=45.4,-75.6666666667 (Canada)&amp;t=h" rel="geolocation" target="_blank">Canada</a> for a telecoms training programme. We didn&#8217;t really go into the details. For the next few hours our conversations revolved around wondering where the bus might be, whether we&#8217;re waiting for the previous bus or already for the next one. And how cold Canada is.</p>
<p>We quickly established we both flew in from Munich on the same flight. <a class="zem_slink" title="Lufthansa" href="http://maps.google.com/maps?ll=50.9375,6.96972222222&amp;spn=0.01,0.01&amp;q=50.9375,6.96972222222 (Lufthansa)&amp;t=h" rel="geolocation" target="_blank">Lufthansa</a> 474, a lovely modern airplane with cheap transatlantic wi-fi, surprisingly comfortable seats and USB ports in the arm rests so you don&#8217;t have to worry about your phone running out of charge.</p>
<p>It really was a very lovely flight and the seven and a half hours passed before you can say <em>&#8220;Maybe I should watch a movie or something&#8221;</em></p>
<p>Or maybe <a class="zem_slink" title="Shin Dong-hyuk (human rights activist)" href="http://en.wikipedia.org/wiki/Shin_Dong-hyuk_%28human_rights_activist%29" rel="wikipedia" target="_blank">Escape from Camp 14</a> was just that interesting a book (it was)</p>
<p>And now, we were both waiting for a bus that wasn&#8217;t showing up. Standing out in the cold Canadian winds of early Spring. At least it wasn&#8217;t snowing like I&#8217;m told it did last week.</p>
<p>At the border we both made the same fatal mistake &#8211; telling the truth. You <em>always</em> say you&#8217;re a tourist. They let you through quickly if you are. Instead the border guards told us simply <em>&#8220;Please step that way to immigration&#8221;.</em></p>
<p>Very scary words when you&#8217;re connecting flight is in an hour, you have to re-do check-in, security and everything else just like it was a completely new flight. Madening.</p>
<p>The line wasn&#8217;t moving anywhere and my restlessness grew. I think I remember the Polish guy being up slightly before me. I think the guards loudly said <em>&#8220;Ok so you&#8217;re 19 and you&#8217;re here to do training? Really?&#8221;</em></p>
<p>Imagine being 19 years old, about to miss your next flight, talking to a very indifferent immigration officer.</p>
<p>When I came up everything went smoothly, but I didn&#8217;t have any information printed. Why would I print my itinerary? That&#8217;s just silly. The iPad mail search was very slow, the wi-fi wasn&#8217;t running nearly quickly enough and as I frantically switched between Mail.app and Safari to see which would be faster in finding my email the immigration guard was growing impatient.</p>
<p><em>&#8220;What, you can&#8217;t find it?&#8221;, </em>she said. Her voice starting to smell of calling me a liar and thinking I want to stay here forever and ever without a proper permit.</p>
<p>When I was finally let through I ended up standing in the wrong line for too long. If I had run like a madman, done everything correctly, I might, just might, catch my next flight. When I finally realized my error and located the proper counter for check-in to my next flight the nice lady just scoffed.</p>
<p><em>&#8220;Haha, no you can&#8217;t check-in to that flight anymore.&#8221;</em></p>
<p>As if I was telling her the funniest joke ever. I knew it was laughable, but worth a try right?</p>
<p>She actually ended up being quite nice. Told me that the two flights still available for last night are fully booked and I should go talk to Lufthansa. She was <a class="zem_slink" title="Air Canada" href="http://www.aircanada.com/en/" rel="homepage" target="_blank">Air Canada</a> because Lufthansa told me just moments ago they don&#8217;t really have flights from Montreal to Ottawa and I should ask Air Canada.</p>
<p>The Lufthansa lady told me that I&#8217;m shit out of luck. Because it&#8217;s not their fault I missed my plane they can rebook me, but can&#8217;t pay for a hotel or reimburse me in any way. Immigration&#8217;s fault is not their mess to clean up and everyone else made the flight.</p>
<p>Not everyone. Remember the Polish kid?</p>
<p>Air Canada told me they can put me on standby for the 10:30 flight, but out of 37 passengers 32 had already checked in and one was on standby. Not much of a chance of making it, I should try the bus lest I become stuck at the airport overnight.</p>
<p>Bouncing from two information desks I finally made it to the bus stop. Waiting for the 8:25 bus.</p>
<p>A bus came, but it was for <a class="zem_slink" title="Quebec" href="http://maps.google.com/maps?ll=46.8161111111,-71.2241666667&amp;spn=0.1,0.1&amp;q=46.8161111111,-71.2241666667 (Quebec)&amp;t=h" rel="geolocation" target="_blank">Quebec</a>. This was when I met the Polish kid. For the next few hours we were inseparable. It&#8217;s strange how quickly people can make temporary friends. There&#8217;s a feeling of safety in a pair. Much better than being alone even if both of you are confused, lost, and have no idea how or when they&#8217;re making it to their destination.</p>
<p>It&#8217;s comforting just to have someone standing next to you who is in the same mess.</p>
<p>By 9pm the bus was nowhere to be found. Information desk assured us it was on the way. In either case, there was another bus at 10:55. It should be at the stop by 10:40.</p>
<p>At 10:55 there was still no bus.</p>
<p>There were many other buses. Quebec. Nothing for Ottawa.</p>
<p>Just as we were both coming to terms with the idea of having to take a cab all the way to Ottawa or waiting for a new plane next morning a bus showed up. 10:59.</p>
<p>It was a rundown <a class="zem_slink" title="Greyhound Lines" href="http://www.greyhound.com/" rel="homepage" target="_blank">Greyhound bus</a>, but it was the most beautiful thing I have ever seen. The bus driver was a grumpy person doing a night shift on Easter. He didn&#8217;t seem very happy about having to deal with us. But at least he would take us to Ottawa.</p>
<p>Two hours later, Greyhound terminal in Ottawa.</p>
<p>In the middle of the night it looked liek I was in the middle of nowhere. There were no people to be seen. A bunch of buses waiting around. I think I saw a group of travelers sleeping around their suitcases inside, but to be honest everything was a haze by now.</p>
<p>Google Maps said it was just a few minutes walk to my hotel. I couldn&#8217;t be bothered, I just wanted to be done with this. Collapsed into the first cab that pulled up and told the driver to take me to Les Suites.</p>
<p>Despite this ordeal and everyone&#8217;s indifference and frenchness at the airport Canada turned out to be very nice. This morning I got free drinks at Starbucks because none of my cards would work.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=6f7fac20-5511-4781-8a3e-5943af90dcc1" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/oYlmInK90Rk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/why-you-dont-have-a-flight-transfer-in-north-america/swizec/6100/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/why-you-dont-have-a-flight-transfer-in-north-america/swizec/6100</feedburner:origLink></item>
		<item>
		<title>A tale about always-on DRM and web security</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/EEhN4BxB-lI/6088</link>
		<comments>http://swizec.com/blog/a-tale-about-always-on-drm-and-web-security/swizec/6088#comments</comments>
		<pubDate>Thu, 28 Mar 2013 13:22:30 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6088</guid>
		<description><![CDATA[Two days ago I was at a friend&#8217;s place and wanted to show her what Diablo 3 looks like. She shows me minecraft, I show her Diablo. Everyone&#8217;s happy. But nope. I run Diablo, I mash in my password because of course you have to log in to play a game with yourself. What could possibly...  <a href="http://swizec.com/blog/a-tale-about-always-on-drm-and-web-security/swizec/6088" class="more-link" title="Read A tale about always-on DRM and web security">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<a href="http://swizec.com/blog/wp-content/uploads/2013/03/diablo-characters.png?3e5991"><img class="alignnone  wp-image-6092" title="Diablo characters (I'm the guy with the shield)" src="http://swizec.com/blog/wp-content/uploads/2013/03/diablo-characters.png?3e5991" alt="Diablo characters (I'm the guy with the shield)" width="640" height="400" /></a>
<p>Two days ago I was at a friend&#8217;s place and wanted to show her what <a class="zem_slink" title="Diablo III" href="http://www.blizzard.com/diablo3/?rhtml=y" rel="homepage" target="_blank">Diablo 3</a> looks like. She shows me minecraft, I show her Diablo. Everyone&#8217;s happy.</p>
<p>But nope.</p>
<p>I run Diablo, I mash in my password because of <em>course</em> you have to log in to play a game with yourself. What could possibly be more natural &#8230; but okay, maybe I don&#8217;t want my cat to mess with my characters and Blizzard doesn&#8217;t want me stealing their game. Fair enough.</p>
<blockquote><p>&#8220;Oh hai thar! We noticed some suspicious activity on your account so we decided you have to verify you&#8217;re you via <a class="zem_slink" title="Battle.net" href="http://www.battle.net/" rel="homepage" target="_blank">Battle.net</a>. Here&#8217;s a link to get you going&#8221;</p></blockquote>
<p>Really? All I did was try to login from a different IP. I&#8217;m at a friend&#8217;s place damn it, this is a laptop, what if I wanted to play in a coffee shop or on a plane or a pterodactyl?</p>
<p>Sigh, fine &#8230; I click the link expecting I&#8217;ll just have to login on Battle.net so they can confirm I also know how to login with a browser and supposedly am not hacking.</p>
<p>Tap tap tap.</p>
<blockquote><p>&#8220;So, you want to give us some digits of a physical copy of a game even though the only game associated with your account is a digital-only copy of Diablo? Or do you want to try answering your <a class="zem_slink" title="Knowledge-based authentication" href="http://en.wikipedia.org/wiki/Knowledge-based_authentication" rel="wikipedia" target="_blank">secret question</a>?&#8221;</p></blockquote>
<p>Well crap, this isn&#8217;t just about logging in. I have just been forced to reset my password via a security question <em>just because I tried to play a game at a friend&#8217;s place!</em></p>
<p>I try once. I try twice. I try three times. Nothing.</p>
<p>This can happen when you choose random <a class="zem_slink" title="Security question" href="http://en.wikipedia.org/wiki/Security_question" rel="wikipedia" target="_blank">security questions</a> and don&#8217;t always answer truthfully because, you know, social engineering. Usually I just mash my hand over the keyboard.</p>
<blockquote><p>&#8220;You have made too many attempts! Your account is now locked! Contact support.&#8221;</p></blockquote>
<p>Oh okay! Right. I&#8217;m using the wrong account! I used <em>swizec@swizec.com</em> for the Diablo3 beta, then was unable to recover it when I wanted the full game. The real account is <em>swizec+battle@swizec.com</em></p>
<p>Let&#8217;s try again.</p>
<p>A few attempts later &#8230; OH! The security question is different on this account. Fuck me.</p>
<p>Yay, I&#8217;m in!</p>
<p>After two round-trips via email, countless attempts at answering the security question, numerous fiddles with the password to get them all matching and fitting the security rules I am finally in.</p>
<p>That&#8217;s it. No <em>Hey thanks</em>, no, <em>You can go game now</em>, just a cold account dashboard.</p>
<p>Close tab. Run game. Log in.</p>
<blockquote><p>&#8220;Your password is incorrect&#8221;</p></blockquote>
<p>Oh for fuck&#8217;s sake! I mistyped my password &#8230; twice &#8230; consistently enough that they matched.</p>
<div id="attachment_6093" class="wp-caption alignnone" style="width: 730px"><a href="http://swizec.com/blog/wp-content/uploads/2013/03/diablo-massacre.png?3e5991"><img class=" wp-image-6093 " title="Diablo massacre" src="http://swizec.com/blog/wp-content/uploads/2013/03/diablo-massacre.png?3e5991" alt="Diablo massacre" width="720" height="450" /></a><p class="wp-caption-text">Diablo massacre</p></div>
<p>Sigh, now how do I change my password?</p>
<blockquote><p>&#8220;Okay, just give us your old password and you can change it&#8221;</p></blockquote>
<p>But I don&#8217;t know the old password!</p>
<p>Log out. Reset password. <em>&#8220;You have made too many attempts! Your account is locked! Contact support.</em><em>&#8220;</em></p>
<p>Oh fuck me. Fine. I will contact support because this is getting silly and I am fed up with you mr. Battle.net!</p>
<p>Clicky clicky through tens of questions trying to divert me from contacting a real person and making me solve my own problems. I battle it through like a champ and finally reach three options: Submit ticket, live chat, phone call.</p>
<p>Live chat and phone call are currently offline. Well okay, it <em>is</em> midnight and you are the European Blizzard support people so you&#8217;re probably sleeping. Fine.</p>
<p>I click Submit ticket.</p>
<blockquote><p>&#8220;Please login to your Battle.net account to submit tickets&#8221;</p></blockquote>
<p><em></em>ARGH!</p>
<p>I threw the computer out the window and cried myself to sleep.</p>
<p>Ok, in reality I carefully put the computer away after slamming it shut ever so gently, it&#8217;s new you know, and watched a movie or something with my friend. Screw Diablo.</p>
<p>Next day I got home and unlocked my account without a fuss. No hint of too many attempts, no complaints about suspicious activity. Nothing. Just worked.</p>
<p>I&#8217;m confused. Yesterday my account was hacked and Terrible Things &#8482; were going on, today everything is fine and you don&#8217;t even warn me that a crazy amount of stupid was happening last night? Right &#8230;</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=7e879824-058e-4579-a7d6-f7aa6c103042" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/EEhN4BxB-lI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/a-tale-about-always-on-drm-and-web-security/swizec/6088/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/a-tale-about-always-on-drm-and-web-security/swizec/6088</feedburner:origLink></item>
		<item>
		<title>It takes about two months to write a technical book</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/q5vFJB0wwOg/6076</link>
		<comments>http://swizec.com/blog/it-takes-about-two-months-to-write-a-technical-book/swizec/6076#comments</comments>
		<pubDate>Tue, 26 Mar 2013 12:19:05 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Book Writing]]></category>
		<category><![CDATA[Communication]]></category>
		<category><![CDATA[Writing]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6076</guid>
		<description><![CDATA[A lot of people will tell you writing a book is hard. I&#8217;m here to tell you it&#8217;s not. Solving the Hamiltonian path problem is hard, writing a book just takes some hard work and a bit of dedication. It&#8217;s not hard when all it takes is plomping your arse down and refusing to get...  <a href="http://swizec.com/blog/it-takes-about-two-months-to-write-a-technical-book/swizec/6076" class="more-link" title="Read It takes about two months to write a technical book">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>A lot of people will tell you writing a book is hard. I&#8217;m here to tell you it&#8217;s not.</p>
<p>Solving the <a class="zem_slink" title="Hamiltonian path problem" href="http://en.wikipedia.org/wiki/Hamiltonian_path_problem" rel="wikipedia" target="_blank">Hamiltonian path problem</a> is hard, writing a book just takes some hard work and a bit of dedication. It&#8217;s not hard when all it takes is plomping your arse down and refusing to get up until something happens. That&#8217;s easy.</p>
<p>As <a class="zem_slink" title="Ernest Hemingway" href="http://en.wikipedia.org/wiki/Ernest_Hemingway" rel="wikipedia" target="_blank">Hemingway</a> put it in a movie, <em>&#8220;There&#8217;s nothing to writing, you just sit down and bleed&#8221;</em> Which is odd, since he liked to write standing up &#8230; anyway.</p>
<div class="wp-caption alignnone" style="width: 427px"><img class=" " title="Example about distribution of primes along a spiral" src="http://i.imgur.com/9t4UQyT.png" alt="Example about distribution of primes along a spiral" width="417" height="407" /><p class="wp-caption-text">Example about distribution of primes along a spiral</p></div>
<p>After two months of plomping my arse down repeatedly I finally finished my <a href="http://d3js.org/" target="_blank">d3.js</a> book. Or rather, I finished the first drafts, which would be a done book if I was self-publishing. Because there&#8217;s a publisher involved, I&#8217;m now looking at two to three months of revision and editing.</p>
<p>To be honest I&#8217;m getting slightly sick of that book. Being able to step away and ignore its existence has been one of the most amazing feelings in the world. I am enjoying my new found freedom to the full. At least until reviewers come back with their <em>You idiot! That&#8217;s not how you write that bit there!!</em></p>
<p>Life can get really frustrating when you try to squeeze at least an hour of focused writing into every single day.</p>
<p>The final tally for the book is 179 pages, 30 examples, 66 days, 171 hours.</p>
<p>That means I spent about an hour per page including research, writing and coding a working example, and an average of almost 3 hours writing per day. All the while doing enough freelancing that my business grew by about 30% in terms of monthly income. \o/</p>
<p>What surprised me is just how much work I had with examples. It is <em>insanely</em> difficult to come up with an example that will exercise what you&#8217;re talking about in a particular chapter, without depending too much on stuff you haven&#8217;t covered yet and being thin on the stuff you&#8217;ve already covered and is now boring.</p>
<p>Then you have to get the examples working.</p>
<div class="wp-caption alignnone" style="width: 505px"><img class=" " title="IRC karma visualisation example" src="http://i.imgur.com/YglOzJO.png" alt="IRC karma visualisation example" width="495" height="509" /><p class="wp-caption-text">IRC karma visualisation example</p></div>
<p>I didn&#8217;t really know much about d3.js when I started out and it would often take me a whole afternoon to get a single example working. Like, you&#8217;d sit down, read the API documentation and get to work. Error.</p>
<p>Fix error &#8230; blank screen.</p>
<p>Get a line on screen &#8230; wrong line.</p>
<p>And so on for <em>hours</em>.</p>
<p>It would always be something stupid in the end, or I&#8217;d misunderstand what the documentation is telling me. Often I&#8217;d resort to looking at other people&#8217;s examples myself so I could even get something working.</p>
<p>But then the <em>really</em> fun part starts. When you do have an example, writing just flies. You sit down and start talking about the code, pasting code in the book, showing some pictures and before you know it, that simple example you spent three hours coding has turned into five pages of the book in just half an hour.</p>
<p>It really is quite amazing.</p>
<p>While there&#8217;s always stuff you can fix in a book and the writing never seems polished enough, I hope there wont&#8217; be too much work with editing. My approach is very re-writing in itself and I often write the same sentence or paragraph several times before it sounds natural enough.</p>
<p>Yeah, who knew, making yourself sound natural takes <a class="zem_slink" title="Practice (learning method)" href="http://en.wikipedia.org/wiki/Practice_%28learning_method%29" rel="wikipedia" target="_blank">deliberate practice</a>. You can&#8217;t just dump your brain on a page and think it sounds natural. It doesn&#8217;t</p>
<p>Right, you&#8217;ve kept reading, now you want a <em>The Point.</em> If you really want to learn something, write a book about it. It doesn&#8217;t take long.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul zemanta-article-ul-image" style="margin: 0; padding: 0; overflow: hidden;">
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://www.brainpickings.org/index.php/2013/03/21/ernest-hemingway-1954-nobel-speech/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/153971251_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://www.brainpickings.org/index.php/2013/03/21/ernest-hemingway-1954-nobel-speech/" target="_blank">Work Alone: Ernest Hemingway&#8217;s 1954 Nobel Acceptance Speech</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://www.brandonsavage.net/why-you-should-write-clean-code/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/153432899_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://www.brandonsavage.net/why-you-should-write-clean-code/" target="_blank">Why You Should Write Clean Code</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://www.cc-chapman.com/2013/want-to-write-a-book-start-by-writing-a-book-proposal/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/153461451_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://www.cc-chapman.com/2013/want-to-write-a-book-start-by-writing-a-book-proposal/" target="_blank">Want to Write a Book? Start By Writing a Book Proposal.</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://victoria-writes.com/2013/03/26/writing-rules/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/155160978_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://victoria-writes.com/2013/03/26/writing-rules/" target="_blank">Writing rules</a></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/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=b347b702-b296-4c4f-a8a0-220c32a3d18b" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/q5vFJB0wwOg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/it-takes-about-two-months-to-write-a-technical-book/swizec/6076/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/it-takes-about-two-months-to-write-a-technical-book/swizec/6076</feedburner:origLink></item>
		<item>
		<title>Bring Ruby VCR to Javascript testing with Capybara and puffing-billy</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/Xgd2_UIB2LQ/6067</link>
		<comments>http://swizec.com/blog/bring-ruby-vcr-to-javascript-testing-with-capybara-and-puffing-billy/swizec/6067#comments</comments>
		<pubDate>Thu, 14 Mar 2013 13:14:53 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[RSpec]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6067</guid>
		<description><![CDATA[Let&#8217;s say you are writing an application in Ruby. You are probably talking to every API under the sun and are happily writing tests to make sure your code isn&#8217;t failing. Because you don&#8217;t want to rely on 3rd parties or an internet connection to make your tests pass or fail you mock everything with...  <a href="http://swizec.com/blog/bring-ruby-vcr-to-javascript-testing-with-capybara-and-puffing-billy/swizec/6067" class="more-link" title="Read Bring Ruby VCR to Javascript testing with Capybara and puffing-billy">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s say you are writing an application in <a class="zem_slink" title="Ruby (programming language)" href="http://www.ruby-lang.org/" rel="homepage" target="_blank">Ruby</a>. You are probably talking to every API under the sun and are happily writing tests to make sure your code isn&#8217;t failing.</p>
<p>Because you don&#8217;t want to rely on 3rd parties or an internet connection to make your tests pass or fail you mock everything with let&#8217;s say, <a href="https://github.com/bblimke/webmock" target="_blank">Webmock</a>. This also makes your tests much <em>much</em> faster. After all even the fastest internet is much slower than the processor talking to its memory.</p>
<p>If you&#8217;re too lazy to mock out every API under the sun, you might use <a href="https://www.relishapp.com/vcr/vcr/docs" target="_blank">VCR</a> to record requests and play them back later. The main advantage being, you don&#8217;t have to worry about meticulously reimplementing <em>everything, </em>and you can nuke the recordings at any time to make sure your code still works against the real API.</p>
<p>Life is good.</p>
<h2>Enter <a class="zem_slink" title="JavaScript" href="http://en.wikipedia.org/wiki/JavaScript" rel="wikipedia" target="_blank">Javascript</a>, stage left</h2>
<p>Then Javascript becomes more and more prominent. Suddenly your application&#8217;s logic is shifting from backend to browser and before you know it, most of your tests are pretty irrelevant.</p>
<p>You&#8217;re fine for a while with Capybara or Cucumber.</p>
<p>Launch a headless browser, click around the site from the comfort of <a class="zem_slink" title="RSpec" href="http://rspec.info/" rel="homepage" target="_blank">RSpec</a>, make sure users see what they&#8217;re supposed to. Balance restored.</p>
<p>Then you add a payment form. Or something. Suddenly your <em>frontend</em> is talking to an API. In case of Stripe or Balanced it&#8217;s even a feature. A great benefit for the user.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#payment-form'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">submit</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">var</span> $form <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// Disable the submit button to prevent repeated clicks</span>
    $form.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'button'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">prop</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'disabled'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    Stripe.<span style="color: #660066;">createToken</span><span style="color: #009900;">&#40;</span>$form<span style="color: #339933;">,</span> stripeResponseHandler<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// Prevent the form from submitting with the default action</span>
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Well that sucks, you&#8217;re suddenly back to square one.</p>
<p>Your tests take minutes to execute. Your tests fail without an internet connection. Your tests rely on some 3rd party service being up. Your tests suck.</p>
<p>Who wants to code when running ~5 tests takes 3 minutes? Nobody.</p>
<h2>Enter puffing-billy, stage right</h2>
<p>The problem is that neither Webmock nor VCR can handle requests originating in a browser because they happen in a different thread and they can&#8217;t mess around with those.</p>
<p>Luckily, a year ago <a href="https://github.com/oesmith">Olly Smith</a>, created <a href="https://github.com/oesmith/puffing-billy" target="_blank">puffing-billy</a>.</p>
<p>The idea was great &#8211; spin up a web proxy, tell your headless browser to use it, when your code makes a request it will go through the proxy, which will try to use a Webmock to handle it, otherwise pass it on to the vast internet.</p>
<p>But who wants to mock everything out manually?</p>
<p>Over the past few weeks I set upon the task of fixing this problem and restoring sanity to my life. Good tests are transparent to the application and I&#8217;ll be damned if I use any of the suggested solutions on the internet like <em>&#8220;Well you just put a switch in your code that knows if you&#8217;re in a test and then doesn&#8217;t talk to Stripe&#8221;</em></p>
<p>Screw that.</p>
<p>This morning I submitted <a href="https://github.com/oesmith/puffing-billy/pull/7" target="_blank">a pull request to puffing-billy</a>.</p>
<p>I added the ability for puffing-billy to behave like it was VCR, but for your browser. When a request is made, it gets cached. The cache is then persisted between sessions, and requests are played back to the browser as needed.</p>
<p>It&#8217;s not as sophisticated as VCR just yet, but it gets the job done and my test runtime has gone from 3 minutes to just under a minute. That&#8217;s a big deal in my book!</p>
<p>The caching even understands that some URL&#8217;s are needlessly different on every request (social buttons, analytics etc.) so you can configure it to normalize those requests to a single recording that is played back every time. Your tests don&#8217;t really rely on gAnalytics working right?</p>
<p>And the best thing is, you don&#8217;t even have to change your tests.</p>
<p>You add something like this in your <em>spec_helper.rb</em>:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="ruby" style="font-family:monospace;">Billy.<span style="color:#9900CC;">configure</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>c<span style="color:#006600; font-weight:bold;">|</span>
  c.<span style="color:#9900CC;">cache</span> = <span style="color:#0000FF; font-weight:bold;">true</span>
  c.<span style="color:#9900CC;">ignore_params</span> = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;http://www.google-analytics.com/__utm.gif&quot;</span>,
                     <span style="color:#996600;">&quot;http://b.siftscience.com/i.gif&quot;</span>,
                     <span style="color:#996600;">&quot;https://r.twimg.com/jot&quot;</span>,
                     <span style="color:#996600;">&quot;http://p.twitter.com/t.gif&quot;</span>,
                     <span style="color:#996600;">&quot;http://p.twitter.com/f.gif&quot;</span>,
                     <span style="color:#996600;">&quot;http://www.facebook.com/plugins/like.php&quot;</span>,
                     <span style="color:#996600;">&quot;https://www.facebook.com/dialog/oauth&quot;</span>,
                     <span style="color:#996600;">&quot;http://cdn.api.twitter.com/1/urls/count.json&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
  c.<span style="color:#9900CC;">persist_cache</span> = <span style="color:#0000FF; font-weight:bold;">true</span>
  c.<span style="color:#9900CC;">cache_path</span> = <span style="color:#996600;">'spec/req_cache/'</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># need to call this because of a race condition between persist_cache</span>
<span style="color:#008000; font-style:italic;"># being set and the proxy being loaded for the first time</span>
Billy.<span style="color:#9900CC;">proxy</span>.<span style="color:#9900CC;">restore_cache</span>
&nbsp;
Capybara.<span style="color:#9900CC;">javascript_driver</span> = <span style="color:#ff3333; font-weight:bold;">:poltergeist_billy</span></pre></td></tr></table></div>

<p>A test for the payment form looks the same as usual:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="ruby" style="font-family:monospace;">    scenario <span style="color:#996600;">&quot;physical product&quot;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
      product = start_buying build<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:product</span>, <span style="color:#ff3333; font-weight:bold;">:physical</span>, user: <span style="color:#0066ff; font-weight:bold;">@seller</span>, active: <span style="color:#0000FF; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
      VCR.<span style="color:#9900CC;">use_cassette</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'Balanced/purchase_with_cc'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
        within <span style="color:#996600;">'#new_order'</span> <span style="color:#9966CC; font-weight:bold;">do</span>
          fill_in <span style="color:#996600;">'order_email'</span>, with: <span style="color:#6666ff; font-weight:bold;">Faker::Internet</span>.<span style="color:#9900CC;">safe_email</span>
          fill_in_address
          fill_in_card
&nbsp;
          click_on <span style="color:#996600;">'Buy Now'</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
        page.<span style="color:#9900CC;">should</span> have_css<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'#receipt'</span>, <span style="color:#ff3333; font-weight:bold;">:visible</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#0000FF; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span>
      <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
      validate_receipt product, <span style="color:#0066ff; font-weight:bold;">@seller</span>
    <span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>Puffing-billy will transparently cache every requests the browser makes and VCR records any requests made by your backend logic. It&#8217;s pretty sweet.</p>
<p>What do you guys think? I only have 20 days of Ruby experience and the internet has told me it really wants something like this, but I couldn&#8217;t find anyone who&#8217;s already made it.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul zemanta-article-ul-image" style="margin: 0; padding: 0; overflow: hidden;">
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://blog.codeship.io/2013/02/11/Using-PhantomJS-for-backend-tests.html" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/144898901_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://blog.codeship.io/2013/02/11/Using-PhantomJS-for-backend-tests.html" target="_blank">How to make your testing awesome with PhantomJS</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://highscalability.com/blog/2013/1/30/better-browser-caching-is-more-important-than-no-javascript.html" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/noimg_26_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://highscalability.com/blog/2013/1/30/better-browser-caching-is-more-important-than-no-javascript.html" target="_blank">Better Browser Caching is More Important than No Javascript or Fast Networks for HTTP Performance</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://www.slideshare.net/jo_liss/testing-ember-apps" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/145879258_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://www.slideshare.net/jo_liss/testing-ember-apps" target="_blank">Testing Ember Apps</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://www.slideshare.net/SmartBear_Software/safe-sex-with-thirdparty-apis" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/152051710_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://www.slideshare.net/SmartBear_Software/safe-sex-with-thirdparty-apis" target="_blank">Safe Sex with Third-Party APIs</a></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/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=e69c073b-038f-4dc0-8a7f-21131f8ce412" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/Xgd2_UIB2LQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/bring-ruby-vcr-to-javascript-testing-with-capybara-and-puffing-billy/swizec/6067/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/bring-ruby-vcr-to-javascript-testing-with-capybara-and-puffing-billy/swizec/6067</feedburner:origLink></item>
		<item>
		<title>Sexy animated spirographs in 35 sloc of d3.js</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/oBFaEib12cY/6052</link>
		<comments>http://swizec.com/blog/sexy-animated-spirographs-in-35-sloc-of-d3-js/swizec/6052#comments</comments>
		<pubDate>Thu, 07 Mar 2013 12:13:50 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Animation]]></category>
		<category><![CDATA[d3.js]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Spirograph]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6052</guid>
		<description><![CDATA[You probably remember spirographs as kid&#8217;s toys from your youth. I had a simple set that was just a collection of plastic sprockets with holes for pencils. Endless amounts of fun when I was two or three years old. I think &#8230; I don&#8217;t really remember much from that time, but I remember having those...  <a href="http://swizec.com/blog/sexy-animated-spirographs-in-35-sloc-of-d3-js/swizec/6052" class="more-link" title="Read Sexy animated spirographs in 35 sloc of d3.js">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>You probably remember spirographs as kid&#8217;s toys from your youth. I had a simple set that was just a collection of plastic sprockets with holes for pencils.</p>
<p>Endless amounts of fun when I was two or three years old. I think &#8230; I don&#8217;t really remember much from that time, but I remember having those thingies and loving playing with them. One of my earliest memories even!</p>
<div class="wp-caption alignnone" style="width: 570px"><img class=" " title="Spirograph" src="http://upload.wikimedia.org/wikipedia/commons/thumb/9/97/Spirograph3.jpg/800px-Spirograph3.jpg" alt="Spirograph" width="560" height="420" /><p class="wp-caption-text"><a class="zem_slink" title="Spirograph" href="http://en.wikipedia.org/wiki/Spirograph" rel="wikipedia" target="_blank">Spirograph</a></p></div>
<p>Last night I was making an animation example for the d3.js book I&#8217;m writing and ended up with the idea of progressively drawing out cool looking parametric equations. Little did I know, those are actually spirographs! Learned something while I was learning something.</p>
<blockquote class="twitter-tweet"><p>@<a href="https://twitter.com/swizec">swizec</a> <a class="zem_slink" title="Parametric equation" href="http://en.wikipedia.org/wiki/Parametric_equation" rel="wikipedia" target="_blank">Parametric equations</a> are a way to model physical spirographs. <a title="http://en.wikipedia.org/wiki/Spirograph" href="http://t.co/JvFBin6ZGa">en.wikipedia.org/wiki/Spirograph</a></p>
<p>— Klemen Slavič (@krofdrakula) <a href="https://twitter.com/krofdrakula/status/309348085983756288">March 6, 2013</a></p></blockquote>
<p>My failure in common knowledge aside, it&#8217;s possible to animate the drawing of parametric equations with just a few lines of <a href="http://d3js.org" target="_blank">d3.js</a> code. What I&#8217;m about to show you has a pretty big problem, but produces cool looking results &#8220;in the lab&#8221;. Try to guess what the problem is.</p>
<h2>Animating spirographs</h2>
<div id="attachment_6059" class="wp-caption alignnone" style="width: 496px"><a href="http://swizec.com/blog/wp-content/uploads/2013/03/0007_04_04.png?3e5991"><img class=" wp-image-6059 " title="After a few steps" src="http://swizec.com/blog/wp-content/uploads/2013/03/0007_04_04.png?3e5991" alt="After a few steps" width="486" height="354" /></a><p class="wp-caption-text">After a few steps</p></div>
<p>We&#8217;ll make an animation timer and for each tick we&#8217;ll draw a new step of the spirograph. After the spirograph is finished, we&#8217;ll stop the timer. To make the animation more interesting to watch, we&#8217;ll also fake a brush flying around (just a black dot).</p>
<p>We start with some basic html:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html" style="font-family:monospace;">&lt;!DOCTYPE html&gt;
&lt;title&gt;&lt;/title&gt;
&lt;link href=&quot;../bootstrap/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;&gt;
&nbsp;
&lt;div id=&quot;graph&quot;&gt;&lt;/div&gt;
&nbsp;
&lt;script src=&quot;http://d3js.org/d3.v3.min.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;timers.js&quot;&gt;&lt;/script&gt;</pre></td></tr></table></div>

<p>Then we hop into the javascript to flesh out the actual code.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> width <span style="color: #339933;">=</span> <span style="color: #CC0000;">600</span><span style="color: #339933;">,</span>
    height <span style="color: #339933;">=</span> <span style="color: #CC0000;">600</span><span style="color: #339933;">,</span>
    svg <span style="color: #339933;">=</span> d3.<span style="color: #660066;">select</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#graph'</span><span style="color: #009900;">&#41;</span>
        .<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'svg'</span><span style="color: #009900;">&#41;</span>
        .<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>width<span style="color: #339933;">:</span> width<span style="color: #339933;">,</span>
               height<span style="color: #339933;">:</span> height<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>I found the parametric function in the wikipedia&#8217;s article on parametric equations. We&#8217;ll be giving it a simple parameter calculated from the animation timer and it will return a two dimensional position.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> position <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>t<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">var</span> a <span style="color: #339933;">=</span> <span style="color: #CC0000;">80</span><span style="color: #339933;">,</span> b <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> c <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> d <span style="color: #339933;">=</span> <span style="color: #CC0000;">80</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#123;</span>x<span style="color: #339933;">:</span> <span style="">Math</span>.<span style="color: #660066;">cos</span><span style="color: #009900;">&#40;</span>a<span style="color: #339933;">*</span>t<span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="">Math</span>.<span style="color: #660066;">pow</span><span style="color: #009900;">&#40;</span><span style="">Math</span>.<span style="color: #660066;">cos</span><span style="color: #009900;">&#40;</span>b<span style="color: #339933;">*</span>t<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
            y<span style="color: #339933;">:</span> <span style="">Math</span>.<span style="color: #660066;">sin</span><span style="color: #009900;">&#40;</span>c<span style="color: #339933;">*</span>t<span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="">Math</span>.<span style="color: #660066;">pow</span><span style="color: #009900;">&#40;</span><span style="">Math</span>.<span style="color: #660066;">sin</span><span style="color: #009900;">&#40;</span>d<span style="color: #339933;">*</span>t<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Tweaking the <em>a</em>, <em>b</em>, c, and <em>d</em> parameters will change the final shape.</p>
<p>Next we&#8217;re going to define some scales to help us translate between maths space and our drawing space.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> t_scale <span style="color: #339933;">=</span> d3.<span style="color: #660066;">scale</span>.<span style="color: #660066;">linear</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">domain</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">500</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">30000</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">range</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">*</span><span style="">Math</span>.<span style="color: #660066;">PI</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    x <span style="color: #339933;">=</span> d3.<span style="color: #660066;">scale</span>.<span style="color: #660066;">linear</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">domain</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">-</span><span style="color: #CC0000;">2</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">range</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">100</span><span style="color: #339933;">,</span> width<span style="color: #339933;">-</span><span style="color: #CC0000;">100</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    y <span style="color: #339933;">=</span> d3.<span style="color: #660066;">scale</span>.<span style="color: #660066;">linear</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">domain</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">-</span><span style="color: #CC0000;">2</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">range</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span>height<span style="color: #339933;">-</span><span style="color: #CC0000;">100</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">100</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">var</span> brush <span style="color: #339933;">=</span> svg.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'circle'</span><span style="color: #009900;">&#41;</span>
        .<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>r<span style="color: #339933;">:</span> <span style="color: #CC0000;">4</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    previous <span style="color: #339933;">=</span> position<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The <em>t_scale</em> is going to translate time into a parameter, <em>x</em> and <em>y</em> calculate proper positions on the final image using the coordinates returned by the position function.</p>
<p>We also put a simple circle on the image &#8211; this will represent the brush &#8211; and we need to take note of the previous position so we can draw lines between our current and previous state.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> step <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>time<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>time <span style="color: #339933;">&gt;</span> t_scale.<span style="color: #660066;">domain</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">var</span> t <span style="color: #339933;">=</span> t_scale<span style="color: #009900;">&#40;</span>time<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        pos <span style="color: #339933;">=</span> position<span style="color: #009900;">&#40;</span>t<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    brush.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>cx<span style="color: #339933;">:</span> x<span style="color: #009900;">&#40;</span>pos.<span style="color: #660066;">x</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
                cy<span style="color: #339933;">:</span> y<span style="color: #009900;">&#40;</span>pos.<span style="color: #660066;">y</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    svg.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'line'</span><span style="color: #009900;">&#41;</span>
        .<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>x1<span style="color: #339933;">:</span> x<span style="color: #009900;">&#40;</span>previous.<span style="color: #660066;">x</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
               y1<span style="color: #339933;">:</span> y<span style="color: #009900;">&#40;</span>previous.<span style="color: #660066;">y</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
               x2<span style="color: #339933;">:</span> x<span style="color: #009900;">&#40;</span>pos.<span style="color: #660066;">x</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
               y2<span style="color: #339933;">:</span> y<span style="color: #009900;">&#40;</span>pos.<span style="color: #660066;">y</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
               stroke<span style="color: #339933;">:</span> <span style="color: #3366CC;">'steelblue'</span><span style="color: #339933;">,</span>
               <span style="color: #3366CC;">'stroke-width'</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">1.3</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    previous <span style="color: #339933;">=</span> pos<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This is our <a class="zem_slink" title="Step function" href="http://en.wikipedia.org/wiki/Step_function" rel="wikipedia" target="_blank">step function</a>. It draws every consecutive step of the animation by moving the brush and putting a line between the current and previous position. The animation will stop when this function returns <em>true</em> so we make sure the <em>time</em> parameter doesn&#8217;t go beyond <em>t_scales</em>&#8216;s domain.</p>
<p>Finally, we simply start the timer.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> timer <span style="color: #339933;">=</span> d3.<span style="color: #660066;">timer</span><span style="color: #009900;">&#40;</span>step<span style="color: #339933;">,</span> <span style="color: #CC0000;">500</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The timer will start running after 500 milliseconds and repeatedly call the <em>step </em>function until it returns <em>true.</em></p>
<p>You can check the animation out via <a href="http://swizec.github.com/d3.js-book-examples/ch4/timers.html" target="_blank">the magic of github pages</a>. The final spirograph looks like this:</p>
<div id="attachment_6055" class="wp-caption alignnone" style="width: 565px"><a href="http://swizec.com/blog/wp-content/uploads/2013/03/0007_04_05.png?3e5991"><img class="size-full wp-image-6055" title="A parametric equation visualised" src="http://swizec.com/blog/wp-content/uploads/2013/03/0007_04_05.png?3e5991" alt="A parametric equation visualised" width="555" height="443" /></a><p class="wp-caption-text">A parametric equation visualised</p></div>
<p>Figured out the problem yet?</p>
<p>The problem with this approach is that I&#8217;m using the animation timer itself as a parameter to the function, which means point density depends on how long you&#8217;re willing to let the animation run. It will always draw the complete function because of how d3 scales work, but it might look <em>very</em> approximate. Think squares for circles approximate.</p>
<p>Another problem is that using a slower computer, or doing anything that lags the CPU even a little bit while the animation is running will ruin the final picture.</p>
<p>For instance, this is what happens when I switch desktops around while the browser is drawing.</p>
<div id="attachment_6057" class="wp-caption alignnone" style="width: 556px"><a href="http://swizec.com/blog/wp-content/uploads/2013/03/glitchy-spirograph.png?3e5991"><img class=" wp-image-6057 " title="Glitchy spirograph" src="http://swizec.com/blog/wp-content/uploads/2013/03/glitchy-spirograph.png?3e5991" alt="Glitchy spirograph" width="546" height="534" /></a><p class="wp-caption-text">Glitchy spirograph</p></div>
<p>&nbsp;</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul zemanta-article-ul-image" style="margin: 0; padding: 0; overflow: hidden;">
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://www.universetoday.com/100325/the-vela-pulsar-as-a-spirograph/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/148486923_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://www.universetoday.com/100325/the-vela-pulsar-as-a-spirograph/" target="_blank">The Vela Pulsar as a Spirograph</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://hackaday.com/2013/02/21/laser-spirograph/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/147121686_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://hackaday.com/2013/02/21/laser-spirograph/" target="_blank">Laser Spirograph</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://www.gizmodo.co.uk/2013/02/watch-the-universe-draw-an-awesome-spirograph-in-the-sky/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/148806266_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://www.gizmodo.co.uk/2013/02/watch-the-universe-draw-an-awesome-spirograph-in-the-sky/" target="_blank">Watch the Universe Draw an Awesome Spirograph in the Sky</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://phys.org/news/2013-02-fermi-motion-spirograph.html" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/148576796_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://phys.org/news/2013-02-fermi-motion-spirograph.html" target="_blank">Fermi&#8217;s motion produces a study in spirograph</a></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/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=fb22a411-7098-4367-b54c-e6363f006ad9" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/oBFaEib12cY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/sexy-animated-spirographs-in-35-sloc-of-d3-js/swizec/6052/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/sexy-animated-spirographs-in-35-sloc-of-d3-js/swizec/6052</feedburner:origLink></item>
		<item>
		<title>The true difference between self publishing and using publishers</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/ENVOodc6FQ0/6047</link>
		<comments>http://swizec.com/blog/the-true-difference-between-self-publishing-and-using-publishers/swizec/6047#comments</comments>
		<pubDate>Tue, 05 Mar 2013 12:22:31 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Publishing]]></category>
		<category><![CDATA[Self-publishing]]></category>
		<category><![CDATA[Writing]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6047</guid>
		<description><![CDATA[Right now I&#8217;m writing two books at once and yes that was a terrible idea. Please avoid doing this if you at all can. One book I&#8217;m working on with a publisher, the other I&#8217;m self-publishing. Both are interesting processes, but I have noticed one colossal difference between the two: Self-publishing -&#62; November 2012 to March...  <a href="http://swizec.com/blog/the-true-difference-between-self-publishing-and-using-publishers/swizec/6047" class="more-link" title="Read The true difference between self publishing and using publishers">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<a href="http://www.flickr.com/photos/sami73/469789435/"><img class="alignnone" title="Writing, by Sami KeinÃ¤nen" src="http://farm1.staticflickr.com/179/469789435_8efdc0e6c6.jpg" alt="Writing, by Sami KeinÃ¤nen" width="500" height="375" /></a>
<p>Right now I&#8217;m writing two books at once and yes that was a <em>terrible</em> idea. Please avoid doing this if you at all can.</p>
<p>One book I&#8217;m working on with a <a class="zem_slink" title="Publishing" href="http://en.wikipedia.org/wiki/Publishing" rel="wikipedia" target="_blank">publisher</a>, the other I&#8217;m <a class="zem_slink" title="Self-publishing" href="http://en.wikipedia.org/wiki/Self-publishing" rel="wikipedia" target="_blank">self-publishing</a>. Both are interesting processes, but I have noticed one colossal difference between the two:</p>
<p>Self-publishing -&gt; November 2012 to March 2013 (5 months) -&gt; 104 hours worked. Includes researching, writing, marketing, everything. About 40 pages written.</p>
<p>Publisher -&gt; late January 2013 to March 2013 (1.5 months) -&gt; 101 hours worked. Just researching and writing. About 100 pages written.</p>
<p>Might be the tight chapter deadlines I keep missing, might be the nice project coordinator lady asking me what the fuck do I think I&#8217;m doing via email every couple of weeks.</p>
<p>But them&#8217;s the facts. I get more writing done when working with a publisher.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul zemanta-article-ul-image" style="margin: 0; padding: 0; overflow: hidden;">
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://acwpublishinghouse.wordpress.com/2013/02/18/author-development-residual-income-through-book-publishing/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/146263368_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://acwpublishinghouse.wordpress.com/2013/02/18/author-development-residual-income-through-book-publishing/" target="_blank">Author Development: Residual Income Through Book Publishing</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://www.pbs.org/mediashift/2013/02/10-proofreading-tips-for-self-publishers-058.html" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/148423968_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://www.pbs.org/mediashift/2013/02/10-proofreading-tips-for-self-publishers-058.html" target="_blank">10 Proofreading Tips For Self-Publishers</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://selfpubauthors.com/2013/03/03/if-a-publisher-offers-you-a-contract-for-your-self-published-book-will-you-be-forced-by-amazon-to-refund-past-customers-who-bought-it/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/149463175_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://selfpubauthors.com/2013/03/03/if-a-publisher-offers-you-a-contract-for-your-self-published-book-will-you-be-forced-by-amazon-to-refund-past-customers-who-bought-it/" target="_blank">If A Publisher Offers You a Contract for Your Self-Published Book, Will You Be Forced (By Amazon) To Refund Past Customers Who Bought It?</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://annaldavis.net/2013/02/26/writer-undercover-four-submission-tips/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/148295322_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://annaldavis.net/2013/02/26/writer-undercover-four-submission-tips/" target="_blank">Writer, Undercover: Four Submission Tips</a></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/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=4497a9c1-c8b8-4f00-881f-5f49a8ed775d" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/ENVOodc6FQ0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/the-true-difference-between-self-publishing-and-using-publishers/swizec/6047/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/the-true-difference-between-self-publishing-and-using-publishers/swizec/6047</feedburner:origLink></item>
		<item>
		<title>#ifihadglass – the app I want to build</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/MFcAZ-nPWjE/6035</link>
		<comments>http://swizec.com/blog/ifihadglass-the-app-i-want-to-build/swizec/6035#comments</comments>
		<pubDate>Thu, 28 Feb 2013 13:10:32 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Concept]]></category>
		<category><![CDATA[Glass]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Glass]]></category>
		<category><![CDATA[User interface]]></category>
		<category><![CDATA[Wearable computer]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6035</guid>
		<description><![CDATA[For about a year now Google has been teasing us with its wearable computing idea &#8211; Glass. And for just as long, people have been making fun of the concept. Calling it anything from utterly ridiculous, to a despicable invasion into everybody&#8217;s privacy. The running joke on the internet is that you should walk up...  <a href="http://swizec.com/blog/ifihadglass-the-app-i-want-to-build/swizec/6035" class="more-link" title="Read #ifihadglass &#8211; the app I want to build">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>For about a year now <a class="zem_slink" title="Google" href="http://google.com" rel="homepage" target="_blank">Google</a> has been teasing us with its <a class="zem_slink" title="Wearable computer" href="http://en.wikipedia.org/wiki/Wearable_computer" rel="wikipedia" target="_blank">wearable computing</a> idea &#8211; Glass.</p>
<p>And for just as long, people have been making fun of the concept. Calling it anything from utterly ridiculous, to a despicable invasion into everybody&#8217;s privacy. The <a class="zem_slink" title="Running gag" href="http://en.wikipedia.org/wiki/Running_gag" rel="wikipedia" target="_blank">running joke</a> on the internet is that you should walk up to anyone wearing Google Glass and shout <em>&#8220;Ok, Glass, google lemon party. Open all.&#8221;</em></p>
<a href="http://swizec.com/blog/wp-content/uploads/2013/02/longboard-glass-app.jpg?3e5991"><img class="alignnone  wp-image-6043" title="longboard-glass-app" src="http://swizec.com/blog/wp-content/uploads/2013/02/longboard-glass-app.jpg?3e5991" alt="longboard-glass-app" width="614" height="344" /></a>
<p>Some have gone as far as calling it a useless idea that does nothing more than a <a class="zem_slink" title="Smartphone" href="http://en.wikipedia.org/wiki/Smartphone" rel="wikipedia" target="_blank">smartphone</a> can already do for you.</p>
<blockquote><p>No to throw cold water here but Is it really? It seems to be rather trivial integration of currently known and available technologies with bit of miniaturization efforts. Nothing that 5 year old iPhone can&#8217;t do with albeit more convenience. Space elevators, 100% artificial life form, fusion reactor of the size AA batteries &#8211; now that, my friend, would be sci-fi stuff.</p></blockquote>
<p>Which is just ridiculous, if you ask me. Glass isn&#8217;t about being annoyed by notifications all day long, or about making calls without a phone (people with bluetooth headphones look ridiculous enough). Hell, Glass is pretty much useless in all but a few cases that Google shows in their <a href="http://www.google.com/glass/start/how-it-feels/">How Glass feels video</a>.</p>
<p>Ugh, life logging. Taking pictures. Remotely sharing moments. Boring.</p>
<p>Here&#8217;s the stuff that might actually change the world as much as smartphones did a few years ago.</p>
<div id="attachment_6036" class="wp-caption alignnone" style="width: 624px"><a href="http://swizec.com/blog/wp-content/uploads/2013/02/Selection_152.png?3e5991"><img class=" wp-image-6036 " title="Directions, while cycling" src="http://swizec.com/blog/wp-content/uploads/2013/02/Selection_152-1024x587.png?3e5991" alt="Directions, while cycling" width="614" height="352" /></a><p class="wp-caption-text">Directions, while cycling</p></div>
<div id="attachment_6037" class="wp-caption alignnone" style="width: 624px"><a href="http://swizec.com/blog/wp-content/uploads/2013/02/Selection_153.png?3e5991"><img class=" wp-image-6037 " title="Skiing directions" src="http://swizec.com/blog/wp-content/uploads/2013/02/Selection_153-1024x576.png?3e5991" alt="Skiing directions" width="614" height="346" /></a><p class="wp-caption-text">Skiing directions</p></div>
<div id="attachment_6038" class="wp-caption alignnone" style="width: 624px"><a href="http://swizec.com/blog/wp-content/uploads/2013/02/Selection_154.png?3e5991"><img class=" wp-image-6038 " title="Artist's reference" src="http://swizec.com/blog/wp-content/uploads/2013/02/Selection_154-1024x558.png?3e5991" alt="Artist's reference" width="614" height="335" /></a><p class="wp-caption-text">Artist&#8217;s reference</p></div>
<p><em>That&#8217;s</em> what Glass is really bringing to the table. The ability to look at things without using your hands. There are countless smartphone zombies out there, walking through town, never looking up from their sci-fi slab of glass.</p>
<p>Sit on a bench some time and observe. Most people are either walking around like zombies, or randomly stopping in the middle of the street to look something up.</p>
<p>It&#8217;s ridiculous.</p>
<h2>Sports, there&#8217;s your future</h2>
<p>The real advantage, however, will come for sports.</p>
<p>Ever used <a class="zem_slink" title="RunKeeper" href="http://www.runkeeper.com/" rel="homepage" target="_blank">Runkeeper</a> or Strava to log your activity? Running with a smartphone in your pocket is a bit annoying, it keeps flopping about in your pocket and doesn&#8217;t do a good job of communicating with you. Looking up your current pace, running time or whatever &#8230; it&#8217;s a pain.</p>
<p>Not only is running while looking down at your phone kind of dangerous, it also hurts your form, the phone is utterly disgusting and covered in sweat by now, and the screen is shaking so much that you can barely see anything without stopping.</p>
<p>Glass might solve that with a good enough app.</p>
<p>The situation becomes even worse when you&#8217;re, for instance, longboarding.</p>
<p>Here you are, bombing down a hill &#8230; no idea how fast you are going and no way of looking up safely, unless you know the track by heart you have no idea what the next bend is going to be like and so on. There isn&#8217;t even an app for that because it would be useless, you can&#8217;t just look at your phone while traveling 50mph down a hill on a thin piece of wood.</p>
<p>I mean you could, but please don&#8217;t.</p>
<div id="attachment_6044" class="wp-caption alignnone" style="width: 624px"><a href="http://swizec.com/blog/wp-content/uploads/2013/02/longboard-glass-app1.jpg?3e5991"><img class=" wp-image-6044 " title="A 3min mockup of the Glass Longboard App" src="http://swizec.com/blog/wp-content/uploads/2013/02/longboard-glass-app1.jpg?3e5991" alt="A 3min mockup of the Glass Longboard App" width="614" height="344" /></a><p class="wp-caption-text">A 3min mockup of the Glass Longboard App</p></div>
<p>The app I want to build would behave a bit like driving instructions in rally games. In a corner of your vision, neatly packed, information about the next curve, your current speed, possibly suggest good breaking/sliding points. Stuff like that.</p>
<p>That alone would make having Glass totally worth it for me.</p>
<p>And yes, I <em>would</em> do adrenalyne sports with a $1500 piece of tech on my face. Especially if I could fit it on my normal glasses.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul zemanta-article-ul-image" style="margin: 0; padding: 0; overflow: hidden;">
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://blog.tmcnet.com/social-spotlight/2013/02/what-would-i-do-ifihadglass.html" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/146846838_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://blog.tmcnet.com/social-spotlight/2013/02/what-would-i-do-ifihadglass.html" target="_blank">What Would I Do #IfIHadGlass?</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://blog.makezine.com/2013/02/22/ifihadglass-the-things-that-i-would-do/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/147387350_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://blog.makezine.com/2013/02/22/ifihadglass-the-things-that-i-would-do/" target="_blank">#ifihadglass, the Things I Would Do&#8230;</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://www.theverge.com/2013/2/20/4006748/google-project-glass-explorer-edition-pre-order" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/146699858_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://www.theverge.com/2013/2/20/4006748/google-project-glass-explorer-edition-pre-order" target="_blank">Google expands Glass pre-orders to &#8216;creative individuals&#8217; with #ifihadglass competition</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://www.besttechie.com/2013/02/20/google-shows-off-google-glass-ui-and-launches-ifihadglass-campaign/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/146726081_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://www.besttechie.com/2013/02/20/google-shows-off-google-glass-ui-and-launches-ifihadglass-campaign/" target="_blank">Google Shows Off Google Glass UI And Launches #IfIHadGlass Campaign</a></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/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=46c01b46-354a-4033-a7a4-3354e1f0539c" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/MFcAZ-nPWjE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/ifihadglass-the-app-i-want-to-build/swizec/6035/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/ifihadglass-the-app-i-want-to-build/swizec/6035</feedburner:origLink></item>
		<item>
		<title>Da Vinci – The Genius</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/Fi0-TD2CnkE/6019</link>
		<comments>http://swizec.com/blog/da-vinci-the-genius/swizec/6019#comments</comments>
		<pubDate>Tue, 26 Feb 2013 13:31:03 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Travel&Events]]></category>
		<category><![CDATA[Leonardo Da Vinci]]></category>
		<category><![CDATA[Ljubljana]]></category>
		<category><![CDATA[Machine]]></category>
		<category><![CDATA[Renaissance]]></category>
		<category><![CDATA[Saturday]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6019</guid>
		<description><![CDATA[Last Saturday I got a chance to visit the new Da Vinci &#8211; The Genius exhibition at Ljubljana&#8216;s main exhibition hall area thing &#8230; space? It was really fun! Perhaps not as much as the one I was to in primary school, but that&#8217;s just the age difference talking, really. When you are ten years...  <a href="http://swizec.com/blog/da-vinci-the-genius/swizec/6019" class="more-link" title="Read Da Vinci &#8211; The Genius">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Last Saturday I got a chance to visit the new <a href="http://davinci.si" target="_blank">Da Vinci &#8211; The Genius</a> exhibition at <a class="zem_slink" title="Ljubljana" href="http://maps.google.com/maps?ll=46.0555555556,14.5083333333&amp;spn=0.1,0.1&amp;q=46.0555555556,14.5083333333 (Ljubljana)&amp;t=h" rel="geolocation" target="_blank">Ljubljana</a>&#8216;s main <a class="zem_slink" title="Convention center" href="http://en.wikipedia.org/wiki/Convention_center" rel="wikipedia" target="_blank">exhibition hall</a> area thing &#8230; space?</p>
<a href="http://swizec.com/blog/wp-content/uploads/2013/02/da-vinci-entrance.jpg?3e5991"><img class=" wp-image-6023 alignnone" title="Da Vinci Entrance" src="http://swizec.com/blog/wp-content/uploads/2013/02/da-vinci-entrance-1024x764.jpg?3e5991" alt="Da Vinci Entrance" width="631" height="471" /></a>
<p>It was really fun! Perhaps not as much as the one I was to in primary school, but that&#8217;s just the age difference talking, really. When you are ten years old, Leonardo is this magnificent guy, half god half human, he can create anything and everything &#8211; things you could never even think of!</p>
<p>Naturally, you use a lot of his influences in your own work &#8211; yes I used to design strange devices when I was ten years old, never build anything of course. A great inspiration.</p>
<p>At 25 he turns into a curiosity. You appreciate the things he designed because of the times he was living in. The machines look cool, but it is painfully obvious that almost none would ever work &#8211; the flying machines especially seem kind of laughable looked at from the present time.</p>
<p>Men flapping wooden wings &#8230; four men running in a tight circle to screw into the air, I mean seriously.</p>
<p>If you can&#8217;t remember being a nerdy kid, completely enthralled by simple mechanics and <a class="zem_slink" title="Classical mechanics" href="http://en.wikipedia.org/wiki/Classical_mechanics" rel="wikipedia" target="_blank">Newtonian physics</a>, just watch an episode of <a class="zem_slink" title="Codename: Kids Next Door" href="http://www.imdb.com/title/tt0312109/" rel="imdb" target="_blank">Codename: Kids Next Door</a>. It&#8217;s all there.</p>
<div id="attachment_6027" class="wp-caption alignnone" style="width: 468px"><a href="http://swizec.com/blog/wp-content/uploads/2013/02/da-vinci-vertical-takeoff.jpg?3e5991"><img class=" wp-image-6027 " title="Da Vinci's wing flappy vertical takeoff machine." src="http://swizec.com/blog/wp-content/uploads/2013/02/da-vinci-vertical-takeoff-764x1024.jpg?3e5991" alt="Da Vinci's wing flappy vertical takeoff machine." width="458" height="614" /></a><p class="wp-caption-text">Da Vinci&#8217;s wing flappy vertical takeoff machine.</p></div>
<p>Seriously though, <a class="zem_slink" title="Leonardo da Vinci" href="http://en.wikipedia.org/wiki/Leonardo_da_Vinci" rel="wikipedia" target="_blank">Leonardo Da Vinci</a> was an incredibly cool guy, the prototypical renaissance man. We need more of those.</p>
<p>His work in studying <a class="zem_slink" title="Human anatomy" href="http://en.wikipedia.org/wiki/Human_anatomy" rel="wikipedia" target="_blank">human anatomy</a> was ground breaking &#8211; did you know one of the paramount textbooks on anatomy, <a href="http://en.wikipedia.org/wiki/Gray%27s_anatomy" target="_blank">Gray&#8217;s Anatomy</a>, purposefully mimics his style for the sketches? &#8211; his artistic works are pretty awesome as well, but they do suffer from problems common to the era.</p>
<p>Can somebody please tell me why artists in the <a class="zem_slink" title="Renaissance" href="http://en.wikipedia.org/wiki/Renaissance" rel="wikipedia" target="_blank">renaissance era</a> thought women are just men with two perfectly round spheres on their chest? It&#8217;s ridiculous.</p>
<p>Either way, the exhibition is a leisurely two hour stroll through sheer awesome. You even get to play with some models!</p>
<p>My favourite exhibit was the deceptively simple hygrometer. Put a weight on one side of a scale, some cotton on the other. Scale moves depending on how soaked in <a class="zem_slink" title="Water vapor" href="http://en.wikipedia.org/wiki/Water_vapor" rel="wikipedia" target="_blank">water vapour</a> the cotton becomes. How cool is that!?</p>
<p>If you&#8217;re even remotely interested in mechanical things, details about the Mona Lisa or cool looking anatomical sketches, you should visit this show on a lazy afternoon.</p>
<p>But definitely bring someone along who hasn&#8217;t played with <a class="zem_slink" title="Machine" href="http://en.wikipedia.org/wiki/Machine" rel="wikipedia" target="_blank">mechanical devices</a> and stuff a lot. The exhibition is much more interesting when you get to help somebody understand why this or that machine works or why it doesn&#8217;t.</p>
<div id="attachment_6029" class="wp-caption alignnone" style="width: 468px"><a href="http://swizec.com/blog/wp-content/uploads/2013/02/da-vinci-robot.jpg?3e5991"><img class=" wp-image-6029 " title="All you need for a humanoid robot" src="http://swizec.com/blog/wp-content/uploads/2013/02/da-vinci-robot-764x1024.jpg?3e5991" alt="All you need for a humanoid robot" width="458" height="614" /></a><p class="wp-caption-text">All you need for a humanoid robot. I once tried to make a hand out of Lego &#8230; it was more complex.</p></div>
<div id="attachment_6030" class="wp-caption alignnone" style="width: 624px"><a href="http://swizec.com/blog/wp-content/uploads/2013/02/da-vinci-art.jpg?3e5991"><img class=" wp-image-6030 " title="Da Vinci art thumbnails" src="http://swizec.com/blog/wp-content/uploads/2013/02/da-vinci-art-1024x764.jpg?3e5991" alt="Da Vinci art thumbnails" width="614" height="458" /></a><p class="wp-caption-text">Da Vinci art thumbnails</p></div>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul zemanta-article-ul-image" style="margin: 0; padding: 0; overflow: hidden;">
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://chasepage.net/2013/02/06/37/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/143343807_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://chasepage.net/2013/02/06/37/" target="_blank">Leonardo Da Vinci</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://www.businessinsider.com/batman-and-leonardo-da-vinci-common-links-2013-1" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/136423848_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://www.businessinsider.com/batman-and-leonardo-da-vinci-common-links-2013-1" target="_blank">&#8216;Dark Knight Trilogy&#8217; Writer Says Batman And Leonardo Da Vinci Are More Alike Than You Think</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://christcenteredteaching.wordpress.com/2012/12/31/everything-connects-to-everything-else-leonardo-da-vinci/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/135252313_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://christcenteredteaching.wordpress.com/2012/12/31/everything-connects-to-everything-else-leonardo-da-vinci/" target="_blank">Everything Connects to Everything Else ~ Leonardo da Vinci ~</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://maphead.wordpress.com/2013/02/24/reading-the-renaissance-the-renaissance-from-greenhaven-press/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/147734613_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://maphead.wordpress.com/2013/02/24/reading-the-renaissance-the-renaissance-from-greenhaven-press/" target="_blank">Reading the Renaissance: The Renaissance from Greenhaven Press</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://scottmdewey.wordpress.com/2013/02/25/overused-words/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/147835963_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://scottmdewey.wordpress.com/2013/02/25/overused-words/" target="_blank">Top 3 Most Overused Words I Hate</a></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/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=7643b8b1-54f5-403f-9b79-a6b617d96da0" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/Fi0-TD2CnkE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/da-vinci-the-genius/swizec/6019/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/da-vinci-the-genius/swizec/6019</feedburner:origLink></item>
		<item>
		<title>Breaking bounds with BoundBreaker</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/B7UPDs5TKgs/6003</link>
		<comments>http://swizec.com/blog/breaking-bounds-with-boundbreaker/swizec/6003#comments</comments>
		<pubDate>Tue, 19 Feb 2013 15:17:35 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Silicon Valley]]></category>
		<category><![CDATA[Slovenia]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=6003</guid>
		<description><![CDATA[Remember to clench your butt. ~ the single most useful piece of advice I&#8217;ve ever gotten, by @filipdobranic of BoundBreaker Back in 2009 I was a greenhorn entrepreneur. Not that I&#8217;m an entrepreneurial machine pumping out product after product these days, but at least I&#8217;m not flopping about like a fish out of water. Most of the time....  <a href="http://swizec.com/blog/breaking-bounds-with-boundbreaker/swizec/6003" class="more-link" title="Read Breaking bounds with BoundBreaker">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<blockquote><p>Remember to clench your butt.</p>
<p>~ the single most useful piece of advice I&#8217;ve ever gotten, by <a href="https://twitter.com/filipdobranic" target="_blank">@filipdobranic</a> of BoundBreaker</p></blockquote>
<p>Back in 2009 I was a greenhorn entrepreneur. Not that I&#8217;m an <a class="zem_slink" title="Entrepreneur" href="http://en.wikipedia.org/wiki/Entrepreneur" rel="wikipedia" target="_blank">entrepreneurial</a> machine pumping out product after product these days, but at least I&#8217;m not flopping about like a fish out of water.</p>
<p>Most of the time.</p>
<p>But I did start my first startup in 2009, two weeks before my 22nd birthday. At the time I was still practically a freshman at college and had just quit my job as a run-of-the-mill web developer building crappy websites for an advertising/communications agency. Of course I had no funds and no idea what I was doing.</p>
<p>But hey, I was a hacker and a decent programmer, just how hard can it be to learn how to business? Piece of cake! I&#8217;ll learn it in a weekend just like I did python!</p>
<p>Turns out it&#8217;s not that easy. Hell, I didn&#8217;t even know how to incorporate or that it might be a good idea.</p>
<p>Luckily I met the guys from <a href="http://www.boundbreaker.org/" target="_blank">BoundBreaker</a>. Sure, there was no BoundBreaker when I met them, but in summer of 2010 my team and I became part of their first generation of hackerpreneurs running startups.</p>
<h2>BoundBreaker</h2>
<p>It&#8217;s hard to say whether being part of an accelerator, any accelerator, is better than learning everything on your own or not &#8211; especially since I can&#8217;t really compare &#8211; but it does teach you things you otherwise wouldn&#8217;t think of learning. That&#8217;s the main benefit of having mentors really &#8211; autodidactism only gets you so far.</p>
<p>Public speaking skills are a perfect example of this. Very few hackers invest in learning how to speak in front of a crowd. Just go to project presentations at your local computer science faculty. It&#8217;s a mess.</p>
<p>Giving my first or second talk, I walked up on stage. I&#8217;ve got this! Always been good with words and I&#8217;m a master of improvisation in tough situations!</p>
<p>The 30 minute talk was over in 5 minutes &#8230; <em>&#8220;Uhhh, you guys know what I was trying to say, right? You&#8217;re itching to download this app I&#8217;ve built, aren&#8217;t you?&#8221;</em></p>
<p>Nowadays I can walk up on stage and it&#8217;s as relaxing as sitting at home, watching my favourite TV show. It really is quite an amazing transformation.</p>
<p>And I don&#8217;t have just the sheer amount of practice to thank, part of the BoundBreaker deal was to teach me how to present ideas anywhere at any time. Just go up there and wow the audience into thinking my idea is the best thing since sliced toast with mozzarella.</p>
<p>Just clench your butt!</p>
<p>That&#8217;s all you need to know when faced with a room full of scary looking investors after you&#8217;ve bet the proverbial farm on making this meeting work out in your favour.</p>
<p>Public speaking isn&#8217;t all BoundBreaker&#8217;s taught me though, there was a bunch of other things too. I learned all about the <a class="zem_slink" title="Lean Startup" href="http://www.startuplessonslearned.com/2008/09/lean-startup.html" rel="homepage" target="_blank">lean startup</a> model, launching MVP&#8217;s, testing assumptions &#8230; things about vesting and a bunch of things about running a team.</p>
<p>Turns out, if it takes six months to build it&#8217;s probably not a <a class="zem_slink" title="Minimum viable product" href="http://en.wikipedia.org/wiki/Minimum_viable_product" rel="wikipedia" target="_blank">minimum viable product</a>. That lesson took so long to sink in my startup fizzled out in the process. Ooops.</p>
<p>However, that summer culminated in my first trip 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" target="_blank">Silicon Valley</a>!</p>
<p>The BoundBreaker team organised most of everything to do with the trip so we could focus on scoring meetings with investors and other persons of interest. It&#8217;s amazing, but a scrappy startup from Slovenia can totally get to a serious meeting with the founder of a VC fund after spending just two weeks in <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" target="_blank">Palo Alto</a> and talking to people.</p>
<p>Shame I didn&#8217;t take <a href="https://twitter.com/kristjanp" target="_blank">@kristjanp</a>&#8216;s advice to stay in Palo Alto and seriously put together an investment round after we got the first VC to bite &#8230; but alas, mentors can only give suggestions, they can&#8217;t run the business for you.</p>
<p>You should <a href="http://www.boundbreaker.org/apply/" target="_blank">apply to BoundBreaker</a> <img src="http://swizec.com/blog/wp-includes/images/smilies/icon_wink.gif?3e5991" alt=';)' class='wp-smiley' /> </p>
<p>PS: they even bought me a cake on my 23rd birthday while we were in the US!</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul zemanta-article-ul-image" style="margin: 0; padding: 0; overflow: hidden;">
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://www.hiscoxusa.com/small-business-insurance/blog/2011/09/23/my-startup-story-pete-cashmore-founder-and-ceo-of-mashable/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/noimg_103_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://www.hiscoxusa.com/small-business-insurance/blog/2011/09/23/my-startup-story-pete-cashmore-founder-and-ceo-of-mashable/" target="_blank">#MyStartupStory: Pete Cashmore, Founder and CEO of Mashable</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://www.slideshare.net/HackerChick/lean-startup-101-16313871" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/142743624_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://www.slideshare.net/HackerChick/lean-startup-101-16313871" target="_blank">Lean Startup 101</a></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/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=56ccf3f0-0280-4951-b66c-aa7c00af80da" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/B7UPDs5TKgs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/breaking-bounds-with-boundbreaker/swizec/6003/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/breaking-bounds-with-boundbreaker/swizec/6003</feedburner:origLink></item>
		<item>
		<title>In praise of the pass phrase</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/UtN3C2YbGYs/5994</link>
		<comments>http://swizec.com/blog/in-praise-of-the-pass-phrase/swizec/5994#comments</comments>
		<pubDate>Thu, 14 Feb 2013 14:31:32 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=5994</guid>
		<description><![CDATA[The idea of pass phrases in favour of passwords has intrigued me ever since I read the iconic XKCD, Password Strength comic. Munroe&#8217;s argument goes that conventional wisdom about secure passwords is stupid and misguided. Experts tell us to use a password that is at least 8 characters long &#8211; exactly a character longer than most humans can...  <a href="http://swizec.com/blog/in-praise-of-the-pass-phrase/swizec/5994" class="more-link" title="Read In praise of the pass phrase">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>The idea of pass phrases in favour of <a class="zem_slink" title="Password" href="http://en.wikipedia.org/wiki/Password" rel="wikipedia" target="_blank">passwords</a> has intrigued me ever since I read the iconic <a href="http://xkcd.com/936/" target="_blank">XKCD, Password Strength</a> comic.</p>
<p>Munroe&#8217;s argument goes that conventional wisdom about secure passwords is <em>stupid</em> and <em>misguided.</em> Experts tell us to use a password that is at least 8 characters long &#8211; exactly a character longer than most humans can comfortably store in short term memory &#8211; contains mixed case letters and numbers.</p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:OED-LEXX-Bungler.jpg" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="A fragment of the OED (1985), showing SGML markup" src="http://upload.wikimedia.org/wikipedia/commons/9/9a/OED-LEXX-Bungler.jpg" alt="A fragment of the OED (1985), showing SGML markup" width="300" height="213" /></a><p class="wp-caption-text">A fragment of the OED (1985), showing SGML markup (Photo credit: Wikipedia)</p></div>
<p>Special characters are a good idea as well, but almost nobody uses them because more often than not services reject them on grounds that &#8230; I don&#8217;t know, I guess their databases don&#8217;t support fancy passwords or something. Don&#8217;t even get me on services with so many password rules the possibility space collapses into, like, 10.</p>
<p>These passwords are impossible to remember. Meaning people use simple passwords instead.</p>
<p>You&#8217;re supposed to change your password every few months as well! People don&#8217;t, because they&#8217;re too hard to remember.</p>
<p>You should use a different password everywhere! People don&#8217;t, because they&#8217;re too hard to remember.</p>
<h2>Passwords suck</h2>
<p>To make matters worse, &#8220;secure&#8221; passwords aren&#8217;t secure at all. An 8 character password considering common <a class="zem_slink" title="Alphanumeric" href="http://en.wikipedia.org/wiki/Alphanumeric" rel="wikipedia" target="_blank">alphanumeric characters</a> people use most often gives you 60^8 combinations. At 1000 guesses per second this is guessable in about 5000 years.</p>
<p>Okay, that&#8217;s impractical. You&#8217;re better off using a different vector of attack &#8230; like a good wrench to the wrist. Or those stupid security questions.</p>
<p>But passwords aren&#8217;t random sequences of letters! Remember, people can&#8217;t memorise those. Most often they use a common word and capitalize the first letter, then add a few numbers at the end. Or possibly some numbers at the start.</p>
<p>There are just 15,222 6 letter words in the English language, giving enough room to add two numbers. Accounting for capitalizing the first letter that gives us 25^2+15222+10^2 combinations. Guessable in about 15 seconds.</p>
<p>Oops.</p>
<p>Including common substitions &#8211; <a class="zem_slink" title="Leet" href="http://en.wikipedia.org/wiki/Leet" rel="wikipedia" target="_blank">1337 sp34k</a> &#8211; gives us a few more combinations and the usual password is guessable in about three days. And that&#8217;s with a very secure looking password that is almost impossible to remember!</p>
<p>Sure, we cheated a bit by using a <a class="zem_slink" title="Dictionary attack" href="http://en.wikipedia.org/wiki/Dictionary_attack" rel="wikipedia" target="_blank">dictionary attack</a>, but hey, anything goes! I&#8217;m sure real attackers have even more tricks up their sleeves.</p>
<h2>Pass phrases win</h2>
<div class="wp-caption alignright" style="width: 250px"><a href="http://www.flickr.com/photos/56803838@N04/5242313321" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="password hell" src="http://farm6.static.flickr.com/5202/5242313321_a17a65ea25_m.jpg" alt="password hell" width="240" height="144" /></a><p class="wp-caption-text">password hell (Photo credit: Ron Bennetts)</p></div>
<p>Take pass phrases on the other hand.</p>
<p>Using a combination of three or four <a class="zem_slink" title="Most common words in English" href="http://en.wikipedia.org/wiki/Most_common_words_in_English" rel="wikipedia" target="_blank">common words</a> is something you do every day. Your brain is hard wired to be great at memorising this stuff &#8230; remember all those cool lines you&#8217;re still referencing from movies made 40 years ago!</p>
<p>Three is the number you shall count! The number of the counting shall be three!</p>
<p>Khm, yes.</p>
<p>The great thing about pass phrases is that they are usually long. Very long.</p>
<p>An average english word is about 7 characters long, three words create a password with 21 characters. With a dispersion of 2 characters per word, your password will likely be 15 to 21 letters, adding spaces and you&#8217;re at 17 to 23.</p>
<p>Now, assuming you&#8217;re using nothing but <a class="zem_slink" title="Letter case" href="http://en.wikipedia.org/wiki/Letter_case" rel="wikipedia" target="_blank">lower case letters</a> and spaces that still gives 26^17 combinations. Guessable in about 3 tera years. That&#8217;s 3 and 13 zeros.</p>
<p>Nobody&#8217;s guessing that via a character by character attack.</p>
<p>Let&#8217;s look at a dictionary attack then, that saved us before, maybe it will help now.</p>
<p>There are 171,476 words in the <a class="zem_slink" title="The Oxford English Dictionary (20 Volume Set) (Vols 1-20)" href="http://www.amazon.com/Oxford-English-Dictionary-Vols-1-20/dp/0198611862%3FSubscriptionId%3D0G81C5DAZ03ZR9WH9X82%26tag%3Dageewitahat-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0198611862" rel="amazon" target="_blank">Oxford English Dictionary</a>. Using just 3 words, any words, gives you 3^171476 combinations. In other words, a dictionary attack at 1000 guesses per second would take so many years the number&#8217;s got 81,804 digits.</p>
<p>Eighty one thousand <em>digits</em>.</p>
<p>That&#8217;s longer than the expected death of the universe isn&#8217;t it?</p>
<p>Sure, not all combinations of words make sense, some words are more common than others. The vocabulary of an average college grad measures at about 17,000 words. That still gives you 3^17000 combinations, or an 8100 digit number of years to guess.</p>
<p>Without funny symbols. Without numbers. Just simple lowercase words.</p>
<p>I&#8217;m already switching all my passwords to pass phrases. You should too!</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul zemanta-article-ul-image" style="margin: 0; padding: 0; overflow: hidden;">
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://www.simplyzesty.com/social-media/how-to-create-a-strong-password-keep-your-social-media-accounts-safe/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/142887137_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://www.simplyzesty.com/social-media/how-to-create-a-strong-password-keep-your-social-media-accounts-safe/" target="_blank">How To Create A Strong Password &amp; Keep Your Social Media Accounts Safe</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://www.oregonlive.com/finance/index.ssf/2013/01/what_experts_do_to_stay_safe_w.html" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/139296866_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://www.oregonlive.com/finance/index.ssf/2013/01/what_experts_do_to_stay_safe_w.html" target="_blank">What experts do to stay safe banking or buying online or by mobile</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://www.vikitech.com/14327/warning-secure-password-risk" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/134524288_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://www.vikitech.com/14327/warning-secure-password-risk" target="_blank">Warning: If You Don&#8217;t Use a Secure Password, You Are At Risk</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://www.garron.me/bits/ssh-key-keygen-login-no-password.html" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/noimg_117_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://www.garron.me/bits/ssh-key-keygen-login-no-password.html" target="_blank">ssh with no password, with ssh-keygen key</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://radicaltype.wordpress.com/2012/11/30/password-security-the-need-for-frequent-change/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/144875741_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://radicaltype.wordpress.com/2012/11/30/password-security-the-need-for-frequent-change/" target="_blank">Password Security: The need for frequent change</a></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/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=f9aa62f4-b517-46d5-8835-3080d5fc46d9" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/UtN3C2YbGYs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/in-praise-of-the-pass-phrase/swizec/5994/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/in-praise-of-the-pass-phrase/swizec/5994</feedburner:origLink></item>
		<item>
		<title>The first Barcamp Sarajevo</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/x9Q_D_Ecd2w/5988</link>
		<comments>http://swizec.com/blog/the-first-barcamp-sarajevo/swizec/5988#comments</comments>
		<pubDate>Tue, 12 Feb 2013 11:54:26 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Travel&Events]]></category>
		<category><![CDATA[BarCamp]]></category>
		<category><![CDATA[Bosnia and Herzegovina]]></category>
		<category><![CDATA[Public Speaking]]></category>
		<category><![CDATA[Sarajevo]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=5988</guid>
		<description><![CDATA[Three days ago Sarajevo saw its first ever Barcamp, organised in just five days. Hat&#8217;s off to @sidonath, @johnjoseph, @nesuss and @neshill for pulling it off! Impressive feat that. The event itself was fantastic, a Barcamp going back to what a Barcamp is supposed to be &#8211; a bunch of people getting together, making an...  <a href="http://swizec.com/blog/the-first-barcamp-sarajevo/swizec/5988" class="more-link" title="Read The first Barcamp Sarajevo">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Three days ago Sarajevo saw its first ever Barcamp, organised in just five days. Hat&#8217;s off to <a href="http://twitter.com/sidonath" target="_blank">@sidonath</a>, <a href="http://twitter.com/johnjoseph" target="_blank">@johnjoseph</a>, <a href="http://twitter.com/nesuss" target="_blank">@nesuss</a> and <a href="http://twitter.com/neshill" target="_blank">@neshill</a> for pulling it off! Impressive feat that.</p>
<div class="wp-caption alignnone" style="width: 510px"><img title="Barcamp Sarajevo Venue" src="http://25.media.tumblr.com/541f17ea6e177798a58591bd04d4bd73/tumblr_mhychuJpOW1qekjngo1_500.jpg" alt="Barcamp Sarajevo Venue" width="500" height="500" /><p class="wp-caption-text">Barcamp Sarajevo Venue</p></div>
<p>The event itself was fantastic, a Barcamp going back to what a Barcamp is supposed to be &#8211; a bunch of people getting together, making an impromptu schedule at the event itself, most talks being hastily slapped together at the last minute because speakers still don&#8217;t know what they&#8217;ll be talking about before their morning coffee.</p>
<p>Or maybe that was just me.</p>
<p>Either way, Barcamps I&#8217;ve been to lately have been straying away from this ideal of an almost impromptu sharing of minds. They&#8217;re becoming too much like full on conferences &#8230; although I&#8217;m told it&#8217;s impossible to have a homely Barcamp environment when 200+ people show up.</p>
<p>With less than fifty people the Sarajevo Barcamp was just perfect. Plenty of new people to meet a completely new crowd, while still small enough to be manageable for even the most shy of speakers.</p>
<p>Surprisingly few people were nervous however, good job speakers! Your presentations were pretty damn awesome and I had fun sitting in on <em>all</em> of them. A benefit of the single-room format as there were not enough people for two tracks.</p>
<div class="wp-caption alignnone" style="width: 510px"><img title="In a startup nothing is true" src="http://25.media.tumblr.com/52c3554f3103442d159821cafc2382b8/tumblr_mhy9czwF1N1qekjngo1_500.jpg" alt="In a startup nothing is true" width="500" height="500" /><p class="wp-caption-text">In a startup nothing is true</p></div>
<p>The event wasn&#8217;t very tech centric, so I learned a lot about the startup scene in <a class="zem_slink" title="Bosnia and Herzegovina" href="http://maps.google.com/maps?ll=43.8666666667,18.4166666667&amp;spn=10.0,10.0&amp;q=43.8666666667,18.4166666667 (Bosnia%20and%20Herzegovina)&amp;t=h" rel="geolocation" target="_blank">Bosnia</a> &#8211; of which there is more than I expected to be honest. It&#8217;s looking pretty vibrant actually!</p>
<p>We even got to see the launch of a new startup <a href="http://forum387.com">Forum387</a>. They claim it wasn&#8217;t a launch and their website still asks for a password, but they promised we can start playing with the tech next week. A working product demo <em>done <strong>live </strong></em>at a public event is a launch in my book.</p>
<p>Their approach to reviving forum software is pretty intriguing too. Should give <a href="http://www.discourse.org/" target="_blank">Discourse</a> a run for their money. They even have clients lined up! More than many startups can say for themselves.</p>
<p>I also learned that the <em>unlocking is illegal</em> fiasco we&#8217;ve witnessed lately has been long in the works by telephone companies. Way back in the early 50&#8242;s you were not allowed to install a <a class="zem_slink" title="Hush-A-Phone v. United States" href="http://en.wikipedia.org/wiki/Hush-A-Phone_v._United_States" rel="wikipedia" target="_blank">hush-a-phone</a> on your device, but were advised to use your hand instead. Somehow that&#8217;s better.</p>
<div class="wp-caption alignnone" style="width: 510px"><img title="The future of forums" src="http://24.media.tumblr.com/0b2b3e70a8ab79674e2259b602f92c1f/tumblr_mhymcwSjqc1qekjngo1_500.jpg" alt="The future of forums" width="500" height="500" /><p class="wp-caption-text">The future of forums</p></div>
<p>The appearence of speaker phones and subsequent lawsuit also set precedent and enshrined in law that we are allowed to connect any device to the network. Making the internet possible! \0/</p>
<p>And apparently spending 50% of your time working on opensource projects for free means you will never have money problems again. It&#8217;s also all sorts of rewarding!</p>
<p>Personally, I discovered that giving presentations without slides is quite fun. Much more flexible than keeping track of what slide you&#8217;re on, it&#8217;s easier to move around the &#8220;stage&#8221; and jump up and down. Or rather, it feels more necessary and it&#8217;s something I should be doing anyway.</p>
<p>But nobody will remember anything you say, which is a shame. Simple visuals help people remember important facts you wanted to convey.</p>
<p>That said, one of the coolest things about this Barcamp was that no talk went without questions. Almost all of them had a discussion going half the length of the talk itself! That&#8217;s amazing and I think something that only happens when audiences are kept small enough.</p>
<p>It was truly an awesome Barcamp, definitely one of my favourites and I&#8217;ve been to many. The fact there was tea available is just icing on the cake.</p>
<div class="wp-caption alignnone" style="width: 510px"><img title="7 of us waiting for Salep with our hosts and a cat in the coziest tea place ever" src="http://25.media.tumblr.com/ff3b2a065ee412e71c20ab0edc04247c/tumblr_mi06rmSa0C1qekjngo1_500.jpg" alt="7 of us waiting for Salep with our hosts and a cat in the coziest tea place ever" width="500" height="500" /><p class="wp-caption-text">7 of us waiting for <a href="http://en.wikipedia.org/wiki/Salep" target="_blank">Salep</a> with our hosts and a cat in the coziest tea place ever</p></div>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul zemanta-article-ul-image" style="margin: 0; padding: 0; overflow: hidden;">
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://grasshopper.com/blog/2010/11/barcamp-omaha-recap-the-grasshopper-buzz-team-heads-to-the-mid-west/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/noimg_23_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://grasshopper.com/blog/2010/11/barcamp-omaha-recap-the-grasshopper-buzz-team-heads-to-the-mid-west/" target="_blank">Barcamp Omaha Recap: The Grasshopper Buzz team heads to the Mid-West</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://grasshopper.com/blog/2011/03/this-one-time-%e2%80%93-at-barcamp%e2%80%a6/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/noimg_59_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://grasshopper.com/blog/2011/03/this-one-time-%e2%80%93-at-barcamp%e2%80%a6/" target="_blank">This One Time &#8211; at Barcamp&#8230;</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://www.techinasia.com/worlds-largest-barcamp-myanmar/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/141441120_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://www.techinasia.com/worlds-largest-barcamp-myanmar/" target="_blank">The World&#8217;s Largest Barcamp is in Myanmar</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://cristianobetta.com/blog/2012/05/08/opencodecamp-where-the-best-of-hackdays-and-barcamps-come-together/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/noimg_73_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://cristianobetta.com/blog/2012/05/08/opencodecamp-where-the-best-of-hackdays-and-barcamps-come-together/" target="_blank">OpenCodeCamp &#8211; Where the best of HackDays and BarCamps come together</a></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/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=436cad91-c844-41eb-bac8-9f851b8dc472" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/x9Q_D_Ecd2w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/the-first-barcamp-sarajevo/swizec/5988/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/the-first-barcamp-sarajevo/swizec/5988</feedburner:origLink></item>
		<item>
		<title>First impressions of Rails as a Javascripter</title>
		<link>http://feedproxy.google.com/~r/AGeekWithAHat2/~3/3YehLZ_U4x4/5948</link>
		<comments>http://swizec.com/blog/first-impressions-of-rails-as-a-javascripter/swizec/5948#comments</comments>
		<pubDate>Thu, 07 Feb 2013 16:25:11 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[Node.js]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=5948</guid>
		<description><![CDATA[When Rails first came out, I was still a PHP guy. Slaving away at a web agency, pushing out website after website and letting designers have all the fun. At the time I didn&#8217;t even notice Rails existed. When news of Ruby and Rails finally did reach me, I was fully immersed in Python and...  <a href="http://swizec.com/blog/first-impressions-of-rails-as-a-javascripter/swizec/5948" class="more-link" title="Read First impressions of Rails as a Javascripter">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>When <a class="zem_slink" title="Ruby on Rails" href="http://rubyonrails.org" rel="homepage" target="_blank">Rails</a> first came out, I was still a <a class="zem_slink" title="PHP" href="http://www.php.net" rel="homepage" target="_blank">PHP</a> guy. Slaving away at a web agency, pushing out website after website and letting designers have all the fun.<img class="alignright" title="Ruby t-shirt" src="http://cache1.bigcartel.com/product_images/71294019/Ruby_CBGB_Red_lg.png" alt="Ruby t-shirt" width="347" height="360" /></p>
<p>At the time I didn&#8217;t even notice Rails existed.</p>
<p>When news of <a class="zem_slink" title="Ruby (programming language)" href="http://www.ruby-lang.org/" rel="homepage" target="_blank">Ruby</a> and Rails finally did reach me, I was fully immersed in <a class="zem_slink" title="Python (programming language)" href="http://www.python.org/" rel="homepage" target="_blank">Python</a> and <a class="zem_slink" title="Django (Web framework)" href="http://www.djangoproject.com" rel="homepage" target="_blank">Django</a>. I scoffed at the idea of anything being better. Them silly Ruby people, why on earth would I play with their toys when I can use a <em>real</em> language such as Python?</p>
<p>Eventually I started loving the speed and flexibility of Javascript and particularly <a class="zem_slink" title="Node.js" href="http://nodejs.org/" rel="homepage" target="_blank">node.js</a>. Django lay almost forgotten, Rails was that weird thing <em>those other people</em> use. The idea of learning Rails did not cross my mind.</p>
<p>In part because node.js was really buzzing at the time (around version 0.3.x I think), in part because by then a lot of the big names in the startup world started abandoning Rails in favour of faster executing environments.</p>
<p>What really attracted me to node.js was the blistering speed of execution and the fact it was the new kid on the block. That exciting new thing everyone&#8217;s looking at. <em>Of course</em> you&#8217;re going to learn node if you&#8217;re going to look at a new tech stack.</p>
<p>Just like these days you&#8217;d probably look at Go or Scala if you were going to learn a completely new way of making web apps.</p>
<h2>A Javascripter starts using Rails</h2>
<p>A few weeks ago somebody calls me up and says <em>&#8220;Hey, you seem to have a grasp on automated testing. Want to help us write tests for our Rails app?&#8221;</em></p>
<p><em>&#8220;Uh, sure, but I&#8217;ve never even looked at Rails before &#8230;&#8221;</em></p>
<p><em>&#8220;No problem, I started the project off with zero Rails experience too. You&#8217;ll figure it out.&#8221;</em></p>
<p>In stark contrast to how programmers are hired these days, somebody was willing to use a generalist instead of holding out for a specialist. Bloody awesome, if you ask me!</p>
<p>And so I was thrown into the dizzying world of Ruby and Rails and a whole new ecosystem of stuff that is completely beyond my comprehension.</p>
<h2>The really cool things</h2>
<p>What struck me when I first saw Ruby code was just how readable it is. Even though I was looking at the language for the first time in my life, I could understand what everything is doing. I could follow the code and decide what tests need to be written.</p>
<p>Although a lot of the syntax is confusing &#8211; what&#8217;s with all the colons? &#8211; I like the fact you can execute functions without using parentheses. As with <a class="zem_slink" title="Haskell (programming language)" href="http://haskell.org" rel="homepage" target="_blank">Haskell</a>, this often makes code more readable, but unlike Haskell can be very confusing when you&#8217;re trying to discern functions from variables.</p>
<div class="wp-caption alignright" style="width: 250px"><a href="http://www.flickr.com/photos/20762304@N00/5184860600" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="rails in de sneeuw" src="http://farm2.static.flickr.com/1307/5184860600_62f1e5dacb_m.jpg" alt="rails in de sneeuw" width="240" height="180" /></a><p class="wp-caption-text">rails in de sneeuw (Photo credit: Gerard Stolk (vers le Carême))</p></div>
<p>I also like the truthyness test by just appending a question mark to a variable/property/thing.</p>
<p>Rails has <em>amazing</em> support for writing tests. While Django makes it easy to write a bunch of unit tests and go so far as integration testing by calling the HTTP interface as a real browser would, Rails goes a step further by making it dead simple to test a real user&#8217;s interaction with your website &#8230; although I think that might actually be Capybara and not vanilla Rails.</p>
<p>Another thing I really like is that Rails is opinionated. Or maybe that&#8217;s just the impression I got. Either way, it&#8217;s a lot more mature than the node.js ecosystem so it is usually very easy to decide what library to use to do something. You pick Rails and you get this whole package of <em>stuff</em>.</p>
<p>Conversely, the most popular (perhaps even best) framework in the node.js ecosystem &#8211; express.js &#8211; can&#8217;t even decide what template engine to use. Database? Ha, you&#8217;re on your own, kid. Testing? Pick any of a million different testing libraries &#8211; you&#8217;re on your own.</p>
<p>This happens a lot in Javascript. The whole ecosystem treats opinions as they were a bad thing. Freedom and the related paradox of choice run rampant.</p>
<h2>Things that suck</h2>
<p>Ruby&#8217;s most powerful feature &#8211; meta programming and the whole <a class="zem_slink" title="Domain-specific language" href="http://en.wikipedia.org/wiki/Domain-specific_language" rel="wikipedia" target="_blank">domain specific language</a> shebang, is also the most annoying for a beginner.</p>
<p>The project I&#8217;m working on just &#8230; works. I have no idea where dependencies are coming from, I can&#8217;t tell which gem file a function I&#8217;m calling is defined in and most of the time I am completely at a loss as to what is actually going on.</p>
<p>It&#8217;s getting better, slowly.</p>
<div class="wp-caption alignright" style="width: 250px"><a href="http://www.flickr.com/photos/18645779@N00/18380160" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="Dejanews MemeGraph For: 'Perl vs PHP vs Python..." src="http://farm1.static.flickr.com/12/18380160_3b9f657690_m.jpg" alt="Dejanews MemeGraph For: 'Perl vs PHP vs Python..." width="240" height="180" /></a><p class="wp-caption-text">Dejanews MemeGraph For: &#8216;Perl vs PHP vs Python vs Ruby&#8217; (Photo credit: Premshree Pillai)</p></div>
<p>So far I&#8217;ve always been used to explicitly defining imports, explicitly calling a function from this library or that. You never do <em>import *</em> and yet with Ruby, that&#8217;s all you get. <em>Everything</em>  is an import * and more often than not, it redefines the behaviour of the language itself.</p>
<p>As such, I have no idea whether I&#8217;m learning how to use Rails, Ruby or any of the 30 something gems the project depends on. It&#8217;s all rather confusing.</p>
<p>But what really ticks me off about Rails, or Ruby, possibly both, is just how <em>slow</em> the whole thing is! It runs well once it gets going, but what the hell is it doing in those 5+ seconds it takes to warm up to a functioning state? Mindboggling.</p>
<p>Maybe node.js just spoiled me.</p>
<h2>Fin</h2>
<p>All in all, I have to say I&#8217;ve grown quite fond of Rails. I love how simple it is to get started as a complete newbie and all the powerful tools are already giving me ideas for what I&#8217;m missing in node.js</p>
<p>Just a matter of finding some time to start bringing some of the cool concepts into node.js. Right now I doubt I&#8217;ll be making a full switch to Rails any time soon.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul zemanta-article-ul-image" style="margin: 0; padding: 0; overflow: hidden;">
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://www.cio.com/article/727806/Ruby_on_Rails_Receives_the_Third_Security_Patch_in_Less_Than_a_Month?source=rss_security" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/141569793_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://www.cio.com/article/727806/Ruby_on_Rails_Receives_the_Third_Security_Patch_in_Less_Than_a_Month?source=rss_security" target="_blank">Ruby on Rails Receives the Third Security Patch in Less Than a Month</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://blog.daemonl.com/2013/02/forcing-myself-to-learn-ror.html" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/noimg_90_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://blog.daemonl.com/2013/02/forcing-myself-to-learn-ror.html" target="_blank">Forcing myself to learn RoR</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://gilesbowkett.blogspot.com/2013/02/nodejs-hatred-reveals-significant.html" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/143333734_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://gilesbowkett.blogspot.com/2013/02/nodejs-hatred-reveals-significant.html" target="_blank">Node.js Hatred Reveals Significant Dysfunction In The Ruby Culture</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://nerds.airbnb.com/weve-launched-our-first-nodejs-app-to-product" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/141624022_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://nerds.airbnb.com/weve-launched-our-first-nodejs-app-to-product" target="_blank">Our First Node.js App: Backbone on the Client and Server</a></li>
<li class="zemanta-article-ul-li-image zemanta-article-ul-li" style="padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;"><a style="box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;" href="http://thinkinginrails.com/2013/02/why_choose_rails/" target="_blank"><img style="padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;" src="http://i.zemanta.com/143236954_80_80.jpg" alt="" /></a><a style="display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;" href="http://thinkinginrails.com/2013/02/why_choose_rails/" target="_blank">Why Choose Ruby on Rails</a></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/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=b780ad15-de34-479a-8c04-1683f4dfcfa5" alt="Enhanced by Zemanta" /></a></div>
<img src="http://feeds.feedburner.com/~r/AGeekWithAHat2/~4/3YehLZ_U4x4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/first-impressions-of-rails-as-a-javascripter/swizec/5948/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://swizec.com/blog/first-impressions-of-rails-as-a-javascripter/swizec/5948</feedburner:origLink></item>
	</channel>
</rss><!-- Served from: www.swizec.com @ 2013-06-19 14:58:38 by W3 Total Cache -->
