<?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>Open eyes Working brain</title>
	<atom:link href="http://federico.galassi.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://federico.galassi.net</link>
	<description>dedicated, in respect and admiration, to the spirit that lives in the computer</description>
	<lastBuildDate>Mon, 19 Mar 2012 23:55:07 +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>Global Education 1.0</title>
		<link>http://federico.galassi.net/2012/03/17/global-education-1-0/</link>
		<comments>http://federico.galassi.net/2012/03/17/global-education-1-0/#comments</comments>
		<pubDate>Sat, 17 Mar 2012 12:13:53 +0000</pubDate>
		<dc:creator>federico</dc:creator>
				<category><![CDATA[education]]></category>
		<category><![CDATA[great people]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[berkeley]]></category>
		<category><![CDATA[coursera]]></category>
		<category><![CDATA[degree]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[knowledge]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[mit]]></category>
		<category><![CDATA[mitx]]></category>
		<category><![CDATA[online]]></category>
		<category><![CDATA[stanford]]></category>
		<category><![CDATA[student]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[udacity]]></category>
		<category><![CDATA[university]]></category>

		<guid isPermaLink="false">http://federico.galassi.net/?p=431</guid>
		<description><![CDATA[I am a knowledge worker. Seeking new knowledge in computer science and technologies is part of my job and i know that finding good knowledge is about finding good sources. There are many of them: good language communities, good publishers, good people. But there are places that are real hotbeds, in which all the cool [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-thumbnail wp-image-433" title="Global Education" src="http://federico.galassi.net/wp-content/uploads/2012/03/global_education-150x150.jpg" alt="" width="200" height="200" /></p>
<p>I am a knowledge worker. Seeking new knowledge in computer science and technologies is part of my job and i know that finding good knowledge is about finding good sources. There are many of them: <a href="http://www.ruby-lang.org/en/community/">good language communities</a>, <a href="http://pragprog.com/titles">good</a> <a href="http://shop.oreilly.com/category/browse-subjects.do">publishers</a>, <a href="http://www.crockford.com/">good people</a>. But there are places that are real <a href="http://thetalentcode.com/">hotbeds</a>, in which all the cool things seem to happen, over and over again. They&#8217;re top american engineering and technology universities. It&#8217;s where most of the history of computers happened. From <a href="http://en.wikipedia.org/wiki/Vi#Creation">Bill Joy coding up Vi for BSD</a> at <a href="http://berkeley.edu/">Berkeley</a>, to <a href="http://mitpress.mit.edu/sicp/">Abelson and Sussman teaching SICP</a> at <a href="http://mit.edu/">MIT</a>, to <a href="http://en.wikipedia.org/wiki/Google#History">Brin and Page starting Google as a research project</a> at <a href="http://www.stanford.edu/">Stanford</a>, to many many more. These are places you have absolutely to watch out for good stuff.</p>
<p>Traditionally top universities have always been elitist with knowledge considered a precious good for a few who typically can pay big money. But with the advent of internet something changed. A first wave of web projects came out with the intent of giving free public online education. <a href="http://ocw.mit.edu/index.htm">MIT OpenCourseWare</a> and <a href="http://webcast.berkeley.edu/">Berkeley Webcast</a> in 2002 and later <a href="http://see.stanford.edu/">Stanford Engineering Everywhere</a>. They all started to give out material of some of their courses and then kept expanding their offer. Free education for the masses, but with one glaring omission compared to their traditional curricula. You get this as a gift, but you&#8217;re on your own. No feedback loop, no legal recognition, no tutoring. These are for &#8220;real&#8221; alumni only.</p>
<p>Today, with internet getting faster, social networks exploding, technology advancing, the snowball is really starting to roll down hill. You can see it from the second wave of sites. Recently born <a href="http://www.coursera.org/">Coursera</a>, <a href="http://www.udacity.com/">Udacity</a>, <a href="http://mitx.mit.edu/">MITx</a> are now taking online enrollments, giving some tutoring through forums, real-time schedules, exercises automatically checked, short digestible video lectures, certificates of completion. The idea that excellent education, with the <a href="http://classx.stanford.edu/ClassX/stanford_front_pages/Showcase/demos.php">help of technology</a>, can stop being a scarce good traded for another scarce good, money, is really catching on. Maybe good education can <a href="http://en.wikipedia.org/wiki/Post_scarcity">be abundant</a>, freely available everywhere, so as to improve the entire world, digging up the actual most precious resource: talented, well educated, smart people.</p>
<p>What&#8217;s next? The point is education for the masses is not only good for the world, it can be also very good for the wallet. Cutting costs, giving ubiquitous access and making their curricula more flexible and self-paced can open these educators to a new world full of potential clients craving to learn from the best. You can already tell it because these initiatives are starting as private commercial companies <a href="http://www.udacity.com/us">backed by investors</a>. It doesn&#8217;t take much to figure out which will be the last fig leaf to fall off. In the next years, we&#8217;ll see education still given for free, but greatly expanded and side by side with commercial services, more certificates and, in the end, real online degrees with legal recognition. Freemium mainstream education, what a great opportunity. Don&#8217;t miss it, <a href="http://www.class-central.com/">start now</a>.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://federico.galassi.net/2012/03/17/global-education-1-0/"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://federico.galassi.net/2012/03/17/global-education-1-0/" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://federico.galassi.net/2012/03/17/global-education-1-0/" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://federico.galassi.net/2012/03/17/global-education-1-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Die Semicolon Die!</title>
		<link>http://federico.galassi.net/2011/05/25/die-semicolon-die/</link>
		<comments>http://federico.galassi.net/2011/05/25/die-semicolon-die/#comments</comments>
		<pubDate>Wed, 25 May 2011 17:05:54 +0000</pubDate>
		<dc:creator>federico</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[asi]]></category>
		<category><![CDATA[automatic semicolon insertion]]></category>
		<category><![CDATA[douglas crockford]]></category>
		<category><![CDATA[end of line]]></category>
		<category><![CDATA[jshint]]></category>
		<category><![CDATA[jslint]]></category>
		<category><![CDATA[pitfall]]></category>
		<category><![CDATA[syntax]]></category>

		<guid isPermaLink="false">http://federico.galassi.net/?p=362</guid>
		<description><![CDATA[I&#8217;ve always put javascript&#8217;s automatic semicolon insertion (ASI for short) under the bad parts of the language. That is based on Douglas Crockford&#8217;s explanation of how the feature is tricky and easily leads to mistakes, with the canonical example being: // good, returns the object return { ... } // wrong! returns undefined return { [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://federico.galassi.net/wp-content/uploads/2010/12/semicolon2.jpeg"><img class="alignright size-full wp-image-368" style="position: relative; z-index: 99;" title="no_semicolon" src="http://federico.galassi.net/wp-content/uploads/2010/12/semicolon2.jpeg" alt="" width="200" height="167" /></a>I&#8217;ve always put <a href="http://en.wikipedia.org/wiki/JavaScript_syntax#Whitespace_and_semicolons">javascript&#8217;s automatic semicolon insertion</a> (ASI for short) under the bad parts of the language. That is based on <a href="http://googlecode.blogspot.com/2009/03/doug-crockford-javascript-good-parts.html">Douglas Crockford&#8217;s explanation</a> of how the feature is tricky and easily leads to mistakes, with the canonical example being:</p>
<pre class="brush: js">// good, returns the object
return { ... }

// wrong! returns undefined
return
    {
        ...
    }</pre>
<p>Fair enough. Lately i&#8217;ve been doing more and more ruby. Ruby is a language universally praised for its elegant, easy to read syntax. One of the strong points of the syntax is its terseness, that is, you can <a href="http://martinfowler.com/bliki/SyntacticNoise.html">omit a lot of punctuation</a>. Semicolons as well. Wait a moment&#8230;</p>
<pre class="brush: ruby">def test
    return
        {
            ...
        }
end

test # returns nil !!</pre>
<p>Same thing! Having the meaning of a program change due to an end-of-line is not a good thing in ruby as well, but it&#8217;s widely accepted because of the benefits. This must be true for javascript as well, so first point:</p>
<p><strong>&#8220;Removing semicolons and other punctuation clutter is not just a liability. It actually makes your code look better.&#8221;</strong></p>
<p>So both the languages have to decide when a statement implicitly terminates. But is ruby implementation really the same as javascript? It turns out it&#8217;s not, ruby takes a quite safer approach. A statement in ruby is finished on an end-of-line if it&#8217;s syntactically valid by itself, it spans multiple lines if it&#8217;s not:</p>
<pre class="brush: ruby"># this works, the trailing dot means the statement is not finished
object.
    method1.
    method2.
    method3

# syntax error, first line is a valid statement by itself, second line calls method1 on nothing
object
    .method1
    .method2
    .method3</pre>
<p>It&#8217;s safe because how a line is parsed depends on the line itself, not by other lines that could be written &#8220;by others&#8221;. The bad part is how it makes method chaining on multiple lines look ugly. This is why ruby 1.9 introduced the exception &#8220;the statement continues if the first character of next line is a dot&#8221;.</p>
<p>Javascript takes a step further to solve this bad part. A controversial step. A statement is finished on an end-of-line if the first character of the next line cannot be correctly parsed as if it was part of the line. Otherwise, the statement goes on. This removes the clutter and gives nice chaining:</p>
<pre class="brush: js">// just works
object
    .method1()
    .method2()
    .method3()</pre>
<p>Unfortunately, you now have a nasty problem. 2 lines which are supposed to be 2 different statements, but with the first character of the second line being a valid continuation of the first, will be treated as one statement with unpredictable results. This practically happens only when a line starts with either ( [ + - /</p>
<pre class="brush: js">// function call instead of grouping
var a = b + c
(d + e).print()
// is really
var a = b + c(d + e).print()

// array index instead of array literal
var a = ["a", "b", "c"]
[0, 1].forEach( &#8230; )
// is really
var a = ["a", "b", "c"][0, 1].forEach( &#8230; )

// binary math operator instead of unary
var a = b + c
-1 == string.indexOf(query) || die()
// is really
var a = b + c &#8211; 1 == string.indexOf(query) || die()

// division instead of regular expression
var i=0
/[a-z]/g.exec(s)
// is really
var i=0 /[a-z]/g.exec(s)</pre>
<p>Well, this sucks, so what should you do? I could say that i remember being caught by this problem just once in many years of javascript. The return problem or starting a line the nasty way is something <em>extremely rare</em>. But even if you don't want to afford the risk, why avoid ASI without even knowing about it? Without even thinking about a reasonable fix, given the nicer syntax? And this leads me to the second point:</p>
<p><strong>"To write semicolon-free code and avoid getting bitten, you just need to remember 2 rules</strong></p>
<p><strong> 1) Don't put an end-of-line between return, break, continue, throw, postfix ++, postfix -- and their operand<br />
2) Avoid starting a line with ( [ +  - / but if you have to, prepend it with a semicolon"</strong></p>
<pre class="brush: js">// everything's fine
return { ... }
continue label
break label
throw error
counter++
counter--

var a = b + c
;(d + e).print()

var a = ["a", "b", "c"]
;[0, 1].forEach( ... )

var a = b + c
;-1 == string.indexOf(query) || die()

var i=0
;/[a-z]/g.exec(s)</pre>
<p>Is it that taxing to remember? Automatic semicolon insertion is of course controversial, but using it is not a complete failure. It's a matter of taste, a trade-off between cleaner nicer code and some tough albeit avoidable pitfall.</p>
<p>While i'm at it, let's debunk some well known myths that always show up</p>
<ul>
<li><strong>"I could know ASI but others don't and they will mess things out"</strong><br />
Well this may be true. It depends on where you work, the skill of your peers, etc.. To me, a javascript programmer is just supposed to know this stuff as he knows of prototype and first class functions. If they don't, supposing they got the opposable thumbs, as they can be told to put semicolons everywhere, they can be told to remember the above 2 simple rules.</li>
<li><strong>"It's not gonna work the same way on every browser"</strong><br />
It's in the specs since more than a decade. I think browser bugs are a thing of the past and even proponents of this theory look unable to find <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=238945">something newer than 5 years ago</a>, so.</li>
<li><strong>"It breaks the tools. You cannot minify code anymore, etc..."</strong><br />
Let's be clear about this. It's officially part of the language. A tool unable to cope with ASI is a broken tool, period. Anyway, i have never had a problem with <a href="http://code.google.com/closure/compiler/">google closure compiler</a>.<strong> </strong></li>
<li><strong>"Jslint doesn't work with it"</strong><br />
<a href="http://www.jslint.com/">Jslint</a> enforces the vision of Douglas and it's pretty strict about it. This is fair, yet for those having another vision nothing is wrong with using <a href="http://jshint.com/">Jshint</a> which has an option to accept ASI. <strong> </strong></li>
</ul>
<p>Let's close with two very nice articles that explain the details and of course you can always read the ecmascript specs:</p>
<p><a href="http://inimino.org/~inimino/blog/javascript_semicolons">The most well-written comprehensive article</a></p>
<p><a href="http://lucumr.pocoo.org/2011/2/6/automatic-semicolon-insertion/">Very good explanation of the pitfalls</a></p>
<p><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">The plain specs </a></p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://federico.galassi.net/2011/05/25/die-semicolon-die/"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://federico.galassi.net/2011/05/25/die-semicolon-die/" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://federico.galassi.net/2011/05/25/die-semicolon-die/" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://federico.galassi.net/2011/05/25/die-semicolon-die/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A Lot of Javascript Love</title>
		<link>http://federico.galassi.net/2010/11/12/a-lot-of-javascript-love/</link>
		<comments>http://federico.galassi.net/2010/11/12/a-lot-of-javascript-love/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 23:22:39 +0000</pubDate>
		<dc:creator>federico</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[event driven]]></category>
		<category><![CDATA[love]]></category>
		<category><![CDATA[new parts]]></category>
		<category><![CDATA[webtechcon]]></category>

		<guid isPermaLink="false">http://federico.galassi.net/?p=344</guid>
		<description><![CDATA[I am back from Webtech Conference Italia 2010. One of the first in Italy featuring a full javascript day with six talks. Not counting javascript related talks in other tracks. It has been exciting to see javascript explained in patterns, historically and computationally analyzed, tuned for faster websites, organized in popular libraries, used to query [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://federico.galassi.net/wp-content/uploads/2010/11/love_bear_small.jpg"><img class="alignright size-full wp-image-346" title="love_bear_small" src="http://federico.galassi.net/wp-content/uploads/2010/11/love_bear_small.jpg" alt="" width="200" height="200" /></a>I am back from <a href="http://webtechcon.it/">Webtech Conference Italia 2010</a>. One of the first in Italy featuring a full <a href="http://webtechcon.it/2010/sessions/?tid=1752">javascript day</a> with six talks. Not counting javascript related talks in other tracks. It has been exciting to see javascript explained in patterns, historically and computationally analyzed, tuned for faster websites, organized in popular libraries, used to query modern databases, to extract data from the web, to mashup those data, to program mobile devices, improved in latest browsers and at last on the server side to build scalable, fast network applications.</p>
<p>We&#8217;re witnessing the exponential rise of a neglected little broken language. A language that obviously started with <a href="http://en.wikipedia.org/wiki/First-class_function">something very right</a> and <a href="http://www.yuiblog.com/blog/2008/08/14/premature-standardization/">grew up even better</a>.</p>
<p>A language that is finally gonna get A LOT of love.</p>
<p>P.S. Here are my talks:</p>
<div id="__ss_5742893" style="width: 425px;"><strong><a title="Event Driven Javascript" href="http://www.slideshare.net/fgalassi/event-driven-javascript">Event Driven Javascript</a></strong><object id="__sse5742893" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=eventdrivenjs-101111092308-phpapp02&amp;stripped_title=event-driven-javascript&amp;userName=fgalassi" /><param name="name" value="__sse5742893" /><param name="allowfullscreen" value="true" /><embed id="__sse5742893" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=eventdrivenjs-101111092308-phpapp02&amp;stripped_title=event-driven-javascript&amp;userName=fgalassi" name="__sse5742893" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/fgalassi">Federico Galassi</a>.</div>
</div>
<div id="__ss_5745867" style="width: 425px;"><strong><a title="Javascript the New Parts" href="http://www.slideshare.net/fgalassi/javascript-the-new-parts">Javascript the New Parts</a></strong><object id="__sse5745867" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=jsthenewparts-101111152356-phpapp01&amp;stripped_title=javascript-the-new-parts&amp;userName=fgalassi" /><param name="name" value="__sse5745867" /><param name="allowfullscreen" value="true" /><embed id="__sse5745867" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=jsthenewparts-101111152356-phpapp01&amp;stripped_title=javascript-the-new-parts&amp;userName=fgalassi" name="__sse5745867" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/fgalassi">Federico Galassi</a>.</div>
</div>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://federico.galassi.net/2010/11/12/a-lot-of-javascript-love/"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://federico.galassi.net/2010/11/12/a-lot-of-javascript-love/" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://federico.galassi.net/2010/11/12/a-lot-of-javascript-love/" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://federico.galassi.net/2010/11/12/a-lot-of-javascript-love/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Complexity killed the Wave</title>
		<link>http://federico.galassi.net/2010/08/07/complexity-killed-the-wave/</link>
		<comments>http://federico.galassi.net/2010/08/07/complexity-killed-the-wave/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 22:11:41 +0000</pubDate>
		<dc:creator>federico</dc:creator>
				<category><![CDATA[simplicity]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[adoption]]></category>
		<category><![CDATA[complexity]]></category>
		<category><![CDATA[gall]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[kill]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[wave]]></category>

		<guid isPermaLink="false">http://federico.galassi.net/?p=336</guid>
		<description><![CDATA[So, Google is going to kill Wave. But despite these wins, and numerous loyal fans, Wave has not seen the user adoption we would have liked. We don’t plan to continue developing Wave as a standalone product, but we will maintain the site at least through the end of the year and extend the technology for [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://federico.galassi.net/wp-content/uploads/2010/08/nelson.jpg"><img class="alignright size-full wp-image-339" title="nelson" src="http://federico.galassi.net/wp-content/uploads/2010/08/nelson.jpg" alt="" width="200" height="187" /></a>So, Google is going to <a href="http://googleblog.blogspot.com/2010/08/update-on-google-wave.html">kill Wave</a>.</p>
<blockquote><p>But despite these wins, and numerous loyal fans, Wave has not seen the user adoption we would have liked. We don’t plan to continue developing Wave as a standalone product, but we will maintain the site at least through the end of the year and extend the technology for use in other Google projects.</p></blockquote>
<p>That&#8217;s a great example of why &#8220;do one thing well&#8221; is better than &#8220;do it all&#8221;. Not only because, as <a href="http://en.wikipedia.org/wiki/Gall's_law">Gall&#8217;s law</a> implies, it&#8217;s easier to get a simple system straight, but also because once you get a complex system straight, you still have to make people get their mind around it. Wave made chat and e-mail play well together, with a great replay feature, bots and translation. Twitter gives short text updates. Adoption declared the winner, but we <a href="http://federico.galassi.net/2009/06/09/google-wave-fallacy/">already knew it</a>.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://federico.galassi.net/2010/08/07/complexity-killed-the-wave/"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://federico.galassi.net/2010/08/07/complexity-killed-the-wave/" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://federico.galassi.net/2010/08/07/complexity-killed-the-wave/" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://federico.galassi.net/2010/08/07/complexity-killed-the-wave/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Please Don&#8217;t Touch the Slow Parts</title>
		<link>http://federico.galassi.net/2010/05/08/please-dont-touch-the-slow-parts/</link>
		<comments>http://federico.galassi.net/2010/05/08/please-dont-touch-the-slow-parts/#comments</comments>
		<pubDate>Sat, 08 May 2010 09:58:09 +0000</pubDate>
		<dc:creator>federico</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[better software]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[faster web]]></category>
		<category><![CDATA[fullo]]></category>
		<category><![CDATA[high performance web sites]]></category>
		<category><![CDATA[rules]]></category>
		<category><![CDATA[slow parts]]></category>
		<category><![CDATA[steve souders]]></category>

		<guid isPermaLink="false">http://federico.galassi.net/?p=321</guid>
		<description><![CDATA[I spoke at Better Software 2010, together with Fullo, about speeding up web applications. The talk draws heavily from Steve&#8217;s work, but it&#8217;s a little bit different from current literature because it tries to organize best practices not as flat list but under macro-areas emerged as &#8220;slow parts&#8221;. Also, i concluded with my obsession that [...]]]></description>
			<content:encoded><![CDATA[<p>I spoke at <a href="http://www.bettersoftware.it">Better Software</a> 2010, together with <a href="http://www.ideato.it">Fullo</a>, about speeding up web applications. The talk draws heavily from <a href="http://www.stevesouders.com/">Steve&#8217;s work</a>, but it&#8217;s a little bit different from current literature because it tries to organize best practices not as flat list but under macro-areas emerged as &#8220;slow parts&#8221;. Also, i concluded with <a href="http://federico.galassi.net/2009/11/15/javascript-performance-make-the-browser-happy-and-you-sad/">my obsession</a> that complexity inherently introduced by performance optimizations should not be dealt with by programmers directly, but by means of automation and abstraction.</p>
<p>Here it is.</p>
<p><strong>update</strong>: now i am linking to the extended version which i gave at phpday 2010</p>
<div style="width:425px" id="__ss_4110316"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/fgalassi/please-dont-touch-the-slow-parts-v2" title="Please Don&#39;t Touch the Slow Parts V2">Please Don&#39;t Touch the Slow Parts V2</a></strong><object id="__sse4110316" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=pleasedonttouch2-100515130606-phpapp01&#038;stripped_title=please-dont-touch-the-slow-parts-v2" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse4110316" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=pleasedonttouch2-100515130606-phpapp01&#038;stripped_title=please-dont-touch-the-slow-parts-v2" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/fgalassi">Federico Galassi</a>.</div>
</div>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://federico.galassi.net/2010/05/08/please-dont-touch-the-slow-parts/"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://federico.galassi.net/2010/05/08/please-dont-touch-the-slow-parts/" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://federico.galassi.net/2010/05/08/please-dont-touch-the-slow-parts/" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://federico.galassi.net/2010/05/08/please-dont-touch-the-slow-parts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy Birthday Blog</title>
		<link>http://federico.galassi.net/2010/04/03/happy-birthday-blog/</link>
		<comments>http://federico.galassi.net/2010/04/03/happy-birthday-blog/#comments</comments>
		<pubDate>Sat, 03 Apr 2010 13:04:28 +0000</pubDate>
		<dc:creator>federico</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[banzai]]></category>
		<category><![CDATA[birthday]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[couchdb]]></category>
		<category><![CDATA[crockford]]></category>
		<category><![CDATA[fullo]]></category>
		<category><![CDATA[gabriele]]></category>
		<category><![CDATA[gtac]]></category>
		<category><![CDATA[ideato]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[javascript.the.good.parts]]></category>
		<category><![CDATA[kata]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[laws.of.simplicity]]></category>
		<category><![CDATA[maeda]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[perfect.software]]></category>
		<category><![CDATA[pomodoro]]></category>
		<category><![CDATA[restful.web.services]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[talent.code]]></category>
		<category><![CDATA[touch.typing]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[weinberg]]></category>
		<category><![CDATA[yourank]]></category>

		<guid isPermaLink="false">http://federico.galassi.net/?p=308</guid>
		<description><![CDATA[Exactly one year ago i posted here for the first time. A hello world tentatively saying &#8220;Let&#8217;s see what happens&#8221;. Now, a year, 16 posts and more than 1000 unique visitors later i can state that maybe it didn&#8217;t happen that much, but i liked the journey. So, let&#8217;s celebrate this first year with a [...]]]></description>
			<content:encoded><![CDATA[<p>Exactly one year ago i posted here for the first time. <a href="http://federico.galassi.net/2009/04/03/hello-world/">A hello world</a> tentatively saying &#8220;Let&#8217;s see what happens&#8221;. Now, a year, 16 posts and more than 1000 unique visitors later i can state that maybe it didn&#8217;t happen that much, but i liked the journey. So, let&#8217;s celebrate this first year with a collage of people, places, companies, technologies, tools, products, devices, books, etc&#8230; that influenced and, sometimes, even inspired me in my professional life . Thanks to all.</p>
<p style="text-align: center;"><a href="http://federico.galassi.net/wp-content/uploads/2010/04/blog_birthday_1.png" target="_blank"><img class="size-full wp-image-309 aligncenter" title="Click to open bigger" src="http://federico.galassi.net/wp-content/uploads/2010/04/blog_birthday_1_small.png" alt="" width="550" height="295" /></a></p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://federico.galassi.net/2010/04/03/happy-birthday-blog/"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://federico.galassi.net/2010/04/03/happy-birthday-blog/" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://federico.galassi.net/2010/04/03/happy-birthday-blog/" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://federico.galassi.net/2010/04/03/happy-birthday-blog/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>All Software Works Ok</title>
		<link>http://federico.galassi.net/2010/03/31/all-software-works-ok/</link>
		<comments>http://federico.galassi.net/2010/03/31/all-software-works-ok/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 21:59:10 +0000</pubDate>
		<dc:creator>federico</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[psychology]]></category>
		<category><![CDATA[simplicity]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[adaptation]]></category>
		<category><![CDATA[avatar]]></category>
		<category><![CDATA[barry]]></category>
		<category><![CDATA[bloated]]></category>
		<category><![CDATA[complexity]]></category>
		<category><![CDATA[construction]]></category>
		<category><![CDATA[cost]]></category>
		<category><![CDATA[enterprise]]></category>
		<category><![CDATA[inspiration]]></category>
		<category><![CDATA[money]]></category>
		<category><![CDATA[necessity]]></category>
		<category><![CDATA[pain]]></category>
		<category><![CDATA[schwartz]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[suffering]]></category>
		<category><![CDATA[sunk]]></category>
		<category><![CDATA[untestable]]></category>
		<category><![CDATA[vision]]></category>

		<guid isPermaLink="false">http://federico.galassi.net/?p=260</guid>
		<description><![CDATA[We live in times of complexity, and even though neat technologies and elegant software can be found at times, the market is still definitely dominated by absurdly heavy solutions. Enterprise is imploding and a wind of change towards more sustainable approaches is blowing all around us, yet the mainstream scene is comparatively stagnant and all [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://federico.galassi.net/wp-content/uploads/2010/03/drinking_bird.jpg"><img class="alignright size-full wp-image-265" title="drinking_bird" src="http://federico.galassi.net/wp-content/uploads/2010/03/drinking_bird.jpg" alt="" width="200" height="133" /></a>We live in times of complexity, and even though <a href="http://nodejs.org/">neat technologies</a> and <a href="http://nokogiri.org/">elegant software</a> can be found at times, the market is still definitely dominated by absurdly heavy solutions. <a href="http://www.tbray.org/ongoing/When/201x/2010/01/02/Doing-It-Wrong">Enterprise is imploding</a> and a wind of change towards <a href="http://en.wikipedia.org/wiki/NoSQL">more sustainable approaches</a> is blowing all around us, yet the mainstream scene is comparatively stagnant and all the pain inflicted to people is not really causing the deserved rebellion.</p>
<p>Why is that? Why when confronted by the possibility of rewriting their untestable bloatware, customer&#8217;s reply is almost always invariably &#8220;No, we don&#8217;t need it. We&#8217;ll just have to fix known bugs and add a couple of features, because right as it is, the software works ok&#8230;&#8221;?. What does &#8220;works ok&#8221; really mean? In my experience, it translates roughly to &#8220;The software does not physically blows up our office, it does some of the things we need to do, and over the years our employees have developed a thick skin against all the nuisances and a baggage of manual tricks, passed on by mouth, to get the rest of the work done anyway. Oh, and we already paid a lot for it&#8221;.</p>
<p>Recently, i got a taste of this mindset myself, when i booked online 2 tickets to <a href="http://www.avatarmovie.com/">Avatar</a> at the <a href="http://www.cinedream.it/">local cineplex</a></p>
<blockquote><p>&#8220;Hello this is my reservation code&#8221;</p>
<p>&#8220;Sorry Mr, those seats are reserved&#8221;</p>
<p>&#8220;Sure, by me&#8221;</p>
<p>&#8220;No, actually by others&#8221;</p>
<p>&#8220;What? see, i made this online reservation&#8230;&#8221;</p>
<p>&#8220;I see, but we take reservations both online and by phone, sometimes they overlap and phone is given priority&#8221;</p>
<p>&#8220;Overlap?! No trust me, i am a programmer, overlapping reservations are not supposed to happen, because your system has to take care&#8221;</p>
<p>&#8220;Oh, but evidently it doesn&#8217;t&#8221;</p>
<p>&#8220;WTF?!?!&#8221;</p>
<p>&#8220;Please, don&#8217;t get mad, i am gonna give you other seats. Today is not even bad. You should see how many angry people we must manage during christmas holidays when all movies are sold out!&#8221;.</p></blockquote>
<p>Now, given that reservation means <em>&#8220;An arrangement by which accommodations are secured in advance&#8221;</em>, how would you rate a reservation system that does not guarantee secure accommodations? Like a fish unable to breathe underwater, yet they live with it, and this takes me to the point.</p>
<p>First, humans are best when it comes to adaptation. That means we naturally adapt to pain so that we don&#8217;t feel so bad, and adapt to pleasure so that we don&#8217;t feel so good. Perception of any external stimulus in the end comes to balance. <a href="http://federico.galassi.net/2009/06/12/on-the-paradox…omer-happiness/">Barry Schwartz in the Paradox of Choice</a> says:</p>
<blockquote>
<div id="_mcePaste">respondents were asked to rate their happiness on a 5-point scale. Some of them had won between $50,000 and $1 million in state lotteries within the last year. Others had become paraplegic or quadriplegic as a result of accidents. Not surprisingly, the lottery winners were happier than those who had become paralyzed. What is surprising, though, is that the lottery winners were no happier than people in general. And what is even more surprising is that the accident victims, while somewhat less happy than people in general, still judged themselves to be happy.</div>
</blockquote>
<p>Second, humans are also very bad at admitting sunk costs. The idea of having spent money on something not worth is the ultimate inconvenient truth. Again Barry</p>
<blockquote><p>Aversion to losses also leads people to be sensitive to what are called “sunk costs.” Imagine having a $50 ticket to a basketball game being played an hour’s drive away. Just before the game there’s a big snowstorm—do you still want to go? Economists would tell us that the way to assess a situation like this is to think about the future, not the past. The $50 is already spent; it’s “sunk” and can’t be recovered. What matters is whether you’ll feel better safe and warm at home, watching the game on TV, or slogging through the snow on treacherous roads to see the game in person. That’s all that should matter. But it isn’t all that matters. To stay home is to incur a loss of $50, and people hate losses, so they drag themselves out to the game.</p></blockquote>
<p>Third, as brilliantly pointed out by <a href="http://programmer.97things.oreilly.com/wiki/index.php/Code_Is_Design">Ryan Brush&#8217;s &#8220;Code is Design&#8221;</a> in <a href="http://oreilly.com/catalog/9780596809492">97 Things Every Programmer Should Know</a> and by <a href="http://www.gabrielelana.it/archives/47">Gabriele&#8217;s &#8220;Waterfall Pitfall #1&#8243; (italian)</a>, <del>uninformed</del> most people understand software construction in terms of the better known building construction. Now, since programs are built out of bytes (not bricks), which are practically nothing, using mind (not excavators), which has no physical constraints, actual construction must be very cheap. This gives them the false hope of having an easy exit strategy at their disposal: fixing the software when an emergency comes up. Would they wait for a defective bridge to show the first cracks before attempting to fix it? Their unconstrained minds seem to be unable to realize that story construction aka book writing, built out of words, might represent a more fitting comparison and that <a href="http://en.wikipedia.org/wiki/Divina_commedia">The Divine Comedy</a> took <a href="http://en.wikipedia.org/wiki/Dante_Alighieri">Dante</a>, a renowned genius, more than ten years to finish.</p>
<p>Last but not least, mainstream has made a really good job at covering mistakes of incompetent programmers. From the almost sandboxed life cycle of a php script, to the rigid syntax of java and its <a href="http://wiki.eclipse.org/FAQ_What_is_a_Quick_Fix%3F">self-correcting IDEs</a>, to the plethora of <a href="http://www.codinghorror.com/blog/2007/01/do-certifications-matter.html">useless certifications</a>, great efforts have been devoted to make any primate with opposable thumbs able to program with very limited competence. Many and cheap, that&#8217;s how economy of scale is supposed to <del>fail</del> work, and that&#8217;s how we got this <a href="http://butunclebob.com/ArticleS.UncleBob.TheNextBigThing">horde of unprofessional programmers</a> sacking the best projects.</p>
<p>All of these points help to explain proliferation of crappy software. Maybe, they get it from some body rental which pays more for advertising than for the army of juniors that actually does the job. At the beginning it hurts, but they spent good money and cannot afford to accept failure, so lies are told and more time and money are invested to improve the situation. Then workarounds, albeit inefficient, come and direct suffering somehow decreases. Eventually, the pile of workarounds becomes part of company culture, and all is back to balance: the software starts working ok.</p>
<p>Unfortunately, this means that the quest for better <del>software</del> workflows can hardly come out of necessity, it must come out of vision, and vision takes <strong>inspiration</strong> fed to <strong>working brains</strong> then <strong>time</strong> for the masses to catch up. With Universe hopefully taking care of latter two, i like to think we, professional programmers, are those in charge of the former.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://federico.galassi.net/2010/03/31/all-software-works-ok/"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://federico.galassi.net/2010/03/31/all-software-works-ok/" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://federico.galassi.net/2010/03/31/all-software-works-ok/" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://federico.galassi.net/2010/03/31/all-software-works-ok/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How I did It: Touch Typist in five months</title>
		<link>http://federico.galassi.net/2010/01/27/how-i-did-it-touch-typist-in-five-months/</link>
		<comments>http://federico.galassi.net/2010/01/27/how-i-did-it-touch-typist-in-five-months/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 17:22:52 +0000</pubDate>
		<dc:creator>federico</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[deep]]></category>
		<category><![CDATA[kaizen]]></category>
		<category><![CDATA[kata]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[practice]]></category>
		<category><![CDATA[touch]]></category>
		<category><![CDATA[type]]></category>
		<category><![CDATA[typeracer]]></category>
		<category><![CDATA[typing]]></category>
		<category><![CDATA[typingweb]]></category>
		<category><![CDATA[typist]]></category>
		<category><![CDATA[wpm]]></category>

		<guid isPermaLink="false">http://federico.galassi.net/?p=242</guid>
		<description><![CDATA[Until, from the midst of this darkness, a sudden light broke in upon me, a light so brilliant and wonderous, and yet so simple. Deep practice, eradicate errors and deep practice again. I alone succeeded in discovering the secret of bestowing skill. Nay, even more, I myself became capable of bestowing mastery upon apprentice matter. [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p><img class="alignright size-full wp-image-243" title="it-could-work" src="http://federico.galassi.net/wp-content/uploads/2010/01/it-could-work.jpg" alt="it-could-work" width="200" height="157" />Until, from the midst of this darkness, a sudden light broke in upon me, a light so brilliant and wonderous, and yet so simple. Deep practice, eradicate errors and deep practice again. I alone succeeded in discovering the secret of bestowing skill. Nay, even more, I myself became capable of bestowing mastery upon apprentice matter.</p>
<p><strong>It could work.</strong></p></blockquote>
<p>At the end of august 2009, while i was reading about <a href="http://steve-yegge.blogspot.com/2008/09/programmings-dirtiest-little-secret.html">the importance for a programmer to touch type</a>, i found out many programmers could type at 80 <a href="http://en.wikipedia.org/wiki/Words_per_minute">wpm</a> and above. I tried myself and consistently scored 60 wpm or below. I have been spending many hours a day at the keyboard since at least 1996. How could it be i am not as fast? I already knew about the importance of practice, but i did practice for years, didn&#8217;t I? Well, uhm, no.</p>
<p>Think of the career of a professional <a href="http://en.wikipedia.org/wiki/Soccer_player">football (soccer) player</a>. How does he get there, does he play all the time for years? Actually, he spends most of the week <a href="http://www.soccer-training-info.com/sample_workout_routine.asp">training</a>: stretching, pushups, sprints, weights, long runs, ball work, etc&#8230; Only a small percentage of time is indeed to play short games and the main game on sunday. That&#8217;s because play alone can only push your performance to the upper end of the range set by current skill. It&#8217;s not going to push you to the next level, to the next order of magnitude, and it doesn&#8217;t keep you from developing bad habits. And that&#8217;s where i got, very fast at typing in my very flawed 7-fingers posture. Not able to improve any further, not even in more than 10 years.</p>
<p>I really <a href="http://en.wikipedia.org/wiki/Kaizen">wanted to get better</a>, so the questions were How? and How long will it take? I didn&#8217;t know the answer to the latter but the former was by then clear in my mind. Find a keyboard dojo, do keyboard <a href="http://federico.galassi.net/2009/09/02/code-katas-programmers-deep-practice/">katas</a> and take the needed time. After trying a lot of viable solutions i found my dojo at <a href="http://www.typingweb.com/">www.typingweb.com</a>. To add some salt to the challenge i switched keyboard layout from italian to U.S., which is quite better for programming, and i started practicing daily with their courses, routinely taking tests to record my progress. Two <a href="http://www.pomodorotechnique.com/">pomodoros</a> a day for the first two months, then one, then again two when i was reaching the end. Always striving to get 97% or above accuracy at the higher possible speed for every single lesson.</p>
<p>Now, five months and about 120 pomodoros of deep practice later, i am writing this to shout to the world that IT COULD WORK. Next i&#8217;ll be moving to <a href="http://federico.galassi.net/2009/07/31/vim-or-the-inevitable-value-of-complexity/">vim</a> katas, while still having some fun at <a href="http://www.typeracer.com">www.typeracer.com</a>, because you never really stop to practice right?!</p>
<p style="text-align: right;">Yours sincerely,<br />
ten fingers typist<br />
american layout<br />
80 wpm average<br />
up to 100 wpm under a good moon<br />
Federico.</p>
<p style="text-align: right;"><img class="aligncenter size-full wp-image-252" title="typing_sep09" src="http://federico.galassi.net/wp-content/uploads/2010/01/typing_sep092.png" alt="typing_sep09" width="573" height="282" /></p>
<p style="text-align: right;"><img class="aligncenter size-full wp-image-251" title="typing_nov09-gen10" src="http://federico.galassi.net/wp-content/uploads/2010/01/typing_nov09-gen10.png" alt="typing_nov09-gen10" width="573" height="284" /></p>
<p style="text-align: right;">
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://federico.galassi.net/2010/01/27/how-i-did-it-touch-typist-in-five-months/"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://federico.galassi.net/2010/01/27/how-i-did-it-touch-typist-in-five-months/" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://federico.galassi.net/2010/01/27/how-i-did-it-touch-typist-in-five-months/" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://federico.galassi.net/2010/01/27/how-i-did-it-touch-typist-in-five-months/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Authentication as it SHOULD have been</title>
		<link>http://federico.galassi.net/2009/12/31/web-authentication-as-it-should-have-been/</link>
		<comments>http://federico.galassi.net/2009/12/31/web-authentication-as-it-should-have-been/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 18:19:51 +0000</pubDate>
		<dc:creator>federico</dc:creator>
				<category><![CDATA[rest]]></category>
		<category><![CDATA[simplicity]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[401]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[basic]]></category>
		<category><![CDATA[digest]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[locastorage]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[logout]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[sessionstorage]]></category>
		<category><![CDATA[stateless]]></category>
		<category><![CDATA[usernametoken]]></category>
		<category><![CDATA[wsse]]></category>

		<guid isPermaLink="false">http://federico.galassi.net/?p=214</guid>
		<description><![CDATA[REST is not an easy concept to grasp but once you get it you finally see the light on many different things. Having just read RESTful Web Services, i wanted to point out some unusual revelation that came to me: form based authentication with its login/session/logout workflow, which is currently dominant on the web, is [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-215" title="auth_small" src="http://federico.galassi.net/wp-content/uploads/2009/12/auth_small.jpg" alt="auth_small" width="200" height="191" /></p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">REST is not an easy concept to grasp but once you get it you finally see the light on many different things. Having just read RESTful Web Services, i wanted to point out some unusual revelation that came to me: form based authentication with its login/session/logout workflow, which is currently dominant on the web, is hopelessly broken.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">First two words about REST. It&#8217;s a set of constraints, of simplifying assumptions which, if applied to an architecture, will guarantee a number of good properties such as simplicity, scalability and reliability. The best known implementation of a RESTful architecture is the web and its backbone protocol, HTTP. HTTP RESTfulness made it good and yet so easy to implement that it eventually emerged as the great darwinian winner. Either your router or a pretty rabbit, if it&#8217;s networked it&#8217;s likely to speak HTTP.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Instead of giving yet another list of REST rules, i am going to give you a feeling of how the web works from a REST perspective. There&#8217;s a server which keeps state of the application, split into meaningful resources. Each resource has its own name (URI). That&#8217;s all the server knows. Then there&#8217;s a client which acts as a finite state machine visiting resources and then moving to other ones through links and forms. The state of the conversation, the session, where the client have been and where it is now, it&#8217;s something the client is in full control of. Server knows nothing about it. That&#8217;s statelessness.</div>
<p>Having recently read <a href="http://www.amazon.com/Restful-Web-Services-Leonard-Richardson/dp/0596529260">RESTful Web Services</a>, i wanted to write about the most interesting of my REST-induced epiphanies:</p>
<p style="text-align: left; "><a href="http://en.wikipedia.org/wiki/Form_based_authentication">Form based authentication</a> with its login/session/logout workflow, which is currently dominant on the web, is hopelessly broken.</p>
<p>To understand why, one has to grasp how the greatest living RESTful implementation, the web and its backbone protocol <a href="http://www.w3.org/Protocols/">HTTP</a>, was <a href="http://www.ted.com/talks/tim_berners_lee_on_the_next_web.html">meant to work</a>. In a nutshell, there&#8217;s a server that keeps the state of the web application, split into meaningful <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm#sec_5_2_1_1">resources</a>. Each resource has its own name (<a href="http://en.wikipedia.org/wiki/Uniform_Resource_Identifier">URI</a>) and a set of available <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm#sec_5_2_1_2">representations</a> of itself. That&#8217;s all the server knows. Then there&#8217;s a client that acts as a <a href="http://en.wikipedia.org/wiki/Finite-state_machine">finite state machine</a> visiting resources, getting representations and then moving to other resources through links and forms. <a href="http://en.wikipedia.org/wiki/Session_(computer_science)">The state of the conversation, the session</a>, where a client has been and where it is now, is something that belongs to the client. Server drives the client by feeding him a graph made of states and links to other states, but it&#8217;s the client who is in charge of following a path. That&#8217;s <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm#sec_5_1_3">statelessness</a>, the simplifying property that made the web triumph as a <a href="http://en.wikipedia.org/wiki/Survival_of_the_fittest">darwinian winner</a>.</p>
<p>In this view, authentication should have been largely a client-side business.<br />
The client visits resources anonymously. If it wants to be authenticated, it just starts sending authentication data with <strong>each</strong> further request. If it wants to be anonymous again, it just stops. It could as well send a mix of authenticated and anonymous requests.<br />
The server doesn&#8217;t care of what happens between requests. If a single request carries authentication data, it checks the data and possibly replies as if the client were authenticated. If a request has no authentication data, a generic response is returned. There&#8217;s no server-side login through a form, there&#8217;s no server-side logout, and above all, there&#8217;s no temporal ordering between those two and hence no server tracked session. All of a sudden, the beauty of this comes with great force. By delegating authentication to the browser using the standard HTTP mechanism we can greatly <strong>simplify</strong> application code.</p>
<p>Unfortunately, in reality this is not the case. During its race to the top, HTTP lost part of its original vision, mainly due to implementation mistakes.</p>
<ol>
<li><a href="http://www.ietf.org/rfc/rfc2617.txt">The specs</a> failed to hit the sweet spot of authentication security. They standardized <a href="http://en.wikipedia.org/wiki/Basic_access_authentication">Basic Authentication</a> which, by sending user and password in plain text, scared people to death and <a href="http://en.wikipedia.org/wiki/Digest_access_authentication">Digest</a> which, due to its complexity and required server cooperation, never really caught on. A client-side mechanism with cheap yet reasonable security such as <a href="http://www.oasis-open.org/committees/wss/documents/WSS-Username-02-0223-merged.pdf">WSSE UsernameToken</a>, <a href="http://www.xml.com/pub/a/2003/12/17/dive.html">later adopted by atom</a>, would have been optimal.</li>
<li>Browsers took away login from client&#8217;s hands by showing the popup dialog to input user/password <strong>only</strong> after a 401 http error code <strong>from server</strong>. There should have been an always visible &#8220;login&#8221; button since <a href="http://tools.ietf.org/html/rfc2617">the specs</a> said &#8220;A user agent that wishes to authenticate itself with an origin server&#8211;usually, but <strong>not necessarily</strong>, after receiving a 401&#8230;&#8221;.</li>
<li>Browsers practically took away logout from client&#8217;s hands by requiring to close the browser in order to clean the passwords cache. There should have been an always visible &#8220;logout&#8221; button.</li>
<li>Browsers gave no chance to customize the ugly and annoyingly modal login dialog. HTML and/or CSS could have been used.</li>
<li>Browsers gave no client-side storage needed to keep session data but again turned back to server with <a href="http://en.wikipedia.org/wiki/HTTP_cookie">cookies</a>. They should have given something like upcoming HTML5 <a href="http://www.w3.org/TR/2009/WD-webstorage-20091222/">localStorage and sessionStorage</a>.</li>
</ol>
<p>Now there&#8217;s not much that can be done short of a collaborative effort by all browser vendors. Meanwhile we can keep dealing with authentication in application code on the server, in a never ending pile of custom solutions, each one slightly different, for yet another pretty standard problem. A problem solved <a href="http://tools.ietf.org/html/rfc1945#section-11">15 years ago</a>.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://federico.galassi.net/2009/12/31/web-authentication-as-it-should-have-been/"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://federico.galassi.net/2009/12/31/web-authentication-as-it-should-have-been/" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://federico.galassi.net/2009/12/31/web-authentication-as-it-should-have-been/" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://federico.galassi.net/2009/12/31/web-authentication-as-it-should-have-been/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Javascript Performance: Make the Browser Happy (and You Sad)</title>
		<link>http://federico.galassi.net/2009/11/15/javascript-performance-make-the-browser-happy-and-you-sad/</link>
		<comments>http://federico.galassi.net/2009/11/15/javascript-performance-make-the-browser-happy-and-you-sad/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 20:40:11 +0000</pubDate>
		<dc:creator>federico</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[simplicity]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[aptimize]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[closure]]></category>
		<category><![CDATA[compilers]]></category>
		<category><![CDATA[dom]]></category>
		<category><![CDATA[foreach]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[mark]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[twain]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://federico.galassi.net/?p=193</guid>
		<description><![CDATA[The browser is emerging as the best platform for applications, so a large community is growing to address its final weakness: speed. Google, Yahoo and various independent programmers are all pushing a bunch of clever techniques to boost performance and please end users. That&#8217;s nice, yet as Mark Twain once said, half of the results of good [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-203" title="BENDER" src="http://federico.galassi.net/wp-content/uploads/2009/11/BENDER1.jpeg" alt="BENDER" width="232" height="184" />The browser is emerging as the <a href="http://en.wikipedia.org/wiki/HTML5">best platform</a> for applications, so a large community is growing to address its final weakness: speed. <a href="http://code.google.com/speed/">Google</a>, <a href="http://developer.yahoo.com/performance/">Yahoo</a> and <a href="http://javascriptrocks.com/performance/">various independent programmers</a> are all pushing a bunch of clever techniques to boost performance and please end users. That&#8217;s nice, yet as Mark Twain once said, <em>half of the results of good intentions are evil</em> and i see potential danger in many of the suggestions made. Here a representative short list of them:</p>
<ul>
<li>Avoid for-in and forEach in favor of optimized while loops</li>
<li>Before making modifications to a DOM node remove it and then re-insert it</li>
<li>To insert multiple DOM nodes, first insert them into a Document Fragment and then add it to the DOM</li>
<li>Join all scripts into a single file</li>
<li>Load javascript files on demand</li>
</ul>
<p>Let&#8217;s make it clear for once, execution speed is not a human problem, that&#8217;s what computers are for, they execute our commands fast. The human problem is programming speed and writing down clear, readable, maintainable commands aka programs. forEach loops make sense to me, they say &#8220;i want to do something on each item&#8221;, optimized while loops make sense to computers. If i want to add DOM nodes or modify one, i don&#8217;t care of removing it or document fragments, browsers care. To me it&#8217;s just noise. Almost all of the problems addressed by those techniques stem from lack of smartness in the browser, and that&#8217;s where fixes belong to, on the machine side. The fact that there are <a href="http://www.microsoft.com/windows/Internet-explorer/default.aspx">inept browser makers</a> is no excuse. Fixes still belong to the machine, they&#8217;re repeatable and can be made automatic. We have a long history of programs automatically converting human friendly code to machine friendly code. They&#8217;re called <a href="http://en.wikipedia.org/wiki/Compiler">compilers</a> and the output either machine code or optimized javascript doesn&#8217;t matter.</p>
<p>So, learn about javascript performance since knowledge is always the way, but don&#8217;t turn yourself into a machine, you&#8217;d be an awful one. Use the tools and wait for browsers to catch up.</p>
<ul>
<li><a href="http://www.aptimize.com/">Aptimize</a></li>
<li><a href="http://code.google.com/closure/compiler/">Closure Compiler</a></li>
<li><a href="http://developer.yahoo.com/yui/3/yui/#use">YUI 3 use</a></li>
</ul>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://federico.galassi.net/2009/11/15/javascript-performance-make-the-browser-happy-and-you-sad/"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://federico.galassi.net/2009/11/15/javascript-performance-make-the-browser-happy-and-you-sad/" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://federico.galassi.net/2009/11/15/javascript-performance-make-the-browser-happy-and-you-sad/" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://federico.galassi.net/2009/11/15/javascript-performance-make-the-browser-happy-and-you-sad/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

