<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A geek with a hat</title>
	<atom:link href="http://swizec.com/blog/feed/trackable-feed3" rel="self" type="application/rss+xml" />
	<link>http://swizec.com/blog</link>
	<description>Drinker of tea</description>
	<lastBuildDate>Mon, 21 May 2012 09:45:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Disability, startups and loneliness</title>
		<link>http://swizec.com/blog/disability-startups-and-loneliness/swizec/4387</link>
		<comments>http://swizec.com/blog/disability-startups-and-loneliness/swizec/4387#comments</comments>
		<pubDate>Mon, 21 May 2012 09:45:15 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Startup World]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4387</guid>
		<description><![CDATA[Some mornings you wake up, check HackerNews, mindlessly scroll up and down &#8230; you upvote a few things, sometimes you even open the link, other times you just read a few comments. Meh. As exciting as scratching your ass. Today was not one of those days! At the very top was a story by David [...]]]></description>
			<content:encoded><![CDATA[<div class="mceTemp">
<dl class="wp-caption alignright zemanta-img" style="width: 250px;">
<dt class="wp-caption-dt"><a href="http://www.flickr.com/photos/16638697@N00/3444177391" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="Tammy Portnoy Speaking" src="http://farm4.static.flickr.com/3402/3444177391_94c8a06a3b_m.jpg" alt="Tammy Portnoy Speaking" width="240" height="160" /></a></dt>
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;"></dd>
</dl>
</div>
<p>Some mornings you wake up, check HackerNews, mindlessly scroll up and down &#8230; you upvote a few things, sometimes you even open the link, other times you just read a few comments.</p>
<p>Meh. As exciting as scratching your ass.</p>
<p>Today was not one of those days! At the very top was a story by David Peter, <a href="http://davidpeter.me/stories/being-deaf" target="_blank">Being Deaf</a>.</p>
<blockquote><p> This is a cry for normalcy, when so many others wish to be abnormal.</p></blockquote>
<p>It&#8217;s a story by a deaf guy who got a chance to work at a startup, a chance most startups wouldn&#8217;t be willing to give I bet.</p>
<p>Fundamentally it is a story about feeling left out of the normal buzz in the office. Either because you don&#8217;t understand what everyone is going on about because you&#8217;re deaf, or maybe you&#8217;re working remotely &#8230; sometimes you&#8217;re just not very fluent in the language. Either way, you feel left out. A whole bunch of things happen at the office and you&#8217;re just not there to experience them.</p>
<div class="mceTemp"></div>
<p>In a sense it must be similar to the alienation founders sometimes feel, when the weight of the world is on you, how the hell can everyone chat about fart jokes when there&#8217;s so much at stake?</p>
<p>Now imagine you don&#8217;t even know they&#8217;re fart jokes, or what the hell everyone is laughing at. You just see them laughing and have no idea what&#8217;s going on &#8230;</p>
<p>Ok you know what, I&#8217;m done butchering the story, or trying to pretend I have anything to say. Truth is, I am completely dumbfounded because I will <em>never</em> be able to undestand what it&#8217;s like. I&#8217;m living <a href="http://whatever.scalzi.com/2012/05/15/straight-white-male-the-lowest-difficulty-setting-there-is/" target="_blank">life at the lowest difficulty level</a>.</p>
<p>Do me a favor, read <a href="http://davidpeter.me/stories/being-deaf" target="_blank">David Peter&#8217;s post</a>. Even if it&#8217;s the only thing you read today.</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=b17a33f2-2aa3-474a-be2a-d66acebc8491" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598184&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/disability-startups-and-loneliness/swizec/4387?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/disability-startups-and-loneliness/swizec/4387/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A year of 750words.com &#8211; with shiny graphs</title>
		<link>http://swizec.com/blog/a-year-of-750words-com-with-shiny-graphs/swizec/4378</link>
		<comments>http://swizec.com/blog/a-year-of-750words-com-with-shiny-graphs/swizec/4378#comments</comments>
		<pubDate>Fri, 18 May 2012 17:57:39 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[750words]]></category>
		<category><![CDATA[Arts]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Writers Resources]]></category>
		<category><![CDATA[Writing]]></category>
		<category><![CDATA[Writing Exercises]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4378</guid>
		<description><![CDATA[384 days ago I wrote my first morning pages on 750words.com Since then I have: written 315,026 words (or about 7 novels) spent 12 minutes on every day&#8217;s words written an average of 820 words a day mentioned sex 408 times mentioned tea 503 times used 1402 curse words Writing the words every day is awesome. It&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>384 days ago I wrote my first morning pages on <a href="http://750words.com">750words.com</a></p>
<p>Since then I have:</p>
<ul>
<li>written 315,026 words (or about 7 novels)</li>
<li>spent 12 minutes on every day&#8217;s words</li>
<li>written an average of 820 words a day</li>
<li>mentioned <strong>sex</strong> 408 times</li>
<li>mentioned <strong>tea</strong> 503 times</li>
<li>used <strong>1402</strong> curse words</li>
</ul>
<p>Writing the words every day is <em>awesome</em>. It&#8217;s like morning exercise but for your brain &#8211; very awesome for waking up and forcing the brain to get up to speed and ready to face the day.</p>
<p>And it&#8217;s very liberating too. Since you&#8217;re not writing for anybody, not even for yourself (I often mash out the whole thing with my eyes closed) you can say literally anything about anyone or anything. Sometimes things come out you didn&#8217;t even know you were thinking!</p>
<p>Awesomer still is the fact you now have a deep dataset about yourself. Your mood, your thoughts, going back &#8230; very far. Seeing your feelings in such plasticity is quite interesting.</p>
<p>Here&#8217;s a graph of my mood for the past 384 days.</p>
<p><iframe src="http://swizec.github.com/750words-analysis/" width="700" height="1800" style="border: 0px"></iframe></p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://scriblinmind.wordpress.com/2012/05/16/how-to-become-interesting-with-graphs/" target="_blank">How To Become Interesting (with Graphs)</a> (scriblinmind.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://writeofinitiation.wordpress.com/2012/05/11/were-going-to-need-a-bigger-graph/" target="_blank">We&#8217;re Going To Need A Bigger Graph</a> (writeofinitiation.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://householdopera.typepad.com/household_opera/2010/06/in-praise-of-750-words.html" target="_blank">In praise of 750 Words</a> (householdopera.typepad.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.buzzfeed.com/katienotopoulos/can-a-graph-of-a-news-articles-words-tell-you-mor" target="_blank">Can A Graph Of A News Article&#8217;s Words Tell You More Than Reading It?</a> (buzzfeed.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=38799454-438e-4f6f-9b23-117a086ca22a" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598184&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/a-year-of-750words-com-with-shiny-graphs/swizec/4378?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/a-year-of-750words-com-with-shiny-graphs/swizec/4378/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Web page segmentation</title>
		<link>http://swizec.com/blog/web-page-segmentation/swizec/4364</link>
		<comments>http://swizec.com/blog/web-page-segmentation/swizec/4364#comments</comments>
		<pubDate>Wed, 16 May 2012 11:05:15 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Science Wednesday]]></category>
		<category><![CDATA[Algorithm]]></category>
		<category><![CDATA[Information Retrieval]]></category>
		<category><![CDATA[Sorting and Searching]]></category>
		<category><![CDATA[Web page]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4364</guid>
		<description><![CDATA[The Internet talks a lot about article extraction &#8211; taking a page and deciding what the real content is. Hell, I&#8217;ve written about the Uncanny valley of web scraping myself. Article extraction is such a wide spread problem that a bunch of API&#8217;s exist to help you solve it. Everything from a fringe feature in five or ten [...]]]></description>
			<content:encoded><![CDATA[<p>The Internet talks a lot about article extraction &#8211; taking a page and deciding what the real content is. Hell, I&#8217;ve written about the <a href="http://www.zemanta.com/fruitblog/the-uncanny-valley-of-web-scraping/" target="_blank">Uncanny valley of web scraping</a> myself.</p>
<p>Article extraction is such a wide spread problem that a bunch of API&#8217;s exist to help you solve it. Everything from a fringe feature in five or ten semantic API&#8217;s, to startups devoted wholly to extracting articles &#8211; like Diffbot.</p>
<p>But what if you don&#8217;t want to extract an article? What if all you want is: <em>this is the header, here is a sidebar, these are ads, here is content, oh and this is a footer, btw those are comments.</em></p>
<p><img class="alignnone" title="Visual vs. Densitometric segmentation (expected)" src="http://i.imgur.com/KwdOq.png" alt="Visual vs. Densitometric segmentation (expected)" width="567" height="273" /></p>
<p>Suddenly you are shit out of luck.</p>
<p>Sure, it makes sense the API&#8217;s wouldn&#8217;t let you do this &#8211; it&#8217;s supposedly their secret magic sauce. Right?</p>
<p>Except it isn&#8217;t.</p>
<p>Analyzing the different implementations of article extractors reveals that far from using a methodical approach of marking up different bits of a page, they mostly work as tree <a class="zem_slink" title="Pruning (decision trees)" href="http://en.wikipedia.org/wiki/Pruning_%28decision_trees%29" rel="wikipedia" target="_blank">pruning algorithms</a> &#8211; go through <a class="zem_slink" title="Document Object Model" href="http://en.wikipedia.org/wiki/Document_Object_Model" rel="wikipedia" target="_blank">DOM</a>, remove anything that&#8217;s not promising, end up with the juicy article.</p>
<p>Nothing you could use to create a web page segmentor &#8230;</p>
<p>Turns out, there is but a single very useful paper devoted to web page segmentation &#8211; Christian Kohlschütter&#8217;s <em><a href="https://docs.google.com/viewer?url=http%3A%2F%2Fcoitweb.uncc.edu%2F~jfan%2Fwebimage2.pdf" target="_blank">A Densitometric Approach to Web Page Segmentation</a>.</em></p>
<p>Yep, the same guy who later wrote <em>Boilerplate Detection using Shallow Text Features, </em>which later turned into <a href="https://code.google.com/p/boilerpipe/" target="_blank">Boilerpipe</a>, one of the best (most certainly the quickest) libraries web content extraction.</p>
<p>In the paper Kohlschütter explains that only three approaches exist:</p>
<ul>
<li>segmenting visually</li>
<li>linguistic approach</li>
<li>densitometric approach</li>
</ul>
<p>Visual segmentation is perhaps the easiest to understand &#8211; you <em>look</em> at a website and as a person you instantly know where different sections are. A computer vision algorithm could do something similar. With the caveat you now have to render every page, then run a <a class="zem_slink" title="Visual learning" href="http://en.wikipedia.org/wiki/Visual_learning" rel="wikipedia" target="_blank">visual learning</a> algorithm and do a bunch of things that are computationally very expensive.</p>
<p>The linguistic approach is somewhat more reasonable &#8211; take a page, look at distributions of words and syllables and what have you (<a href="http://en.wikipedia.org/wiki/Quantitative_linguistics" target="_blank">quanititive linguistics</a> this is called) and decide based on that. Problem here is, this only works well for large blocks of text &#8230; the linguistic content in, say, a header might be somewhat lacking.</p>
<h2>Block fusion algorithm</h2>
<p><img class="alignnone" title="Visual vs. Densitometric (actual)" src="http://i.imgur.com/LCupU.png" alt="Visual vs. Densitometric (actual)" width="636" height="287" /></p>
<p>Kohlschütter&#8217;s densitometric approach has a tendency to work as well as a visual algorithm, while being as fast as a lingustic approach &#8230; bloody marvelous!</p>
<p>The idea is basically this:</p>
<ul>
<li>walk through nodes</li>
<li>assign a text density to each node -&gt; number-of-tokens / number-of-&#8217;lines&#8217;</li>
<li>merge neighbor nodes with the same densities</li>
<li>repeat until desired granularity is reached</li>
</ul>
<p>The simplicity of this algorithm is just brilliant. Even better is the fact they managed to get it down to <em>15ms</em> per page on average. For comparison&#8217;s sake &#8211; the time it takes Readability to clean up a page is counted in seconds, an average response time from Diffbot (visual approach) is about <em>10 seconds per page.</em></p>
<p>Yep, that fast.</p>
<p>And for the icing on the cake &#8211; most main bits of the Block Fusion Algorithm are already implemented deep inside the bowels of Boilerpipe. You just have to look hard enough.</p>
<p>&nbsp;</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.zemanta.com/fruitblog/the-uncanny-valley-of-web-scraping/" target="_blank">The uncanny valley of web scraping</a> (zemanta.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.marketingtechblog.com/eyequant/" target="_blank">Eyequant: Heatmapping on the Fly</a> (marketingtechblog.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.npr.org/blogs/alltechconsidered/2012/05/14/152444019/algorithms-the-ever-growing-all-knowing-way-of-the-future?ft=1&amp;f=1049" target="_blank">Algorithms: The Ever-Growing, All-Knowing Way Of The Future</a> (npr.org)</li>
<li class="zemanta-article-ul-li"><a href="http://www.daniweb.com/software-development/python/threads/423356/webscraping-with-beautiful-soup-extracting-images" target="_blank">webscraping with beautiful soup (extracting images)</a> (daniweb.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.johndcook.com/blog/2012/05/15/machine-learning-in-action/" target="_blank">Machine Learning in Action</a> (johndcook.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=80957035-03c6-4cce-93f6-3c07a987921a" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598185&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/web-page-segmentation/swizec/4364?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/web-page-segmentation/swizec/4364/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inside a Google onsite interview</title>
		<link>http://swizec.com/blog/inside-a-google-onsite-interview/swizec/4352</link>
		<comments>http://swizec.com/blog/inside-a-google-onsite-interview/swizec/4352#comments</comments>
		<pubDate>Tue, 15 May 2012 11:55:58 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Travel&Events]]></category>
		<category><![CDATA[Companies]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Interview]]></category>
		<category><![CDATA[London]]></category>
		<category><![CDATA[Question]]></category>
		<category><![CDATA[Search Engines]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4352</guid>
		<description><![CDATA[Last Friday I found myself in Google&#8217;s London HQ, talking about cool problems with a bunch of engineers. The so called &#8220;onsite interviews&#8221;. The saga started a few months ago with two phone interviews. Then Google sent me a &#8220;What to know in onsite interviews&#8221; email. And here I was, completely unprepared, having the time [...]]]></description>
			<content:encoded><![CDATA[<p>Last Friday I found myself in Google&#8217;s <a class="zem_slink" title="London" href="http://maps.google.com/maps?ll=51.5072222222,-0.1275&amp;spn=0.1,0.1&amp;q=51.5072222222,-0.1275 (London)&amp;t=h" rel="geolocation" target="_blank">London</a> HQ, talking about cool problems with a bunch of engineers. The so called &#8220;onsite interviews&#8221;.</p>
<div class="wp-caption alignright" style="width: 310px"><img class="  " title="Google's parlour" src="http://distilleryimage0.s3.amazonaws.com/c159a6949b5311e1a92a1231381b6f02_7.jpg" alt="Google's parlour" width="300" height="300" /><p class="wp-caption-text">Google&#39;s parlour</p></div>
<p>The saga started a few months ago with <a title="A Google phone interview" href="http://swizec.com/blog/a-google-phone-interview/swizec/3813">two phone interviews</a>.</p>
<p>Then <a title="Google sent me a “what to know in on-site interviews” email. Here it is." href="http://swizec.com/blog/google-sent-me-a-what-to-know-in-on-site-interviews-email-here-it-is/swizec/4251">Google sent me a &#8220;What to know in onsite interviews&#8221; email</a>.</p>
<p>And here I was, completely unprepared, having the time of my life just chiling in the awesome parlour they have going at the reception desk (inside a very confusing building &#8230; who puts a reception desk on the top floor anyway?)</p>
<p><em>A disclaimer: some say they had to sign NDA&#8217;s and stuff. Nobody mentioned to me personally that any of this was a secret. And hey, <a href="http://www.quora.com/How-many-people-who-take-the-Google-onsite-interviews-end-up-getting-the-job" target="_blank">only ~25% of onsite candidates get hired</a>, there are 30,000 employees &#8211; that means 120,000 people have seen what happens.</em></p>
<p><em>It&#8217;s not a secret.</em></p>
<h2>The interviews</h2>
<p>There I was, lounging in a comfy leather chair. Just when I was thinking <em>&#8220;Fuck, I blew it. I knew I shouldn&#8217;t have been 5 minutes late!&#8221;</em> my recruiter came in through the door and apologized &#8211; her office is across the street nowadays and it takes a while to get to the main building.</p>
<p>Phew.</p>
<p>She walked me through a series of doors, swiped her keycard a few times, quipped about the <em>epic</em> naming scheme for the interview (meeting?) rooms. Named after cornerstone computers of history, most recently The Watson.</p>
<p>I found myself in a small white room. Nothing more than a desk, a small whiteboard, a phone and a huge LCD screen. Hell, the holding room at the police station I was once taken to as a teen was bigger.</p>
<p><img class=" alignnone" title="A small interview room at Google" src="http://distilleryimage11.instagram.com/f70b24e69e7f11e1af7612313813f8e8_7.jpg" alt="A small interview room at Google" width="490" height="490" /></p>
<p>Apparently I drew the short stick and got the smallest whiteboard available as well. Maybe they knew I was short and just wanted to make me comfortable?</p>
<p>A few moments later, my first interviewer came in. Said hello, and went right to business.</p>
<h2>The Questions</h2>
<p>There were only three things anyone cared for:</p>
<ul>
<li>ability to solve problems you&#8217;ve never heard of</li>
<li>Big-O and efficiency</li>
<li><em>no</em> whiteboard coding, that means catching all <a class="zem_slink" title="Off-by-one error" href="http://en.wikipedia.org/wiki/Off-by-one_error" rel="wikipedia" target="_blank">off-by-one errors</a></li>
</ul>
<p>I especially loved the insistence on solving all problems cold. At one point I said <em>Oh cool, I&#8217;ve heard of this problem before</em> and the engineer <strong>immediately</strong> swapped it out for a new one.</p>
<p>As a result the whole experience was much more fun &#8211; it felt like solving a series of interesting little coding puzzles that are easy enough to be solvable in full and at most optimal within ~30 minutes, but are juuuuust hard enough you actually have to rack your brain a little bit to get them.</p>
<p>Lexical knowledge? Forget about it, whenever you don&#8217;t <em>know</em> something, they just wave you on and say it&#8217;s not really important. And you can tell it doesn&#8217;t matter. They don&#8217;t even write it down in their notes that hey, there&#8217;s this little thing you couldn&#8217;t remember off the top of your head.</p>
<p>My questions were a mix bag of designing systems and algorithms</p>
<ul>
<li>there used to be a list of questions here, but I took them out after being informed that they don&#8217;t actually have hundreds of questions available to ask people</li>
<li>they were essentially questions similar to those you might experience in a high school (or possibly college) programming competition</li>
</ul>
<p>Those were the interesting questions anyway, sprinkled between these were explanations of <em>A Recent Interesting Thing You Did &#8482;</em> - makes me giddy I gave three different answers to this question. Just to avoid talking about the same stuff all the time <img src="http://swizec.com/blog/wp-includes/images/smilies/icon_smile.gif?1d5d3d" alt=':)' class='wp-smiley' /> </p>
<p>Oh and I guess there were <em>some</em> lexical questions, like what is a singleton and how you&#8217;d get rid of it, how do closures function  and how does a <a class="zem_slink" title="Domain Name System" href="http://en.wikipedia.org/wiki/Domain_Name_System" rel="wikipedia" target="_blank">DNS lookup</a> work.</p>
<h2>How I did?</h2>
<p>Honestly, I have no idea how I did.</p>
<p>Sure, I solved all the problems. With the exception of one, I even came up with the most optimal solution on my own. And I managed to catch all the off-by-one errors and corner cases and everything.</p>
<p>But it doesn&#8217;t <em>really</em> matter how well <strong>I</strong> did, what matters is how many others did better than me in all those little nuances like how quickly it took to solve a problem, how much you communicate and so on &#8230; so it&#8217;s really hard to say.</p>
<p>What I <strong><em>can</em></strong> say, however, is that it was one of the most fun days I&#8217;ve ever had and I deeply regret the fact there were only five interviews. Everything was over with much too quickly &#8230;</p>
<p>But at the end of the day, I didn&#8217;t even get the answer to my main question: <em>&#8220;What&#8217;s working at Google like, really?&#8221;</em> (seems like they aren&#8217;t allowed to talk about this, you get canned responses when asking)</p>
<p>So I still don&#8217;t know if Google is a place I would want to work at, but my god the lunch was amazing. If they extend an offer I might accept for the food alone!</p>
<p>PS: A coffee lab is where Googlers drink their caffeine inside the building</p>
<p><img class="alignnone" title="A Google coffee lab" src="http://distilleryimage2.instagram.com/23b9b7a09e8011e1a9f71231382044a1_7.jpg" alt="A Google coffee lab" width="612" height="612" /></p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.seomoz.org/blog/whiteboard-friday-interview-with-googles-maile-ohye" target="_blank">Whiteboard Friday &#8211; Interview with Google&#8217;s Maile Ohye</a> (seomoz.org)</li>
<li class="zemanta-article-ul-li"><a href="http://news.cnet.com/8301-1035_3-57434191-94/no-terminator-style-overlays-in-first-batch-of-google-glasses/?part=rss&amp;subj=News-Mobile" target="_blank">No Terminator-style overlays in first batch of Google Glasses</a> (news.cnet.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.seomoz.org/blog/replicate-googles-panda-questionnaire-whiteboard-friday" target="_blank">Replicate Google&#8217;s Panda Questionnaire &#8211; Whiteboard Friday</a> (seomoz.org)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=02b2f493-1a1f-44ab-befd-b24077cff27e" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598185&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/inside-a-google-onsite-interview/swizec/4352?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/inside-a-google-onsite-interview/swizec/4352/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Remember to feed your sysadmins</title>
		<link>http://swizec.com/blog/remember-to-feed-your-sysadmins/swizec/4332</link>
		<comments>http://swizec.com/blog/remember-to-feed-your-sysadmins/swizec/4332#comments</comments>
		<pubDate>Mon, 14 May 2012 11:17:10 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Internet access]]></category>
		<category><![CDATA[IP address]]></category>
		<category><![CDATA[Publishers]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4332</guid>
		<description><![CDATA[My blog has been down for the better part of a week. It&#8217;s now back &#8230; almost &#8230; well mostly &#8230; it&#8217;s somewhat back! Before I tell you the story, let me pre-emptively deal with all the &#8220;advice&#8221; that starts flying in everytime there&#8217;s a problem with my blog: moving to not-wordpress is a problem [...]]]></description>
			<content:encoded><![CDATA[<p>My blog has been down for the better part of a week. It&#8217;s now back &#8230; almost &#8230; well mostly &#8230; it&#8217;s somewhat back!</p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:Strucla_%28cake%29.JPG" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="Strucla (cake)" src="http://upload.wikimedia.org/wikipedia/commons/thumb/d/d8/Strucla_%28cake%29.JPG/300px-Strucla_%28cake%29.JPG" alt="Strucla (cake)" width="300" height="225" /></a><p class="wp-caption-text">Strucla (cake) (Photo credit: Wikipedia)</p></div>
<p>Before I tell you the story, let me pre-emptively deal with all the &#8220;advice&#8221; that starts flying in everytime there&#8217;s a problem with my blog:</p>
<ul>
<li>moving to not-<a class="zem_slink" title="WordPress" href="http://wordpress.org" rel="homepage" target="_blank">wordpress</a> is a problem because I&#8217;d have to migrate plugins, the layout, and so on</li>
<li>on using <em>static page generator</em> &#8230; my wordpress is configured to do just that, all you see are static pages</li>
<li>my hosting is free, I like <a class="zem_slink" title="Free Stuff" href="http://FreeStuff4Free.com" rel="homepage" target="_blank">free stuff</a></li>
<li>this host has withstood traffic of <em>500 <strong>visitors</strong></em> a second (each visitor translates into 10+ requests)</li>
<li>I don&#8217;t like doing sysadmining</li>
</ul>
<h2>The Story of Being a Free User and Not Buying Enough <a class="zem_slink" title="Cake" href="http://en.wikipedia.org/wiki/Cake" rel="wikipedia" target="_blank">Cakes</a></h2>
<p>Everything started last Monday when I said that <em><a title="My brain can’t handle OOP anymore" href="http://swizec.com/blog/my-brain-cant-handle-oop-anymore/swizec/4320">My brain can&#8217;t handle OOP anymore</a>. </em><a class="zem_slink" title="Reddit" href="http://reddit.com/" rel="homepage" target="_blank">Reddit</a> hated the post, mostly resorting to calling me an idiot, but <a class="zem_slink" title="Hacker News" href="http://news.ycombinator.com/" rel="homepage" target="_blank">HackerNews</a> was a far more receptive crowd with 53 upvotes and 53 comments. There was a bit of activity on twitter as well.</p>
<p>What I&#8217;m saying is the post was generally taking off a little bit.</p>
<p>Then everything went wrong.</p>
<p>A friend said <em>&#8220;Hey, uhm, I&#8217;m trying to read your blog, but it&#8217;s taking a bit of time to open&#8221;</em>.</p>
<p>Meh, that sort of stuff happens sometimes. You can never quite pinpoint it and not like I can do anything about it anyway since I have to rush off to class.</p>
<p>Then the tweets started. <em>&#8220;Hey dude, your blog is down!&#8221; &#8221;LoL, your site just says It works!&#8221;</em> and so on.</p>
<p>Well &#8230; fuck.</p>
<p>How could this be? The post wasn&#8217;t even that popular? Somewhere near the bottom of hackernews, nothing but hate from reddit &#8230; impossible!</p>
<p>Way possible!</p>
<p>One of the fonts was 404-ing. This results in a request that does not get cached and servers go down. Or rather, servers don&#8217;t go down but one of the lesser sysadmins goes <em>&#8220;You know what, the whole environment is getting a bit slow, and it&#8217;s all due to this guy&#8217;s blog &#8230; I&#8217;m sure nobody will mind if I just shut it down for now.&#8221;</em></p>
<p>I minded.</p>
<p>Then the real fun begins. Later that night the main sysadmin decided that it was finally time to perform that migration to a new server we&#8217;ve been planning for months and he&#8217;ll do it in the morning since he&#8217;s been working on a project &#8217;round the clock and is Too Tired Right Now &#8482;.</p>
<p>Next morning, joy! Bliss! Heaven! He started, ran rsyinc, I switched around some <a class="zem_slink" title="IP address" href="http://en.wikipedia.org/wiki/IP_address" rel="wikipedia" target="_blank">IP addresses</a> and off we go to greener pastures!</p>
<p>In a few minutes accessing the raw domain produced a <em><a class="zem_slink" title="HTTP 403" href="http://en.wikipedia.org/wiki/HTTP_403" rel="wikipedia" target="_blank">403 error</a></em> and going to /blog gave you a lovely <em>Error establishing database connection.</em></p>
<div class="wp-caption alignright" style="width: 250px"><a href="http://www.flickr.com/photos/10229241@N04/1800816503" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="Sunday" src="http://farm3.static.flickr.com/2270/1800816503_6147f638fd_m.jpg" alt="Sunday" width="240" height="160" /></a><p class="wp-caption-text">Sunday (Photo credit: ex.libris)</p></div>
<p>Progress! The blog is running happily under nginx now and soon enough eveyrthing will be back to normal with just a day&#8217;s worth of traffic gone. Not too shabby really, could&#8217;ve been much worse.</p>
<p>Then the main sysadmin vanished.</p>
<p>And I couldn&#8217;t get him back until Sunday.</p>
<p>I&#8217;m just a lowly freeloader with a blog that often brings down whole servers. I don&#8217;t even bring him cake or anything! He has better things to do.</p>
<p>Finally, on Sunday, rejoicment and glory and heaven and everything that is nice and lovely and sweet. He says <em>Hello, sorry for the delay.</em> on irc and promptly brings the database over to the new server and hooks it up to the wordpress installation.</p>
<p>Yay my blog is back!</p>
<p><em>&#8220;Okay, everything works, let me just hook up the redirects and page caching back up&#8221;</em></p>
<p>That was the last I&#8217;ve heard from him. I can only hope it doesn&#8217;t take another week for him to get back to me again. That would suck since this blog is totally vulnerable without a functioning page caching mechanism. There&#8217;s just too much traffic when I post anything remotely interesting.</p>
<p>Wish me luck.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://mertonmick.wordpress.com/2012/05/10/archie-the-cake-eating-dog/" target="_blank">Archie the cake eating dog.</a> (mertonmick.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://blog.serverdensity.com/2012/05/06/sysadmin-sunday-78/" target="_blank">Sysadmin Sunday 78</a> (serverdensity.com)</li>
<li class="zemanta-article-ul-li"><a href="http://etbe.coker.com.au/2012/04/17/reliable-internet-service/" target="_blank">The Most Important things for running a Reliable Internet Service</a> (etbe.coker.com.au)</li>
<li class="zemanta-article-ul-li"><a href="http://smallshoptechheavy.wordpress.com/2012/04/16/the-best-laid-plans-of-sysadmins-or-trading-off-capital-vs-labor/" target="_blank">The Best-Laid Plans of SysAdmins, or Trading Off Capital Vs. Labor</a> (smallshoptechheavy.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://rachelbythebay.com/w/2012/03/07/nb/" target="_blank">Fighting boredom at a sysadmin job by writing a binary grabber</a> (rachelbythebay.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/?px"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=a5f67f2f-69ec-487c-b09a-07778bf5a1c3" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598186&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/remember-to-feed-your-sysadmins/swizec/4332?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/remember-to-feed-your-sysadmins/swizec/4332/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My brain can&#8217;t handle OOP anymore</title>
		<link>http://swizec.com/blog/my-brain-cant-handle-oop-anymore/swizec/4320</link>
		<comments>http://swizec.com/blog/my-brain-cant-handle-oop-anymore/swizec/4320#comments</comments>
		<pubDate>Mon, 07 May 2012 11:35:52 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Firefly]]></category>
		<category><![CDATA[Foobar]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[Functional programming]]></category>
		<category><![CDATA[Joss Whedon]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[Object-oriented programming]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[River Tam]]></category>
		<category><![CDATA[Visitor pattern]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4320</guid>
		<description><![CDATA[The other week I was working on my compilers homework &#8211; the semantic analysis part is an object-oriented nightmare. Something called the visitor pattern to traverse trees and do weird stuff. It made me want to curl up in a fetal position in the corner, rocking back and forth in a padded room, while mumbling [...]]]></description>
			<content:encoded><![CDATA[<blockquote class="twitter-tweet"><p>Today I realized there is nothing more confusing to me than object oriented programming. Especially in Java. People _actually_ use this!?</p>&mdash; Swizec (@Swizec) <a href="https://twitter.com/Swizec/status/196543519446409216" data-datetime="2012-04-29T10:16:41+00:00">April 29, 2012</a></blockquote>
<script src="//platform.twitter.com/widgets.js?1d5d3d" charset="utf-8"></script>
<p>The other week I was working on my compilers homework &#8211; the <a class="zem_slink" title="Compiler" href="http://en.wikipedia.org/wiki/Compiler" rel="wikipedia" target="_blank">semantic analysis</a> part is an object-oriented nightmare. Something called the <a class="zem_slink" title="Visitor pattern" href="http://en.wikipedia.org/wiki/Visitor_pattern" rel="wikipedia" target="_blank">visitor pattern</a> to traverse trees and do weird stuff.</p>
<p>It made me want to curl up in a fetal position in the corner, rocking back and forth in a padded room, while mumbling tongues at myself. As <a class="zem_slink" title="List of Firefly characters" href="http://en.wikipedia.org/wiki/List_of_Firefly_characters" rel="wikipedia" target="_blank">River Tam</a> would say before running out of the room in panic <em>&#8220;Too crowded!&#8221;</em></p>
<h2>What <a class="zem_slink" title="Object-oriented programming" href="http://en.wikipedia.org/wiki/Object-oriented_programming" rel="wikipedia" target="_blank">OOP</a> feels like</h2>
<div id="attachment_4326" class="wp-caption alignright" style="width: 310px"><a href="http://swizec.com/blog/wp-content/uploads/2012/05/Summer_Glau_as_River_Tam_in_Serenity_Wallpaper__yvt2.jpg?1d5d3d"><img class="size-medium wp-image-4326" title="Schizophrenic?" src="http://swizec.com/blog/wp-content/uploads/2012/05/Summer_Glau_as_River_Tam_in_Serenity_Wallpaper__yvt2-300x225.jpg?1d5d3d" alt="Schizophrenic?" width="300" height="225" /></a><p class="wp-caption-text">Schizophrenic?</p></div>
<p>In object-oriented programming everything gets muddled together. Functions are bundled with data, everything is codependent and there&#8217;s no telling what a <a class="zem_slink" title="Function (mathematics)" href="http://en.wikipedia.org/wiki/Function_%28mathematics%29" rel="wikipedia" target="_blank">function</a> might do when you call it.</p>
<p>And that&#8217;s assuming there are no side-effects outside the object monad. Otherwise, who knows, the world might explode!</p>
<p>This creates software that is <em>impossible</em> to understand. I used to think I could, but after a few months of functional-style programming I realized that I simply don&#8217;t have the brainpower to understand object oriented code. It&#8217;s too messy.</p>
<p>When you put singletons into the picture and objects using other objects it all just gets &#8230; let me give you a simple example:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">foo: object <span style="color:#006600; font-weight:bold;">&#123;</span>
   i: private <span style="color:#CC0066; font-weight:bold;">integer</span> = <span style="color:#006666;">0</span>;
   add: function <span style="color:#006600; font-weight:bold;">&#40;</span>a:<span style="color:#CC0066; font-weight:bold;">integer</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span>
      i <span style="color:#006600; font-weight:bold;">+</span>= a;
      <span style="color:#0000FF; font-weight:bold;">return</span> i;
   <span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
<span style="color:#006600; font-weight:bold;">/*</span> lots of code happens here, foo has been passed around, things happened <span style="color:#006600; font-weight:bold;">*/</span>
<span style="color:#006600; font-weight:bold;">/*</span> foo is <span style="color:#9966CC; font-weight:bold;">not</span> a singleton though, just used a lot <span style="color:#006600; font-weight:bold;">*/</span>
&nbsp;
a:<span style="color:#CC0066; font-weight:bold;">integer</span> = foo.<span style="color:#9900CC;">add</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">5</span><span style="color:#006600; font-weight:bold;">&#41;</span>;
&nbsp;
<span style="color:#006600; font-weight:bold;">//</span> What is the value of a?</pre></div></div>

<p>Answering this simple question requires knowing <em><strong>everything</strong></em>. The whole execution history of <em>foo</em>. The whole codebase. You name it, you have to keep it in your head.</p>
<p>Oh and did I mention class <em>bar</em>? It depends on <em>foo</em> for a lot of its stuff. Oh yeah, they got into a little friends with benefits situation last year. It all gets pretty interesting. I think <em>bar</em> cheated on <em>foo</em> with <em><a class="zem_slink" title="Foobar" href="http://en.wikipedia.org/wiki/Foobar" rel="wikipedia" target="_blank">baz</a></em> once, though. There&#8217;s no telling how <em>foo</em> might react to that!</p>
<h2>Functional programming</h2>
<div id="attachment_4329" class="wp-caption alignright" style="width: 379px"><a href="http://www.okeefecreations.com/"><img class=" wp-image-4329  " title="fp, by okeef creations" src="http://swizec.com/blog/wp-content/uploads/2012/05/fp1.png?1d5d3d" alt="fp, by okeef creations" width="369" height="178" /></a><p class="wp-caption-text">fp, by okeef creations</p></div>
<p>With a lot of gentle poking and prodding from <a href="http://twitter.com/sbelak">@sbelak</a>, I started learning <a class="zem_slink" title="Functional programming" href="http://en.wikipedia.org/wiki/Functional_programming" rel="wikipedia" target="_blank">functional programming</a> about two years ago.</p>
<p>I was promised easy scalability, working with multiple processors without cost, expressive code, things that Just Work &#8482; and software with less bugs that is easier to maintain and shorter/quicker to write.</p>
<p>I may not have gotten all that, but I <em>did</em> get a whole new way of thinking about my craft. An easier way to <em>understand.</em></p>
<p>At first functional programming felt like performing a lobotomy on myself by sticking hot pokers into my feet. <em>Are you <strong>sure</strong> I don&#8217;t need loops? But I do need variables don&#8217;t I? At least a bit of mutability? Really? I don&#8217;t? This is some sort of hazing ritual isn&#8217;t it, any moment now you&#8217;re all going to jump up, shout &#8220;surprise&#8221; and start laughing at me.</em></p>
<p><em></em> But I kept at it. And even though my code looked horrible, I fell in love.</p>
<p>The first attraction of functinal style code was writing python functions that just pass data around. No storing in intermediate variables, just passing one function&#8217;s result directly into the arguments of the next function in the chain.</p>
<p>Because who cares about reading intermediate steps? All I care for is that this chunk of code creates <em>X</em>. Not that it first does <em>Y</em>, then <em>Z,</em> then pulls in <em>A</em> and <em>B</em> and combines them into <em>X.</em></p>
<p>Sure, you could define a function called <em>X</em> that combines <em>Y, Z, A </em>and <em>B, </em>but why create a new function for something that only gets called once? Much better to just do something like <em>X = A+B(Y(Z))</em> isn&#8217;t it?</p>
<h2>A waterfall of data</h2>
<div id="attachment_4322" class="wp-caption alignright" style="width: 360px"><a href="http://swizec.com/blog/wp-content/uploads/2012/05/waterfall-of-data.jpg?1d5d3d"><img class=" wp-image-4322 " title="Plitvice falls" src="http://swizec.com/blog/wp-content/uploads/2012/05/waterfall-of-data.jpg?1d5d3d" alt="Plitvice falls" width="350" height="233" /></a><p class="wp-caption-text">Plitvice falls</p></div>
<p>The way I think about code now is a waterfall of data.</p>
<p>You have data and every function in the chain is a ledge. The data stops falling, changes course a bit, perhaps even changes some properties, and falls onward to the next function.</p>
<p>In the end you have a pool. This is where your data ends up after falling through many functions and being changed. But then it flows onward to the next function, or wherever you might need it.</p>
<p>You might say this is really <a class="zem_slink" title="Procedural programming" href="http://en.wikipedia.org/wiki/Procedural_programming" rel="wikipedia" target="_blank">procedural programming</a>, but I don&#8217;t like side-effects, imperative bits of code and so on. It&#8217;s still functional programming, but this is how my brain understands code. Your mileage might vary.</p>
<h2>Fin</h2>
<p>Whatever way you think about your code, whatever way you visualise execution in your head &#8230; hat&#8217;s off to you, if you can handle the inherent complexity of object-oriented programming. You are a better man than I am.</p>
<p>I think you should give &#8220;<em>this functional programming fad&#8221;</em> a try anyway. You  might like it <img src="http://swizec.com/blog/wp-includes/images/smilies/icon_wink.gif?1d5d3d" alt=';)' class='wp-smiley' /> </p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://restreaming.wordpress.com/2012/03/16/functional-programming-in-practice/" target="_blank">Functional programming in practice</a> (restreaming.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://swizec.com/blog/closure-and-currying-magic-for-cleaner-javascript/swizec/3981" target="_blank">Closure and currying magic for cleaner javascript</a> (swizec.com)</li>
<li class="zemanta-article-ul-li"><a href="http://teknonics.wordpress.com/2012/05/04/objects-and-php-a-brief-evolutionary-history/" target="_blank">Objects and PHP: A brief evolutionary history</a> (teknonics.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://normansoven.com/blog/still-trying-to-wrap-my-head-around-functional-programming/" target="_blank">Still trying to wrap my head around functional programming.</a> (normansoven.com)</li>
<li class="zemanta-article-ul-li"><a href="http://bulldozer00.com/2012/05/05/the-old-is-new-again/" target="_blank">The Old Is New Again</a> (bulldozer00.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.altdevblogaday.com/2012/04/26/functional-programming-in-c/" target="_blank">Functional Programming in C++</a> (altdevblogaday.com)</li>
<li class="zemanta-article-ul-li"><a href="http://slidetocode.com/2012/05/06/the-perfect-programming-language/" target="_blank">The genesis of the perfect programming language</a> (slidetocode.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=6209c6cc-944f-4b49-b45c-5467e35073f2" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598187&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/my-brain-cant-handle-oop-anymore/swizec/4320?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/my-brain-cant-handle-oop-anymore/swizec/4320/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Steal my startup idea: Rent-a-mum</title>
		<link>http://swizec.com/blog/steal-my-startup-idea-rent-a-mum/swizec/4300</link>
		<comments>http://swizec.com/blog/steal-my-startup-idea-rent-a-mum/swizec/4300#comments</comments>
		<pubDate>Fri, 04 May 2012 11:09:54 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Business and Economy]]></category>
		<category><![CDATA[Customer service]]></category>
		<category><![CDATA[Entrepreneur]]></category>
		<category><![CDATA[Silicon Valley]]></category>
		<category><![CDATA[Small Business]]></category>
		<category><![CDATA[Start Up]]></category>
		<category><![CDATA[Startup company]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4300</guid>
		<description><![CDATA[Delegate everything not worth your time. ~ The Internet The other day I was chatting with some friends about life in general over some tea. A topic that kept resurfacing was how everybody is getting too old to live with their parents these days and that one of the big issues keeping us back is, [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Delegate everything not worth your time.</p>
<p>~ The Internet</p></blockquote>
<div class="wp-caption alignright" style="width: 250px"><a href="http://www.flickr.com/photos/55838353@N00/745454236" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="Grocery Store #1" src="http://farm2.static.flickr.com/1241/745454236_b09e49d2ee_m.jpg" alt="Grocery Store #1" width="240" height="167" /></a><p class="wp-caption-text">Grocery Store #1 (Photo credit: wgdavis)</p></div>
<p>The other day I was chatting with some friends about life in general over some tea. A topic that kept resurfacing was how everybody is getting too old to live with their parents these days and that one of the big issues keeping us back is, essentially, that we are spoiled.</p>
<p>Nobody wants to deal with the mundane things in life &#8211; that stuff your mum takes care of, so you can study/work/live in peace without going hungry or naked.</p>
<p>There is a business in there. Somebody needs to start it <strong><em>Now!</em></strong></p>
<h2>The what</h2>
<p>What I&#8217;m proposing is a mom-like service. Something that:</p>
<ul>
<li>reminds me to buy groceries</li>
<li>delivers groceries to my doorstep</li>
<li>reminds me to clean the apartment</li>
<li>preferably cleans the apartment for me</li>
<li>washes my clothes</li>
<li>reminds me to buy new clothes</li>
<li>delivers mundane clothes to my doorstep (underwear, socks, etc.)</li>
<li>delivers shampoo, razor blades, etc.</li>
<li>pays my bills, or at least reminds me to do so</li>
<li>reminds me to take a haircut</li>
<li>cooks my food or at least reminds me to eat</li>
<li>other things I don&#8217;t even know I need yet</li>
</ul>
<p>Traditionally only men had this problem &#8211; they solved it by getting married or having a serious girlfriend. But more and more women are facing this problem as well.</p>
<p>Life is hectic and who hasn&#8217;t worked on something cool all day, only to realize you haven&#8217;t eaten in hours, you&#8217;re kind of hungry, the fridge is empty and all the stores are closed already?</p>
<h2>The opportunity</h2>
<div class="wp-caption alignright" style="width: 413px"><img class=" " title="A spoiled brat" src="http://emol.org/film/archives/confessionsofashopaholic/confessionsshopaholic.jpg" alt="A spoiled brat" width="403" height="265" /><p class="wp-caption-text">A spoiled brat</p></div>
<p>Generation Y or <a class="zem_slink" title="Generation Y" href="http://en.wikipedia.org/wiki/Generation_Y" rel="wikipedia" target="_blank">Millenial Generation</a>, whatever you want to call us, is generally known as <em>&#8220;those <a class="zem_slink" title="Spoiled child" href="http://en.wikipedia.org/wiki/Spoiled_child" rel="wikipedia" target="_blank">spoiled brats</a>&#8220;</em>. We are the first generation to grow up with a globally connected world, where everything is instantly available. Ever since we were about 10 years old we have taken things for granted.</p>
<p>Want to eat tropical fruit when it&#8217;s -20C outside? You got it.</p>
<p>Want to know what&#8217;s happening 10,000km away? Just ask one of your friends from Australia.</p>
<p>Combine this with being the first generations where it&#8217;s become unacceptable to &#8220;discipline&#8221; your child and you are left with a bunch of humans with an insane sense of entitlement. We want it, we want it all. And we&#8217;re willing to do next to nothing to get it.</p>
<p>This generation is now growing up.</p>
<p>We are reaching the second half of our 20&#8242;s and it&#8217;s time to branch out and live on our own &#8230; but we have no idea <em>how</em>. And we don&#8217;t really want to either. We want to continue with our cushy lifestyles.</p>
<p>Here&#8217;s the cool thing &#8211; we don&#8217;t care so much about money, as we do about <em>&#8220;doing something that makes you happy&#8221;</em>. This means we&#8217;d gladly fork over perfectly useful money, just to have more time in the day to do the stuff we care about.</p>
<h2>The competition</h2>
<p><a href="http://swizec.com/blog/wp-content/uploads/2012/05/Screen-Shot-2012-05-04-at-1.04.49-PM.png?1d5d3d"><img class="alignnone  wp-image-4315" title="Manpacks" src="http://swizec.com/blog/wp-content/uploads/2012/05/Screen-Shot-2012-05-04-at-1.04.49-PM.png?1d5d3d" alt="Manpacks" width="510" height="264" /></a></p>
<p>There is a lot of competition in this space &#8230; sort of.</p>
<p>A bunch of services exist, everything from dog walking to house cleaning and grocery deliveries. But:</p>
<ul>
<li>all of these services <em>suck</em> at marketing</li>
<li>everything is fragmented</li>
<li>you have to do a lot of management to use them</li>
</ul>
<p>I know of only two startups that have gotten around to solving my problem in a good way. <a href="http://www.manpacks.com/" target="_blank">Manpacks.com</a> will deliver fresh underwear, socks, shaving products etc. every three months. This is awesome.</p>
<p>There&#8217;s also a service in <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>, whose name eludes me right now, that will deliver fresh food to your startup every day so you can focus on what really matters &#8211; <em>your fucking startup</em>.</p>
<h2>How to get started</h2>
<p>Considering the competition out there and the very localized nature of some of these tasks starting may seem difficult. I propose an embrace-and-extinguish strategy.</p>
<p>The startup can be positioned as a consolidation service. You create some sort of website where people sign up for the service and choose which particular tasks they would want to delegate. They give you the money. (different packages, prices, etc.)</p>
<p>Behind the scenes, you keep a list of local businesses that do particular services like cleaning, or grocery delivery &#8230; whatever. These businesses are hired by you and sent on site when need be. You also ensure a standard of quality by doing proper <a class="zem_slink" title="Customer service" href="http://en.wikipedia.org/wiki/Customer_service" rel="wikipedia" target="_blank">customer service</a> and checking back with everyone.</p>
<p>The <a class="zem_slink" title="Small business" href="http://en.wikipedia.org/wiki/Small_business" rel="wikipedia" target="_blank">small businesses</a> can focus on their core product and you essentially take care of their marketing and customer relations. The customer, doesn&#8217;t have to keep tabs on every small business, they can be billed monthly via credit card and you send them friendly reminders on what&#8217;s going on &#8211; you take a load off their mind.</p>
<p>A win-win-win situation is created where everybody benefits.</p>
<h2>How to win</h2>
<p>While being a consolidation service is a good way to start, you will eventually want to bring everything under your own umbrella. This can be achieved by looking at where your biggest markets are and starting to build a ground crew of your own.</p>
<p>Having your own ground crew helps because you aren&#8217;t dependent on other companies for your own success, you can keep better control over <a class="zem_slink" title="Service quality" href="http://en.wikipedia.org/wiki/Service_quality" rel="wikipedia" target="_blank">service quality</a> and I&#8217;m guessing it&#8217;s simply an easier situation to work with.</p>
<p>You can keep using external businesses where the market isn&#8217;t big enough to warrant building your own presence.</p>
<h2>Dangers</h2>
<p>The biggest danger for this idea is that a lot of people coming out of college these days simply aren&#8217;t looking towards lives of high paychecks. The job market for new grads, I hear, is quite tough and &#8220;luxury&#8221; services such as this one are usually the first to go when people are running tight on money.</p>
<p>The ones that do get jobs, get very <em>very</em> busy jobs though.</p>
<p>There&#8217;s also the difficulty inherent in business development. Getting all those partners on board at the beginning might be tough &#8211; you can mitigate this by focusing on a single large city at first.</p>
<p>Another danger is getting the marketing right. Just having an online presence, while a lot, won&#8217;t be enough. You&#8217;d need some sort of very engaging social media strategy.</p>
<p>Since I&#8217;ve only given this an hour or two of thought, there are likely dangers I can&#8217;t think of right now.</p>
<h2>Why I&#8217;m not doing this</h2>
<p>If I think this is such a good idea &#8230; why am I posting it up here for everyone to steal?</p>
<p>Two reasons:</p>
<ol>
<li>I really <em>really</em> want to pay for this service</li>
<li>I&#8217;m not very good at biz dev and this idea hinges mostly on that</li>
</ol>
<p>So, what am I missing? Why doesn&#8217;t something like this exist yet?</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://sme-blog.com/small-business-checklists/life-in-the-little-league" target="_blank">Life in the little league</a> (sme-blog.com)</li>
<li class="zemanta-article-ul-li"><a href="http://mashable.com/2012/05/03/collaborative-fund-craig-shapiro-video/" target="_blank">Funding for Good: Where Socially Conscious Startups Get Their Money</a> (mashable.com)</li>
<li class="zemanta-article-ul-li"><a href="http://weblog.sba.gov/blog-advo/?p=1447" target="_blank">Immigrant Businesses Start with More Capital than Others Do</a> (weblog.sba.gov)</li>
<li class="zemanta-article-ul-li"><a href="http://blog.bootstraptoday.com/2012/05/04/9-secrets-to-attract-developers-to-your-startup/" target="_blank">9 Secrets to Attract Developers to Your Startup</a> (bootstraptoday.com)</li>
<li class="zemanta-article-ul-li"><a href="http://techcrunch.com/2012/05/03/42floors-showroom/" target="_blank">42Floors Launches &#8216;Showroom&#8217; For All The Stuff Offices Need After Signing The Lease</a> (techcrunch.com)</li>
<li class="zemanta-article-ul-li"><a href="http://smallbiztrends.com/2012/05/startup-tech-bubble-talk-is-everywhere-but-not-all-agree.html" target="_blank">Startup Tech Bubble Talk Is Everywhere But Not All Agree</a> (smallbiztrends.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=a401ca53-37e8-4dc1-b4e1-836570bf39c5" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598187&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/steal-my-startup-idea-rent-a-mum/swizec/4300?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/steal-my-startup-idea-rent-a-mum/swizec/4300/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Skype does not an IDE make</title>
		<link>http://swizec.com/blog/skype-does-not-an-ide-make/swizec/4287</link>
		<comments>http://swizec.com/blog/skype-does-not-an-ide-make/swizec/4287#comments</comments>
		<pubDate>Wed, 02 May 2012 15:51:38 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Cascading Style Sheet]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Skype]]></category>
		<category><![CDATA[Style Sheets]]></category>
		<category><![CDATA[Text editor]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4287</guid>
		<description><![CDATA[This is the screen I&#8217;ve been staring into for most of the day. It&#8217;s horrible. No way for a man to code. Or a woman. Or anyone really. If I had a child, this would be how I ground them &#8211; restrict text editor access to Skype. Why was I doing this all day you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://swizec.com/blog/wp-content/uploads/2012/05/Screen-Shot-2012-05-02-at-3.42.28-PM.png?1d5d3d"><img class="alignnone  wp-image-4290" title="Skype not an IDE" src="http://swizec.com/blog/wp-content/uploads/2012/05/Screen-Shot-2012-05-02-at-3.42.28-PM.png?1d5d3d" alt="Skype not an IDE" width="691" height="432" /></a></p>
<p>This is the screen I&#8217;ve been staring into for most of the day.</p>
<p>It&#8217;s horrible. No way for a man to <a class="zem_slink" title="Code" href="http://en.wikipedia.org/wiki/Code" rel="wikipedia" target="_blank">code</a>. Or a woman. Or anyone really. If I had a child, this would be how I ground them &#8211; restrict <a class="zem_slink" title="Text editor" href="http://en.wikipedia.org/wiki/Text_editor" rel="wikipedia" target="_blank">text editor</a> access to <a class="zem_slink" title="Skype" href="http://skype.com" rel="homepage" target="_blank">Skype</a>.</p>
<p>Why was I doing this all day you ask?</p>
<p>A few days ago I decided to launch a small experiment &#8211; for this I needed a small icon. <a href="https://twitter.com/ponywithhiccups" target="_blank">@ponywithhiccups</a> bravely stepped up to the task and got to work.</p>
<p>After some days of back and forth we came up with a design both can be happy with. Bit of advice: <em>meet up in person</em> if at all possible. Especially for design.</p>
<p>Then I asked her to code it all up in <a class="zem_slink" title="Cascading Style Sheets" href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets" rel="wikipedia" target="_blank">CSS</a> and <a class="zem_slink" title="HTML" href="http://en.wikipedia.org/wiki/HTML" rel="wikipedia" target="_blank">HTML</a>. You know, because I&#8217;m lazy and she can totally handle that and I have far less important things to do than implementing my own experiments.</p>
<p>With a huff and a puff she got to work.</p>
<p>Everything was going <em>so well.</em> Right up to the point she finally decided she has no idea what&#8217;s going on and I should step in to help. Via Skype.</p>
<p>Very well then, how hard can it be to lend a helping hand in coding some CSS? CSS is, like, totally child&#8217;s play. I can write CSS in my sleep!</p>
<p>Turns out, via Skype, not so much.</p>
<h2>Human = text editor</h2>
<p>Perhaps the problem wasn&#8217;t Skype so much as it was <a class="zem_slink" title="Pair programming" href="http://en.wikipedia.org/wiki/Pair_programming" rel="wikipedia" target="_blank">pair programming</a> to use another <a class="zem_slink" title="Human" href="http://en.wikipedia.org/wiki/Human" rel="wikipedia" target="_blank">human being</a>as a text editor. The only real issue Skype introduced was making the screen blurry and occasionally locking up so I could only see changes with a slight delay.</p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:Pair_programming_1.jpg" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="Look! It's paired programming!" src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Pair_programming_1.jpg/300px-Pair_programming_1.jpg" alt="Look! It's paired programming!" width="300" height="225" /></a><p class="wp-caption-text">Look! It&#39;s paired programming! (Photo credit: Wikipedia)</p></div>
<p>Using another human as a text editor, though, that was just painful.</p>
<p>The way I work is very messy -&gt; I jump around the screen, scroll up and down, add a dot on line 10, write a row at line 100, refresh the browser, change some HTML, look at twitter, refresh the browser, change line 50, remove lines 10-20, add 5 lines, move the 5 lines fifty lines up.</p>
<p>And so on.</p>
<p>This works because I can keep the whole codebase in memory. But it&#8217;s <em>vital </em>that jumping around the file happens as quickly as it does in my head. Any delay feels like somebody was dragging a barbed wire through my brain while pulling the handbrake on my thoughts and chugging a refrigerator out the window.</p>
<p>You know, that feeling you get when you&#8217;re trying to code, but the computer is being slow?</p>
<p>Multiply it by 10 and add the computer asking <em>&#8220;Uh, what do you mean?&#8221; &#8220;Are you sure?&#8221;</em> and every now and then <em>&#8220;OH! I know what you are going to say in 25 seconds!&#8221;</em> &#8230; and then doing the wrong thing.</p>
<p>No fault to @ponywithhiccups of course, she&#8217;s just starting out with this stuff and I should have gone to her in person &#8211; we&#8217;d be done in half the time.</p>
<p>Pointing at the screen with your finger and saying <em>&#8220;Right there, just fix that!&#8221;</em> doesn&#8217;t work either.</p>
<p>BUT! In the end we prevailed and that&#8217;s <strong><em>awesome</em></strong>. I also learned a bunch about css3 animations; that stuff is fascinating. The things you can do, wow.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://swizec.com/blog/webdevs-you-have-no-idea-how-much-you-know/swizec/3891" target="_blank">Webdevs, you have no idea how much you know</a> (swizec.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.impressivewebs.com/css-the-good-parts/" target="_blank">CSS: The Good Parts</a> (impressivewebs.com)</li>
<li class="zemanta-article-ul-li"><a href="http://webdesigndevelopment11.wordpress.com/2012/05/01/website-development-with-html-5-and-css-3/" target="_blank">Website development with HTML 5 and CSS 3</a> (webdesigndevelopment11.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://reviews.cnet.com/8301-19512_7-57424441-233/skype-upgrades-interface-adds-touch-screen-features/?part=rss&amp;subj=news" target="_blank">Skype upgrades interface, adds touch-screen features</a> (reviews.cnet.com)</li>
<li class="zemanta-article-ul-li"><a href="http://mikeliving.wordpress.com/2012/05/01/web-design-and-hucksterism/" target="_blank">Web Design and Hucksterism</a> (mikeliving.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://itechtunes.com/2012/05/01/15-great-html5-and-css3-generators/" target="_blank">15 great HTML5 and CSS3 generators</a> (itechtunes.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=a623ba8a-2999-4b31-9f23-cad1a4f51768" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598187&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/skype-does-not-an-ide-make/swizec/4287?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/skype-does-not-an-ide-make/swizec/4287/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Three benefits of trying to gain weight</title>
		<link>http://swizec.com/blog/three-benefits-of-trying-to-gain-weight/swizec/4263</link>
		<comments>http://swizec.com/blog/three-benefits-of-trying-to-gain-weight/swizec/4263#comments</comments>
		<pubDate>Tue, 01 May 2012 15:16:01 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Body mass index]]></category>
		<category><![CDATA[Body weight]]></category>
		<category><![CDATA[Food]]></category>
		<category><![CDATA[Health]]></category>
		<category><![CDATA[Longboard]]></category>
		<category><![CDATA[Muscle]]></category>
		<category><![CDATA[Weight gain]]></category>
		<category><![CDATA[Weight loss]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4263</guid>
		<description><![CDATA[Two months ago the females in my life were becoming increasingly vocal about how skinny I was -&#62; I decided to gain some weight. Sure, I wasn&#8217;t really that skinny &#8211; a body mass index of ~21, smack in the middle of healthy &#8211; but hey, why not. Let&#8217;s try to fatten up a bit. [...]]]></description>
			<content:encoded><![CDATA[<p>Two months ago the females in my life were becoming increasingly vocal about how skinny I was -&gt; I decided to gain some weight.</p>
<div class="mceTemp">
<dl class="wp-caption alignright" style="width: 220px;">
<dt class="wp-caption-dt"><a href="http://commons.wikipedia.org/wiki/File:Get_fat3.jpg" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured " title="&quot;Get fat on Lorings Fat-ten-u and corpula..." src="http://upload.wikimedia.org/wikipedia/commons/thumb/9/97/Get_fat3.jpg/300px-Get_fat3.jpg" alt="&quot;Get fat on Lorings Fat-ten-u and corpula..." width="210" height="433" /></a></dt>
</dl>
</div>
<p>Sure, I wasn&#8217;t really that skinny &#8211; a <a class="zem_slink" title="Body mass index" href="http://en.wikipedia.org/wiki/Body_mass_index" rel="wikipedia" target="_blank">body mass index</a> of ~21, smack in the middle of healthy &#8211; but hey, why not. Let&#8217;s try to fatten up a bit. How hard could it be to gain 4kg in two months?</p>
<p>Extremely hard!</p>
<p>Since I was already tracking calories I only set myfitnesspal to <em>&#8220;<a class="zem_slink" title="Weight gain" href="http://en.wikipedia.org/wiki/Weight_gain" rel="wikipedia" target="_blank">gain weight</a>&#8220;</em> and tried to stuff my face full of food every day. The first week I went down a whole kilogram. The next week I was almost back to before I started. Now I&#8217;m just under two kilograms heavier than I was two months ago.</p>
<p>What?</p>
<p>Whenever I get excited on twitter about gaining half a kilogram or so, a bunch of tweets fly in from people saying something to the effect of <em>&#8220;Oh how I wish I had your problem! How dare you make it sound so difficult to be fat?&#8221;</em></p>
<p>Well, to those people I would say they can&#8217;t really complain until they give my exercise regimen a try &#8211; 40 minutes of <a class="zem_slink" title="Body weight" href="http://en.wikipedia.org/wiki/Body_weight" rel="wikipedia" target="_blank">body-weight</a> and cardio every morning before breakfast, boxing practice two or three times a week, longboarding session as often as possible and using walking/longboarding as the main mode of transport.</p>
<p>If you can do all that and be fat, tell me your secret! I&#8217;m trying to gain some weight here!</p>
<p>The experiment wasn&#8217;t a complete wash though. Some benefits include:</p>
<ul>
<li><strong>infinite energy</strong> - because I&#8217;m constantly stuffing my face, it seems I get tired later in the day and mornings are easier. Better yet, my morning boot up time shortened to almost instant. I&#8217;m dezombified almost immediately after waking up!</li>
<li><strong>less sleep</strong> - somewhat related is the fact I seem to need less sleep. 6 hours a day has always been plenty, but I needed to recharge a bit on weekends (8 hours). Nowadays the 8 hour sleep only happens twice or thrice a month. Awesome.</li>
<li><strong>stable energy</strong><em> - </em>getting obvious here with the energy pattern &#8211; but I simply can&#8217;t scoff down enough food in three sittings. This means I have to eat food, real food, none of that snacks crap, every two to three hours. This makes me constantly energized, without any of those afternoon lulls in energy levels.</li>
</ul>
<p>While all of that is super awesome &#8211; and should have been completely obvious &#8211; there is one giant drawback to all of this. It seems I need to eat <em>constantly</em>. Every. Two. Freaking. Hours. Or three.</p>
<p>This is a huge pain in the arse. Not only do I have to find a way to eat real food when I&#8217;m at class for six hours straight, it&#8217;s also very distracting when I&#8217;m working. Imagine being fully immersed in the flow, working on an interesting problem and then juuuuust as you&#8217;re about to crack the problem &#8230; oh right, I have to eat again.</p>
<p>And then you waste at least half an hour preparing and eating food. By the time you&#8217;re done, the proverbial glass palace in your head has already shattered and it takes forever to get back to work.</p>
<p>But hey, I can exercise much harder while getting less tired. That&#8217;s good too <img src="http://swizec.com/blog/wp-includes/images/smilies/icon_smile.gif?1d5d3d" alt=':)' class='wp-smiley' /> </p>
<p><img class="alignnone" title="This is not me longboarding" src="http://images.usatoday.com/sports/_photos/2006-06-20-longboard1.jpg" alt="This is not me longboarding" width="472" height="270" /></p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.drsharma.ca/obesity-close-concerns-stopping-the-gain.html" target="_blank">Close Concerns: Stopping The Gain</a> (drsharma.ca)</li>
<li class="zemanta-article-ul-li"><a href="http://www.everydayhealth.com/weight/simple-ways-to-gain-weight.aspx" target="_blank">Simple Ways to Gain Weight</a> (everydayhealth.com)</li>
<li class="zemanta-article-ul-li"><a href="http://jasonmachowsky.wordpress.com/2012/05/01/one-for-the-weight-gainers/" target="_blank">One for the Weight Gainers&#8230;</a> (jasonmachowsky.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://sonjaolafs.wordpress.com/2012/04/30/myth-of-the-week/" target="_blank">Myth of the Week</a> (sonjaolafs.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.eurekalert.org/pub_releases/2012-05/aaos-lst042612.php" target="_blank">Longer sleep times may counteract genetic factors related to weight gain</a> (eurekalert.org)</li>
<li class="zemanta-article-ul-li"><a href="http://www.pbpulse.com/dining/brunch/2012/03/30/that-girl-longboards-makes-brunch-a-laid-back-affair/" target="_blank">That Girl: Longboards makes brunch a laid-back affair</a> (pbpulse.com)</li>
<li class="zemanta-article-ul-li"><a href="http://hackaday.com/2012/04/17/all-aluminum-longboard-shows-its-mettle/" target="_blank">All Aluminum Longboard Shows Its Mettle</a> (hackaday.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=9a2bde12-8a81-4686-96ee-0fa3f80c7b35" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598187&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/three-benefits-of-trying-to-gain-weight/swizec/4263?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/three-benefits-of-trying-to-gain-weight/swizec/4263/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Google sent me a &#8220;what to know in on-site interviews&#8221; email. Here it is.</title>
		<link>http://swizec.com/blog/google-sent-me-a-what-to-know-in-on-site-interviews-email-here-it-is/swizec/4251</link>
		<comments>http://swizec.com/blog/google-sent-me-a-what-to-know-in-on-site-interviews-email-here-it-is/swizec/4251#comments</comments>
		<pubDate>Thu, 26 Apr 2012 13:26:01 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4251</guid>
		<description><![CDATA[After two phone interviews Google asked me to visit London and have a whole day of chatting about technology and solving intricate coding puzzles. Just to see how good I am on a scale of 1 to Google. They aldo sent me an email with advice. It can be summed up as &#8220;You should know everything. [...]]]></description>
			<content:encoded><![CDATA[<p>After two phone interviews Google asked me to visit London and have a whole day of chatting about technology and solving intricate coding puzzles. Just to see how good I am on a scale of 1 to Google.</p>
<div class="wp-caption alignright" style="width: 290px"><a href="http://commons.wikipedia.org/wiki/File:Sorting_quicksort_anim.gif" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="An animation of the quicksort algorithm sortin..." src="http://upload.wikimedia.org/wikipedia/commons/6/6a/Sorting_quicksort_anim.gif" alt="An animation of the quicksort algorithm sortin..." width="280" height="214" /></a><p class="wp-caption-text">An animation of the quicksort algorithm sorting an array of randomized values. (Photo credit: Wikipedia)</p></div>
<p>They aldo sent me an email with advice. It can be summed up as <em>&#8220;You should know everything. If it&#8217;s to do with computers, you should know it. Here are 5 books and 4 fancy algorithms you should read. You must also be intimately familiar with all these basic-ish algorithms. This is your two week notice. Good luck. Oh and take a look at these videos too!&#8221;</em></p>
<p>Technical interviews have always been fun for me, I just love talking shop with anyone who would listen and how often do you get the chance to talk shop with some of the [provenly] best engineers out there?</p>
<p>Somehow, instead of being super solid advice, the email did nothing but cement my idea that it&#8217;s impossible to study up on all this and I should just hope I&#8217;ve got what it takes anyway.</p>
<p>Here&#8217;s the email, copied verbatim.</p>
<p><strong>Guide to getting an engineering job with Google</strong></p>
<p>Software engineers work in small, rapid teams, each handling the full development cycle without need for hierarchy; product design, system architecture, coding, testing &amp; product launching at global scale. They don&#8217;t tend to make prototypes; but rather work in realtime, with live feedback from real people across the globe. Engineers don&#8217;t always get it right first time, but iterate fast in an agile, unit test environment.</p>
<p>Google takes an academic approach to the interviewing process.  This means that we’re interested in your thought process, your approach to problem solving as well as your coding abilities.</p>
<p><strong>Technical Interviews</strong></p>
<p>You can expect questions that evaluate your skills in three primary areas:</p>
<p>1. Coding</p>
<ul>
<li>Fluency in at least one programming language is prerequisite, preferably be an object-oriented language, ideally C++ or Java (C# is OK, although engineers don&#8217;t use it and Python can be useful).</li>
<li>You should be able to produce fully compilable code in your chosen language, to justify why it&#8217;s your preferred language and be fully up-to-date with its latest editions.</li>
<li>Sample topics: construct / traverse data structures, implement system routines, distill large data sets to single values, transform one data set to another.</li>
<li>Google engineers don&#8217;t tend to need pre-coded solutions or architectures (so would not utilise MFC, .NET or J2EE).</li>
<li>Engineers develop in a globally open, unit test environment, so you should be familiar with this methodology and able to write your own tests.</li>
<li>Coding styleguides can be found <a href="http://code.google.com/p/google-styleguide/" target="_blank">here</a>.</li>
</ul>
<p>2. Algorithms</p>
<ul>
<li>You need to know <a href="http://en.wikipedia.org/wiki/Big_O_notation" target="_blank">Big-O</a> complexity analysis really well → it’s OK to quickly come up with a brute force solution, but that’s never going to be the answer → always look for an O(n*logn) solution or ideally a linear one.</li>
<li>Searching and sorting algorithms (Quicksort, Mergesort, etc) → know more than one O(n*logn) sorting algorithm → know how they work and how to optimise for time and space.</li>
<li>Hash tables → be able to implement one using only arrays.</li>
<li>Trees → know tree construction, traversal, and manipulation algorithms. Familiarise yourself with binary trees, n-ary trees and trie-trees, and at least one type of balanced binary tree.</li>
<li>Know the classic computer science problems (Shortest Path, Traveling Salesman, Knapsack, etc).</li>
</ul>
<p>3. System design</p>
<ul>
<li>You need to know powers of 2, and be good at back-of-the-envelope calculations e.g. to estimate the required number of machines for a given design.</li>
<li>Know Google’s products, and think about how you would design the back-end (or front-end).</li>
<li>System design questions are a test of your problem solving skills. Ask qualifying questions → make sure you explain your thought process → explain and justify your assumptions → think of the bigger picture and don’t get bogged down in the detail.</li>
<li>Sample topics: features sets, interfaces, class hierarchies, designing a system under certain constraints, simplicity and robustness, tradeoffs.</li>
<li>Checkout <a href="http://code.google.com/edu/parallel/dsd-tutorial.html" target="_blank">this link</a> for basic systems design as used at Google.</li>
</ul>
<p><strong>Interview Hints</strong></p>
<ul>
<li>Talk through your thought processes. Our engineers are evaluating not only your technical abilities but how you approach &amp; solve problems.</li>
<li>Ask clarifying questions if you do not understand the problem or need more information. Many of the questions asked in Google interviews are deliberately underspecified because our engineers are looking to see how you engage the problem. In particular, they are looking to see which areas leap to your mind as the most important piece of the technological puzzle you&#8217;ve been presented.</li>
<li>Think about ways to improve the solution you&#8217;ll present. In many cases, the first answer that springs to mind isn&#8217;t the most elegant solution &amp; may need some refining. It&#8217;s definitely worthwhile to talk about your initial thoughts to a question, but jumping immediately into presenting a brute force solution will be received less well than taking time to compose a more efficient solution.</li>
<li>Show an interest in Google products. What is your favourite product, and how would you improve it?</li>
</ul>
<p><strong>Videos</strong><br />
- <a href="http://www.youtube.com/watch?v=w887NIa_V9w" target="_blank">Interviewing at Google</a> &#8211; <a href="https://www.youtube.com/watch?v=aOZhbOhEunY&amp;feature=player_embedded" target="_blank">An inside look at Google</a><br />
- <a href="http://www.youtube.com/user/Google?blend=1&amp;ob=4" target="_blank">Google Youtube Channel</a><br />
- <a href="http://www.youtube.com/watch?v=qsan-GQaeyk" target="_blank">Underneath the covers at Google</a><br />
- <a href="http://www.youtube.com/results?search_query=%22Google+i%2Fo%22+2011&amp;aq=f" target="_blank">Google i/O 2011</a></p>
<p><strong>Recommended books</strong></p>
<ul>
<li>Programming Pearls, 2nd Edition &#8211; Jon Bentley</li>
<li>Introduction to Algorithms, 2nd Edition &#8211; Cormen, Leiserson, Rivest, Stein</li>
<li>Programming Interviews Exposed: Secrets to Landing your next job, 2nd Edition &#8211; Mongan, Suojanen, Giguere</li>
<li>Effective C++ &#8211; Scott Myers</li>
<li>How Google Tests Software &#8211; James Whittaker</li>
</ul>
<p><strong>Background knowledge:</strong><br />
Background knowledge: The Google infrastructure Google has the world’s most formidable large-scale computing and storage infrastructure. Clusters of Linux-based machines with custom job and storage management systems allows us to build applications that access petabytes of data or process millions of requests a day. We can build such systems because, amongst other things, we have full control over the software stack.  Four of the key elements include:</p>
<ul>
<li><strong><a href="http://en.wikipedia.org/wiki/Google_File_System" target="_blank">GFS</a></strong> - the Google File System</li>
<li><strong><a href="http://en.wikipedia.org/wiki/MapReduce" target="_blank">MapReduce</a></strong> - to crunch large data sets</li>
<li><strong><a href="http://en.wikipedia.org/wiki/BigTable" target="_blank">BigTable</a></strong> - a distributed storage system</li>
<li><strong><a href="http://research.google.com/archive/chubby.html" target="_blank">Chubby</a></strong> - a distributed lock service</li>
</ul>
<p><strong>I asked an experienced Google engineer how/why Google uses Big O notation and they gave me this information:</strong><br />
Google-scale problems fall into two categories: those that span across machines, across very large amounts of data, and those that supply a large number of users with very quick access to data, such as search.</p>
<p>When we design a solution for either sort of problem, we are deal with large numbers of items, for example a large number of web pages to search, or customer reports to aggregate up.  This means that any algorithm that is not at least as good as linear (O(n)) in time is likely to be too slow.  User-facing products such as search require even better: that means aiming for constant time operation (O(1)), no matter how large our index, we need to show results in a fixed amount of time.  Sometimes that means we scale the system up to cope with the number of Web pages we have to search.  Any example of where your understanding of performance profiling would be applicable is now that we have a constant-time solution, we need to minimise the overhead of just one user performing a search; it&#8217;s no good if one user&#8217;s query causes 100MB to be allocated on 1000 computers.</p>
<p>Another example would be when we index the Web.  This means taking billions of Web pages, computing metrics on each of them to extract the search terms that might trigger them, and then putting them in a searchable index.  Adding each page means we might need to compare it with every other page to find the best result for a query, but in fact we can perform the index in linear time with respect to the whole internet by performing the entire computation in parallel.  What engineers have done is distilled the problem to an &#8216;embarrassingly parallel&#8217; one where as much computation as possible is done on each single page before the more expensive step of comparing it with other pages.  This reduces the overall time to index the Web to the extent where we can keep much of the internet searchable even if the page is only 15 minutes old.  Here, we have used algorithms and Big O analysis to both decrease latency and increase throughput; performance profiling plays a part but but only once a truly scalable solution has been found.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://searchenginewatch.com/article/2170391/New-Google-Search-Algorithm-Update-Targets-Web-Spam" target="_blank">New Google Search Algorithm Update Targets Web Spam</a> (searchenginewatch.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.electronista.com/articles/12/04/25/google.funds.user.review.algorithm.research/" target="_blank">Google helps create algorithm to target shill reviews</a> (electronista.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.aaronchua.com/2012/04/why-is-my-sites-not-ranking-after.html" target="_blank">Why is my sites not ranking after google algorithm changes on April 2012</a> (aaronchua.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.javacodegeeks.com/2012/03/my-problem-with-your-interviews.html" target="_blank">My Problem With Your Interviews</a> (javacodegeeks.com)</li>
<li class="zemanta-article-ul-li"><a href="http://blog.hudsonhorizons.com/Article/Pinterest-Algorithm-Must-See-Photo-Explains-All.htm" target="_blank">Pinterest Algorithm Mystery Explained: Must-See Photo</a> (hudsonhorizons.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=f2e30d39-c798-4903-9421-69b1874e49e5" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598187&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/google-sent-me-a-what-to-know-in-on-site-interviews-email-here-it-is/swizec/4251?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/google-sent-me-a-what-to-know-in-on-site-interviews-email-here-it-is/swizec/4251/feed</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Making our irc bot talk</title>
		<link>http://swizec.com/blog/making-our-irc-bot-talk/swizec/4243</link>
		<comments>http://swizec.com/blog/making-our-irc-bot-talk/swizec/4243#comments</comments>
		<pubDate>Wed, 25 Apr 2012 17:02:27 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Artificial intelligence]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Internet Relay Chat]]></category>
		<category><![CDATA[Markov chain]]></category>
		<category><![CDATA[Time series]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4243</guid>
		<description><![CDATA[[18:21:38] &#60;HairyFotr&#62; _chatty-botko_ we desire to hear moar of you&#8217;re infinite wisdom [18:21:38] &#60;_chatty-botko_&#62; know it broken ? _chatty-botko_ doesn&#8217;t though gets IRC might seem quaint and outdated, but for keeping in touch with a group of friends it beats Twitter, Facebook and Google+ hands down. There&#8217;s a bunch of others on those things. With IRC [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>[18:21:38] &lt;HairyFotr&gt; _chatty-botko_ we desire to hear moar of you&#8217;re infinite wisdom<br />
[18:21:38] &lt;_chatty-botko_&gt; know it broken ? _chatty-botko_ doesn&#8217;t though gets</p></blockquote>
<p><a class="zem_slink" title="Internet Relay Chat" href="http://en.wikipedia.org/wiki/Internet_Relay_Chat" rel="wikipedia" target="_blank">IRC</a> might seem quaint and outdated, but for keeping in touch with a group of friends it beats <a class="zem_slink" title="Twitter" href="http://twitter.com" rel="homepage" target="_blank">Twitter</a>, Facebook and Google+ hands down.</p>
<div class="wp-caption alignright" style="width: 370px"><img class=" " title="Robot" src="http://www.theuniversesolved.com/images/irobot1.jpg" alt="Robot" width="360" height="281" /><p class="wp-caption-text">Robot</p></div>
<p>There&#8217;s a bunch of <em>others</em> on those things. With IRC there&#8217;s just us &#8230; and a robot overlord.</p>
<p>Mostly <em>_botko_</em> makes sure to mention when we repost links and keeps irc logs for us. But as soon as <a href="https://twitter.com/#!/smotko" target="_blank">@smotko</a> added random phrases to make keeping us in place more interesting. We wanted more.</p>
<p>We wanted our bot to speak.</p>
<p>It&#8217;s been ages since I coded just for fun, so last night I made <em>_botko_</em> talk.</p>
<h2>What to say?</h2>
<blockquote><p>[18:03:13] &lt;_chatty-botko_&gt; _botko_ probably feels left out<br />
[18:12:45] &lt;_chatty-botko_&gt; auto complete <img src="http://swizec.com/blog/wp-includes/images/smilies/icon_biggrin.gif?1d5d3d" alt=':D' class='wp-smiley' />  whoa! mind = blown</p></blockquote>
<p>So how do you make a robot speak?</p>
<p>Natural language generation is a <em>huge</em> field, hell I&#8217;m doing <a href="http://swizec.github.com/Le-Thesis/" target="_blank">my thesis</a> in that general vicinity. For this project I just wanted to have a little fun, not invent a monster -&gt; <a class="zem_slink" title="Markov chain" href="http://en.wikipedia.org/wiki/Markov_chain" rel="wikipedia" target="_blank">markov chain</a> <a class="zem_slink" title="Natural language generation" href="http://en.wikipedia.org/wiki/Natural_language_generation" rel="wikipedia" target="_blank">text generation</a>!</p>
<p>The way a markov chain text generator works is basically:</p>
<ol>
<li>split a text into words</li>
<li>create n-grams (n-length groups of words, I used n=1)</li>
<li>create unique hashes of all n-grams</li>
<li>map each <a class="zem_slink" title="N-gram" href="http://en.wikipedia.org/wiki/N-gram" rel="wikipedia" target="_blank">n-gram</a> to a list of <em>next</em> n-grams</li>
</ol>
<p>You end up with this sort of data structure.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: black;">&#123;</span>-<span style="color: #ff4500;">8818677644356330256</span>: <span style="color: black;">&#123;</span><span style="color: #483d8b;">'next'</span>: <span style="color: black;">&#123;</span>-<span style="color: #ff4500;">6361492750444014453</span>: <span style="color: #ff4500;">1</span><span style="color: black;">&#125;</span>,
                        <span style="color: #483d8b;">'text'</span>: <span style="color: black;">&#91;</span><span style="color: #483d8b;">'dobu'</span><span style="color: black;">&#93;</span>,
                        <span style="color: #483d8b;">'weight'</span>: <span style="color: #ff4500;">1.9</span><span style="color: black;">&#125;</span>,
 -<span style="color: #ff4500;">8629397782117610386</span>: <span style="color: black;">&#123;</span><span style="color: #483d8b;">'next'</span>: <span style="color: black;">&#123;</span><span style="color: black;">&#125;</span>, <span style="color: #483d8b;">'text'</span>: <span style="color: black;">&#91;</span><span style="color: #483d8b;">'podatkov'</span><span style="color: black;">&#93;</span>, <span style="color: #483d8b;">'weight'</span>: <span style="color: #ff4500;">0.9</span><span style="color: black;">&#125;</span>,
 <span style="color: #ff4500;">7424044602067048</span>: <span style="color: black;">&#123;</span><span style="color: #483d8b;">'next'</span>: <span style="color: black;">&#123;</span><span style="color: #ff4500;">14336086128129331</span>: <span style="color: #ff4500;">0.9</span>, <span style="color: #ff4500;">1480645349370722979</span>: <span style="color: #ff4500;">1</span><span style="color: black;">&#125;</span>,
                    <span style="color: #483d8b;">'text'</span>: <span style="color: black;">&#91;</span><span style="color: #483d8b;">':D'</span><span style="color: black;">&#93;</span>,
                    <span style="color: #483d8b;">'weight'</span>: <span style="color: #ff4500;">2.9</span><span style="color: black;">&#125;</span>,
<span style="color: #808080; font-style: italic;"># and so on for quite a while</span></pre></div></div>

<p>While this works great for static text, an irc chatroom is a rolling <a class="zem_slink" title="Time series" href="http://en.wikipedia.org/wiki/Time_series" rel="wikipedia" target="_blank">time series</a> that never really ends. Not only will you soon run out of memory, how do you deal with staying relevant?</p>
<p>I had to wait until <em><strong>4:03AM</strong></em> for the solution to hit me!</p>
<p>It doesn&#8217;t have to be complicated at all &#8211; just decay the weights of all <em>next</em> items whenever you poke an element. And do the same whenever a new text is added to the Corpus.</p>
<p>Especially important is to choose the starting point well. The more relevant it is to current discussion, the more chance you have of saying something relevant. So instead of choosing at random, we make a weighted choice here as well.</p>
<p>When everything is packaged together, usage becomes pretty simple:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">corpus.<span style="color: black;">add</span><span style="color: black;">&#40;</span>text<span style="color: black;">&#41;</span> <span style="color: #808080; font-style: italic;"># repeat this a couple of times</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># to generate, you just</span>
corpus.<span style="color: black;">rewind</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
text = <span style="color: #483d8b;">&quot; &quot;</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>take<span style="color: black;">&#40;</span>corpus, <span style="color: #ff4500;">5</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> <span style="color: #808080; font-style: italic;"># creates a 5 word text</span></pre></div></div>

<p>All the <a href="https://github.com/Swizec/botko/blob/speaking/src/Corpus.py" target="_blank">code is on github</a>.</p>
<p>Making the data structure iterable like that was especially interesting. Now I can change how the generator works without affecting external code.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">    <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__iter__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">self</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__setitem__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, ngram, value<span style="color: black;">&#41;</span>:
        key = <span style="color: #008000;">self</span>.__hash<span style="color: black;">&#40;</span>ngram<span style="color: black;">&#41;</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">data</span><span style="color: black;">&#91;</span>key<span style="color: black;">&#93;</span> = value
&nbsp;
    <span style="color: #808080; font-style: italic;"># adapted from</span>
    <span style="color: #808080; font-style: italic;"># http://eli.thegreenplace.net/2010/01/22/weighted-random-generation-in-python/</span>
    <span style="color: #ff7700;font-weight:bold;">def</span> __weighted_choice<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, items<span style="color: black;">&#41;</span>:
        rnd = <span style="color: #dc143c;">random</span>.<span style="color: #dc143c;">random</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #008000;">sum</span><span style="color: black;">&#40;</span><span style="color: black;">&#91;</span>w <span style="color: #ff7700;font-weight:bold;">for</span> w, k <span style="color: #ff7700;font-weight:bold;">in</span> items<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">for</span> i, item <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">enumerate</span><span style="color: black;">&#40;</span>items<span style="color: black;">&#41;</span>:
            rnd -= item<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>
            <span style="color: #ff7700;font-weight:bold;">if</span> rnd <span style="color: #66cc66;">&amp;</span>lt<span style="color: #66cc66;">;</span> <span style="color: #ff4500;">0</span>:
                <span style="color: #ff7700;font-weight:bold;">return</span> item<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> __next<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, ngram<span style="color: black;">&#41;</span>:
        item = <span style="color: #008000;">self</span>.<span style="color: #0000cd;">__getitem__</span><span style="color: black;">&#40;</span>ngram<span style="color: black;">&#41;</span>
&nbsp;
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>item<span style="color: black;">&#91;</span><span style="color: #483d8b;">'next'</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> == <span style="color: #ff4500;">0</span>:
            <span style="color: #ff7700;font-weight:bold;">raise</span> <span style="color: #008000;">StopIteration</span>
&nbsp;
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">self</span>.<span style="color: black;">data</span><span style="color: black;">&#91;</span><span style="color: #008000;">self</span>.__weighted_choice<span style="color: black;">&#40;</span><span style="color: #008000;">zip</span><span style="color: black;">&#40;</span>item<span style="color: black;">&#91;</span><span style="color: #483d8b;">'next'</span><span style="color: black;">&#93;</span>.<span style="color: black;">values</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>,
                                                    item<span style="color: black;">&#91;</span><span style="color: #483d8b;">'next'</span><span style="color: black;">&#93;</span>.<span style="color: black;">keys</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
                         <span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'text'</span><span style="color: black;">&#93;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> next<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> <span style="color: #008000;">hasattr</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, <span style="color: #483d8b;">'current_ngram'</span><span style="color: black;">&#41;</span>:
            <span style="color: #008000;">self</span>.<span style="color: black;">rewind</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
        <span style="color: #008000;">self</span>.<span style="color: black;">current_ngram</span> = <span style="color: #008000;">self</span>.__next<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">current_ngram</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">self</span>.<span style="color: black;">current_ngram</span></pre></div></div>

<p>Pretty cool right?</p>
<h2>When to speak?</h2>
<p>Okay, that takes care of generating the text. But when should <em>_botko_</em> speak anyway?</p>
<div class="wp-caption alignright" style="width: 250px"><a href="http://www.flickr.com/photos/49503157467@N01/2866792711" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="How Should You Act on IRC (Internet Relay Chat..." src="http://farm4.static.flickr.com/3246/2866792711_027e60dd7e_m.jpg" alt="How Should You Act on IRC (Internet Relay Chat..." width="240" height="180" /></a><p class="wp-caption-text">How Should You Act on IRC (Internet Relay Chatroom)? (Photo credit: Chris Pirillo)</p></div>
<p>You certainly don&#8217;t want the bot to spam everyone. But you don&#8217;t want him to be completely quiet most of the time. Speaking every X amount of events is simply too predictable and boring &#8230;</p>
<p>Ideally you&#8217;d want him to speak more when the chatroom is busier and less when it&#8217;s a bit quiet. When it&#8217;s been quiet for a long time and it suddenly becomes very busy, that&#8217;s also a good time to speak.</p>
<p>Sort of like a greeting.</p>
<p>I ended up using a combination of chat velocity and the rate of chat acceleration change to determine the probability of speaking, which is then still left up to <a class="zem_slink" title="Randomness" href="http://en.wikipedia.org/wiki/Randomness" rel="wikipedia" target="_blank">randomness</a>.</p>
<p>Velocity is measured as the ratio between the timespan of the last 10 messages and the timespan of the last 60. This basically measures how densely the messages are coming into the chatroom right now.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">velocity_rate = <span style="color: black;">&#40;</span>now - <span style="color: #ff4500;">10</span>_messages_ago_time<span style="color: black;">&#41;</span>/<span style="color: black;">&#40;</span>now - <span style="color: #ff4500;">60</span>_messages_ago_time<span style="color: black;">&#41;</span></pre></div></div>

<p>The rate of acceleration change idea took some time to materialize in my head. The idea is that you want to make it likelier for the bot to speak when there is a sudden flurry of activity and fall back to the <em>velocity_rate</em> formula when conditions are mostly stable.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">v_i = average_speed_of_last_<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span>+i : i<span style="color: #66cc66;">*</span><span style="color: #ff4500;">5</span><span style="color: black;">&#93;</span>_messages
a_i = delta_of_two_speeds
accel_rate = a_1/a_2</pre></div></div>

<p>It looks simple in pseudocode, but I promise it took a fair amount of head banging to come up with that!</p>
<p>This part of the <a href="https://github.com/Swizec/botko/blob/speaking/src/chitchat.py" target="_blank">code is also on github</a>.</p>
<h2>Lovely!</h2>
<p>That&#8217;s pretty much it. Our IRC room now has a bot that entertains everyone with its nonsense and I couldn&#8217;t make myself go to bed until almost five in the morning.</p>
<p>All that&#8217;s left to do now is tweaking the parameters a bit, perhaps iron out a bug or two.</p>
<p>I&#8217;m almost tempted to connect this guy to #startups &#8230;</p>
<blockquote><p>[18:27:27] wisdom ACTION uses this quote in blogpost because it&#8217;s starting<br />
[18:27:43] I almost have to use that &#8230;<br />
[18:27:44] kul, to da si se spet zacel ful pogovarjat, prej</p></blockquote>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://bostinno.com/2012/03/06/boston-dynamics-cheetah-breaks-land-speed-record-for-legged-bots-might-have-insatiable-blood-thirst-video/" target="_blank">Boston Dynamics&#8217; Cheetah Breaks Land Speed Record for Legged Bots, Might Have Insatiable Blood Thirst [Video]</a> (bostinno.com)</li>
<li class="zemanta-article-ul-li"><a href="http://go.theregister.com/feed/www.theregister.co.uk/2012/04/25/turing_test_prize_bletchley_park/" target="_blank">Wannabe-human bots face 2012 Turing Test in Turing&#8217;s old office</a> (go.theregister.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.gamespot.com/dawnspire-prelude/reviews/dawnspire-prelude-review-6168979/" target="_blank">Dawnspire: Prelude</a> (gamespot.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.i-programmer.info/bookreviews/65-mathematics/3696-hidden-markov-models-for-time-series.html" target="_blank">Hidden Markov Models for Time Series</a> (i-programmer.info)</li>
<li class="zemanta-article-ul-li"><a href="http://gumption.typepad.com/blog/2011/06/socialbots-2-artificial-intelligence-social-intelligence-and-twitter.html" target="_blank">Socialbots 2: Artificial Intelligence, Social Intelligence and Twitter</a> (gumption.typepad.com)</li>
<li class="zemanta-article-ul-li"><a href="http://news.cnet.com/8301-27080_3-10452342-245.html?part=rss&amp;subj=news&amp;tag=2547-1_3-0-20" target="_blank">Beware strangers on IM who won&#8217;t answer your questions</a> (news.cnet.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.readwriteweb.com/archives/when_bots_go_mad.php" target="_blank">When Bots Go Mad</a> (readwriteweb.com)</li>
<li class="zemanta-article-ul-li"><a href="http://afetteredmind.com/2012/04/25/ray-kurzweil-and-the-singularity/" target="_blank">Ray Kurzweil&#8230;and the singularity</a> (afetteredmind.com)</li>
<li class="zemanta-article-ul-li"><a href="http://hackaday.com/2012/04/25/a-camera-that-describes-a-picture-for-you/" target="_blank">A camera that describes a picture for you</a> (hackaday.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=dcc40786-643b-40dc-8f49-6c869a6c7a72" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598188&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/making-our-irc-bot-talk/swizec/4243?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/making-our-irc-bot-talk/swizec/4243/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>There is no do or do not, only try</title>
		<link>http://swizec.com/blog/there-is-no-do-or-do-not-only-try/swizec/4239</link>
		<comments>http://swizec.com/blog/there-is-no-do-or-do-not-only-try/swizec/4239#comments</comments>
		<pubDate>Tue, 24 Apr 2012 10:04:37 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4239</guid>
		<description><![CDATA[No. Try not. Do&#8230; or do not. There is no try. ~ Some Green Dude That&#8217;s solid advice right there. You shouldn&#8217;t try to do this. Just do it. Or don&#8217;t, if you decide it you don&#8217;t want to for whatever reason. Another movie had a similar philosophy: &#8220;You either karate or you do not karate. [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>No. Try not. Do&#8230; or do not. There is no try.</p>
<div class="wp-caption alignright" style="width: 343px"><img class=" " title="A green guy" src="http://images.wikia.com/starwars/images/e/e0/Yoda_SWSB.jpg" alt="A green guy" width="333" height="383" /><p class="wp-caption-text">A green guy</p></div>
<p>~ Some Green Dude</p></blockquote>
<p>That&#8217;s solid advice right there. You shouldn&#8217;t <em>try</em> to do this. Just do it. Or don&#8217;t, if you decide it you don&#8217;t want to for whatever reason.</p>
<p>Another movie had a similar philosophy: <em>&#8220;You either <a class="zem_slink" title="Karate" href="http://en.wikipedia.org/wiki/Karate" rel="wikipedia" target="_blank">karate</a> or you do not karate. Karate so so. You beat up.&#8221;</em></p>
<p>Here&#8217;s the thing though, that advice is absolute <strong>bollocks.</strong> We live in a probabilistic universe &#8211; even if you <em>do</em> do instead of try,  you are at the mercy of <a class="zem_slink" title="Probability" href="http://en.wikipedia.org/wiki/Probability" rel="wikipedia" target="_blank">probability</a>.</p>
<p>Our actions are <a class="zem_slink" title="Stochastic" href="http://en.wikipedia.org/wiki/Stochastic" rel="wikipedia" target="_blank">stochastic</a>, so are the actions of others. Even the basic physical forces acting on things are &#8230; stochastic. Ever studied the development of robots? Most of it goes into dealing with probabilistic actions in a probabilistic universe.</p>
<p>Most of the time when we &#8220;do instead of try&#8221; we aren&#8217;t even dealing with just ourselves, there are many moving pieces. People even. With their own stochastic thoughts and decisions.</p>
<p>Whenever you decide to <strong>do</strong> what you&#8217;re really doing is something more like: <em>&#8220;Okay, I will do everything within reason to achieve this. If more information reveals it isn&#8217;t worth the effort, I won&#8217;t. If something more important comes up, I won&#8217;t.&#8221;</em></p>
<p>Sure, commit yourself fully, but remember you&#8217;re only <em>trying and hoping for the best</em>.</p>
<p><iframe src="http://www.youtube.com/embed/PHDT30oWs20" frameborder="0" width="420" height="315"></iframe></p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://wmbriggs.com/blog/?p=5117" target="_blank">All Of Statistics: Part I</a> (wmbriggs.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.technologyreview.com/blog/arxiv/27598/" target="_blank">Stochastic Pattern Recognition Dramatically Outperforms Conventional Techniques</a> (technologyreview.com)</li>
<li class="zemanta-article-ul-li"><a href="http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/Reverend-Bayes-meet-Countess-Lovelace-Probabilistic-Programming-for-Machine-Learning" target="_blank">Reverend Bayes, meet Countess Lovelace: Probabilistic Programming for Machine Learning</a> (channel9.msdn.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.machinedlearnings.com/2012/02/active-learning-and-contextual-bandits.html" target="_blank">Active Learning and Contextual Bandits</a> (machinedlearnings.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=fe347ba2-460e-43ca-9458-543f6f144f40" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598188&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/there-is-no-do-or-do-not-only-try/swizec/4239?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/there-is-no-do-or-do-not-only-try/swizec/4239/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My impressions of Diablo 3</title>
		<link>http://swizec.com/blog/my-impressions-of-diablo-3/swizec/4228</link>
		<comments>http://swizec.com/blog/my-impressions-of-diablo-3/swizec/4228#comments</comments>
		<pubDate>Sun, 22 Apr 2012 10:57:02 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Blizzard Entertainment]]></category>
		<category><![CDATA[Diablo]]></category>
		<category><![CDATA[Diablo 3]]></category>
		<category><![CDATA[Diablo III]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Video Games]]></category>
		<category><![CDATA[World of Goo]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4228</guid>
		<description><![CDATA[Diablo 3 open beta weekend is happening right now! Since Friday evening everyone has been invited to help Blizzard stress test their servers and let nostalgia rip through their brain with massively sexy graphics and cool sound effects. Especially the sound effects! It almost feels like they used the exact same sound files from Diablo 2 and Diablo [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_4231" class="wp-caption alignnone" style="width: 701px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/Screen-Shot-2012-04-22-at-12.59.00-AM.png?1d5d3d"><img class=" wp-image-4231  " title="Shiny Diablo 3 is shiny" src="http://swizec.com/blog/wp-content/uploads/2012/04/Screen-Shot-2012-04-22-at-12.59.00-AM.png?1d5d3d" alt="Shiny Diablo 3 is shiny" width="691" height="432" /></a><p class="wp-caption-text">Shiny Diablo 3 is shiny</p></div>
<p><a class="zem_slink" title="Diablo III" href="http://www.gamespot.com/diablo-iii/" rel="gamespot" target="_blank">Diablo 3</a> <a class="zem_slink" title="Software release life cycle" href="http://en.wikipedia.org/wiki/Software_release_life_cycle" rel="wikipedia" target="_blank">open beta</a> weekend is happening <em>right now!</em> Since Friday evening everyone has been invited to help <a class="zem_slink" title="Blizzard Entertainment" href="http://www.blizzard.com/" rel="homepage" target="_blank">Blizzard</a> stress test their servers and let nostalgia rip through their brain with massively sexy graphics and cool sound effects.</p>
<p>Especially the sound effects! It almost feels like they used the exact same sound files from Diablo 2 and <a class="zem_slink" title="Diablo (video game)" href="http://us.blizzard.com/en-us/games/legacy/" rel="homepage" target="_blank">Diablo 1</a> for opening a book, thrashing a barrel etc.</p>
<p>It. Is. <em>Magnificent.</em></p>
<p>Maybe I&#8217;m biased since I&#8217;ve been waiting for Diablo 3 to come out for the last &#8230; oh I don&#8217;t know, about ten years?</p>
<p>I was a huge fan of Diablo 1 back in primary school, finished that game about three or four times. Getting a ripped <a class="zem_slink" title="Compact Disc" href="http://en.wikipedia.org/wiki/Compact_Disc" rel="wikipedia" target="_blank">CD</a> with that game has probably been one of the best birthday gifts a friend&#8217;s ever given me. Yes, we used to do that. Hand drawn covers and everything.</p>
<p>Diablo 2, I never managed to finish. The original was floating around my social circles this time. Not sure where it ended up, might have been me &#8230; last played the game on Wine a couple years ago. In all its glorious 800&#215;600 screen size in the midst of my 2560&#215;1080 screen real-estate.</p>
<p>I didn&#8217;t finish because of a bug with the random map generator  &#8230; didn&#8217;t create a way to get to the next level. Ooops.</p>
<h2>Oh glorious Diablo 3</h2>
<p>Luckily Diablo 3 works on a Mac and I have one of those Mac laptop thingies. I&#8217;ve heard people have huge problems trying to run the beta on Wine. This is one of those times I&#8217;m super happy I don&#8217;t religiously go for open source stuff. <img src="http://swizec.com/blog/wp-includes/images/smilies/icon_razz.gif?1d5d3d" alt=':P' class='wp-smiley' /> </p>
<p><img class="alignright" title="Vomiting rainbows" src="http://i0.kym-cdn.com/photos/images/newsfeed/000/085/444/1282786204310.jpg?1318992465" alt="Vomiting rainbows" width="334" height="255" /></p>
<p>Unfortunately my poor laptop is a bit old and while the game runs mostly fine, the physics are a bit &#8230; slow. Despite what I used to think in primary school, no this does not give you more time to think about your actions.</p>
<p>In a word, Diablo 3 is <em><strong>FUN!</strong></em> And when I say fun, I mean vomiting rainbows and farting daisies fun.</p>
<p>My favorite new feature is definitely that you can <em>use the dungeon itself</em> to kill monsters. Pull a lever and a chandelier falls down on a group. Marvelous!</p>
<p>The experience is in fact so awesome I will probably buy this game. Then crawl into a hole for a week and shut everything down. No Twitter. No facebook. No school. Nothing. Just Diablo 3.</p>
<p>Hell, I&#8217;ve never even bought a game before if it wasn&#8217;t by an indie developer. And even that I only ever bought <a class="zem_slink" title="World of Goo" href="http://www.worldofgoo.com" rel="homepage" target="_blank">World of Goo</a> and <a class="zem_slink" title="Machinarium" href="http://en.wikipedia.org/wiki/Machinarium" rel="wikipedia" target="_blank">Machinarium</a>.</p>
<h2>Not all is perfect <img src="http://swizec.com/blog/wp-includes/images/smilies/icon_sad.gif?1d5d3d" alt=':(' class='wp-smiley' /> </h2>
<p>There are two things I don&#8217;t like about Diablo 3 though.</p>
<p>It&#8217;s too easy.</p>
<p>Might be nostalgia talking, but I remember the game used to be pretty challenging. Even at the very beginning. You had to stock up on health potions and make sure your inventory was empty before setting out from town.</p>
<div class="wp-caption alignright" style="width: 346px"><img class="  " title="The Diablo 2 skill tree" src="http://3.bp.blogspot.com/_ICutuhWaLzY/TIhLtDhokmI/AAAAAAAAADM/of5D3oM9yrk/s1600/diablo2skilltree.jpg" alt="The Diablo 2 skill tree" width="336" height="252" /><p class="wp-caption-text">The Diablo 2 skill tree</p></div>
<p>Nowadays monsters drop some sort of magical healing crystals. I mean, I managed to clean out a whole dungeon on three or four health potions &#8230; as a weakling necromancer. Oh sorry, a necromancer is a Witchdoctor now.</p>
<p>The skill system is kind of lame, too.</p>
<p>Sure, this is very related to the being too easy part, they wanted to make it <em>super</em> simple. Having played a lot of <a class="zem_slink" title="Role-playing game" href="http://en.wikipedia.org/wiki/Role-playing_game" rel="wikipedia" target="_blank">RPG&#8217;s</a> in the past, it just seems confusing to me. It&#8217;s too easy to understand.</p>
<p>Instead of a huge <a class="zem_slink" title="Technology tree" href="http://en.wikipedia.org/wiki/Technology_tree" rel="wikipedia" target="_blank">skill tree</a> where plenty of choices need to be made, there&#8217;s just five or six tracks of linearly progressing skills. No choice, no exciting tactification, nothing. Just <em>&#8220;Yeah, sure, upgrade my skill&#8221;</em>. The only choice you really have is whether you&#8217;re going to set the next skill level as the one you actually use or not.</p>
<p>That&#8217;s it.</p>
<p>As a <span style="text-decoration: line-through;">necromancer</span>witchdoctor once you take on a secondary skill you even lose the ability to do melee attacks, which is silly. Even ganked from all sides I have to resort to casting range spells &#8230; everyone is an inch away and even as a weakling I could kill them with a dagger blow.</p>
<p>Maybe I&#8217;m missing something.</p>
<p>But! The game is super fun. The hours fly by and in a stroke of pure brilliance Blizzard was nice enough to include a clock in the game interface to make sure I, you know, remember to feed myself and stuff.</p>
<p>Oh and the characters are reset before official launch. I also suck at taking screenshots so no interesting battle scenes in the following pics.</p>
<div id="attachment_4233" class="wp-caption alignnone" style="width: 701px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/Screen-Shot-2012-04-21-at-11.24.12-PM.png?1d5d3d"><img class=" wp-image-4233  " title="Even the login screen looks good" src="http://swizec.com/blog/wp-content/uploads/2012/04/Screen-Shot-2012-04-21-at-11.24.12-PM.png?1d5d3d" alt="Even the login screen looks good" width="691" height="432" /></a><p class="wp-caption-text">Even the login screen looks good</p></div>
<div id="attachment_4234" class="wp-caption alignnone" style="width: 701px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/Screen-Shot-2012-04-22-at-12.31.41-AM.png?1d5d3d"><img class=" wp-image-4234  " title="Gets messy" src="http://swizec.com/blog/wp-content/uploads/2012/04/Screen-Shot-2012-04-22-at-12.31.41-AM.png?1d5d3d" alt="Gets messy" width="691" height="432" /></a><p class="wp-caption-text">Gets messy</p></div>
<div id="attachment_4235" class="wp-caption alignnone" style="width: 701px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/Screen-Shot-2012-04-22-at-1.13.55-AM.png?1d5d3d"><img class=" wp-image-4235  " title="You even get to see into the next levels" src="http://swizec.com/blog/wp-content/uploads/2012/04/Screen-Shot-2012-04-22-at-1.13.55-AM.png?1d5d3d" alt="You even get to see into the next levels" width="691" height="432" /></a><p class="wp-caption-text">You even get to see into the next levels</p></div>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.csmonitor.com/Innovation/Horizons/2012/0420/Diablo-3-beta-throws-open-doors-this-weekend-only" target="_blank">Diablo 3 beta throws open doors, this weekend only</a> (csmonitor.com)</li>
<li class="zemanta-article-ul-li"><a href="http://noobtard.wordpress.com/2012/04/21/diablo-3-open-beta-weekend/" target="_blank">Diablo 3 Open Beta Weekend</a> (noobtard.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://rantsandrage.com/2012/04/21/diablo-3-took-long-enough/" target="_blank">Diablo 3: Took Long Enough!</a> (rantsandrage.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.rockpapershotgun.com/2012/04/18/diablo-3-beta-appears-to-be-public/" target="_blank">Diablo 3 Beta Appears To Be Opening Up?</a> (rockpapershotgun.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=f870fedc-f979-41d1-9f4f-75b922453237" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598188&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/my-impressions-of-diablo-3/swizec/4228?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/my-impressions-of-diablo-3/swizec/4228/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Does a new age of kings approach?</title>
		<link>http://swizec.com/blog/does-a-new-age-of-kings-approach/swizec/4219</link>
		<comments>http://swizec.com/blog/does-a-new-age-of-kings-approach/swizec/4219#comments</comments>
		<pubDate>Thu, 19 Apr 2012 11:13:47 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Eric Schmidt]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[James Cameron]]></category>
		<category><![CDATA[Larry Page]]></category>
		<category><![CDATA[Ross Perot]]></category>
		<category><![CDATA[Space exploration]]></category>
		<category><![CDATA[Woods Hole Oceanographic Institution]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4219</guid>
		<description><![CDATA[We are on the brink of a huge cultural shift. As governments worldwide flop around trying to Fix The Economy &#8482; and make sure we all don&#8217;t starve to death &#8230; &#8230; there are individuals spending trillions of dollars pushing the envelope of humankind&#8217;s achievement. The whole of humankind. Not just padding their pockets. Things that a [...]]]></description>
			<content:encoded><![CDATA[<p>We are on the brink of a huge cultural shift. As governments worldwide flop around trying to Fix The Economy &#8482; and make sure we all don&#8217;t starve to death &#8230;</p>
<p>&#8230; there are individuals spending trillions of dollars pushing the envelope of <strong>humankind&#8217;s</strong> achievement. The <em>whole</em> of humankind. Not just padding their pockets.</p>
<p>Things that a few decades ago were barely within reach of the richest nation states.</p>
<h2><a href="http://www.theverge.com/2012/4/18/2957585/planetary-resources-space-exploration-company-james-cameron-google" target="_blank">company backed by James Cameron and Google executives may be an asteroid mining project</a></h2>
<div class="wp-caption alignleft" style="width: 368px"><img class="  " title="Asteroid" src="http://static.bbc.co.uk/solarsystem/img/ic/640/other_solar_system_bodies/asteroid/asteroid_large.jpg" alt="Asteroid" width="358" height="222" /><p class="wp-caption-text">Asteroid</p></div>
<p>MIT&#8217;s Technology Review has just gotten news of a mysterious new project that claims it will &#8220;create a new industry and a new definition of &#8216;natural resources.&#8217;&#8221; <a class="zem_slink" title="Space exploration" href="http://en.wikipedia.org/wiki/Space_exploration" rel="wikipedia" target="_blank">Space exploration</a> company Planetary Resources will be unveiled in a conference call on Tuesday, April 24th. Besides the audacious announcement, which promises to &#8220;overlay two critical sectors — space exploration and natural resources — to add trillions of dollars to the <a class="zem_slink" title="Gross world product" href="http://en.wikipedia.org/wiki/Gross_world_product" rel="wikipedia" target="_blank">global GDP</a>,&#8221; what makes this unique is its high-profile support group. The venture is backed by Google executives <a class="zem_slink" title="Larry Page" href="http://www.forbes.com/profile/larry-page" rel="forbes" target="_blank">Larry Page</a> and Eric Schmidt, director James Cameron, and politician <a class="zem_slink" title="Ross Perot" href="http://perotcharts.com" rel="homepage" target="_blank">Ross Perot</a>&#8216;s son, among others.</p>
<h2>James cameron tweets from Mariana Trench</h2>
<blockquote class="twitter-tweet"><p>Just arrived at the ocean's deepest pt. Hitting bottom never felt so good. Can't wait to share what I'm seeing w/ you @<a href="https://twitter.com/DeepChallenge">DeepChallenge</a></p>&mdash; James Cameron (@JimCameron) <a href="https://twitter.com/JimCameron/status/184036733959143425" data-datetime="2012-03-25T21:59:11+00:00">March 25, 2012</a></blockquote>
<script src="//platform.twitter.com/widgets.js?1d5d3d" charset="utf-8"></script>
<p>There have been only four successful dives:</p>
<ol>
<li>by the <a class="zem_slink" title="United States Navy" href="http://en.wikipedia.org/wiki/United_States_Navy" rel="wikipedia" target="_blank">United States Navy</a> (in 1960)</li>
<li>[unmanned] by Japan Agency for Marine-Earth Science and Technology (in 1996)</li>
<li>[unmanned] by <a class="zem_slink" title="Woods Hole Oceanographic Institution" href="http://maps.google.com/maps?ll=41.5245166667,-70.6709722222&amp;spn=0.01,0.01&amp;q=41.5245166667,-70.6709722222 (Woods%20Hole%20Oceanographic%20Institution)&amp;t=h" rel="geolocation" target="_blank">Woods Hole Oceanographic Institution</a> (in 2009)</li>
<li>by James Cameron (in 2012)</li>
</ol>
<h2><a href="http://www.theatlantic.com/technology/archive/2012/03/amazons-jeff-bezos-discovers-historic-apollo-11-rocket-engines-at-the-bottom-of-the-sea/255190/" target="_blank">Jeff Bezos finds Apollo 11 rockets</a></h2>
<blockquote>
<div class="wp-caption alignleft" style="width: 275px"><img class="    " title="Saturn V" src="http://cdn.theatlantic.com/static/mt/assets/science/apollo11615.jpg" alt="Saturn V" width="265" height="332" /><p class="wp-caption-text">Saturn V</p></div>
<p>I&#8217;m excited to report that, using state-of-the-art deep sea sonar, the team has found the Apollo 11 engines lying 14,000 feet below the surface, and we&#8217;re making plans to attempt to raise one or more of them from the ocean floor. We don&#8217;t know yet what condition these engines might be in &#8211; they hit the ocean at high velocity and have been in salt water for more than 40 years. On the other hand, they&#8217;re made of tough stuff, so we&#8217;ll see.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p></blockquote>
<h2><a class="zem_slink" title="Elon Musk" href="http://en.wikipedia.org/wiki/Elon_Musk" rel="wikipedia" target="_blank">Elon Musk</a>&#8216;s Dragon gets green-light for launch to Space Station</h2>
<div class="wp-caption alignright" style="width: 358px"><img title="Dragon Draco" src="http://regmedia.co.uk/2011/04/21/spacex_dragon_draco.jpg" alt="Dragon Draco" width="348" height="261" /><p class="wp-caption-text">Dragon Draco</p></div>
<p>This is going to be the first private spaceship to dock with the International Space Station. And if that&#8217;s not enough, they are also the first private entity to be <a href="http://news.discovery.com/space/spacex-elon-musk-mars-astronauts-20-years-110423.html" target="_blank">planning a manned Mars mission</a>.</p>
<p>Even better &#8230; the only entities to have ever put an object in orbit are (in order of first success):</p>
<ol>
<li>Soviet Union</li>
<li>United States</li>
<li>France</li>
<li>Japan</li>
<li>China</li>
<li>United Kingdom</li>
<li><a class="zem_slink" title="European Space Agency" href="http://maps.google.com/maps?ll=48.8482,2.3042&amp;spn=1.0,1.0&amp;q=48.8482,2.3042 (European%20Space%20Agency)&amp;t=h" rel="geolocation" target="_blank">European Space Agency</a></li>
<li>India</li>
<li>Israel</li>
<li>Ukraine</li>
<li>Russia</li>
<li>Iran</li>
<li>Elon Musk (<a class="zem_slink" title="SpaceX" href="http://www.spacex.com/" rel="homepage" target="_blank">spaceX</a>)</li>
</ol>
<p>Keep in mind, orbital capabilities put you 98% towards earth-to-earth ballistic missiles. All you need is a warhead.</p>
<h2>Scary or awesome?</h2>
<p>I honestly can&#8217;t decide whether this is more scary than awesome, or the other way around. On the one hand all of this is positively exciting &#8211; every young boy has read books about space and dreamed of being an astronaut. Even the deep sea always holds a special kind of allure.</p>
<p>At the same time &#8230; listening to the news makes it seem like thusands of people are losing jobs every day. Unemployment is rising. Civil unrest is on the verge of causing a pretty big bang and everyone everywhere is unhappy with their governments, the state of the economy. Everything.</p>
<p>And yet, we have individuals with trillions of dollars to spend on bringing mankind closer to the sci-fi dream of the 1960&#8242;s. Even the desire to do so!</p>
<p>Food for thought.</p>
<p><img class=" alignnone" title="A future mars colony" src="http://2.bp.blogspot.com/-acoaJHV4OOE/Te4rN5eq3wI/AAAAAAAAAn4/P68uKDHJW7I/s1600/HM_Landscape_01.jpg" alt="A future mars colony" width="672" height="475" /></p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://m.deadline.com/2012/04/is-james-cameron-investing-in-asteroid-mining-project/" target="_blank">Is James Cameron Investing In Asteroid Mining Project?</a> (m.deadline.com)</li>
<li class="zemanta-article-ul-li"><a href="http://gizmodo.com/5903306/what-will-director-james-cameron-do-in-outer-space" target="_blank">What Will Director James Cameron Do In Outer Space? [Space]</a> (gizmodo.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.digitaltrends.com/cool-tech/google-execs-back-mysterious-space-exploration-startup/" target="_blank">Google execs back mysterious space exploration startup</a> (digitaltrends.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=74891d97-bad9-4a28-b8f2-f73296b4cb64" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598188&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/does-a-new-age-of-kings-approach/swizec/4219?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/does-a-new-age-of-kings-approach/swizec/4219/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comparing automatic poetry generators</title>
		<link>http://swizec.com/blog/comparing-automatic-poetry-generators/swizec/4207</link>
		<comments>http://swizec.com/blog/comparing-automatic-poetry-generators/swizec/4207#comments</comments>
		<pubDate>Wed, 18 Apr 2012 14:18:44 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Le Thesis]]></category>
		<category><![CDATA[Science Wednesday]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[Literature]]></category>
		<category><![CDATA[Manurung]]></category>
		<category><![CDATA[Online Writing]]></category>
		<category><![CDATA[Poetry]]></category>
		<category><![CDATA[Racter]]></category>
		<category><![CDATA[Ray Kurzweil]]></category>
		<category><![CDATA[Surrealist techniques]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4207</guid>
		<description><![CDATA[When you write, there&#8217;s usually something you want to say. Answer the good old 5W+H at least. Poetry is pretty exploratory though. When you start, you have barely a vague sense on what you&#8217;re trying to achieve. You&#8217;re conveying emotion rather than meaning. Form matters a lot as well. A lot of creative writing looks like that. [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:Walt_Whitman_edit_2.jpg" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="Walt Whitman's use of free verse became apprec..." src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a1/Walt_Whitman_edit_2.jpg/300px-Walt_Whitman_edit_2.jpg" alt="Walt Whitman's use of free verse became apprec..." width="300" height="371" /></a><p class="wp-caption-text">Walt Whitman&#39;s use of free verse became appreciated by composers seeking a more fluid approach to setting text. (Photo credit: Wikipedia)</p></div>
<p>When you write, there&#8217;s usually something you want to <em>say</em>. Answer the good old <em>5W+H</em> at least.</p>
<p>Poetry is pretty exploratory though. When you start, you have barely a vague sense on what you&#8217;re trying to achieve. You&#8217;re conveying emotion rather than meaning. Form matters a lot as well.</p>
<p>A lot of creative writing looks like that.</p>
<p>For humans, this is very fun, for computers it&#8217;s a huge problem though. Just the definition of an algorithm says it needs to reach The Goal in a finite amount of steps. Whoops, now what?</p>
<p>The many attempts at making a computer write <a class="zem_slink" title="Poetry" href="http://en.wikipedia.org/wiki/Poetry" rel="wikipedia" target="_blank">poetry</a> can be put in four categories: word salad, template and grammar-based, form-aware <a class="zem_slink" title="Electric generator" href="http://en.wikipedia.org/wiki/Electric_generator" rel="wikipedia" target="_blank">generators</a>, poetry generation systems.</p>
<h2>1. <a class="zem_slink" title="Word salad" href="http://en.wikipedia.org/wiki/Word_salad" rel="wikipedia" target="_blank">Word Salad</a> generators</h2>
<blockquote style="text-align: center;"><p>judy gotta want upon someone.<br />
wanna sadly will go about.</p>
<p>sammy gotta want the thief him but the<br />
every reason. real distance carry.</p></blockquote>
<p>Most early attempts just strung together random words. Perhaps using a markov chain of some sort, but mostly the result doesn&#8217;t make sense and looks like an alien tried to write a poem in a random human language.</p>
<p>This is not poetry.</p>
<h2>2. Template and grammar -based generators</h2>
<blockquote style="text-align: center;"><p>All green in the leaves<br />
I smell dark pools in the trees<br />
Crash the moon has fled</p></blockquote>
<p>A slightly better approach uses templates, that are then filled with random words. For example the above poem comes from Masterman&#8217;s computerized haikus, where the computer filled in a template:</p>
<pre>All [1] in the [2]
I [3] [4] [5] in the [6]
[7] the [8] has [9]</pre>
<p>A similar approach is to use a grammar:</p>
<pre>IN THE MORNING + noun phrase with a noun as head + WILL + APPEAR / BE</pre>
<pre>/ BECOME / SEEM / TURN + adjective phrase</pre>
<div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:Isharsinghbhaiyastanding.jpg" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="Ishar Singh 'Ishar' Bhaiya reciting a poem" src="http://upload.wikimedia.org/wikipedia/commons/thumb/9/9f/Isharsinghbhaiyastanding.jpg/300px-Isharsinghbhaiyastanding.jpg" alt="Ishar Singh 'Ishar' Bhaiya reciting a poem" width="300" height="312" /></a><p class="wp-caption-text">Ishar Singh &#39;Ishar&#39; Bhaiya reciting a poem (Photo credit: Wikipedia)</p></div>
<p>These generators do create text that looks like decent poetry, but with a suspicious amount of human intervention. Would you call a poet just filling in blanks, well, a poet? Probably not. But the texts do fulfill the <em>grammaticality </em>requirement, so it would seem we&#8217;re on to something.</p>
<p>Fun fact: the only two computer systems to have published poetry (<a class="zem_slink" title="Racter" href="http://en.wikipedia.org/wiki/Racter" rel="wikipedia" target="_blank">RACTER</a> and PROSE) were of this type.</p>
<h2>3. Form-aware generators</h2>
<blockquote style="text-align: center;"><p>Scattered sandals<br />
a call back to myself,<br />
so hollow I would echo.</p>
<p>Crazy moon child<br />
Hide from your coffin<br />
To spite your doom.</p>
<p>You broke my soul<br />
the juice of eternity,<br />
the spirit of my lips.</p></blockquote>
<p>This type of system is designed specifically with grammaticality and poeticness in mind. Two thirds of the way to proper poetry!</p>
<p>In <em><a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.9.5371" target="_blank">An Evolutionary Approach to Poetry Generation</a></em> Manurung lists four prominent examples of this kind of system:</p>
<ol>
<li><em><strong>Gervas’ WASP system</strong>, </em>which creates different types of classical <a class="zem_slink" title="Spanish poetry" href="http://en.wikipedia.org/wiki/Spanish_poetry" rel="wikipedia" target="_blank">Spanish poetry</a>. Mainly aiming to fulfill the parameters of metre and rhyme. It uses verse patterns that are similar to previously mentioned templates, but are different in that they are more sophisticated since the algorithm gets to pick <em>every</em> word instead of just a few</li>
<li><strong><a class="zem_slink" title="Ray Kurzweil" href="http://en.wikipedia.org/wiki/Ray_Kurzweil" rel="wikipedia" target="_blank">Ray Kurzweil</a>’s Cybernetic Poet, or RKCP</strong>, this one is proprietary and so not much is known about how it works, (it produced the above poem, btw). The interesting aspect of RKCP is that it uses an existing poet&#8217;s corpus as a basis for its own creations, which is something I&#8217;m striving for in my own thesis.
<p><div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:Ray_Kurzweil.jpg" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="Ray Kurzweil at UP Experience 2008." src="http://upload.wikimedia.org/wikipedia/commons/thumb/4/4b/Ray_Kurzweil.jpg/300px-Ray_Kurzweil.jpg" alt="Ray Kurzweil at UP Experience 2008." width="300" height="200" /></a><p class="wp-caption-text">Ray Kurzweil at UP Experience 2008. (Photo credit: Wikipedia)</p></div></li>
<li>There is also <strong>ALAMO group&#8217;s Rimbaudelaires</strong>, which is apparently a template-filling system that creates its own templates by cutting out nouns/phrases/etc. from sentences and then filling them back in with random words, that follow strict rules for poeticness.</li>
<li>Perhaps the coolest is <strong>POEVOLVE. </strong>It uses the <em>reflection-engagement</em> cycle to create an evolutionary approach where many different versions of the same poem are kept in a sort of tree and then pruned based on how promising they seem. Eventually the system would create proper poetry, however the only part implement so far is a poeticness generation system, so we cannot know for certain the proposed full implementation would even work. But it does look very familiar to how Manurung approaches the problem in the thesis.</li>
</ol>
<div>This is still not poetry.</div>
<h2>4. Poetry generation systems</h2>
<blockquote><p>no solo en plata o viola truncada<br />
se vuelva mas tu y ello juntamente<br />
en tierra en humo en polvo en sombra en nada</p></blockquote>
<p>Finally we reach a class of systems that actively try to create text that is meaningful, poetic <em>and</em> grammatical. Poetry, according to our definition.</p>
<p>Good examples of these sort of systems are ASPERA and COLIBRI, which use <a class="zem_slink" title="Case-based reasoning" href="http://en.wikipedia.org/wiki/Case-based_reasoning" rel="wikipedia" target="_blank">case-based reasoning</a> to produce good looking Spanish poetry.</p>
<blockquote><p>A case-based reasoner attempts to solve a new problem by consulting an explicit database of existing problems and their solutions (Luger and Stubblefield, 1998). This process is described by Aamodt and Plaza (1994) as a cycle of four processes, namely retrieve, reuse, re- vise, and retain.</p></blockquote>
<p>Essentially the system takes some poem fragments as input, looks them up in a database to get some word patterns to create a sort of template. This is then filled in with random-ish words that fit some particular metre patterns etc.</p>
<p>Through a few revision steps the software eventually produces a verse and stores it back in the database, to be used later on.</p>
<h2>Fin</h2>
<div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:The_Poet_Tree_in_Cabbagetown_Toronto.jpg" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="The Poet Tree in Cabbagetown Toronto" src="http://upload.wikimedia.org/wikipedia/commons/thumb/3/34/The_Poet_Tree_in_Cabbagetown_Toronto.jpg/300px-The_Poet_Tree_in_Cabbagetown_Toronto.jpg" alt="The Poet Tree in Cabbagetown Toronto" width="300" height="225" /></a><p class="wp-caption-text">The Poet Tree in Cabbagetown Toronto (Photo credit: Wikipedia)</p></div>
<p>So there you go, the whole field of <a class="zem_slink" title="Surrealist techniques" href="http://en.wikipedia.org/wiki/Surrealist_techniques" rel="wikipedia" target="_blank">automatic poetry</a> generation laid out before your eyes. The minimal overlap between different systems clearly shows that this field is virtually nonexistent since not much consensus has been reached on how this should be done &#8230; since the early 1970&#8242;s.</p>
<p>Then again, the paper I&#8217;m reading is by now almost ten years old, so maybe there&#8217;s a bunch more science out there than I can even begin to comprehend. Just two months ago I had no idea anyone had ever thought about doing automagic poetry <em>&#8220;properly&#8221;</em>.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://straightfromtheleaf.wordpress.com/2012/04/17/poems-for-lifes-puzzle-tea-and-poetry/" target="_blank">Poems For Life&#8217;s Puzzle &#8211; Tea and Poetry</a> (straightfromtheleaf.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://swizec.com/blog/science-wednesday-defining-poetry/swizec/4079" target="_blank">Science Wednesday: Defining poetry</a> (swizec.com)</li>
<li class="zemanta-article-ul-li"><a href="http://dailypost.wordpress.com/2012/04/17/national-poetry-month/" target="_blank">National Poetry Month</a> (dailypost.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://ericmrwebb.wordpress.com/2012/04/17/the-pitfalls-of-outright-political-poetry/" target="_blank">The Pitfalls of Outright Political Poetry</a> (ericmrwebb.wordpress.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=f9aadda6-c008-4f3f-9034-525689014f9a" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598188&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/comparing-automatic-poetry-generators/swizec/4207?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/comparing-automatic-poetry-generators/swizec/4207/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The most fun you can have offline</title>
		<link>http://swizec.com/blog/the-most-fun-you-can-have-offline/swizec/4146</link>
		<comments>http://swizec.com/blog/the-most-fun-you-can-have-offline/swizec/4146#comments</comments>
		<pubDate>Tue, 17 Apr 2012 10:12:05 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[Travel&Events]]></category>
		<category><![CDATA[Longboard]]></category>
		<category><![CDATA[Skateboard]]></category>
		<category><![CDATA[Sport]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4146</guid>
		<description><![CDATA[I don&#8217;t even come close to the ridiculously photogenic guy, but just look at that smile! Look at it! That is true joy. I&#8217;m as happy as a corgi on stilts as the internet would say. The photo is from a longboarding class, organized by Longboard Magazin, I went to last Monday instead of nurturing an easter [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_4185" class="wp-caption alignnone" style="width: 682px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/383380_347698125278305_146707288710724_862402_1645891238_n.jpg?1d5d3d"><img class=" wp-image-4185 " title="Me on a longboard" src="http://swizec.com/blog/wp-content/uploads/2012/04/383380_347698125278305_146707288710724_862402_1645891238_n.jpg?1d5d3d" alt="Me on a longboard" width="672" height="447" /></a><p class="wp-caption-text">Me on a longboard</p></div>
<p>I don&#8217;t even come close to the ridiculously photogenic guy, but just <em>look</em> at that smile! Look at it! That is true joy. I&#8217;m as happy as a corgi on stilts as the internet would say.</p>
<p>The photo is from a <a class="zem_slink" title="Longboarding" href="http://en.wikipedia.org/wiki/Longboarding" rel="wikipedia" target="_blank">longboarding</a> class, organized by <a href="http://www.longboard.si/" target="_blank">Longboard Magazin</a>, I went to last Monday instead of nurturing an easter food hangover at home. I went again  this Sunday, simply because the first one made me smile like <em>that</em>.</p>
<p>My <a href="http://swizec.com/blog/seems-i-am-in-love-with-learning/swizec/2442">first experience on a longboard</a> was a lot sillier than that photo:</p>
<blockquote><p>Three days ago I was such a noob at this stuff it took me longer to get home from college than it would on foot. Now it’s as quick as rollerblading (on my old skates) and getting faster. A lot faster!</p>
<p>Thing is, I sort of jumped into the deep end with this. <a href="http://twitter.com/zidarsk8">@zidarsk8</a> just showed me how to stop, I still can’t brake, I can only stop. Sort of.</p></blockquote>
<p>And <a href="http://swizec.com/blog/today-i-nearly-died-four-times/swizec/3251">a longboard almost killed me</a> &#8230; four times &#8230; in a single day.</p>
<p>But I love it! Longboarding is the single funnest thing you can do offline. From what I hear the only thing that might possibly compare is surfing, but that comes with all sorts of costs and traveling and other silly things that I don&#8217;t really have time for.</p>
<p>A longboard is simple.</p>
<p>You step outside, you live in an asphalt jungle, and you ride like the wind. It&#8217;s even better when you go on a longboarding trip for the whole day with a bunch of other <a class="zem_slink" title="Newbie" href="http://en.wikipedia.org/wiki/Newbie" rel="wikipedia" target="_blank">noobs</a> and some guys who can show you how to use these things.</p>
<p>You&#8217;re kind of tired the next day and you might have a sore knee or two &#8230; worth it! <img src="http://swizec.com/blog/wp-includes/images/smilies/icon_biggrin.gif?1d5d3d" alt=':D' class='wp-smiley' /> </p>
<p>If you have a longboard at home, you should totally join us whenever the full day class is happening next. Well, I guess you&#8217;d also have to be from Slovenia, otherwise it might be a bit impractical.</p>
<p>The whole first class was caught on video, but I&#8217;m told it&#8217;s been lost to science, so here are some cool photos instead:</p>
<div id="attachment_4186" class="wp-caption alignnone" style="width: 682px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/532741_347692488612202_146707288710724_862300_619788079_n.jpg?1d5d3d"><img class=" wp-image-4186 " title="Road cleanup" src="http://swizec.com/blog/wp-content/uploads/2012/04/532741_347692488612202_146707288710724_862300_619788079_n.jpg?1d5d3d" alt="Road cleanup" width="672" height="447" /></a><p class="wp-caption-text">Road cleanup</p></div>
<div id="attachment_4187" class="wp-caption alignnone" style="width: 682px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/576025_347695228611928_146707288710724_862355_1226691061_n.jpg?1d5d3d"><img class=" wp-image-4187 " title="Learning to turn tightly" src="http://swizec.com/blog/wp-content/uploads/2012/04/576025_347695228611928_146707288710724_862355_1226691061_n.jpg?1d5d3d" alt="Learning to turn tightly" width="672" height="447" /></a><p class="wp-caption-text">Learning to turn tightly</p></div>
<div id="attachment_4188" class="wp-caption alignnone" style="width: 682px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/534032_347697751945009_146707288710724_862396_809260405_n.jpg?1d5d3d"><img class=" wp-image-4188 " title="Turning at speed" src="http://swizec.com/blog/wp-content/uploads/2012/04/534032_347697751945009_146707288710724_862396_809260405_n.jpg?1d5d3d" alt="Turning at speed" width="672" height="447" /></a><p class="wp-caption-text">Turning at speed</p></div>
<div id="attachment_4203" class="wp-caption alignnone" style="width: 682px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/544490_347698501944934_146707288710724_862407_1345953820_n.jpg?1d5d3d"><img class=" wp-image-4203 " title="Yes, speed!" src="http://swizec.com/blog/wp-content/uploads/2012/04/544490_347698501944934_146707288710724_862407_1345953820_n.jpg?1d5d3d" alt="Yes, speed!" width="672" height="447" /></a><p class="wp-caption-text">Yes, speed!</p></div>
<div id="attachment_4189" class="wp-caption alignnone" style="width: 682px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/555476_347699688611482_146707288710724_862427_1778477533_n.jpg?1d5d3d"><img class=" wp-image-4189 " title="Wheee" src="http://swizec.com/blog/wp-content/uploads/2012/04/555476_347699688611482_146707288710724_862427_1778477533_n.jpg?1d5d3d" alt="Wheee" width="672" height="447" /></a><p class="wp-caption-text">Wheee</p></div>
<div id="attachment_4190" class="wp-caption alignnone" style="width: 682px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/535752_347700888611362_146707288710724_862446_973054401_n.jpg?1d5d3d"><img class=" wp-image-4190 " title="First class group shot" src="http://swizec.com/blog/wp-content/uploads/2012/04/535752_347700888611362_146707288710724_862446_973054401_n.jpg?1d5d3d" alt="First class group shot" width="672" height="447" /></a><p class="wp-caption-text">First class group shot</p></div>
<div id="attachment_4192" class="wp-caption alignnone" style="width: 682px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/563573_351609458220505_146707288710724_872024_2059221382_n.jpg?1d5d3d"><img class=" wp-image-4192 " title="Learning the cross-step" src="http://swizec.com/blog/wp-content/uploads/2012/04/563573_351609458220505_146707288710724_872024_2059221382_n.jpg?1d5d3d" alt="Learning the cross-step" width="672" height="447" /></a><p class="wp-caption-text">Learning the cross-step</p></div>
<div id="attachment_4191" class="wp-caption alignnone" style="width: 682px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/522486_351608958220555_146707288710724_872006_151528080_n.jpg?1d5d3d"><img class=" wp-image-4191 " title="This happens if you skip a class and don't learn how to footbreak" src="http://swizec.com/blog/wp-content/uploads/2012/04/522486_351608958220555_146707288710724_872006_151528080_n.jpg?1d5d3d" alt="This happens if you skip a class and don't learn how to footbreak" width="672" height="447" /></a><p class="wp-caption-text">This happens if you skip a class and don&#39;t learn how to footbreak</p></div>
<div id="attachment_4193" class="wp-caption alignnone" style="width: 682px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/558527_351610218220429_146707288710724_872053_1299898577_n.jpg?1d5d3d"><img class=" wp-image-4193 " title="Something ..." src="http://swizec.com/blog/wp-content/uploads/2012/04/558527_351610218220429_146707288710724_872053_1299898577_n.jpg?1d5d3d" alt="Something ..." width="672" height="447" /></a><p class="wp-caption-text">Something ...</p></div>
<div id="attachment_4198" class="wp-caption alignnone" style="width: 682px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/536436_351614011553383_146707288710724_872115_1191131204_n.jpg?1d5d3d"><img class=" wp-image-4198 " title="Powersliding!" src="http://swizec.com/blog/wp-content/uploads/2012/04/536436_351614011553383_146707288710724_872115_1191131204_n.jpg?1d5d3d" alt="Powersliding!" width="672" height="447" /></a><p class="wp-caption-text">Powersliding!</p></div>
<div id="attachment_4199" class="wp-caption alignnone" style="width: 682px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/523376_351613951553389_146707288710724_872114_1267428967_n.jpg?1d5d3d"><img class=" wp-image-4199 " title="The girls were naturals" src="http://swizec.com/blog/wp-content/uploads/2012/04/523376_351613951553389_146707288710724_872114_1267428967_n.jpg?1d5d3d" alt="The girls were naturals" width="672" height="447" /></a><p class="wp-caption-text">The girls were naturals</p></div>
<div id="attachment_4200" class="wp-caption alignnone" style="width: 682px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/554413_351614118220039_146707288710724_872118_401969108_n.jpg?1d5d3d"><img class=" wp-image-4200 " title="Yep, naturals." src="http://swizec.com/blog/wp-content/uploads/2012/04/554413_351614118220039_146707288710724_872118_401969108_n.jpg?1d5d3d" alt="Yep, naturals." width="672" height="447" /></a><p class="wp-caption-text">Yep, naturals.</p></div>
<div id="attachment_4195" class="wp-caption alignnone" style="width: 682px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/539879_351613898220061_146707288710724_872111_696417144_n1.jpg?1d5d3d"><img class=" wp-image-4195 " title="Once, only once, I managed to get up normally :P" src="http://swizec.com/blog/wp-content/uploads/2012/04/539879_351613898220061_146707288710724_872111_696417144_n1.jpg?1d5d3d" alt="Once, only once, I managed to get up normally :P" width="672" height="447" /></a><p class="wp-caption-text">Once, only once, I managed to get up normally <img src="http://swizec.com/blog/wp-includes/images/smilies/icon_razz.gif?1d5d3d" alt=':P' class='wp-smiley' /> </p></div>
<div id="attachment_4196" class="wp-caption alignnone" style="width: 682px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/542112_351614551553329_146707288710724_872132_517478043_n.jpg?1d5d3d"><img class=" wp-image-4196 " title="Second class group shot" src="http://swizec.com/blog/wp-content/uploads/2012/04/542112_351614551553329_146707288710724_872132_517478043_n.jpg?1d5d3d" alt="Second class group shot" width="672" height="447" /></a><p class="wp-caption-text">Second class group shot</p></div>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://surfabike.wordpress.com/2012/01/24/longboard-crew/" target="_blank">Longboard Crew</a> (surfabike.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://r.zemanta.com/?u=http%3A//www.canada.com/sports/North%2BVancouver%2Bponders%2Bwhat%2Babout%2Blongboarding/6247724/story.html&amp;a=78522895&amp;rid=d81a0a49-2de8-47a5-8580-724978505d10&amp;e=60999298dbd70113bd43812e56b679ff" target="_blank">North Vancouver ponders what to do about longboarding</a> (canada.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.gadling.com/2012/02/29/video-of-the-day-hawaii-longboarding-big-island-and-oahu/" target="_blank">Video of the day: Hawaii longboarding, Big Island and Oahu</a> (gadling.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.pbpulse.com/dining/brunch/2012/03/30/that-girl-longboards-makes-brunch-a-laid-back-affair/" target="_blank">That Girl: Longboards makes brunch a laid-back affair</a> (pbpulse.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.geekologie.com/2012/04/gandalf-on-skateboard-casts-you-shall-no.php" target="_blank">Gandalf On Skateboard Casting &#8216;You Shall Not Pass&#8217;</a> (geekologie.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=d81a0a49-2de8-47a5-8580-724978505d10" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598188&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/the-most-fun-you-can-have-offline/swizec/4146?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/the-most-fun-you-can-have-offline/swizec/4146/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Using Backbone to improve multiselects</title>
		<link>http://swizec.com/blog/using-backbone-to-improve-multiselects/swizec/4172</link>
		<comments>http://swizec.com/blog/using-backbone-to-improve-multiselects/swizec/4172#comments</comments>
		<pubDate>Fri, 13 Apr 2012 20:57:19 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Checkbox]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[User interface]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4172</guid>
		<description><![CDATA[Sometimes you need to ask a users for multiple answers to a single question. But what&#8217;s the best way to go about it? A multiselect input field is kind of strange for the user, sticks out and doesn&#8217;t really behave like everything else on the web. A bunch of checkboxes is better for the user [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you need to ask a users for multiple answers to a single question. But what&#8217;s the best way to go about it?</p>
<div id="attachment_4176" class="wp-caption alignnone" style="width: 770px"><a href="swizec.github.com/checkbox-field/"><img class=" wp-image-4176  " title="Checkbox-field" src="http://swizec.com/blog/wp-content/uploads/2012/04/Screen-Shot-2012-04-13-at-10.43.12-PM.png?1d5d3d" alt="Checkbox-field" width="760" height="152" /></a><p class="wp-caption-text">Checkbox-field</p></div>
<p>A multiselect input <a class="zem_slink" title="Field (mathematics)" href="http://en.wikipedia.org/wiki/Field_%28mathematics%29" rel="wikipedia" target="_blank">field</a> is kind of strange for the user, sticks out and doesn&#8217;t really behave like everything else on the web.</p>
<p>A bunch of <a class="zem_slink" title="Checkbox" href="http://en.wikipedia.org/wiki/Checkbox" rel="wikipedia" target="_blank">checkboxes</a> is better for the user &#8230; but have you ever tried handling a form with dynamically created checkboxes? Let alone creating useful tests and consolidating everything into a single list of values. No decent forms framework will let you do that easily.</p>
<p>I had to solve this similar problem for a <a href="http://www.nextpunch.com/" target="_blank">time and attendance software</a> I worked on, so I made a <a class="zem_slink" title="JavaScript" href="http://en.wikipedia.org/wiki/JavaScript" rel="wikipedia" target="_blank">Javascript</a> thing to convert a select field into a <a href="http://swizec.github.com/checkbox-field/" target="_blank">checkbox-field</a>. Then I made it into a simple jquery plugin thing for everyone to use <img src="http://swizec.com/blog/wp-includes/images/smilies/icon_smile.gif?1d5d3d" alt=':)' class='wp-smiley' /> </p>
<p><a style="font-size: 1.2em;" href="http://swizec.github.com/checkbox-field/" target="_blank">Check out the demo!</a></p>
<p>The idea is pretty simple:</p>
<ul>
<li>take a select, turn it into a list of options</li>
<li>every option becomes a <em>Checkbox</em> model in a collection</li>
<li>render each Checkbox as a <em>CheckboxView</em></li>
<li>connect everything with some events</li>
</ul>
<p>What I really love about the Backbone approach is that all of this works almost magically. Instead of bending over backwards to get checkboxes and the hidden multiselect synced up, all I had to do was create some models, some views and tell them how they are connected.</p>
<p>This is how the field itself is created</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$multiselect.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;option&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span> el<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> $el <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>el<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #006600; font-style: italic;">// hidden behind the scenes here is that:</span>
    <span style="color: #006600; font-style: italic;">// 1. creating a Checkbox, correctly binds together all needed events</span>
    <span style="color: #006600; font-style: italic;">// 2. adding it to checkboxes, takes care of rendering and adding to the DOM</span>
    checkboxes.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> Checkbox<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>value<span style="color: #339933;">:</span> $el.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
                                 label<span style="color: #339933;">:</span> $el.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
                                 selected<span style="color: #339933;">:</span> $el.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'selected'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</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></div></div>

<p>And to make sure data is synced up between its three representations (multiselect, visual checkboxes, the <a class="zem_slink" title="Data structure" href="http://en.wikipedia.org/wiki/Data_structure" rel="wikipedia" target="_blank">data structure</a> itself), all it takes is this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> Checkbox <span style="color: #339933;">=</span> Backbone.<span style="color: #660066;">Model</span>.<span style="color: #660066;">extend</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
    initialize<span style="color: #339933;">:</span> <span style="color: #003366; 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: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;change:selected&quot;</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">toggled</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">attributes</span>.<span style="color: #660066;">id</span> <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">cid</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
&nbsp;
    toggled<span style="color: #339933;">:</span> <span style="color: #003366; 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: #003366; font-weight: bold;">var</span> $opt <span style="color: #339933;">=</span> $multiselect.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;option[value=&quot;</span><span style="color: #339933;">+</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'value'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;]&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'selected'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            $opt.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;selected&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;1&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
            $opt.<span style="color: #660066;">removeAttr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;selected&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Yep, that&#8217;s the whole model and that&#8217;s all it takes to sync everything up. Pretty cool huh? I remember trying to do this with just <a class="zem_slink" title="JQuery" href="http://jquery.com/" rel="homepage" target="_blank">jQuery</a> once &#8230; I nearly stabbed my eyes out to end the misery.</p>
<p>All in all the whole thing is just <em>123 sloc</em>, which can only mean one thing: Backbone is cool.</p>
<p>If you use my <a href="http://swizec.github.com/checkbox-field/" target="_blank">checkbox-field</a> library, it&#8217;s only going to be a single sloc for you:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#my_selector&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">checkboxField</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>That&#8217;s it <img src="http://swizec.com/blog/wp-includes/images/smilies/icon_smile.gif?1d5d3d" alt=':)' class='wp-smiley' /> </p>
<p>Let me know what you think.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://ki6i.com/2011/11/14/jquery-multiselect-abreviation-list/" target="_blank">JQuery Multiselect &#8211; Abbreviation List</a> (ki6i.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/8877080/retrieving-selected-values-from-wpf-listbox-with-multiselect" target="_blank">Retrieving selected values from WPF ListBox with multiselect</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/9025172/how-can-i-get-element-state-from-appendchild-checkbox-in-javascript" target="_blank">How can I get element state from appendchild checkbox in Javascript?</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/9404605/controlling-checkboxes-in-html" target="_blank">Controlling Checkboxes in HTML</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/9396182/simulate-holding-ctrl-key" target="_blank">Simulate Holding Ctrl Key</a> (stackoverflow.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=f7e989e4-2ff3-4685-8e25-afe1c681042a" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598188&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/using-backbone-to-improve-multiselects/swizec/4172?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/using-backbone-to-improve-multiselects/swizec/4172/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google+ redesigned into Facebook</title>
		<link>http://swizec.com/blog/google-redesigned-into-facebook/swizec/4162</link>
		<comments>http://swizec.com/blog/google-redesigned-into-facebook/swizec/4162#comments</comments>
		<pubDate>Wed, 11 Apr 2012 21:35:37 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[The Web]]></category>
		<category><![CDATA[Companies]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Search Engines]]></category>
		<category><![CDATA[Social network]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4162</guid>
		<description><![CDATA[Google has turned into one of those &#8220;Yeah we&#8217;re just like Facebook, but with a cleaner design and without annoying ads. Can you invest half a million dollars mister VC? kthxbai&#8221; startups. This is a company making self driving cars for fuck&#8217;s sake, they should know better! Just look at the screenshots. &#160; Related articles [...]]]></description>
			<content:encoded><![CDATA[<p><a class="zem_slink" title="Google" href="http://google.com" rel="homepage" target="_blank">Google</a> has turned into one of those <em>&#8220;Yeah we&#8217;re just like <a class="zem_slink" title="Facebook" href="http://facebook.com" rel="homepage" target="_blank">Facebook</a>, but with a cleaner design and without annoying ads. Can you invest half a million dollars mister VC? kthxbai&#8221; </em>startups.</p>
<p>This is a company making self driving cars for fuck&#8217;s sake, they should know better!</p>
<p>Just look at the screenshots.</p>
<p>&nbsp;</p>
<div id="attachment_4165" class="wp-caption alignnone" style="width: 817px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/Screen-Shot-2012-04-11-at-11.28.06-PM.png?1d5d3d"><img class=" wp-image-4165 " title="New Google+" src="http://swizec.com/blog/wp-content/uploads/2012/04/Screen-Shot-2012-04-11-at-11.28.06-PM.png?1d5d3d" alt="New Google+" width="807" height="590" /></a><p class="wp-caption-text">New Google+</p></div>
<div id="attachment_4166" class="wp-caption alignnone" style="width: 820px"><a href="http://swizec.com/blog/wp-content/uploads/2012/04/Screen-Shot-2012-04-11-at-11.27.47-PM.png?1d5d3d"><img class=" wp-image-4166 " title="Facebook timeline" src="http://swizec.com/blog/wp-content/uploads/2012/04/Screen-Shot-2012-04-11-at-11.27.47-PM.png?1d5d3d" alt="Facebook timeline" width="810" height="592" /></a><p class="wp-caption-text">Facebook timeline</p></div>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://socialtimes.com/the-google-redesign-is-simple-functional-and-very-social-video_b93994" target="_blank">The Google+ Redesign is Simple, Functional and Very Social [Video]</a> (socialtimes.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.sociableblog.com/2012/04/11/google-plus-gets-redesign/" target="_blank">Google+ Gets a Complete Redesign, With a More Customizable Interface</a> (sociableblog.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.electronista.com/articles/12/04/11/google.reworked.early/" target="_blank">Google+ gets big redesign for customization, hangout focus</a> (electronista.com)</li>
<li class="zemanta-article-ul-li"><a href="http://thetechnologycafe.com/google-launches-a-major-redesigned-version-of-google-challenges-facebook-pictures/" target="_blank">Google Launches A Major Redesigned Version Of Google+ : Challenges Facebook [Pictures]</a> (thetechnologycafe.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=84ed8b42-97da-436e-b2e3-568f811b9515" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598188&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/google-redesigned-into-facebook/swizec/4162?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/google-redesigned-into-facebook/swizec/4162/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>What Refactoring is, and what it isn&#8217;t</title>
		<link>http://swizec.com/blog/what-refactoring-is-and-what-it-isnt/swizec/4148</link>
		<comments>http://swizec.com/blog/what-refactoring-is-and-what-it-isnt/swizec/4148#comments</comments>
		<pubDate>Wed, 11 Apr 2012 10:58:43 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Code refactoring]]></category>
		<category><![CDATA[Kent Beck]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[Martin Fowler]]></category>
		<category><![CDATA[Methodologies]]></category>
		<category><![CDATA[Programmer]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Refactoring]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4148</guid>
		<description><![CDATA[ This post is my first test of zemanta&#8217;s Blogspire, please tell me if you find this style of reblogging useful and I should do more in the future, or maybe I _should_ reblog, but differently. Thanks Nikos Maravitsas writes about What refactoring is and what it isn&#8217;t over at Java Code Geeks. Sometimes a programmer will [...]]]></description>
			<content:encoded><![CDATA[<p><em> This post is my first test of zemanta&#8217;s Blogspire, please tell me if you find this style of reblogging useful and I should do more in the future, or maybe I _should_ reblog, but differently. Thanks <img src="http://swizec.com/blog/wp-includes/images/smilies/icon_smile.gif?1d5d3d" alt=':)' class='wp-smiley' /> </em></p>
<div class="wp-caption alignright" style="width: 395px"><img class=" " title="Refactoring" src="http://1.bp.blogspot.com/_aYqOeKEM97s/TPZnWcXbwPI/AAAAAAAAAFk/kXux_iDWy8w/s1600/codeRefactoring.gif" alt="Refactoring" width="385" height="212" /><p class="wp-caption-text">Refactoring</p></div>
<p>Nikos Maravitsas writes about <em><a href="http://www.javacodegeeks.com/2012/04/what-refactoring-is-and-what-it-isnt.html" target="_blank">What refactoring is and what it isn&#8217;t</a></em> over at Java Code Geeks.</p>
<blockquote class="zemanta-b-article"><p>Sometimes a programmer will come to me and explain that they don&#8217;t like the design of something and that &#8220;we&#8217;re gonna need to do a whole bunch of refactoring&#8221; to make it right. Oh Oh. This doesn&#8217;t sound good. And it doesn&#8217;t sound like refactoring either&#8230;.</p>
<div style="clear: both;"><img style="margin: 0px; border: 0px; display: none;" src="http://blogspire.zemanta.com/pixie/ehz1WpCMTBqDdYS5VMr9hQ.57859/blog.gif" alt="We need this to understand how you use our service - you can take it out if you like. Cheers, your Blogspire team." /></div>
</blockquote>
<p><em>But that other guy before me was stupid! He did it wrong! All wrong! Wah wah wah &#8230;</em></p>
<p>Definitely something I&#8217;ve been guilty of throughout my coding career. Even went so far as justifying it in a blogpost where I asked <em><a href="http://swizec.com/blog/are-you-a-boy-scout-coder">Are you a boyscout coder?</a> </em>The gist of my question was whether clients should be charged for refactoring work or not.</p>
<p>More importantly, what level of refactoring work is on par for getting any work done in a foreign codebase and what&#8217;s taking aesthetics too far.</p>
<blockquote><p><a class="zem_slink" title="Code refactoring" href="http://en.wikipedia.org/wiki/Code_refactoring" rel="wikipedia" target="_blank">Refactoring</a>, as originally defined by <a class="zem_slink" title="Martin Fowler" href="http://martinfowler.com/" rel="homepage" target="_blank">Martin Fowler</a> and <a class="zem_slink" title="Kent Beck" href="http://en.wikipedia.org/wiki/Kent_Beck" rel="wikipedia" target="_blank">Kent Beck</a>, is</p>
<p><em>A change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior… It is a disciplined way to clean up code that minimizes the chances of introducing bugs.</em></p>
<p>/&#8230;/</p>
<p>Refactoring is supposed to be a practice that supports making changes to code. You refactor code before making changes, so that you can confirm your understanding of the code and make it easier and safer to put your change in.</p></blockquote>
<p>And that&#8217;s the gist of it. You are allowed to refactor as much as you want so long as the outside interface doesn&#8217;t change and you make the code demonstrably easier to work with in the future. I think any client would be happy to pay for making their development process cheaper.</p>
<p>Nikos goes on to explain <em>how</em> to refactor:</p>
<blockquote><p>Refactoring is simple. Protect yourself from making mistakes by first writing tests where you can. Make structural changes to the code in small, independent and safe steps, and test the code after each of these steps to ensure that you haven’t changed the behavior – it still works the same, just looks different.</p></blockquote>
<p>But there&#8217;s a difference between refactoring things as you go, just polishing up some function names, changing a variable here and there, making things more readable. Those little things you have to get in order to make everyone&#8217;s lives easier before you implement a new feature &#8230; and changing the architecture of the whole system.</p>
<blockquote><p>“Large Scale Refactoring” changes can be ugly. They can take weeks or months (or years) to complete, requiring changes to many different parts of the code. They need to be broken down and released in multiple steps, requiring temporary scaffolding and detours, especially if you are working in short Agile sprints.</p></blockquote>
<p>This isn&#8217;t refactoring!</p>
<p>Call redesigning and/or rewriting what it is &#8211; <em>redesigning</em>. If there&#8217;s a business case for it, go ahead, if it makes sense to redesign now before things get messy, go ahead. For the sake of yourself and everyone around you, just don&#8217;t do these things in the name of <em>Refactoring.</em></p>
<p>Don&#8217;t be that guy.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/9209530/how-to-refactor-this-simple-code" target="_blank">How to refactor this simple code</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.javacodegeeks.com/2012/04/what-refactoring-is-and-what-it-isnt.html" target="_blank">What Refactoring is, and what it isn&#8217;t</a> (javacodegeeks.com)</li>
<li class="zemanta-article-ul-li"><a href="http://css.dzone.com/articles/bullets-legacy-code" target="_blank">Bullets for legacy code</a> (css.dzone.com)</li>
<li class="zemanta-article-ul-li"><a href="http://collectiveidea.com/blog/archives/2012/01/17/refactored-for-efficiency/" target="_blank">Refactored for Efficiency</a> (collectiveidea.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=e998cd27-7776-4320-92af-ec753e607615" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598188&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/what-refactoring-is-and-what-it-isnt/swizec/4148?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/what-refactoring-is-and-what-it-isnt/swizec/4148/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>19 months from launch to $1,000,000,000 acquisition: Instagram</title>
		<link>http://swizec.com/blog/19-months-from-launch-to-1000000000-acquisition-instagram/swizec/4142</link>
		<comments>http://swizec.com/blog/19-months-from-launch-to-1000000000-acquisition-instagram/swizec/4142#comments</comments>
		<pubDate>Tue, 10 Apr 2012 10:05:40 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Startup World]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[App Store]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Instagram]]></category>
		<category><![CDATA[Mark Zuckerberg]]></category>
		<category><![CDATA[Photograph]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Wikipedia]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4142</guid>
		<description><![CDATA[On October 5th, 2010, Instagram launched We’re really excited to launch our first version of Instagram today, free in the App Store. Instagram makes mobile photos fast, simple, &#38; beautiful. When we sat down three months ago to start designing our product, we looked at digital photos and realized very few exciting things had happened in the [...]]]></description>
			<content:encoded><![CDATA[<p>On October 5th, 2010, <a class="zem_slink" title="Instagram" href="http://instagr.am/" rel="homepage" target="_blank">Instagram</a> launched</p>
<div class="wp-caption alignright" style="width: 360px"><img class=" " title="My first instagram photo" src="http://25.media.tumblr.com/tumblr_lbwdreEgcJ1qekjngo1_500.jpg" alt="My first instagram photo" width="350" height="350" /><p class="wp-caption-text">My first instagram photo</p></div>
<blockquote><p>We’re really excited to launch our first version of Instagram today, <a href="itms://itunes.apple.com/us/app/instagram/id389801252?mt=8" target="_blank">free in the App Store</a>. Instagram makes mobile photos <em>fast, simple, &amp; beautiful</em>.</p>
<p>When we sat down three months ago to start designing our product, we looked at <a class="zem_slink" title="Digital photography" href="http://en.wikipedia.org/wiki/Digital_photography" rel="wikipedia" target="_blank">digital photos</a> and realized very few exciting things had happened in the last 5 years. We’re setting out to change that, and this release is our first step along the way.</p></blockquote>
<p>Just 19 months later, on April 9th, 2012 (yesterday), a new piece of news came along</p>
<blockquote><p>When Mike and I started Instagram nearly two years ago, we set out to change and improve the way the world communicates and shares. We’ve had an amazing time watching Instagram grow into a vibrant community of people from all around the globe. Today, we couldn’t be happier to announce that Instagram has agreed to be acquired by <a class="zem_slink" title="Facebook" href="http://facebook.com" rel="homepage" target="_blank">Facebook</a>.</p></blockquote>
<p>As an <a class="zem_slink" title="Early adopter" href="http://en.wikipedia.org/wiki/Early_adopter" rel="wikipedia" target="_blank">early adopter</a>, I was along for the ride almost since the very beginning &#8211; my first instagram photo going online on November 5th, 2010. Yes, I&#8217;m an Instagram fanboy! And<em> I feel included</em> in the success because I&#8217;ve been rooting for them so long.</p>
<p>But let&#8217;s just put that billion dollar acquisition into perspective:</p>
<ul>
<li><em>45 million dollars</em> for every month worked on Instagram</li>
<li><em>76 million dollars</em> per employee (just 13 of them according to Wikipedia)</li>
<li>about <em>30 dollars</em> for every user</li>
<li>about <em>a dollar</em> for every photo</li>
</ul>
<p>And <strong>that</strong> is what startups are about. Creating value. <em>Ridiculous amounts</em> of value.</p>
<p>For even more perspective &#8211; if your average university education was providing as much value as Instagram does for both its founders and its users &#8230; someone would have to dump <em>3.2 billion dollars</em> in your lap as a graduation gift.</p>
<p>Some of you might be wondering what&#8217;s so special about Instagram anyway, how can they command such a high valuation, what to users see in them?</p>
<p>To that, all I can say is &#8230; remember what sharing a photo was like before Instagram? All that uploading to a twitpic service, then posting to twitter and to facebook and whatever &#8230; it was a pain in the arse.</p>
<p>More importantly, filters are just about the only way you can make a mobile photo look any better than a bland piece of crap with poor lighting. And as a faithful Instagram fan, I&#8217;m sticking by this interpretation.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.androidauthority.com/facebook-will-buy-instagram-for-1billion-dollars-breaking-news-73899/" target="_blank">Facebook will buy Instagram for $1Billion Dollars [Breaking News]</a> (androidauthority.com)</li>
<li class="zemanta-article-ul-li"><a href="http://progressivemediaconcepts.com/2012/04/facebook-acquires-instagram-for-1-billion/" target="_blank">Facebook Acquires Instagram for $1 Billion</a> (progressivemediaconcepts.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.macrumors.com/2012/04/09/facebook-buys-instagram-for-1-billion/" target="_blank">Facebook Buys Instagram For $1 Billion</a> (macrumors.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=70289ca6-3204-4e92-96ee-7ccb9373ab9d" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598188&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/19-months-from-launch-to-1000000000-acquisition-instagram/swizec/4142?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/19-months-from-launch-to-1000000000-acquisition-instagram/swizec/4142/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tracking RSS readers with Google Analytics</title>
		<link>http://swizec.com/blog/tracking-rss-readers-with-google-analytics/swizec/4130</link>
		<comments>http://swizec.com/blog/tracking-rss-readers-with-google-analytics/swizec/4130#comments</comments>
		<pubDate>Fri, 06 Apr 2012 10:51:25 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Feedburner]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[HTML element]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[Slashdot]]></category>
		<category><![CDATA[Uniform Resource Locator]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4130</guid>
		<description><![CDATA[The problem with RSS (aside from only being used by nerds) is that it is almost untrackable. Sure there&#8217;s Feedburner and Google Analytics can tell you how many people came to  your blog specifically through clickthroughs. But when you&#8217;ve got the whole post right there in your reader, why would you ever want to clickthrough to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://xkcd.com" target="_blank"><img title="XKCD nerd sniping" src="http://imgs.xkcd.com/comics/nerd_sniping.png" alt="XKCD nerd sniping" width="100%" /></a></p>
<p>The problem with <a class="zem_slink" title="RSS" href="http://en.wikipedia.org/wiki/RSS" rel="wikipedia" target="_blank">RSS</a> (aside from only being used by nerds) is that it is almost untrackable.</p>
<p>Sure there&#8217;s <a class="zem_slink" title="FeedBurner" href="http://www.feedburner.com/" rel="homepage" target="_blank">Feedburner</a> and <a class="zem_slink" title="Google Analytics" href="http://www.google.com/analytics" rel="homepage" target="_blank">Google Analytics</a> can tell you how many people came to  your blog specifically through clickthroughs. But when you&#8217;ve got the whole post right there in your reader, why would you ever want to clickthrough to the actual website?</p>
<p>You wouldn&#8217;t.</p>
<p>Feedburner tells me there are 925 people subscribed to my blog. Hooray!</p>
<p>Do they ever read a post? No idea.</p>
<p>Well, about 400 a month do clickthrough to the website &#8230; but who cares about that. I&#8217;m not an advertiser, all I want are readers!</p>
<p>On Tuesday I nerdsniped myself and spent the whole day trying to figure out how to do this &#8211; long story short, I didn&#8217;t find a single way. But I tried several things:</p>
<h2>__utm.gif</h2>
<p>If you didn&#8217;t know, Google Analytics uses a so called <a class="zem_slink" title="Web bug" href="http://en.wikipedia.org/wiki/Web_bug" rel="wikipedia" target="_blank">tracking pixel</a>that a javascript snippet injects into a site so it can then be downloaded by the browser. Because the gif is dynamically served by a server and there are a bunch of parameters in the request &#8211; they know who you are, what the site was, and voila &#8211; tracking!</p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:Wikibooks-javascript.png" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="Wikibooks-javascript" src="http://upload.wikimedia.org/wikipedia/commons/thumb/8/80/Wikibooks-javascript.png/300px-Wikibooks-javascript.png" alt="Wikibooks-javascript" width="300" height="214" /></a><p class="wp-caption-text">Wikibooks-javascript (Photo credit: Wikipedia)</p></div>
<p>Add it to the feed with the right parameters and voila. You suddenly know how many people <em>read</em> your <a class="zem_slink" title="RSS" href="http://en.wikipedia.org/wiki/RSS" rel="wikipedia" target="_blank">RSS feed</a>! Hooray \o/</p>
<p>Well &#8230; no. Apparently Google Analytics ignore such requests. The referrer is probably wrong since it isn&#8217;t your domain, just some sort of reader url or something.</p>
<h2><a class="zem_slink" title="JavaScript" href="http://en.wikipedia.org/wiki/JavaScript" rel="wikipedia" target="_blank">Javascript</a></h2>
<p>Maybe the parameters I added to the __utm.gif request weren&#8217;t dynamic enough. The cookie stuff was certainly missing &#8230;</p>
<p>Okay, let&#8217;s use <a class="zem_slink" title="Google" href="http://google.com" rel="homepage" target="_blank">Google&#8217;s</a> own javacript snippet. Surely <em>that</em> will work! I mean, what could possibly go wrong, a reader loads your article as html anyway, so javascript should definitely work. And I&#8217;m fairly sure I&#8217;ve seen javascript in certain feeds &#8230; how else would those ads get in there?</p>
<p>Nope.</p>
<p>Readers scrape away all traces of javascript, probably worried about hacking and silly stuff.</p>
<h2>Iframes</h2>
<p>Right, <a class="zem_slink" title="HTML element" href="http://en.wikipedia.org/wiki/HTML_element" rel="wikipedia" target="_blank">iframes</a> then! Everything should work perfectly &#8211; the tracking pixel is inserted with javascript, the iframe actually loads your website so surely all the other parameters are correct as well.</p>
<p>Better yet, <a class="zem_slink" title="Slashdot" href="http://slashdot.org/" rel="homepage" target="_blank">Slashdot</a>&#8216;s got an iframe in their feed and <em>that</em> works! Youtube embeds and others are also a combination of iframes and javascript. Surely we&#8217;re on to a winner here.</p>
<p>I even went so far as to make a special iframe-only look for my blog:</p>
<p><iframe src="http://swizec.com/blog/tracking-rss-readers-with-google-analytics/swizec/4130?track_page=1" width="320" height="240"></iframe></p>
<p>That&#8217;s right, add a <em>?track_page=1</em> to a <a class="zem_slink" title="Uniform Resource Locator" href="http://en.wikipedia.org/wiki/Uniform_Resource_Locator" rel="wikipedia" target="_blank">URL</a> and you get a bunch of sharing widgets and google analytics. Let&#8217;s make the iframe useful why not &#8230;</p>
<p>Didn&#8217;t work. Readers allow iframes on a per-case basis and apparently I&#8217;m not cool enough for them.</p>
<h2>Well, poo</h2>
<p>I&#8217;m very open to ideas for things to try here &#8230; all I want is to look at google analytics and have people reading the RSS counted amonst the normal reader population.</p>
<p>Sure, Feedburner does have some sort of hack to look at &#8220;reach&#8221;, but it bugs me that I have no idea what that actually means. And that it&#8217;s not included where I normally look for stats.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.thetaboard.com/blog/client-side-error-logging-with-google-analytics?r=378" target="_blank">You should be using Google Analytics to log your startup&#8217;s client-side errors</a> (thetaboard.com)</li>
<li class="zemanta-article-ul-li"><a href="http://marketing.yell.com/web-design/what-is-google-analytics-and-what-can-it-do/" target="_blank">What is Google Analytics and what can it do?</a> (marketing.yell.com)</li>
<li class="zemanta-article-ul-li"><a href="http://socialfresh.com/google-plus-google-analytics/" target="_blank">Getting the Most out of Google+ with Google Analytics</a> (socialfresh.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.distilled.net/blog/seo/combining-the-html5-history-api-and-the-canonical-tag-for-improved-tracking/" target="_blank">Combining the HTML5 History API and the Canonical Tag for Improved Tracking</a> (distilled.net)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=d8d70dfa-fcc1-441e-9c80-25b7125a9323" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598188&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/tracking-rss-readers-with-google-analytics/swizec/4130?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/tracking-rss-readers-with-google-analytics/swizec/4130/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A few thoughts on blogging inspiration</title>
		<link>http://swizec.com/blog/a-few-thoughts-on-blogging-inspiration/swizec/4119</link>
		<comments>http://swizec.com/blog/a-few-thoughts-on-blogging-inspiration/swizec/4119#comments</comments>
		<pubDate>Thu, 05 Apr 2012 12:40:47 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Insanity]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[Idea]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Writing]]></category>
		<category><![CDATA[Zemanta]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4119</guid>
		<description><![CDATA[Blogspire is a great suggestion tool &#8211; go sign up &#8211; but when a topic doesn&#8217;t come from within the process to coming up with a post is a lot more complicated. Even when the idea is yours, there is a lot that goes into coming up with a decent post. Let me describe the two ways [...]]]></description>
			<content:encoded><![CDATA[<blockquote class="twitter-tweet" data-in-reply-to="187864253871554560"><p>@<a href="https://twitter.com/gstritar">gstritar</a> yep, using Blogspire. Have you tried blogging about a topic that isn't "yours"? It takes _hours_. /@<a href="https://twitter.com/zemanta">zemanta</a></p>&mdash; Swizec (@Swizec) <a href="https://twitter.com/Swizec/status/187864436076331008" data-datetime="2012-04-05T11:29:06+00:00">April 5, 2012</a></blockquote>
<script src="//platform.twitter.com/widgets.js?1d5d3d" charset="utf-8"></script>
<p><a href="http://blogspire.zemanta.com/" target="_blank">Blogspire</a> <em>is</em> a great suggestion tool &#8211; go sign up <img src="http://swizec.com/blog/wp-includes/images/smilies/icon_wink.gif?1d5d3d" alt=';)' class='wp-smiley' />  &#8211; but when a topic doesn&#8217;t come from within the process to coming up with a post is a lot more complicated. Even when the <a class="zem_slink" title="Idea" href="http://en.wikipedia.org/wiki/Idea" rel="wikipedia" target="_blank">idea</a> <strong><em>is</em></strong> yours, there is a lot that goes into coming up with a decent post.</p>
<p>Let me describe the two ways I write.</p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:Meadow_near_Gard%27s_Farm_-_geograph.org.uk_-_896805.jpg" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="Meadow near Gard's Farm Taken from the bridlew..." src="http://upload.wikimedia.org/wikipedia/commons/thumb/2/20/Meadow_near_Gard%27s_Farm_-_geograph.org.uk_-_896805.jpg/300px-Meadow_near_Gard%27s_Farm_-_geograph.org.uk_-_896805.jpg" alt="Meadow near Gard's Farm Taken from the bridlew..." width="300" height="225" /></a><p class="wp-caption-text">Meadow near Gard&#39;s Farm Taken from the bridleway most of the foreground is in this square the rest of the field in the next. No idea what the violet flowers are. (Photo credit: Wikipedia)</p></div>
<h2>&#8220;my&#8221; post</h2>
<p>When <a class="zem_slink" title="Writing" href="http://en.wikipedia.org/wiki/Writing" rel="wikipedia" target="_blank">writing</a> in a creative flurry, everything is simple (this only happens when you have plenty of free time)</p>
<ol>
<li>Get idea</li>
<li>Become antsy to write about it</li>
<li>Keep thinking about the idea while working out, under the shower, during breakfast</li>
<li>Jump into a <a class="zem_slink" title="Text editor" href="http://en.wikipedia.org/wiki/Text_editor" rel="wikipedia" target="_blank">text editor</a></li>
<li>Write like a mad man</li>
<li>Breathe</li>
<li>Edit a bit (30% rewrite)</li>
<li>Publish</li>
</ol>
<p>That&#8217;s it. Another post is born.</p>
<p>This type of post feels very good to write, gets something off my mind and occasionally reaches some level of popularity on the hackernewses and such out there.</p>
<p>Usually these posts are flops in the traditional sense. The only post of this sort that has ever reached popularity was <em><a href="http://swizec.com/blog/living-life-in-25min-increments/swizec/1859">Living life in 25 min increments</a>.</em></p>
<h2>&#8220;not my&#8221; post</h2>
<p>More often than not, you can&#8217;t write a post the moment you think of it. You&#8217;re either too busy, the idea hasn&#8217;t fully formed in your head, or it just isn&#8217;t the right type of idea for a particular day.</p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:Seven_Sisters_snow_sunset.jpg" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="Sunset behind the remaining three of Bristol's..." src="http://upload.wikimedia.org/wikipedia/commons/thumb/0/08/Seven_Sisters_snow_sunset.jpg/300px-Seven_Sisters_snow_sunset.jpg" alt="Sunset behind the remaining three of Bristol's..." width="300" height="200" /></a><p class="wp-caption-text">Sunset behind the remaining three of Bristol&#39;s &quot;Seven Sisters&quot;. (Photo credit: Wikipedia)</p></div>
<p>Sometimes the idea does come from outside &#8211; like when somebody from <a class="zem_slink" title="Zemanta" href="http://www.zemanta.com" rel="homepage" target="_blank">Zemanta</a> comes up to me and goes <em>&#8220;Hey, I think you should write about this. And if you could also make product X look good, that&#8217;d be great&#8221;</em>. Or sometimes it&#8217;s a friend saying <em>&#8220;Hey, I just launched this cool thing/solved this cool problem/did something awesome &#8230; can you write about it?&#8221;</em></p>
<p>The idea goes on the whiteboard. Or in a moleskine. Anywhere.</p>
<p>Yesterday I wrote a post for Zemanta (to be published later today).  Here&#8217;s what the process looked like:</p>
<ol>
<li>&#8220;Hey, write about This Thing &#8482;.&#8221;</li>
<li>Install product, promise to give it a try</li>
<li>3 days go by when I&#8217;m busy with other stuff</li>
<li>&#8220;Hey, did you write anything yet? Just checking.&#8221;</li>
<li>Check out product, look at its homepage</li>
<li>Go to bed thinking about the post</li>
<li>Wake up, do an hour and a half<em> </em>of research on an unknown <a class="zem_slink" title="Problem domain" href="http://en.wikipedia.org/wiki/Problem_domain" rel="wikipedia" target="_blank">problem domain</a></li>
<li>Go to class</li>
<li>Ruminate on the post all day</li>
<li>Come up with a few key phrases and points to mention</li>
<li>Start writing &#8230; decide I still don&#8217;t know what I&#8217;m writing about</li>
<li>Jot down three main points, organize them in a flow</li>
<li>Spend two hours writing a <em>very</em> crappy draft</li>
<li>Watch an episode of futurama</li>
<li>Rewrite the whole post in 20 minutes</li>
<li>Congratulations, it is now 1:19am.</li>
</ol>
<p>While yesterday was a particularly crappy because I haven&#8217;t been getting enough off-time lately, that&#8217;s pretty much what goes into writing the kind of post that reliably makes it to The Frontpage &#8482;.</p>
<p>Several rewrites from <em>Wtf am I doing</em> to <em>Hey, I can publish this &#8230;</em> Each step also needs at least 20 minutes of slacking off before taking the next step.</p>
<p>But I think it&#8217;s worth it.</p>
<p>Unfortunately, this is why the quality of my posts usually dips whenever a bunch of work is dumped in my lap. Double so if a deadline is attached to everything.</p>
<div class="mceTemp"></div>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.contentmarketinginstitute.com/2012/02/federated-media-bloggers/" target="_blank">Federated, Zemanta Launch Program to Connect Bloggers with Brands</a> (contentmarketinginstitute.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.bloggingtips.com/2012/04/04/grow-a-blog-in-30-days/" target="_blank">Grow A Blog In 30 Days &#8211; One Simple Idea Spark Up Your Blog!</a> (bloggingtips.com)</li>
<li class="zemanta-article-ul-li"><a href="http://ayeshazahid.com/2012/04/04/inexperiencedor-youre-learning/" target="_blank">inexperienced(or you&#8217;re learning)</a> (ayeshazahid.com)</li>
<li class="zemanta-article-ul-li"><a href="http://blog.factbrowser.com/2012/02/22/free-tools-to-make-blogging-easier/" target="_blank">4 Free tools That Make Blogging So Much Easier</a> (factbrowser.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.newstatesman.com/blogs/media/2012/04/beauty-and-post-postbag-journalism" target="_blank">Beauty and post-postbag journalism</a> (newstatesman.com)</li>
<li class="zemanta-article-ul-li"><a href="http://scarvesandcigarettes.wordpress.com/2012/04/02/ive-been-posting-these-in-the-wrong-blog/" target="_blank">I&#8217;ve been posting these in the wrong blog&#8230;</a> (scarvesandcigarettes.wordpress.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=e6f46b5b-f41f-4e3b-a5de-161e3361ed67" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598188&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/a-few-thoughts-on-blogging-inspiration/swizec/4119?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/a-few-thoughts-on-blogging-inspiration/swizec/4119/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Online, real names provide anonymity</title>
		<link>http://swizec.com/blog/online-real-names-provide-anonymity/swizec/4099</link>
		<comments>http://swizec.com/blog/online-real-names-provide-anonymity/swizec/4099#comments</comments>
		<pubDate>Tue, 03 Apr 2012 11:00:57 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[The Web]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Online and offline]]></category>
		<category><![CDATA[Online Communities]]></category>
		<category><![CDATA[Slovenia]]></category>
		<category><![CDATA[Social network]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4099</guid>
		<description><![CDATA[There are 845 million active users on facebook. There are 500 million twitter accounts. There are 100 million users on Google+. Of all those people only one is Swizec. Three other profiles do show up when searching for &#8220;Swizec&#8221;, but they don&#8217;t have the account name registered. Nor the domain name. In Slovenia, there are [...]]]></description>
			<content:encoded><![CDATA[<p>There are <a href="http://newsroom.fb.com/content/default.aspx?NewsAreaId=22" target="_blank">845 million active users on facebook</a>.</p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://en.wikipedia.org/wiki/File:Ultima_Online.jpg" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="Early virtual world: Ultima Online" src="http://upload.wikimedia.org/wikipedia/en/thumb/7/70/Ultima_Online.jpg/300px-Ultima_Online.jpg" alt="Early virtual world: Ultima Online" width="300" height="225" /></a><p class="wp-caption-text">Early virtual world: Ultima Online (Photo credit: Wikipedia)</p></div>
<p>There are <a href="http://www.mediabistro.com/alltwitter/twitter-active-total-users_b17655" target="_blank">500 million twitter accounts</a>.</p>
<p>There are <a href="http://mashable.com/2012/02/01/google-plus-breaks-100m-users/" target="_blank">100 million users on Google+</a>.</p>
<p>Of all those people only one is Swizec.</p>
<p>Three other profiles do show up when searching for &#8220;Swizec&#8221;, but they don&#8217;t have the account name registered. Nor the domain name.</p>
<p>In <a class="zem_slink" title="Slovenia" href="http://maps.google.com/maps?ll=46.05,14.5&amp;spn=10.0,10.0&amp;q=46.05,14.5 (Slovenia)&amp;t=h" rel="geolocation" target="_blank">Slovenia</a>, there are 2 million people. Out of them 4121 people share my real first name, my surname, 298. The combination happens to be unique &#8230; for now.</p>
<p>There are <a href="http://www.bbc.co.uk/news/world-15391515" target="_blank">7 billion people in the world</a>.</p>
<p><a href="http://www.internetworldstats.com/stats.htm" target="_blank">Less than half</a> of those are currently online &#8211; the figure is rapidly changing in favor of the whole world being connected. When all those people come online, what do you think will provide better anonymity? Real names or nicknames?</p>
<p>Even today, if you want to be anonymous online, just use your <a class="zem_slink" title="Personal name" href="http://en.wikipedia.org/wiki/Personal_name" rel="wikipedia" target="_blank">real name</a>.</p>
<p>A real name might not hide you from your friends, neither would a nickname, but you will be damn well hidden from a cursory inspection by a potential employer or whomever might want to find those drunken pictures from last night. Googling <em><a href="http://duckduckgo.com/?q=facebook+fired" target="_blank">facebook fired</a></em> throws out lots of interesting results &#8230;</p>
<h2>Nicknames are real</h2>
<p>Me, I have nowhere to hide. My nickname is the same everywhere.</p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:Flickr_-_%E2%80%A6trialsanderrors_-_Nicknames_of_the_states%2C_1884.jpg" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured " title="Map of the United States showing the state nic..." src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Flickr_-_%E2%80%A6trialsanderrors_-_Nicknames_of_the_states%2C_1884.jpg/300px-Flickr_-_%E2%80%A6trialsanderrors_-_Nicknames_of_the_states%2C_1884.jpg" alt="Map of the United States showing the state nic..." width="300" height="168" /></a><p class="wp-caption-text">United States nicknames</p></div>
<p>People have used nicknames since forever. It creates a friendly atmosphere, it&#8217;s a sign of trust, of not being strangers. A police officer calls you by your name, a friend calls you by something personal. Perhaps a name that grows and evolves as you do &#8211; a concept native americans were very familiar with according to all those novels I read as a kid.</p>
<p>But the latest trend in online identities is <em>Real Names &#8482;</em>. Because nicknames are somehow &#8230; bad. Even <a class="zem_slink" title="Twitter" href="http://twitter.com" rel="homepage" target="_blank">Twitter</a>, the last bastion of proper nicknames, has bowed to pressure and started exposing Real Names as the primary identifier both on twitter.com and its mobile apps.</p>
<p>Why?</p>
<p>Perhaps a ploy to tie &#8220;real world&#8221; identities to their &#8220;online&#8221; counterparts in a desperate attempt to sell you ever more crap. Or maybe it&#8217;s got something to do with the occult idea that there is power in real names, that calling someone by their real name compels them to do what you want.</p>
<p>Remember Rumpelstiltkin?</p>
<p>Whatever it is, it&#8217;s annoying &#8230; sooner or later the <a class="zem_slink" title="Virtual world" href="http://en.wikipedia.org/wiki/Virtual_world" rel="wikipedia" target="_blank">online world</a> will become as anonymous as its physical counterpart and it will no longer be possible to waltz into a social network and for someone to go <em>&#8220;Heeey, you&#8217;re Swizec! Oh man, I remember you from X, how are ya old bastard?&#8221;</em></p>
<p>I&#8217;m going to miss that.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.readwriteweb.com/archives/who_will_win_the_race_to_build_the_webs_best_real-.php" target="_blank">Who Will Win the Race to Build the Web&#8217;s Best Real-Name Identity Service?</a> (readwriteweb.com)</li>
<li class="zemanta-article-ul-li"><a href="http://sixestate.com/facebook-plug-in-a-fix-for-anonymous-comments/" target="_blank">Facebook Plugin a Fix for Anonymous Comments</a> (sixestate.com)</li>
<li class="zemanta-article-ul-li"><a href="http://techcrunch.com/2012/04/02/path-starts-hashing-data/" target="_blank">Two Months Removed From AddressGate, Path Starts Hashing, Anonymizing Data</a> (techcrunch.com)</li>
<li class="zemanta-article-ul-li"><a href="http://sixestate.com/anonymous-comments-the-bane-of-online-news/" target="_blank">Anonymous Comments: The Bane of Online News?</a> (sixestate.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.troyrecord.com/articles/2012/03/23/news/doc4f6cc9cb1aa8c193550304.txt" target="_blank">New story commenting platform coming to The Record</a> (troyrecord.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.buzzom.com/2012/02/chinese-govt-threatens-to-ban-microbloggers-not-using-their-real-names-by-march-16/" target="_blank">Chinese govt threatens to ban microbloggers not using their real names by March 16</a> (buzzom.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.forbes.com/sites/kashmirhill/2012/01/24/google-relaxes-real-name-policy-but-might-make-you-provide-proof-of-your-nickname/" target="_blank">Google+ Relaxes &#8216;Real Name&#8217; Policy, But Might Make You Provide Proof Of Your Nickname</a> (forbes.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=d7c08924-1224-48a5-9d7d-3dbd17f61d81" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598188&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/online-real-names-provide-anonymity/swizec/4099?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/online-real-names-provide-anonymity/swizec/4099/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>The exciting future Javascript</title>
		<link>http://swizec.com/blog/the-exciting-future-javascript/swizec/4101</link>
		<comments>http://swizec.com/blog/the-exciting-future-javascript/swizec/4101#comments</comments>
		<pubDate>Mon, 02 Apr 2012 10:44:50 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Constructor (object-oriented programming)]]></category>
		<category><![CDATA[Definition]]></category>
		<category><![CDATA[Douglas Crockford]]></category>
		<category><![CDATA[ECMAScript]]></category>
		<category><![CDATA[Function object]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Scope (computer science)]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4101</guid>
		<description><![CDATA[ECMAscript, 6th edition might bring us fat arrow notation &#8211; Douglas Crockford on fat arrows function &#40;x&#41; &#123; return x * x; &#125; &#160; // becomes &#160; &#40;x&#41; =&#62; x * x Douglas&#8217; post concerns itself mostly with the intricacies of how this is bound to the function objectand what the fat arrow notation might bring, what [...]]]></description>
			<content:encoded><![CDATA[<p><a class="zem_slink" title="ECMAScript" href="http://www.ecma-international.org/publications/standards/Ecma-262.htm" rel="homepage" target="_blank">ECMAscript</a>, 6th edition might bring us fat arrow notation &#8211; <a href="http://www.yuiblog.com/blog/2012/03/30/what-is-the-meaning-of-this">Douglas Crockford on fat arrows</a></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>x<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">return</span> x <span style="color: #339933;">*</span> x<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// becomes</span>
&nbsp;
<span style="color: #009900;">&#40;</span>x<span style="color: #009900;">&#41;</span> <span style="color: #339933;">=&gt;</span> x <span style="color: #339933;">*</span> x</pre></div></div>

<p>Douglas&#8217; post concerns itself mostly with the intricacies of how <em>this</em> is bound to the <a class="zem_slink" title="Function object" href="http://en.wikipedia.org/wiki/Function_object" rel="wikipedia" target="_blank">function object</a>and what the fat arrow notation might bring, what I see is something completely different.</p>
<div class="wp-caption alignright" style="width: 250px"><a href="http://www.flickr.com/photos/22882695@N00/4766782412" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="vim" src="http://farm5.static.flickr.com/4073/4766782412_f471ddd85e_m.jpg" alt="vim" width="240" height="180" /></a><p class="wp-caption-text">vim (Photo credit: jwalsh)</p></div>
<p>Proper lambdas!</p>
<p>That&#8217;s right, <a class="zem_slink" title="Function (mathematics)" href="http://en.wikipedia.org/wiki/Function_%28mathematics%29" rel="wikipedia" target="_blank">functions</a> that implicitly return with none of that big ugly <em>function</em> keyword! Hooray.</p>
<p>A bit tricky when you need a named function, but so far this is just an unofficial proposal, I&#8217;m sure they&#8217;ll figure something out by the time ECMA6 comes anywhere near being a standard (not in 2012).</p>
<p>As I said on hacker news <em><a class="zem_slink" title="JavaScript" href="http://en.wikipedia.org/wiki/JavaScript" rel="wikipedia" target="_blank">Javascript</a> is a beautiful language, trapped in bad syntax, peppered with poor semantic choices</em>. What is left of a language once you take syntax and semantics out of the picture? Quite a lot.</p>
<h2>What else is new</h2>
<p>Spurred on by excitement I decided to poke around the <a href="http://wiki.ecmascript.org/doku.php" target="_blank">wiki for the ongoing specification work of Ecma</a>.</p>
<p>Some of the &#8220;<a href="http://wiki.ecmascript.org/doku.php?id=harmony:harmony" target="_blank">tentatively approved</a>&#8221; proposals include:</p>
<ol>
<li><strong><a href="http://wiki.ecmascript.org/doku.php?id=harmony:array_comprehensions" target="_blank">Array comprehensions</a> and <a href="http://wiki.ecmascript.org/doku.php?id=harmony:generator_expressions" target="_blank">generators</a> and <a href="http://wiki.ecmascript.org/doku.php?id=harmony:iterators" target="_blank">iterators</a></strong> - a natural notation for constructing lists from lists, used a lot in python and haskell.

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// mapping</span>
<span style="color: #009900;">&#91;</span> square<span style="color: #009900;">&#40;</span>x<span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>x of <span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span><span style="color: #CC0000;">2</span><span style="color: #339933;">,</span><span style="color: #CC0000;">3</span><span style="color: #339933;">,</span><span style="color: #CC0000;">4</span><span style="color: #339933;">,</span><span style="color: #CC0000;">5</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#93;</span>
<span style="color: #006600; font-style: italic;">// filtering</span>
<span style="color: #009900;">&#91;</span> x <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>x of a<span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>x.<span style="color: #660066;">color</span> <span style="color: #339933;">===</span> ‘blue’<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#93;</span></pre></div></div>

<p>This naturally extends into generators, where you can have an object generating values according to a pattern &#8211; possibly until infinity. (the example given in the proposal are fibonacci numbers, obviously)</p>
<p><a class="zem_slink" title="Iterator" href="http://en.wikipedia.org/wiki/Iterator" rel="wikipedia" target="_blank">Iterators</a> are a similar beast &#8211; you get to define <em>how</em> an object should be iterated over, which gives us nice abstractions for all sorts of things.</li>
<li><strong><a href="http://wiki.ecmascript.org/doku.php?id=harmony:classes" target="_blank">Classes</a> </strong>- although using prototypes, functions and instances is enough to do everything classes can do, it isn&#8217;t very expressive and too much deep knowledge is required to understand the code.<br />
<blockquote><p>A class defines four objects and their properties: a <a class="zem_slink" title="Constructor (object-oriented programming)" href="http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29" rel="wikipedia" target="_blank">constructor function</a>, a prototype, a new instance, and a private record bound to the new instance. The body of a class is a collection of member <a class="zem_slink" title="Definition" href="http://en.wikipedia.org/wiki/Definition" rel="wikipedia" target="_blank">definitions</a>.</p></blockquote>
</li>
<li><strong><a href="http://wiki.ecmascript.org/doku.php?id=harmony:block_scoped_bindings" target="_blank">Block scoped bindings</a></strong> &#8211; Javascript used to only be <a class="zem_slink" title="Scope (computer science)" href="http://en.wikipedia.org/wiki/Scope_%28computer_science%29" rel="wikipedia" target="_blank">lexically scoped</a>, otherwise known to new programmers as <em>&#8220;Aaaaaah everything is global what the hell!?&#8221;</em>. With the addition of <a href="http://wiki.ecmascript.org/doku.php?id=harmony:let" target="_blank">let</a>, <a href="http://wiki.ecmascript.org/doku.php?id=harmony:const" target="_blank">const</a> and block functions there will now also be block scope where you can define things to only exist inside two {}.</li>
<li><strong><a href="http://wiki.ecmascript.org/doku.php?id=harmony:modules" target="_blank">Modules!</a></strong>
<p>What has traditionally been solved using require.js will now work similar to how python does it. You get to define modules and then import them where they are needed. Possibly the most earth shattering addition since dependency management in Javascript has devolved into an extreme sport lately.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// module</span>
module math <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">export</span> <span style="color: #003366; font-weight: bold;">function</span> sum<span style="color: #009900;">&#40;</span>x<span style="color: #339933;">,</span> y<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">return</span> x <span style="color: #339933;">+</span> y<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #003366; font-weight: bold;">export</span> <span style="color: #003366; font-weight: bold;">var</span> pi <span style="color: #339933;">=</span> <span style="color: #CC0000;">3.141593</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// client</span>
<span style="color: #006600; font-style: italic;">// we can import in script code, not just inside a module</span>
<span style="color: #003366; font-weight: bold;">import</span> <span style="color: #009900;">&#123;</span>sum<span style="color: #339933;">,</span> pi<span style="color: #009900;">&#125;</span> from math<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;2π = &quot;</span> <span style="color: #339933;">+</span> sum<span style="color: #009900;">&#40;</span>pi<span style="color: #339933;">,</span> pi<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li><strong><a href="http://wiki.ecmascript.org/doku.php?id=harmony:direct_proxies" target="_blank">Proxies</a></strong> &#8211; according to the proposal a <em>Proxy</em> is an object that takes two objects &#8211; a target and a handler. Where, if I understand correctly, you call functions on the proxy (trigger them), which execute as traps on the handler object, using the target.
<p>This looks like a new way of handling events.Similar to what modern MVC frameworks are doing where you have a &#8220;view&#8221; that takes care of safely executing functions when events are triggered.</li>
</ol>
<h2>When?</h2>
<p>A lot more interesting stuff can be found in the <a href="http://wiki.ecmascript.org/doku.php?id=strawman:strawman" target="_blank">strawman section</a> where completely far out ideas live, but the tentatively approved ideas already raise my hopes far too much without any assurance I&#8217;ll ever get any of this. So much could change before any of this is solidifies into a standard.</p>
<p>And even when it does become a standard &#8230; how long before any of this reaches wide browser support? Mozilla&#8217;s Javascript already includes a lot of this stuff &#8211; a lot of the proposals come from there actually &#8211; anyone else? Not really.</p>
<p>At least there is some comfort in the fact all of this will quickly reach node.js <img src="http://swizec.com/blog/wp-includes/images/smilies/icon_smile.gif?1d5d3d" alt=':)' class='wp-smiley' /> </p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://blog.chromium.org/2012/02/future-of-javascript-take-peek-today.html" target="_blank">The Future of JavaScript &#8211; take a peek today!</a> (chromium.org)</li>
<li class="zemanta-article-ul-li"><a href="http://webdev360.com/the-next-javascript-in-google-chrome-40849.html" target="_blank">The next JavaScript in Google Chrome</a> (webdev360.com)</li>
<li class="zemanta-article-ul-li"><a href="http://briancray.com/2012/02/23/javascript-module-pattern/" target="_blank">Javascript module pattern: When to use it and why</a> (briancray.com)</li>
<li class="zemanta-article-ul-li"><a href="http://swizec.com/blog/closure-and-currying-magic-for-cleaner-javascript/swizec/3981" target="_blank">Closure and currying magic for cleaner javascript</a> (swizec.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.davidflanagan.com/2011/11/why-i-want-clas.html" target="_blank">Why I want Classes in JavaScript</a> (davidflanagan.com)</li>
<li class="zemanta-article-ul-li"><a href="http://devblog.blackberry.com/2011/08/virtual-functions-in-javascript/" target="_blank">&#8220;Virtual&#8221; Functions in JavaScript</a> (devblog.blackberry.com)</li>
<li class="zemanta-article-ul-li"><a href="http://lostechies.com/derekgreer/2012/02/17/javascript-closures-explained/" target="_blank">JavaScript Closures Explained</a> (lostechies.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=234dfc5e-ee3f-4fe3-87a1-53fe9bbda4ef" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598188&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/the-exciting-future-javascript/swizec/4101?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/the-exciting-future-javascript/swizec/4101/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>My language is better than yours</title>
		<link>http://swizec.com/blog/my-language-is-better-than-yours/swizec/4093</link>
		<comments>http://swizec.com/blog/my-language-is-better-than-yours/swizec/4093#comments</comments>
		<pubDate>Fri, 30 Mar 2012 08:44:20 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Lisp]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming language]]></category>
		<category><![CDATA[Wikipedia]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4093</guid>
		<description><![CDATA[My language brings all the geeks to the yard, And they&#8217;re like &#8220;It&#8217;s better than yours&#8221; Damn right, it&#8217;s better than yours, I can teach you, but I have to charge Programming languages &#8211; the second favourite thing for geeks to fight about (right after code editors and IDE&#8216;s). Everybody knows Java sucks, that PHP [...]]]></description>
			<content:encoded><![CDATA[<blockquote style="text-align: center;"><p>My language brings all the geeks to the yard,<br />
And they&#8217;re like &#8220;It&#8217;s better than yours&#8221;<br />
Damn right, it&#8217;s better than yours,<br />
I can teach you, but I have to charge</p></blockquote>
<p><a class="zem_slink" title="Programming language" href="http://en.wikipedia.org/wiki/Programming_language" rel="wikipedia" target="_blank">Programming languages</a> &#8211; the second favourite thing for geeks to fight about (right after code editors and <a class="zem_slink" title="Integrated development environment" href="http://en.wikipedia.org/wiki/Integrated_development_environment" rel="wikipedia" target="_blank">IDE</a>&#8216;s).</p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:John_McCarthy_Stanford.jpg" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="John McCarthy, an American computer scientist." src="http://upload.wikimedia.org/wikipedia/commons/thumb/4/49/John_McCarthy_Stanford.jpg/300px-John_McCarthy_Stanford.jpg" alt="John McCarthy, an American computer scientist." width="300" height="200" /></a><p class="wp-caption-text">John McCarthy, an American computer scientist. (Photo credit: Wikipedia)</p></div>
<p>Everybody knows <a class="zem_slink" title="Java (programming language)" href="http://www.oracle.com/technetwork/java/" rel="homepage" target="_blank">Java</a> sucks, that <a class="zem_slink" title="PHP" href="http://www.php.net" rel="homepage" target="_blank">PHP</a> is a script kiddie&#8217;s tool and that <a class="zem_slink" title="Lisp (programming language)" href="http://en.wikipedia.org/wiki/Lisp_%28programming_language%29" rel="wikipedia" target="_blank">Lisp</a> is the most magnificent thing ever to crawl out of the <a class="zem_slink" title="Abiogenesis" href="http://en.wikipedia.org/wiki/Abiogenesis" rel="wikipedia" target="_blank">primordial ooze</a> of academic language research.</p>
<p>Ask somebody else and suddenly everyone knows <a class="zem_slink" title="JavaScript" href="http://en.wikipedia.org/wiki/JavaScript" rel="wikipedia" target="_blank">JavaScript</a> is the best thing since sliced bread and Java is only used by weird people of the Indian persuasion &#8230; and <a class="zem_slink" title="Google" href="http://google.com" rel="homepage" target="_blank">Google</a>. For some reason.</p>
<p>Does all of this really matter?</p>
<p>At the end of the day most languages are turing complete, which means you can use any language to do anything. Write your next <a class="zem_slink" title="Killer application" href="http://en.wikipedia.org/wiki/Killer_application" rel="wikipedia" target="_blank">killer app</a> in <a href="http://en.wikipedia.org/wiki/Brainfuck">brainfuck</a> for all I care. You should do it in <a href="http://en.wikipedia.org/wiki/Malbolge">malbolge</a> actually, that will make the whole geek community green with envy.</p>
<p>But you know what, your app doesn&#8217;t win based on the technology you use, <em>users don&#8217;t care!</em> What matters is solving an actual problem.</p>
<p>There&#8217;s still no excuse for any <a class="zem_slink" title="Modern language" href="http://en.wikipedia.org/wiki/Modern_language" rel="wikipedia" target="_blank">modern language</a> to exist without type inference though &#8230;</p>
<p><a href="http://screencasts.chariotsolutions.com/webpage/2011/10">Uncovering the Unknown: Principles of Type Inference</a> &#8211; an awesome talk explaining exactly <em>why </em>there is no excuse for making people type <em>int</em> and <em>char</em> in 2012.</p>
<p>I&#8217;m looking at you Java.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.readwriteweb.com/cloud/2012/03/googles-go-programming-languag.php" target="_blank">Google&#8217;s Go Programming Language Grows Up: Now What?</a> (readwriteweb.com)</li>
<li class="zemanta-article-ul-li"><a href="http://blog.architgupta.com/language-ism" target="_blank">Language-ism</a> (architgupta.com)</li>
<li class="zemanta-article-ul-li"><a href="http://nathansuniversity.appspot.com/" target="_blank">Create your own programming language in JavaScript</a> (nathansuniversity.appspot.com)</li>
<li class="zemanta-article-ul-li"><a href="http://siliconfilter.com/google-releases-version-1-of-its-go-programming-language/" target="_blank">Google Releases Version 1 of its Go Programming Language</a> (siliconfilter.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www.i-programmer.info/news/98-languages/3926-javascript-on-the-rise.html" target="_blank">JavaScript On the Rise</a> (i-programmer.info)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=f3a6fcd8-eba5-42be-9a69-97a7bf3b8da7" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598188&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/my-language-is-better-than-yours/swizec/4093?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/my-language-is-better-than-yours/swizec/4093/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Science Wednesday: Defining poetry</title>
		<link>http://swizec.com/blog/science-wednesday-defining-poetry/swizec/4079</link>
		<comments>http://swizec.com/blog/science-wednesday-defining-poetry/swizec/4079#comments</comments>
		<pubDate>Wed, 28 Mar 2012 10:53:46 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Le Thesis]]></category>
		<category><![CDATA[Science Wednesday]]></category>
		<category><![CDATA[Alexander Blok]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[Definition]]></category>
		<category><![CDATA[Literature]]></category>
		<category><![CDATA[Natural Language Generation]]></category>
		<category><![CDATA[Online Writing]]></category>
		<category><![CDATA[Poetry]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4079</guid>
		<description><![CDATA[Poetry is a literary form in which language is used in a concentrated blend of sound and imagery to create an emotional response. ~ Levin (1962) Poetry is simple to define &#8211;  a poem is a poem because people consider it a poem. Simple. Easy to understand. Useless. When you are studying poetry in a [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Poetry is a literary form in which language is used in a concentrated blend of sound and imagery to create an emotional response.</p>
<p>~ Levin (1962)</p></blockquote>
<p>Poetry is simple to define &#8211; <em> a <a class="zem_slink" title="Poetry" href="http://en.wikipedia.org/wiki/Poetry" rel="wikipedia" target="_blank">poem</a> is a poem because people consider it a poem. </em></p>
<p>Simple. Easy to understand. Useless.</p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:Alexander_Blok_-_Noch%2C_ulica%2C_fonar%2C_apteka.jpg" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="Alexander Blok's poem 'Noch, ulica, fonar, apt..." src="http://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Alexander_Blok_-_Noch%2C_ulica%2C_fonar%2C_apteka.jpg/300px-Alexander_Blok_-_Noch%2C_ulica%2C_fonar%2C_apteka.jpg" alt="Alexander Blok's poem 'Noch, ulica, fonar, apt..." width="300" height="224" /></a><p class="wp-caption-text">Alexander Blok&#39;s poem </p></div>
<p>When you are <a href="http://swizec.com/blog/science-wednesday-towards-a-computational-model-of-poetry-generation/swizec/3855">studying poetry</a> in a scientific context, even <a href="https://github.com/Swizec/Le-Thesis">creating a poetry generator</a> for your graduation thesis, you need a definition that goes beyond intuitive notions of poetry.</p>
<p>Specifically, you need <a class="zem_slink" title="Falsifiability" href="http://en.wikipedia.org/wiki/Falsifiability" rel="wikipedia" target="_blank">falsifiable</a> results, a way to decide what piece of text is gibberish and what is poetry. Answering the question &#8220;Is this art?&#8221; is impossible, so Manurung came up with a better definition of poetry in his doctorate thesis <em><a href="http://academic.research.microsoft.com/Paper/2348039.aspx" target="_blank">An evolutionary algorithm for poetry generation</a>.</em></p>
<p>He touches upon three dimensions of poetry: poeticness, grammaticality and meaningfulness and finally arrives at a useful definition.</p>
<h2>Poeticness</h2>
<p>Usual suspect properties of poetry apply here, exactly the ones you learned about in high school. Things such as rhythm, metre, <a class="zem_slink" title="Phoneme" href="http://en.wikipedia.org/wiki/Phoneme" rel="wikipedia" target="_blank">phonemic</a> patterns and <a class="zem_slink" title="Literal and figurative language" href="http://en.wikipedia.org/wiki/Literal_and_figurative_language" rel="wikipedia" target="_blank">figurative language</a>.</p>
<p>For our experiments to be falsifiable it is useful to focus solely on the technical aspects of poetry i.e. the rhythm and phonemic patterns. If you don&#8217;t remember &#8211; rhythm and metre are the patterns in syllable stress and phonemic patterns are rhymes and such.</p>
<div id="attachment_4084" class="wp-caption alignnone" style="width: 409px"><a href="http://swizec.com/blog/wp-content/uploads/2012/03/metre.png?1d5d3d"><img class="size-full wp-image-4084" title="Ambiguity in partitioning metre into feet" src="http://swizec.com/blog/wp-content/uploads/2012/03/metre.png?1d5d3d" alt="Ambiguity in partitioning metre into feet" width="399" height="174" /></a><p class="wp-caption-text">Ambiguity in partitioning metre into feet</p></div>
<p>There are several types of phonemic patterns (rhyme, alliteration, assonance and consonance), but considering the syllabication problem solved, these are fairly easy to test.</p>
<p>Problems arise when considering figurative language. When is something a metaphor, or just using the wrong word? Quinn (1982) lists a taxonomy of 60 different types of figures of speech, both at the symbolic and the rhetorical level. (can&#8217;t find a link right now, sorry)</p>
<p>This is a poem produced by an old-style system using purely random functions (ELUAR).</p>
<blockquote><p>Sparkles of whiteness fly in my eyes,<br />
The moan of stars swang branches of trees,<br />
The heart of time sings in the snowy night.<br />
Seconds of Eternity fly in grass,<br />
The Clock of rain turns,<br />
Death of the Apples,<br />
The Equinox penetrates the words.</p></blockquote>
<p>Is it a real poem? I don&#8217;t know, but the experiment doesn&#8217;t look very falsifiable either.</p>
<p>Any <a class="zem_slink" title="Surrealist techniques" href="http://en.wikipedia.org/wiki/Surrealist_techniques" rel="wikipedia" target="_blank">automatic poetry</a> generator bumps into the problem that <em>Readers of [poetry] are prepared to do considerable interpretative work &#8230; In general, the more the audience is prepared to contribute in responding to a work of art, themore chance there is that a computer&#8217;s performance may be acknowledged as aesthetically valuable (Boden 1990)</em></p>
<p>The implication being &#8220;this shit is simple&#8221;. But that&#8217;s abusing the concept of poetic license &#8211; something we want to avoid and make life harder for ourselves.</p>
<h2>Grammaticality</h2>
<blockquote><p>A poem must obey linguistic conventions that are prescribed by a given grammar and lexicon. This is perhaps the most obvious requirement that by definition all natural lan- guage artifacts should fulfill. However, in the context of poetry, it is important to state explicitly, as there is the danger of invoking poetic license (see previous section).</p></blockquote>
<p>Essentially, we are avoiding purely random strings of words.</p>
<p>For instance: according to <em>hyperbaton </em>(a defined figure of speech) the line &#8220;I was in my life alone&#8221; is allowed, but &#8220;In I life was alone my&#8221; is just silly.</p>
<h2>Meaningfulness</h2>
<div class="wp-caption alignright" style="width: 196px"><a href="http://www.flickr.com/photos/22179411@N06/4236215697" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured" title="Poetry is an..." src="http://farm3.static.flickr.com/2523/4236215697_595587b794_m.jpg" alt="Poetry is an..." width="186" height="240" /></a><p class="wp-caption-text">Poetry is an... (Photo credit: liber(the poet);)</p></div>
<p>Simply put, the property of meaningfulness states that a text must <em>intentionally</em> convey some sort of conceptual message that can be interpreted. This holds true for any <a class="zem_slink" title="Natural language generation" href="http://en.wikipedia.org/wiki/Natural_language_generation" rel="wikipedia" target="_blank">Natural Language Generation</a> system and despite what first year english majors might think, it must also hold true for poetry.</p>
<p>Keyword being <em>intentionally</em>. The above poem produced by ELUAR primarily hinges on unguided random processes, so it cannot possibly fulfill this requirement.</p>
<h2>Useful definition</h2>
<p>Finally we reach a useful definition of poetry:</p>
<blockquote><p>A poem is a natural language artifact which simultaneously fulfills the properties of meaningfulness, grammaticality and poeticness. In other words, a text x is a poem if x ∈ P ∩ G ∩ M.</p></blockquote>
<p>For this definition to be complete, further specification must be done on defining meaningfulness and poeticness &#8211; something I hope the authors have published papers on since 2003, otherwise this is an area I hope to tackle in my thesis.</p>
<p>Since we can measure the technical aspects of poeticness, this definition favors classical poetry &#8211; a good thing, since I personally have always found modern poetry to be somewhat contrived in its desperate attempts to be <em>art</em>.</p>
<p>Greeting card poetry serves as a good example of poetry fitting our definition.</p>
<blockquote><p>Far and away you may be,<br />
But the presence of your love is here with me</p></blockquote>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://juliecatherinevigna.wordpress.com/2012/03/25/new-index-of-poems/" target="_blank">New: Index of Poems</a> (juliecatherinevigna.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://swizec.com/blog/science-wednesday-towards-a-computational-model-of-poetry-generation/swizec/3855" target="_blank">Science Wednesday: Towards a computational model of poetry generation</a> (swizec.com)</li>
<li class="zemanta-article-ul-li"><a href="http://cgdelarey.wordpress.com/2012/03/27/poetry-in-motion/" target="_blank">Poetry in motion</a> (cgdelarey.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://caterpillartooth.wordpress.com/2012/03/27/explore-poetry-in-april/" target="_blank">Explore Poetry in April</a> (caterpillartooth.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://haikulovesongs.wordpress.com/2012/03/27/celebrating-the-amazing-poets-behind-one-stop-poetry-redux/" target="_blank">celebrating the amazing poets behind One Stop Poetry {redux}</a> (haikulovesongs.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://alchemyofscrawl.wordpress.com/2012/03/24/guest-post-by-g-p-a-spoken-word-is-not-poetry/" target="_blank">Guest Post by G.P.A &#8211; Spoken Word is not Poetry</a> (alchemyofscrawl.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://rainingink.wordpress.com/2012/03/27/foundblack-out-poetry-tuesday-2/" target="_blank">Found/Black Out Poetry Tuesday: Emotions and Sharp Edges</a> (rainingink.wordpress.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=d0ed91b7-a024-40cd-a4be-b140b8c40391" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598188&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/science-wednesday-defining-poetry/swizec/4079?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/science-wednesday-defining-poetry/swizec/4079/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>An evil business model that works</title>
		<link>http://swizec.com/blog/an-evil-business-model-that-works/swizec/4067</link>
		<comments>http://swizec.com/blog/an-evil-business-model-that-works/swizec/4067#comments</comments>
		<pubDate>Tue, 27 Mar 2012 10:43:50 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Business model]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Razor]]></category>
		<category><![CDATA[Shaving]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4067</guid>
		<description><![CDATA[A whole industry is actively conning us. But they get away with it, because we can&#8217;t get away from them. No, I&#8217;m not talking about Facebook or Google or Microsoft or Apple. That&#8217;s child&#8217;s play in comparison. Nope, not copyright and patent trolls either. I&#8217;m talking about the business model used by the razor blade, [...]]]></description>
			<content:encoded><![CDATA[<p>A whole industry is actively conning us. But they get away with it, because we can&#8217;t get away from <em>them</em>.</p>
<div class="wp-caption alignright" style="width: 276px"><img title="Don Draper" src="http://28.media.tumblr.com/tumblr_lfw4j47HeY1qgzycmo1_400.jpg" alt="Don Draper" width="266" height="400" /><p class="wp-caption-text">Don Draper</p></div>
<p>No, I&#8217;m not talking about <a class="zem_slink" title="Facebook" href="http://facebook.com" rel="homepage" target="_blank">Facebook</a> or <a class="zem_slink" title="Google" href="http://google.com" rel="homepage" target="_blank">Google</a> or <a class="zem_slink" title="Microsoft" href="http://maps.google.com/maps?ll=47.6395972222,-122.12845&amp;spn=0.01,0.01&amp;q=47.6395972222,-122.12845 (Microsoft)&amp;t=h" rel="geolocation" target="_blank">Microsoft</a> or <a class="zem_slink" title="Apple" href="http://www.apple.com" rel="homepage" target="_blank">Apple.</a> That&#8217;s child&#8217;s play in comparison.</p>
<p>Nope, not copyright and patent trolls either.</p>
<p>I&#8217;m talking about the <a class="zem_slink" title="Business model" href="http://en.wikipedia.org/wiki/Business_model" rel="wikipedia" target="_blank">business model</a> used by the razor blade, the printer and the <a class="zem_slink" title="Video game console" href="http://en.wikipedia.org/wiki/Video_game_console" rel="wikipedia" target="_blank">gaming console</a> industries.</p>
<p>A simple business model &#8211; sell the product at a low price, possibly at a loss, make sure there is a renewable component that needs replacing often and sell it to your users at a premium. The main product locks them in, the auxilary product bleeds them dry.</p>
<h2>Good old bait and switch.</h2>
<p>While gaming consoles are a pretty tame rip off and printers matter less and less. The razor blade industry is actively ripping off half the population! (assuming women mostly depilate, rather than shave)</p>
<p>As mammals who like to pretend they aren&#8217;t hairy beasts, everyone must shave. At least once in a while. As a result the <a href="http://www.stuff.co.nz/sunday-star-times/features/2329747/Why-the-shaving-market-is-so-cut-throat" target="_blank">male shaving industry is worth <strong>$2,000,000,000</strong> in the US alone</a>.</p>
<p>First you buy a razor handle, cheap, I promise, later you have to buy replacement razor blades. You know, for a clean smooth shave! Price? Oh, just twice as much as the original purchase, no biggie!</p>
<p>That&#8217;s evil.</p>
<p>Forget Google stealing all your datas or <a href="http://www.theglobeandmail.com/news/technology/digital-culture/social-networking/twitter-sells-your-feed-to-big-data/article2355287/" target="_blank">Twitter selling you out to advertisers</a>. Here, you <em>pay</em> to be ripped off. <em>Pay!</em></p>
<p>Dealing with the <a class="zem_slink" title="Shaving" href="http://en.wikipedia.org/wiki/Shaving" rel="wikipedia" target="_blank">shaving</a> industry has become so horrible I would rather shave with so old a razor that shaving sounds like a snow shovel scraping against asphalt. <em>HRRRRKKKKHHRHK!</em></p>
<div class="wp-caption alignright" style="width: 360px"><img class=" " title="30 euro :/" src="http://24.media.tumblr.com/tumblr_m1fo0fZON41qekjngo1_500.jpg" alt="30 euro :/" width="350" height="468" /><p class="wp-caption-text">30 euro :/</p></div>
<p>The handle on my last one even broke &#8211; pressing too hard made the whole thing fly off! Kept using it for two months.</p>
<p>When you finally say to yourself <em>&#8220;Okay, this is getting ridiculous, I&#8217;m buying replacement razors&#8221;</em> &#8230; you go to a store and are presented with a fine selection of two or three types of razors.</p>
<p>None match what you&#8217;ve got at home.</p>
<p>You go to the next store &#8230; the situation isn&#8217;t much better.</p>
<p>Rinse and repeat about five times and the realization finally hits you &#8211; you&#8217;ve been using this razor so long it&#8217;s been discontinued and you have to buy a whole new set.</p>
<p>Well, fuck.</p>
<h2>Volunteering for a rip off</h2>
<p>After mulling over three blades, or five, aloe this strip, silky smooth rubber that strip, maye I should just get a <a class="zem_slink" title="Razor" href="http://en.wikipedia.org/wiki/Razor" rel="wikipedia" target="_blank">disposable razor</a> &#8230; you finally pick something that looks like it might work. You fork over the 10 euro for a new razor and then 20 euro for a set of replacement blades &#8230;</p>
<p>&#8230; and you vow not to make another purchase for at least a year. You&#8217;d rather suffer using the same blade for two or three months.</p>
<p>No considerations of brand loyalty, no recollection of any marketing you saw on television, no other consideration than minimizing exposure to the purchase. When buying a computer all you want is an <a class="zem_slink" title="List of Intel microprocessors" href="http://en.wikipedia.org/wiki/List_of_Intel_microprocessors" rel="wikipedia" target="_blank">Intel processor</a> and a Nvidia graphics card. If it&#8217;s portable and you can afford it, you want an Apple.</p>
<p>And you cherish the purchase. You get excited when you buy something!</p>
<p>With razor blades just walking into the store makes you feel ripped off.</p>
<p>Maybe if they worked on that, they could get me in the store more often and increase the whole market &#8211; not just market share &#8211; would get bigger.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.digitaltrends.com/web/shaving-company-kickstarts-business-with-hilarious-viral-video/" target="_blank">Shaving company kickstarts business with hilarious viral video</a> (digitaltrends.com)</li>
<li class="zemanta-article-ul-li"><a href="http://www2.macleans.ca/2012/03/20/shaving-sticker-shock-off-razors/" target="_blank">The Dollar Shave Club&#8217;s pitch is smooth, and razor sharp</a> (macleans.ca)</li>
<li class="zemanta-article-ul-li"><a href="http://pandodaily.com/2012/03/06/dollar-shave-club-punches-gillette-where-it-hurts-in-the-marketing-budget/" target="_blank">Dollar Shave Club Punches Gillette Where It Hurts. (In the Marketing Budget)</a> (pandodaily.com)</li>
<li class="zemanta-article-ul-li"><a href="http://gadgets.gunaxin.com/fing-great-razors-life/115512" target="_blank">F***ing Great Razors for Life?</a> (gadgets.gunaxin.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=c5df4cc3-1895-41ce-ae38-a54dcdf0b691" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598188&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/an-evil-business-model-that-works/swizec/4067?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/an-evil-business-model-that-works/swizec/4067/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>A test post and a story</title>
		<link>http://swizec.com/blog/a-test-post-and-a-story/swizec/4060</link>
		<comments>http://swizec.com/blog/a-test-post-and-a-story/swizec/4060#comments</comments>
		<pubDate>Sun, 25 Mar 2012 15:23:45 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4060</guid>
		<description><![CDATA[This is a test post to see if caching is now configured properly, feeds are updating, frontpage is updating etc. Here is a story in picture form for your troubles:]]></description>
			<content:encoded><![CDATA[<p>This is a test post to see if caching is now configured properly, feeds are updating, frontpage is updating etc.</p>
<p>Here is a story in picture form for your troubles:</p>
<p><img class="alignnone" src="http://i.imgur.com/1Wu9o.jpg" alt="" width="600" height="565" /><br />
<img class="alignnone" src="http://i.imgur.com/JwBpr.jpg" alt="" width="600" height="565" /><br />
<img class="alignnone" src="http://i.imgur.com/pqdJE.jpg" alt="" width="600" height="565" /><br />
<img class="alignnone" src="http://i.imgur.com/pqdJE.jpg" alt="" width="600" height="565" /><br />
<img class="alignnone" src="http://i.imgur.com/inrvE.jpg" alt="" width="600" height="565" /><br />
<img class="alignnone" src="http://i.imgur.com/BIfCA.jpg" alt="" width="600" height="565" /><br />
<img class="alignnone" src="http://i.imgur.com/1jcHO.jpg" alt="" width="600" height="565" /><br />
<img class="alignnone" src="http://i.imgur.com/vQTVj.jpg" alt="" width="600" height="565" /><br />
<img class="alignnone" src="http://i.imgur.com/4MfTV.jpg" alt="" width="600" height="565" /></p>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598189&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/a-test-post-and-a-story/swizec/4060?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/a-test-post-and-a-story/swizec/4060/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I wish this existed</title>
		<link>http://swizec.com/blog/i-wish-this-existed/swizec/4045</link>
		<comments>http://swizec.com/blog/i-wish-this-existed/swizec/4045#comments</comments>
		<pubDate>Fri, 23 Mar 2012 11:56:12 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[A tech a day]]></category>
		<category><![CDATA[Concept]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[Highlighter]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Syntax]]></category>
		<category><![CDATA[Syntax highlighting]]></category>
		<category><![CDATA[Turbo Pascal]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4045</guid>
		<description><![CDATA[Just realized 90% of my blogposts rape the word &#8220;actually&#8221;. &#8212; Swizec (@Swizec) March 19, 2012 This happens because not a single writing tool can tell me Hey you, yes you, you&#8217;re using too many filler words, yo! Ever since the 1990&#8242;s programmers have been using a key piece of technology. An ubiquitous piece of [...]]]></description>
			<content:encoded><![CDATA[<blockquote class="twitter-tweet"><p>Just realized 90% of my blogposts rape the word &#8220;actually&#8221;.</p>
<p>&mdash; Swizec (@Swizec) <a href="https://twitter.com/Swizec/status/181674782339772416" data-datetime="2012-03-19T09:33:38+00:00">March 19, 2012</a></p></blockquote>
<p><script src="//platform.twitter.com/widgets.js?1d5d3d" charset="utf-8"></script></p>
<p>This happens because not a single writing tool can tell me <em>Hey you, yes you, you&#8217;re using too many <a class="zem_slink" title="Filler (linguistics)" href="http://en.wikipedia.org/wiki/Filler_%28linguistics%29" rel="wikipedia" target="_blank">filler words</a>, yo!</em></p>
<p>Ever since the 1990&#8242;s programmers have been using a key piece of technology. An ubiquitous piece of tech that exists in even the most trivial of <a class="zem_slink" title="Code" href="http://en.wikipedia.org/wiki/Code" rel="wikipedia" target="_blank">code</a> editors, something that makes the life of a <a class="zem_slink" title="Programmer" href="http://en.wikipedia.org/wiki/Programmer" rel="wikipedia" target="_blank">coder</a> survivable.</p>
<h2>Syntax highlighting!</h2>
<p>This is what code looked like before <a class="zem_slink" title="Syntax" href="http://en.wikipedia.org/wiki/Syntax" rel="wikipedia" target="_blank">syntax</a> highlighting. Working with this wasn&#8217;t impossible &#8230; the longest piece of code I came up with was probably upwards of 4000 lines of very horrible code &#8230; hey, I was 12, cut me some slack.</p>
<div id="attachment_4049" class="wp-caption alignnone" style="width: 650px"><a href="http://swizec.com/blog/wp-content/uploads/2012/03/turbo_pascal.png?1d5d3d"><img class="size-full wp-image-4049" title="Turbo Pascal 6" src="http://swizec.com/blog/wp-content/uploads/2012/03/turbo_pascal.png?1d5d3d" alt="Turbo Pascal 6" width="640" height="454" /></a><p class="wp-caption-text">Turbo Pascal 6</p></div>
<p>I still remember the incredible joy that came with installing Turbo Pascal 7. <a class="zem_slink" title="Syntax highlighting" href="http://en.wikipedia.org/wiki/Syntax_highlighting" rel="wikipedia" target="_blank">Syntax Highlighting</a> baby! No seriously, the code was suddenly <em>better</em>.</p>
<p>Life in general was <em>better</em>. I would compare <a class="zem_slink" title="Quality of life" href="http://en.wikipedia.org/wiki/Quality_of_life" rel="wikipedia" target="_blank">quality of life</a> before and after syntax highlighting to losing one&#8217;s virginity. It is literally <em>that</em> awesome.</p>
<div id="attachment_4050" class="wp-caption alignnone" style="width: 680px"><a href="http://swizec.com/blog/wp-content/uploads/2012/03/turbo_pascal_7_scholl_pack_13_640966.png?1d5d3d"><img class="size-full wp-image-4050" title="Turbo Pascal 7" src="http://swizec.com/blog/wp-content/uploads/2012/03/turbo_pascal_7_scholl_pack_13_640966.png?1d5d3d" alt="Turbo Pascal 7" width="670" height="453" /></a><p class="wp-caption-text">Turbo Pascal 7</p></div>
<p>I remember spending a lot of time just tweaking the highlighter settings, making sure everything looked just right. A well set up syntax highlighter makes you feel at home <img src="http://swizec.com/blog/wp-includes/images/smilies/icon_smile.gif?1d5d3d" alt=':)' class='wp-smiley' /> </p>
<p>These days I no longer pay much attention to syntax highlighting, I just take it for granted. If a file looks wrong in <a class="zem_slink" title="Emacs" href="http://www.gnu.org/software/emacs" rel="homepage" target="_blank">Emacs</a>, you simply go on the internets, download the appropriate mode and voila, code looks good again.</p>
<h2>Natural language syntax highlighting</h2>
<p>Coding isn&#8217;t all I do anymore, though A lot of my time is spent <a href="http://swizec.com/blog/on-writing-every-day/swizec/3058">writing every day</a>. My editors though &#8230; are kind of lame.</p>
<p>When writing English my &#8220;code&#8221; still looks like it was 1994:</p>
<div id="attachment_4052" class="wp-caption alignnone" style="width: 800px"><a href="http://swizec.com/blog/wp-content/uploads/2012/03/Screen-Shot-2012-03-23-at-11.57.31-AM.png?1d5d3d"><img class="size-full wp-image-4052" title="Distractionless writing" src="http://swizec.com/blog/wp-content/uploads/2012/03/Screen-Shot-2012-03-23-at-11.57.31-AM.png?1d5d3d" alt="Distractionless writing" width="790" height="209" /></a><p class="wp-caption-text">Distractionless writing</p></div>
<p>Writing without distractions is all fine and good, but syntax highlighting isn&#8217;t a distraction! It&#8217;s helpful!</p>
<p>What if instead of a cold hard piece of text staring back at me from the editor, there was something like this instead:</p>
<div id="attachment_4054" class="wp-caption alignnone" style="width: 516px"><a href="http://swizec.com/blog/wp-content/uploads/2012/03/Screen-Shot-2012-03-23-at-12.34.24-PM.png?1d5d3d"><img class="size-full wp-image-4054" title="English syntax highlighting" src="http://swizec.com/blog/wp-content/uploads/2012/03/Screen-Shot-2012-03-23-at-12.34.24-PM.png?1d5d3d" alt="English syntax highlighting" width="506" height="230" /></a><p class="wp-caption-text">English syntax highlighting</p></div>
<p>This is just a simple mockup I put together in html in about 20 minutes. Syntax highlighting on the level of words</p>
<ul>
<li>verbs are <span style="color: rgba(232, 19, 225, 1);">pink</span></li>
<li>pronouns are <span style="color: rgba(36, 199, 49, 1);">green</span></li>
<li>nouns are <span style="color: rgba(22, 26, 222, 1); font-weight: 600;">blue</span></li>
<li>errors have a <span style="background: rgba(235, 47, 69, 0.3);">red background</span></li>
</ul>
<p>Not sure how visible it is, but when editing a sentence, it would be useful for the start and end of it to be <span style="background: rgba(17, 245, 245, 0.3);">highlighted</span> with a light blue hue &#8230; just like parenthesis matching when coding!</p>
<p>It would be really cool if syntax highlighting for <a class="zem_slink" title="Natural language" href="http://en.wikipedia.org/wiki/Natural_language" rel="wikipedia" target="_blank">natural languages</a> went beyond words and onto concepts, where it isn&#8217;t just the noun that turns blue, but all adjectives attached to it would get a blue-ish background. </p>
<p>That would help <em>incredibly</em> when it comes to overloading.</p>
<h2>Who could use this?</h2>
<p>If natural languages were a bit simpler, we&#8217;d already have syntax <a class="zem_slink" title="Highlighter" href="http://en.wikipedia.org/wiki/Highlighter" rel="wikipedia" target="_blank">highlighters</a> &#8230; or maybe nobody&#8217;s thought of this before?</p>
<p>I for one do enough writing that I would pay for something like this. Make it a wordpress plugin or something &#8230; or an emacs mode. I don&#8217;t care, I want it!</p>
<p>Hopefully I&#8217;m not the only person who needs this, there is a whole market of book and magazine editors, professional writers, journalists and so on who could benefit from something like this.</p>
<p>However, all of those people will never <em>ask</em> for syntax highlighting, I doubt many of them even realize such a concept exists.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://swizec.com/blog/webdevs-you-have-no-idea-how-much-you-know/swizec/3891" target="_blank">Webdevs, you have no idea how much you know</a> (swizec.com)</li>
<li class="zemanta-article-ul-li"><a href="http://alexanderle.com/blog/2012/03/17/syntax-highlighting-with-gvim.html" target="_blank">Add Syntax Highlighting To Your Blog With VIM</a> (alexanderle.com)</li>
<li class="zemanta-article-ul-li"><a href="http://briancarper.net/blog/556/clojure-syntax-highlighting-via-syntaxhighlighter" target="_blank">Clojure syntax highlighting via SyntaxHighlighter</a> (briancarper.net)</li>
<li class="zemanta-article-ul-li"><a href="http://weblogs.sdn.sap.com/pub/wlg/28805" target="_blank">How-to use syntax highlighting using Notepad++ for SAP NetWeaver Identity Management scripts</a> (weblogs.sdn.sap.com)</li>
<li class="zemanta-article-ul-li"><a href="http://kungfuwit.wordpress.com/2012/02/22/syntax-highlighting-for-code-blocks-in-madcap-flare-with-prettify/" target="_blank">Syntax highlighting of code blocks with Prettify</a> (kungfuwit.wordpress.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=a7e90941-a919-4af3-8fc0-ae8f05b19449" alt="Enhanced by Zemanta" /></a></div>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598189&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/i-wish-this-existed/swizec/4045?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/i-wish-this-existed/swizec/4045/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>What Starting feels like</title>
		<link>http://swizec.com/blog/what-starting-feels-like/swizec/4040</link>
		<comments>http://swizec.com/blog/what-starting-feels-like/swizec/4040#comments</comments>
		<pubDate>Wed, 21 Mar 2012 10:35:28 +0000</pubDate>
		<dc:creator>Swizec</dc:creator>
				<category><![CDATA[Inspiration]]></category>

		<guid isPermaLink="false">http://swizec.com/blog/?p=4040</guid>
		<description><![CDATA[Starting anything is scary. Mindbogglingly scary in fact. But somebody&#8217;s got to do it and if a 4th grader girl can lob herself off a big ski jump, you can stare down that text editor until it produces some code, a blogpost, a business plan or whatever. Certainly the best video I&#8217;ve seen this month]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://www.youtube.com/embed/ebtGRvP3ILg" frameborder="0" width="640" height="360"></iframe></p>
<p>Starting anything is <em>scary</em>. Mindbogglingly scary in fact. But somebody&#8217;s got to do it and if a 4th grader girl can lob herself off a big ski jump, you can stare down that text editor until it produces some code, a blogpost, a business plan or whatever.</p>
<p>Certainly the best video I&#8217;ve seen this month <img src="http://swizec.com/blog/wp-includes/images/smilies/icon_smile.gif?1d5d3d" alt=':)' class='wp-smiley' /> </p>
 <div>
		<img src="http://www.google-analytics.com/__utm.gif?utmwv=5.2.7&utms=2&utmn=1337598189&utmhn=swizec.com&utmcs=UTF-8&utmdt=A%20geek%20with%20a%20hat&utmhid=1065670631&utmr=-&utmp=&utmac=UA-1464315-1" /><iframe src="http://swizec.com/blog/what-starting-feels-like/swizec/4040?track_page=1" style="width:100%;height:80px; border: none"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://swizec.com/blog/what-starting-feels-like/swizec/4040/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: www.swizec.com @ 2012-05-21 13:03:09 by W3 Total Cache -->
