<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Brainmoda &#124; Staffan Nöteberg's blog</title>
	<atom:link href="http://blog.staffannoteberg.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.staffannoteberg.com</link>
	<description>Same brain - more astute usage</description>
	<lastBuildDate>Mon, 30 Aug 2010 06:03:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.staffannoteberg.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/997bf388d477d7a85a92bafb7e2c7bf2?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Brainmoda &#124; Staffan Nöteberg's blog</title>
		<link>http://blog.staffannoteberg.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.staffannoteberg.com/osd.xml" title="Brainmoda &#124; Staffan Nöteberg&#039;s blog" />
	<atom:link rel='hub' href='http://blog.staffannoteberg.com/?pushpress=hub'/>
		<item>
		<title>What constitutes a Timebox, anyway?</title>
		<link>http://blog.staffannoteberg.com/2010/08/30/what-constitutes-a-timebox-anyway/</link>
		<comments>http://blog.staffannoteberg.com/2010/08/30/what-constitutes-a-timebox-anyway/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 06:03:50 +0000</pubDate>
		<dc:creator>Staffan Nöteberg</dc:creator>
				<category><![CDATA[Decision Awareness]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Iterative]]></category>
		<category><![CDATA[Procrastination]]></category>
		<category><![CDATA[Sustainable Pace]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Time box]]></category>

		<guid isPermaLink="false">http://blog.staffannoteberg.com/?p=909</guid>
		<description><![CDATA[I use the term Timebox when the following applies: I determined beforehand a particular point in time when it starts. I determined beforehand a particular point in time when it ends. I determined beforehand a particular activity that I will focus on. A successful Timebox is when I start at the time that I had [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.staffannoteberg.com&blog=2614182&post=909&subd=brainmoda&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img src="http://brainmoda.files.wordpress.com/2010/08/timebox1.png?w=500&#038;h=262" alt="What constitutes a Timebox, anyway?" title="What constitutes a Timebox, anyway?" width="500" height="262" class="aligncenter size-full wp-image-922" /></p>
<p>I use the term <em>Timebox</em> when the following applies:</p>
<ol>
<li>I determined beforehand a particular point in time when it starts.
</li>
<li>I determined beforehand a particular point in time when it ends.
</li>
<li>I determined beforehand a particular activity that I will focus on.
</li>
</ol>
<p>A successful <em>Timebox</em> is when I start at the time that I had determined (1), end at the time that I had determined (2) and only focus on the task that I had determined (3). As <em>Timebox</em> considered, it is irrelevant what, how much and with what quality I produce.</p>
<p>There are alternatives to limit the time. </p>
<ul>
<li>We can restrict the scope: pick blueberries in the woods until the bucket is full.
</li>
<li>We can limit the quality: search the greengrocery until you have found a really good tomato.
</li>
<li>We can limit the cost: shop christmas gifts until your wallet is empty.
</li>
</ul>
<p>All four approaches have pros and cons.</p>
<p><a href="http://www.pomodoro-book.com/en" target="pb"><img class="aligncenter size-full wp-image-778" title="Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC" src="http://brainmoda.files.wordpress.com/2008/02/idg_en.gif?w=480&#038;h=250" alt="Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC" width="480" height="250" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brainmoda.wordpress.com/909/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brainmoda.wordpress.com/909/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brainmoda.wordpress.com/909/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brainmoda.wordpress.com/909/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brainmoda.wordpress.com/909/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brainmoda.wordpress.com/909/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brainmoda.wordpress.com/909/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brainmoda.wordpress.com/909/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brainmoda.wordpress.com/909/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brainmoda.wordpress.com/909/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brainmoda.wordpress.com/909/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brainmoda.wordpress.com/909/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brainmoda.wordpress.com/909/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brainmoda.wordpress.com/909/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.staffannoteberg.com&blog=2614182&post=909&subd=brainmoda&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.staffannoteberg.com/2010/08/30/what-constitutes-a-timebox-anyway/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/892160c571f99f4c4f75dbd01ca95406?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">snoteberg</media:title>
		</media:content>

		<media:content url="http://brainmoda.files.wordpress.com/2010/08/timebox1.png" medium="image">
			<media:title type="html">What constitutes a Timebox, anyway?</media:title>
		</media:content>

		<media:content url="http://brainmoda.files.wordpress.com/2008/02/idg_en.gif" medium="image">
			<media:title type="html">Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC</media:title>
		</media:content>
	</item>
		<item>
		<title>Japanese version of Pomodoro Technique Illustrated &#8212; 6th language</title>
		<link>http://blog.staffannoteberg.com/2010/07/27/japanese-version-of-pomodoro-technique-illustrated-6th-language/</link>
		<comments>http://blog.staffannoteberg.com/2010/07/27/japanese-version-of-pomodoro-technique-illustrated-6th-language/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 13:20:59 +0000</pubDate>
		<dc:creator>Staffan Nöteberg</dc:creator>
				<category><![CDATA[Adaptive Process]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[Brain]]></category>
		<category><![CDATA[Daily Mind Map]]></category>
		<category><![CDATA[Decision Awareness]]></category>
		<category><![CDATA[Estimating]]></category>
		<category><![CDATA[Gestures]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Index Cards]]></category>
		<category><![CDATA[Iterative]]></category>
		<category><![CDATA[Kitchen Timer]]></category>
		<category><![CDATA[Lean]]></category>
		<category><![CDATA[Memory]]></category>
		<category><![CDATA[Mind]]></category>
		<category><![CDATA[Mind Map]]></category>
		<category><![CDATA[Mind Mapping]]></category>
		<category><![CDATA[Mind Maps]]></category>
		<category><![CDATA[Overlearning]]></category>
		<category><![CDATA[Pair Programming]]></category>
		<category><![CDATA[Pomodoro]]></category>
		<category><![CDATA[Pomodoro Technique]]></category>
		<category><![CDATA[Pomodoro Technique Illustrated]]></category>
		<category><![CDATA[Procrastination]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Psychology]]></category>
		<category><![CDATA[Repertoire]]></category>
		<category><![CDATA[Retrospective]]></category>
		<category><![CDATA[Sustainable Pace]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tecnica del Pomodoro]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[Time Management]]></category>
		<category><![CDATA[Time box]]></category>
		<category><![CDATA[japanese]]></category>
		<category><![CDATA[ascii media works]]></category>
		<category><![CDATA[manga]]></category>

		<guid isPermaLink="false">http://blog.staffannoteberg.com/?p=898</guid>
		<description><![CDATA[The Japanese publishing company ASCII Media Works has agreed with Pragmatic Bookshelf to publish a Japanese translation of Pomodoro Technique Illustrated. ASCII Media Works specializes in publishing of books, entertainment and computer magazines, manga, and video games. They are known for their Dengeki magazines and book labels like Dengeki Daioh. All in all the company [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.staffannoteberg.com&blog=2614182&post=898&subd=brainmoda&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The Japanese publishing company <a href="http://asciimw.jp/" target="amv">ASCII Media Works</a> has agreed with  Pragmatic Bookshelf to publish a Japanese translation of <a href="http://pomodoro-book.com" target="pti">Pomodoro Technique Illustrated</a>.<img src="http://brainmoda.files.wordpress.com/2010/07/japan1.jpg?w=256&#038;h=300" width="256" height="300" class="alignright" /></p>
<p>ASCII Media Works specializes in publishing of books, entertainment and computer magazines, manga, and video games. They are  known for their Dengeki magazines and book labels like Dengeki Daioh. All in all the company have about 350 employees.</p>
<p>Many ideas in Pomodoro Technique and particulary in my book are based on Agile, Lean and TPS. Kaizen and PDCA are probably more well known in Japan than in Europe and North America. To me, it makes this news even more exciting.</p>
<p>The Japanese version of Pomodoro Technique Illustrated is scheduled to be in the store within nine months.</p>
<p>This is the sixth language for Pomodoro Technique Illustrated: English (<a target="pp" href="http://pragprog.com/titles/snfocus/pomodoro-technique-illustrated">Pragmatic Bookshelf</a>), Korean (<a target="ib" href="http://insightbook.co.kr/">Insight Book</a>), Chinese (<a target="tb" href="http://www.turingbook.com">Turing Book</a>), Swedish (<a target="sl" href="http://www.studentlitteratur.se/">Studentlitteratur</a>), German (<a target="dpu" href="http://www.dpunkt.de/">Dpunkt Verlag</a>), and now Japanese (<a href="http://asciimw.jp/" target="amv">ASCII Media Works</a>).</p>
<p><a href="http://www.pomodoro-book.com/en" target="pb"><img class="aligncenter size-full wp-image-778" title="Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC" src="http://brainmoda.files.wordpress.com/2008/02/idg_en.gif?w=480&#038;h=250" alt="Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC" width="480" height="250" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brainmoda.wordpress.com/898/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brainmoda.wordpress.com/898/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brainmoda.wordpress.com/898/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brainmoda.wordpress.com/898/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brainmoda.wordpress.com/898/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brainmoda.wordpress.com/898/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brainmoda.wordpress.com/898/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brainmoda.wordpress.com/898/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brainmoda.wordpress.com/898/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brainmoda.wordpress.com/898/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brainmoda.wordpress.com/898/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brainmoda.wordpress.com/898/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brainmoda.wordpress.com/898/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brainmoda.wordpress.com/898/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.staffannoteberg.com&blog=2614182&post=898&subd=brainmoda&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.staffannoteberg.com/2010/07/27/japanese-version-of-pomodoro-technique-illustrated-6th-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/892160c571f99f4c4f75dbd01ca95406?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">snoteberg</media:title>
		</media:content>

		<media:content url="http://brainmoda.files.wordpress.com/2010/07/japan1.jpg?w=256" medium="image" />

		<media:content url="http://brainmoda.files.wordpress.com/2008/02/idg_en.gif" medium="image">
			<media:title type="html">Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC</media:title>
		</media:content>
	</item>
		<item>
		<title>Pomodoro Technique Illustrated in German &#8212; 5th language</title>
		<link>http://blog.staffannoteberg.com/2010/07/14/pomodoro-technique-illustrated-in-german-5th-language/</link>
		<comments>http://blog.staffannoteberg.com/2010/07/14/pomodoro-technique-illustrated-in-german-5th-language/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 18:43:43 +0000</pubDate>
		<dc:creator>Staffan Nöteberg</dc:creator>
				<category><![CDATA[Adaptive Process]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[Brain]]></category>
		<category><![CDATA[Daily Mind Map]]></category>
		<category><![CDATA[Decision Awareness]]></category>
		<category><![CDATA[Estimating]]></category>
		<category><![CDATA[GTD]]></category>
		<category><![CDATA[Gestures]]></category>
		<category><![CDATA[Getting Things Done]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Index Cards]]></category>
		<category><![CDATA[Iterative]]></category>
		<category><![CDATA[Kitchen Timer]]></category>
		<category><![CDATA[Memory]]></category>
		<category><![CDATA[Mind]]></category>
		<category><![CDATA[Mind Map]]></category>
		<category><![CDATA[Mind Mapping]]></category>
		<category><![CDATA[Mind Maps]]></category>
		<category><![CDATA[Overlearning]]></category>
		<category><![CDATA[Pomodoro]]></category>
		<category><![CDATA[Pomodoro Technique]]></category>
		<category><![CDATA[Pomodoro Technique Illustrated]]></category>
		<category><![CDATA[Procrastination]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Psychology]]></category>
		<category><![CDATA[Repertoire]]></category>
		<category><![CDATA[Retrospective]]></category>
		<category><![CDATA[Sustainable Pace]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tecnica del Pomodoro]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[Time Management]]></category>
		<category><![CDATA[Time box]]></category>
		<category><![CDATA[dpunkt]]></category>
		<category><![CDATA[dpunkt verlag]]></category>
		<category><![CDATA[german]]></category>
		<category><![CDATA[kennedy]]></category>

		<guid isPermaLink="false">http://blog.staffannoteberg.com/?p=883</guid>
		<description><![CDATA[&#8220;Ich bin ein Berliner&#8221;, said President John F. Kennedy 26 June 1963. He wanted to show his support for the Federal Republic, and against the GDR and the Soviet Union. What he did not know, was that Berliner is the German word for donut. My grandmother and grandfather were born and grew up in Berlin. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.staffannoteberg.com&blog=2614182&post=883&subd=brainmoda&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><em>&#8220;Ich bin ein Berliner&#8221;</em>, said President John F. Kennedy 26 June 1963. He wanted to show his support for the Federal Republic, and against the GDR and the Soviet Union. What he did not know, was that Berliner is the German word for donut.<img src="http://brainmoda.files.wordpress.com/2010/07/pti_de.jpg?w=260&#038;h=303" width="260" height="303" class="alignright" /></p>
<p>My grandmother and grandfather were born and grew up in Berlin. Personally, I like both the city of Berlin and donuts. Therefore it is particularly gratifying that my book <a target="pb" href="http://pomodoro-book.com">Pomodoro Technique Illustrated</a> will now be published in German by the German publisher <a target="dp" href="http://www.dpunkt.de/">Dpunkt Verlag</a>.</p>
<p>Dpunkt was founded in 1995 and has grown into one of the leading German publishers in the IT-publishing market. The headquarter is in Heidelberg and their catalog includes books on Agile, Clojure and Ruby.</p>
<p>This is the fifth language for Pomodoro Technique Illustrated: English (<a target="pp" href="http://pragprog.com/titles/snfocus/pomodoro-technique-illustrated">Pragmatic Bookshelf</a>), Korean (<a target="ib" href="http://insightbook.co.kr/">Insight Book</a>), Chinese (<a target="tb" href="http://www.turingbook.com">Turing Book</a>), Swedish (<a target="sl" href="http://www.studentlitteratur.se/">Studentlitteratur</a>), and now German (<a target="dpu" href="http://www.dpunkt.de/">Dpunkt Verlag</a>).</p>
<p>The German version of the book will be available in stores in nine months.</p>
<p><a href="http://www.pomodoro-book.com/en" target="pb"><img class="aligncenter size-full wp-image-778" title="Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC" src="http://brainmoda.files.wordpress.com/2008/02/idg_en.gif?w=480&#038;h=250" alt="Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC" width="480" height="250" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brainmoda.wordpress.com/883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brainmoda.wordpress.com/883/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brainmoda.wordpress.com/883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brainmoda.wordpress.com/883/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brainmoda.wordpress.com/883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brainmoda.wordpress.com/883/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brainmoda.wordpress.com/883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brainmoda.wordpress.com/883/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brainmoda.wordpress.com/883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brainmoda.wordpress.com/883/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brainmoda.wordpress.com/883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brainmoda.wordpress.com/883/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brainmoda.wordpress.com/883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brainmoda.wordpress.com/883/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.staffannoteberg.com&blog=2614182&post=883&subd=brainmoda&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.staffannoteberg.com/2010/07/14/pomodoro-technique-illustrated-in-german-5th-language/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/892160c571f99f4c4f75dbd01ca95406?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">snoteberg</media:title>
		</media:content>

		<media:content url="http://brainmoda.files.wordpress.com/2010/07/pti_de.jpg" medium="image" />

		<media:content url="http://brainmoda.files.wordpress.com/2008/02/idg_en.gif" medium="image">
			<media:title type="html">Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC</media:title>
		</media:content>
	</item>
		<item>
		<title>Pomodoro Technique video from Devoxx</title>
		<link>http://blog.staffannoteberg.com/2010/07/12/pomodoro-technique-video-from-devoxx/</link>
		<comments>http://blog.staffannoteberg.com/2010/07/12/pomodoro-technique-video-from-devoxx/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 06:31:07 +0000</pubDate>
		<dc:creator>Staffan Nöteberg</dc:creator>
				<category><![CDATA[Adaptive Process]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[Brain]]></category>
		<category><![CDATA[Daily Mind Map]]></category>
		<category><![CDATA[Decision Awareness]]></category>
		<category><![CDATA[Estimating]]></category>
		<category><![CDATA[Gestures]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Index Cards]]></category>
		<category><![CDATA[Iterative]]></category>
		<category><![CDATA[Kitchen Timer]]></category>
		<category><![CDATA[Memory]]></category>
		<category><![CDATA[Mind]]></category>
		<category><![CDATA[Overlearning]]></category>
		<category><![CDATA[Pomodoro Technique]]></category>
		<category><![CDATA[Pomodoro Technique Illustrated]]></category>
		<category><![CDATA[Procrastination]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Psychology]]></category>
		<category><![CDATA[Repertoire]]></category>
		<category><![CDATA[Retrospective]]></category>
		<category><![CDATA[Sustainable Pace]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tecnica del Pomodoro]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[Time Management]]></category>
		<category><![CDATA[Time box]]></category>
		<category><![CDATA[devoxx]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[antwerp]]></category>
		<category><![CDATA[belgium]]></category>

		<guid isPermaLink="false">http://blog.staffannoteberg.com/?p=861</guid>
		<description><![CDATA[My Pomodoro Technique presentation from the Devoxx conference in Antwerp in Belgium is now freely available. Devoxx may be the second biggest Java conference in the world and a few hundred people attended my session. You can see it here: http://parleys.com/#st=5&#38;id=1595<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.staffannoteberg.com&blog=2614182&post=861&subd=brainmoda&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="attachment_871" class="wp-caption aligncenter" style="width: 510px"><a target="parleys" href="http://parleys.com/#st=5&amp;id=1595"><img src="http://brainmoda.files.wordpress.com/2010/07/parleys1.jpg?w=500&#038;h=255" alt="Pomodoro Technique video from Devoxx" title="Pomodoro Technique video from Devoxx" width="500" height="255" class="size-full wp-image-871" /></a><p class="wp-caption-text">Pomodoro Technique video from Devoxx (click to play)</p></div>
<p>My Pomodoro Technique presentation from the Devoxx conference in Antwerp in Belgium is now freely available. Devoxx may be the second biggest Java conference in the world and a few hundred people attended my session. You can see it here: <a href="http://parleys.com/#st=5&amp;id=1595" target="parleys">http://parleys.com/#st=5&amp;id=1595</a></p>
<p><a href="http://www.pomodoro-book.com/en" target="pb"><img class="aligncenter size-full wp-image-778" title="Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC" src="http://brainmoda.files.wordpress.com/2008/02/idg_en.gif?w=480&#038;h=250" alt="Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC" width="480" height="250" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brainmoda.wordpress.com/861/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brainmoda.wordpress.com/861/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brainmoda.wordpress.com/861/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brainmoda.wordpress.com/861/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brainmoda.wordpress.com/861/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brainmoda.wordpress.com/861/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brainmoda.wordpress.com/861/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brainmoda.wordpress.com/861/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brainmoda.wordpress.com/861/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brainmoda.wordpress.com/861/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brainmoda.wordpress.com/861/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brainmoda.wordpress.com/861/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brainmoda.wordpress.com/861/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brainmoda.wordpress.com/861/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.staffannoteberg.com&blog=2614182&post=861&subd=brainmoda&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.staffannoteberg.com/2010/07/12/pomodoro-technique-video-from-devoxx/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/892160c571f99f4c4f75dbd01ca95406?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">snoteberg</media:title>
		</media:content>

		<media:content url="http://brainmoda.files.wordpress.com/2010/07/parleys1.jpg" medium="image">
			<media:title type="html">Pomodoro Technique video from Devoxx</media:title>
		</media:content>

		<media:content url="http://brainmoda.files.wordpress.com/2008/02/idg_en.gif" medium="image">
			<media:title type="html">Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC</media:title>
		</media:content>
	</item>
		<item>
		<title>Recursive Regexes</title>
		<link>http://blog.staffannoteberg.com/2010/06/22/recursive-regexes/</link>
		<comments>http://blog.staffannoteberg.com/2010/06/22/recursive-regexes/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 20:42:23 +0000</pubDate>
		<dc:creator>Staffan Nöteberg</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Regex]]></category>
		<category><![CDATA[Regular Expressions]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[recursiv]]></category>
		<category><![CDATA[recursion]]></category>
		<category><![CDATA[oniguruma]]></category>

		<guid isPermaLink="false">http://blog.staffannoteberg.com/?p=847</guid>
		<description><![CDATA[Oniguruma supports recursive regular expressions. They can e.g. be used for matching a generative grammar like the following: expression -&#62; expression + term expression -&#62; expression - term expression -&#62; term term -&#62; ( expression ) term -&#62; digit I wrote the following regex that corresponds to the grammar above: /^(?&#60;expression&#62;(?&#60;term&#62;\d&#124;\(\g&#60;expression&#62;\))([-+]\g&#60;expression&#62;)?)$/ Note that \g&#60;expression&#62; is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.staffannoteberg.com&blog=2614182&post=847&subd=brainmoda&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.geocities.jp/kosako3/oniguruma/" target="og">Oniguruma</a> supports recursive regular expressions. They can e.g. be used for matching a generative grammar like the following:</p>
<ol>
<li><code>expression -&gt; expression + term</code></li>
<li><code>expression -&gt; expression - term</code></li>
<li><code>expression -&gt; term</code></li>
<li><code>term -&gt; ( expression )</code></li>
<li><code>term -&gt; digit</code></li>
</ol>
<p>I wrote the following regex that corresponds to the grammar above:</p>
<ul>
<li><code>/^(?&lt;expression&gt;<strong><span style="color:#ff0000;">(</span></strong>?&lt;term&gt;\d|\(\g&lt;expression&gt;\)<strong><span style="color:#ff0000;">)</span><span style="color:#008080;">(</span></strong>[-+]\g&lt;expression&gt;<strong><span style="color:#008080;">)</span></strong>?)$/</code></li>
</ul>
<p>Note that <code>\g&lt;expression&gt;</code> is invoked recursively – like rule number 4 in the grammar. I chose to only allow single digit numbers to make the expression crisper as example. This could of course easily be changed to general integers, floats or imaginary numbers.</p>
<p>Here goes some testing:</p>
<p><code>irb(main):001:0&gt; r = /^(?&lt;expression&gt;(?&lt;term&gt;\d|\(\g&lt;expression&gt;\))([-+]\g&lt;expression&gt;)?)$/<br />
=&gt; /^(?&lt;expression&gt;(?&lt;term&gt;\d|\(\g&lt;expression&gt;\))([-+]\g&lt;expression&gt;)?)$/<br />
irb(main):002:0&gt; "2+4"[r]<br />
=&gt; "2+4"<br />
irb(main):003:0&gt; "2+45"[r]<br />
=&gt; nil<br />
irb(main):004:0&gt; "2-3(4+3)"[r]<br />
=&gt; nil<br />
irb(main):005:0&gt; "2-3(+3)"[r]<br />
=&gt; nil<br />
irb(main):006:0&gt; "2-31(+3)"[r]<br />
=&gt; nil<br />
irb(main):007:0&gt; "2-3+(+3)"[r]<br />
=&gt; nil<br />
irb(main):008:0&gt; "2-3+(4+3)"[r]<br />
=&gt; "2-3+(4+3)"</code></p>
<p>Expressions that return nil are obviously not correct.</p>
<p><a href="http://www.pomodoro-book.com/en" target="pb"><img class="aligncenter size-full wp-image-778" title="Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC" src="http://brainmoda.files.wordpress.com/2008/02/idg_en.gif?w=480&#038;h=250" alt="Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC" width="480" height="250" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brainmoda.wordpress.com/847/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brainmoda.wordpress.com/847/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brainmoda.wordpress.com/847/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brainmoda.wordpress.com/847/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brainmoda.wordpress.com/847/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brainmoda.wordpress.com/847/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brainmoda.wordpress.com/847/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brainmoda.wordpress.com/847/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brainmoda.wordpress.com/847/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brainmoda.wordpress.com/847/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brainmoda.wordpress.com/847/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brainmoda.wordpress.com/847/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brainmoda.wordpress.com/847/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brainmoda.wordpress.com/847/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.staffannoteberg.com&blog=2614182&post=847&subd=brainmoda&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.staffannoteberg.com/2010/06/22/recursive-regexes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/892160c571f99f4c4f75dbd01ca95406?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">snoteberg</media:title>
		</media:content>

		<media:content url="http://brainmoda.files.wordpress.com/2008/02/idg_en.gif" medium="image">
			<media:title type="html">Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC</media:title>
		</media:content>
	</item>
		<item>
		<title>Regex Quantifiers Algebra</title>
		<link>http://blog.staffannoteberg.com/2010/06/16/regex-quantifiers-algebra/</link>
		<comments>http://blog.staffannoteberg.com/2010/06/16/regex-quantifiers-algebra/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 20:28:08 +0000</pubDate>
		<dc:creator>Staffan Nöteberg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.staffannoteberg.com/?p=822</guid>
		<description><![CDATA[Regular expressions or parts of a regular expression can be repeated. I specify the number of repetitions with a type of operator called quantifiers. A quantifier has two attributes: A lower limit for the number of repetitions is represented by a natural number (i.e. a non-negative integer) An upper limit for the number of repetitions [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.staffannoteberg.com&blog=2614182&post=822&subd=brainmoda&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Regular expressions or parts of a regular expression can be repeated. I specify the number of repetitions with a type of operator called quantifiers. A quantifier has two attributes: </p>
<ol>
<li><strong>A lower limit</strong> for the number of repetitions is represented by a natural number (i.e. a non-negative integer) </li>
<li><strong>An upper limit</strong> for the number of repetitions is represented either by a natural number or the empty string. The latter means unlimited. </li>
</ol>
<p>I write the quantifiers inside a pair of braces, with a comma between the lower and upper limit, for example: </p>
<ul>
<li><em>Zero or one repetition:</em> {0,1}</li>
<li><em>One, two or three repetitions:</em> {1,3}</li>
<li><em>Fourteen or fifteen repetitions:</em> {14,15}</li>
<li><em>Two or more repetitions:</em> {2,}</li>
</ul>
<p>The quantifier {1,1} is an identity operator: </p>
<ul>
<li>a{1,1} <em>equals</em> a</li>
</ul>
<p>Quantifiers are unary, left associative, and has high precedence. Concatenation as well as Alternation have lower precedence. That gives the following rules: </p>
<ul>
<li><em>Concatination:</em> ab{1,2} <em>equals</em> a(b{1,2})</li>
<li><em>Concatination:</em> a{1,2}b <em>equals</em> (a{1,2})b</li>
<li><em>Alternation:</em> a|b{1,2} <em>equals</em> a|(b{1,2})</li>
<li><em>Alternation:</em> a{1,2}|b <em>equals</em> (a{1,2})|b</li>
</ul>
<p>I&#8217;ve got a lot of syntactic sugar in my regular expression jar. A single natural number in a quantifier represents both the lower and upper limit: </p>
<ul>
<li>{3} <em>equals</em> {3,3}</li>
</ul>
<p>I may write Kleene closure &#8212; zero or more repetitions &#8212; as an asterisk without braces: </p>
<ul>
<li>a* <em>equals</em> a{0,}</li>
</ul>
<p>I may write Positive closure &#8212; one or more repetitions &#8212; as a plus sign without braces: </p>
<ul>
<li>a+ <em>equals</em> a{1,}</li>
</ul>
<p>I may write the Optional operation &#8212; zero or one repetition &#8212; as a question mark without braces: </p>
<ul>
<li>a? <em>equals</em> a{0,1}</li>
</ul>
<p>More algebra: </p>
<ul>
<li>(a*)* <em>equals</em> a*</li>
<li>(a+)+ <em>equals</em> a+</li>
<li>(a?)? <em>equals</em> a?</li>
<li>(a*)+ <em>equals</em> (a+)* <em>equals</em> a*</li>
<li>(a*)? <em>equals</em> (a?)* <em>equals</em> a*</li>
<li>(a+)? <em>equals</em> (a?)+ <em>equals</em> a*</li>
<li><em>Kleene closure is Positive closure or nothing:</em> a* <em>equals</em> (a+|)</li>
<li><em>Optional a is a or nothing:</em> a? <em>equals</em> (a|)? <em>equals</em> (a|)</li>
<li><em>Kleene closure of a or nothing is Kleene closure of a:</em> (a|)* <em>equals</em> a*</li>
<li><em>Positive closure of a is a concatenated with Kleene closure of a:</em> a+ <em>equals</em> aa*</li>
</ul>
<p><a target="pb" href="http://www.pomodoro-book.com/en"><img src="http://brainmoda.files.wordpress.com/2008/02/idg_en.gif?w=480&#038;h=250" alt="Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC" title="Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC" width="480" height="250" class="aligncenter size-full wp-image-778" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brainmoda.wordpress.com/822/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brainmoda.wordpress.com/822/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brainmoda.wordpress.com/822/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brainmoda.wordpress.com/822/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brainmoda.wordpress.com/822/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brainmoda.wordpress.com/822/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brainmoda.wordpress.com/822/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brainmoda.wordpress.com/822/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brainmoda.wordpress.com/822/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brainmoda.wordpress.com/822/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brainmoda.wordpress.com/822/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brainmoda.wordpress.com/822/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brainmoda.wordpress.com/822/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brainmoda.wordpress.com/822/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.staffannoteberg.com&blog=2614182&post=822&subd=brainmoda&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.staffannoteberg.com/2010/06/16/regex-quantifiers-algebra/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/892160c571f99f4c4f75dbd01ca95406?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">snoteberg</media:title>
		</media:content>

		<media:content url="http://brainmoda.files.wordpress.com/2008/02/idg_en.gif" medium="image">
			<media:title type="html">Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC</media:title>
		</media:content>
	</item>
		<item>
		<title>Samurai and Rock Star</title>
		<link>http://blog.staffannoteberg.com/2010/06/11/samurai-and-rock-star/</link>
		<comments>http://blog.staffannoteberg.com/2010/06/11/samurai-and-rock-star/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 18:54:33 +0000</pubDate>
		<dc:creator>Staffan Nöteberg</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.staffannoteberg.com/?p=804</guid>
		<description><![CDATA[To be invited to speak at conferences around the world has many advantages. One is that you meet other authors. Ed Burns and Jonathan Rasmusson are two of them. I met Jonathan Rasmusson in Chicago last summer at Agile2009. He was then struggling with his upcoming book. I asked curiously when he expected the book [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.staffannoteberg.com&blog=2614182&post=804&subd=brainmoda&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To be invited to speak at conferences around the world has many advantages. One is that you meet other authors. Ed Burns and Jonathan Rasmusson are two of them.</p>
<p>I <img src="http://brainmoda.files.wordpress.com/2010/06/samurai.jpg?w=125&#038;h=150" alt="Agile Smurai" title="Agile Smurai" width="125" height="150" class="alignright size-thumbnail wp-image-814" />met Jonathan Rasmusson in Chicago last summer at Agile2009. He was then struggling with his upcoming book. I asked curiously when he expected the book to be released. Hopefully within a few months, he answered. A few months happened to be almost a year, but now it&#8217;s released. The title is <a target="as" href="http://pragprog.com/titles/jtrap/the-agile-samurai">&#8220;The Agile Samurai &#8212; How Agile Masters Deliver Great Software&#8221;</a> which describes exactly what it is. There are many Agile books out there, but this one is different. Firstly, even though it&#8217;s published by Pragmatic Bookshelf it has a style similar to <a target="hf" href="http://oreilly.com/store/series/headfirst.csp">O&#8217;Reilly&#8217;s Head First series</a> . Pictures and text are mixed in a way that make learning easy. Secondly, this is more of an in-his-own-words book than the usual Agile book. The book describes Agile ideas instead of defining the Scrum terminology. If you&#8217;re interested in Agile, on whatever level, you should read this book.</p>
<p>Last <img src="http://brainmoda.files.wordpress.com/2010/06/crest.jpg?w=121&#038;h=150" alt="Rock Star Programmers" title="Rock Star Programmers" width="121" height="150" class="alignright size-thumbnail wp-image-815" />month I met Ed Burns in Poland at the GeeCON2010 Java conference. He recently released a new version of his JSF book. But, what caught my attention was another book from 2008. During one of his sessions at GeeCON he replayed interviews with people like Rod Johnson, James Gosling and Andy Hunt. Those interviews were originally recorded for the book <a target="rtc" href="http://ridingthecrest.com">&#8220;Riding the Crest &#8212; Secrets of the Rockstar Programmers.&#8221;</a> It&#8217;s a book were thought leaders from our own industry shares what they think about entrepreneurs, what makes them productive and how their career affected their private life? The answers go in all directions.</p>
<p><a target="pb" href="http://www.pomodoro-book.com/en"><img src="http://brainmoda.files.wordpress.com/2008/02/idg_en.gif?w=480&#038;h=250" alt="Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC" title="Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC" width="480" height="250" class="aligncenter size-full wp-image-778" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brainmoda.wordpress.com/804/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brainmoda.wordpress.com/804/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brainmoda.wordpress.com/804/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brainmoda.wordpress.com/804/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brainmoda.wordpress.com/804/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brainmoda.wordpress.com/804/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brainmoda.wordpress.com/804/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brainmoda.wordpress.com/804/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brainmoda.wordpress.com/804/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brainmoda.wordpress.com/804/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brainmoda.wordpress.com/804/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brainmoda.wordpress.com/804/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brainmoda.wordpress.com/804/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brainmoda.wordpress.com/804/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.staffannoteberg.com&blog=2614182&post=804&subd=brainmoda&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.staffannoteberg.com/2010/06/11/samurai-and-rock-star/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/892160c571f99f4c4f75dbd01ca95406?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">snoteberg</media:title>
		</media:content>

		<media:content url="http://brainmoda.files.wordpress.com/2010/06/samurai.jpg?w=125" medium="image">
			<media:title type="html">Agile Smurai</media:title>
		</media:content>

		<media:content url="http://brainmoda.files.wordpress.com/2010/06/crest.jpg?w=121" medium="image">
			<media:title type="html">Rock Star Programmers</media:title>
		</media:content>

		<media:content url="http://brainmoda.files.wordpress.com/2008/02/idg_en.gif" medium="image">
			<media:title type="html">Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC</media:title>
		</media:content>
	</item>
		<item>
		<title>Regex extension &#8212; here&#8217;s the Integer Class</title>
		<link>http://blog.staffannoteberg.com/2010/05/29/regex-extension-heres-the-integer-class/</link>
		<comments>http://blog.staffannoteberg.com/2010/05/29/regex-extension-heres-the-integer-class/#comments</comments>
		<pubDate>Sat, 29 May 2010 21:46:48 +0000</pubDate>
		<dc:creator>Staffan Nöteberg</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Regex]]></category>
		<category><![CDATA[Regular Expressions]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://blog.staffannoteberg.com/?p=758</guid>
		<description><![CDATA[The IP address problem is well known in the regex community. Here I present an extended regex syntax that would make it possible to match IP addresses in a less chatty way. Ip-address problem Let&#8217;s say I want to validate an IP address. It is four integers with interleaved dots such as 123.125.126.107. The naïve [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.staffannoteberg.com&blog=2614182&post=758&subd=brainmoda&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><em>The IP address problem is well known in the regex community. Here I present an extended regex syntax that would make it possible to match IP addresses in a less chatty way.<br />
</em></p>
<p><strong>Ip-address problem</strong></p>
<p>Let&#8217;s say I want to validate an IP address. It is four integers with interleaved dots such as <em>123.125.126.107</em>. The naïve regex would be:</p>
<ul>
<li><code>\d*\.\d*\.\d*\.\d*</code></li>
</ul>
<p>But it is so imprecise that it matches both <em>9999.9999.9999.9999</em> and <em>&#8230;</em>. Since the four integers in a IP address must be in the range <em>0-255</em>, I can be certain that they consist of one, two, or three digits. With the Limiting Repetition operator, I can formulate this requirement: </p>
<ul>
<li><code>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}</code></li>
</ul>
<p>Now <em>0.1.2.3</em> and <em>101.0.202.1</em> matches, while <code>9999.9999.9999.9999</code> doesn&#8217;t match because there are too many digits in the integers. Unfortunately <em>999.888.777.666</em> matches as well. That&#8217;s not an acceptable IP address. I told you that the integers can be up to <em>255</em>. But, don&#8217;t give up. In Friedl&#8217;s seminal book &#8220;Mastering Regular Expressions&#8221;, he describes two ways to shrink the match set. Both are, however, very chatty. The first way is to list all authorized integers in a super chubby alternation: </p>
<ul>
<li><code>(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20<br />
|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35<br />
|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50<br />
|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65<br />
|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80<br />
|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95<br />
|96|97|98|99|100|101|102|103|104|105|106|107<br />
|108|109|110|111|112|113|114|115|116|117|118<br />
|119|120|121|122|123|124|125|126|127|128|129<br />
|130|131|132|133|134|135|136|137|138|139|140<br />
|141|142|143|144|145|146|147|148|149|150|151<br />
|152|153|154|155|156|157|158|159|160|161|162<br />
|163|164|165|166|167|168|169|170|171|172|173<br />
|174|175|176|177|178|179|180|181|182|183|184<br />
|185|186|187|188|189|190|191|192|193|194|195<br />
|196|197|198|199|200|201|202|203|204|205|206<br />
|207|208|209|210|211|212|213|214|215|216|217<br />
|218|219|220|221|222|223|224|225|226|227|228<br />
|229|230|231|232|233|234|235|236|237|238|239<br />
|240|241|242|243|244|245|246|247|248|249|250<br />
|251|252|253|254|255)</code></li>
</ul>
<p>Note that the above is just one integer in the IP address. I have to write the super chubby alternation four times with interleaved dots to get the correct regex.</p>
<p>The second way to specify an integer in the range <em>0-255</em> is to decompose the problem into sub problems based on the initial character. If the first digit is 0 or 1, then all integers consisting of 1-3 digits are acceptable &#8211; I also allow leading zeros as in e.g. 054. When the initial digit is <em>2</em> and the second number is in the range <em>0-4</em>, then I accept digits in the ranges <em>20-24</em> and <em>200-249</em>. Finally, if the integer starts with <em>25</em>, then I only tolerate it if it&#8217;s followed by a digit in the range <em>0-5</em>. Like this:</p>
<ul>
<li><code>[01]?\d\d?|2[0-4]\d|25[0-5]</code></li>
</ul>
<p>(Does this regex really match <em>25</em>? The third part of this alternation only matches integers in the range <em>250-255</em>. Yes, it does. The first part matches any integer consisting of one or two digits.)</p>
<p>Again I must rewrite my regex four times with interleaved dots to match an entire IP address. </p>
<p><strong>Integer Class – a new operator suggested<br />
</strong></p>
<p>So far I&#8217;ve talked about how regex works right now. Let&#8217;s imagine now that I can add a new operator. I call the new operator Integer Class.</p>
<p>Both regexes above solve the problem, but they demand so many characters that it reminds me of chatter from a group of monkeys (i.e. not easy to understand). My proposal is to extend the regex syntax with a new operator: Integer Class. It matches integers of any length, if they are in a specific range. For IP numbers &#8212; which should be in the range <em>0-255</em> &#8212; it would look like this: </p>
<ul>
<li><code>[0..255]</code></li>
</ul>
<p>Square brackets surrounds two integers – a lower and an upper limit. There are double dots in-between the integers. Integer Class would work almost as a syntactic sugar for the super chubby alternation above &#8212; but not quite. Here are some details: </p>
<ul>
<li><strong>Backwards compability:</strong> most regex interpreters permits Character Classes with repeated characters. A regex <code>[0..255]</code> is syntactically correct already today. But now it means something entirely different than what I want. The regex interpreter doesn&#8217;t care about the double fives and the double dots. Right now, <code>[0..255]</code> is a redundant way of writing <code>[0.25]</code>, i.e. it matches exactly one character and it must be either 0, dot, 2 or 5. With my syntax and semantics, the regex interpreter would notice the double dots and say &#8220;Hey, this isn&#8217;t a Character Class, because it&#8217;s an Integer Class.&#8221; How cool is that?
</li>
<li><strong>Leading Zeroes:</strong> An Integer Class matches leading zeros in the candidate, but only if you specify it. How? Well, by writing a zero in front of the lower limit. For example: [00..255] means that even sequences like <em>012</em>, <em>0004</em> and <em>00255</em> are appropriate integers.
</li>
<li><strong>Negative integers:</strong> Of course, negative integers are permitted. For example, <code>[-1..1]</code> matches <em>-1</em>, <em>0</em> or <em>1</em>. Sidenote: a leading dash in a Character Class means that dashes are allowed. It may sound trivial, but then you should know that in a Character Class <code>[A-Z]</code>, the dash means from/to – the range <em>A</em> to <em>Z</em>. A dash in a Character Class has a different meaning depending of if it&#8217;s in the beginning or the middle of an expression. Anyway, if there is a double point, it is an Integer Class and then dash means minus.
</li>
<li><strong>Greedy:</strong> Like many other regex operators &#8211; such as repetition &#8211; the Integer Class is greedy of type longest-leftmost-match, but charity obedient. This means that <code>[0..255]</code> rather match <em>255</em> than <em>2</em> in candidate <em>255</em>. But the regex engine is prepared to release the fives if it means the whole expression match. This differs from the super chubby alternation above. At least a Traditional NFA engine often matches the first one it finds, i.e. <em>2</em> rather than <em>255</em>.
</li>
<li><strong>Meta Characters inside Integer class:</strong> There&#8217;s no need for rules to escape characters since only digits, double dots and dashes are permitted in an Integer class. Backslash is not allowed to reside in an Integer Class.
</li>
<li><strong>Negated Integer Class:</strong> A caret <code>^</code> after the right square bracket will negate the Integer Class. Any integer except those stated in the Integer Class will be matched. E.g. <code>[^5..7]</code> match any integer except <em>5</em>, <em>6</em> and <em>7</em>. Note that a negated Integer Class still must match an integer. Match exactly one integer, but not <em>5</em>, <em>6</em> or <em>7</em>.</li>
<li><strong>Not accepting nothing:</strong> A Character Class doesn&#8217;t match nothing – the empty string. The same is true for an Integer Class. There must be an integer matched in the range. The exception is, of course, when an Integer Class is followed by <code>*</code> or <code>?</code> &#8212; for example: <code>[0..255]*</code></li>
</ul>
<p>With the suggested Integer Class, an IP address can be matched with this regex:</p>
<ul>
<li><code>([0..255]\.){3}[0..255]</code></li>
</ul>
<p>Relevant questions:</p>
<ul>
<li>Is this syntax possible or would it be ambiguous?2
</li>
<li>There are many possible operators to add to the regex syntax – is Integer Class the most needed?
</li>
<li>Should the Integer Class be even more capable, e.g. be able to match floats?
</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brainmoda.wordpress.com/758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brainmoda.wordpress.com/758/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brainmoda.wordpress.com/758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brainmoda.wordpress.com/758/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brainmoda.wordpress.com/758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brainmoda.wordpress.com/758/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brainmoda.wordpress.com/758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brainmoda.wordpress.com/758/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brainmoda.wordpress.com/758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brainmoda.wordpress.com/758/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brainmoda.wordpress.com/758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brainmoda.wordpress.com/758/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brainmoda.wordpress.com/758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brainmoda.wordpress.com/758/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.staffannoteberg.com&blog=2614182&post=758&subd=brainmoda&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.staffannoteberg.com/2010/05/29/regex-extension-heres-the-integer-class/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/892160c571f99f4c4f75dbd01ca95406?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">snoteberg</media:title>
		</media:content>
	</item>
		<item>
		<title>Pomodoro Technique Illustrated in Swedish</title>
		<link>http://blog.staffannoteberg.com/2010/05/23/pomodoro-technique-illustrated-in-swedish/</link>
		<comments>http://blog.staffannoteberg.com/2010/05/23/pomodoro-technique-illustrated-in-swedish/#comments</comments>
		<pubDate>Sun, 23 May 2010 17:52:32 +0000</pubDate>
		<dc:creator>Staffan Nöteberg</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Pomodoro Technique]]></category>
		<category><![CDATA[Pomodoro Technique Illustrated]]></category>
		<category><![CDATA[Tecnica del Pomodoro]]></category>
		<category><![CDATA[Time Management]]></category>
		<category><![CDATA[Time box]]></category>
		<category><![CDATA[pragmatic bookshelf]]></category>
		<category><![CDATA[studentlitteratur]]></category>
		<category><![CDATA[swedish]]></category>

		<guid isPermaLink="false">http://blog.staffannoteberg.com/?p=746</guid>
		<description><![CDATA[For the first time, one of the Pragmatic Bookshelf books will be translated into Swedish. My book Pomodoro Technique Illustrated will soon be released in Chinese (Turing Book) and Korean (Insight Book) as several other books from the same publisher. Now, the Swedish publisher house Studentlitteratur have agreed on a contract with the Pragmatic Bookshelf. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.staffannoteberg.com&blog=2614182&post=746&subd=brainmoda&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For <img src="http://brainmoda.files.wordpress.com/2010/05/swedishflag.jpg?w=150&#038;h=92" alt="" title="swedishflag" width="150" height="92" class="alignright size-medium wp-image-750" />the first time, one of the Pragmatic Bookshelf books will be translated into Swedish. My book <a href="http://www.pomodoro-book.com" target="pti">Pomodoro Technique Illustrated</a> will soon be released in <a href="http://blog.staffannoteberg.com/2010/02/03/pomodoro-technique-illustrated-in-chinese/" target="chi">Chinese (Turing Book)</a> and <a href="http://blog.staffannoteberg.com/2010/02/23/pomodoro-technique-illustrated-translated-into-korean" target="kor">Korean (Insight Book)</a> as several other books from the same publisher. Now, the Swedish publisher house <a href="http://www.studentlitteratur.se/" target="stu">Studentlitteratur</a> have agreed on a contract with the Pragmatic Bookshelf. And the first book translated into Swedish is Pomodoro Technique Illustrated.</p>
<p>Although Studentlitteratur literally means &#8220;literature for students&#8221; they also have many books for professionals. Over 3,500 titles in different subject fields are divided into three groups:</p>
<ul>
<li>School and Teacher education
</li>
<li>Medicine and Health
</li>
<li>Business and Society
</li>
</ul>
<p>Among Studentlitteratur&#8217;s titles are Java, Ruby, Agile and XP. As a little exercise I have inventoried my bookshelf at home to see what books from Studentlitteratur that I myself possess. Here is the list, which happened to include much humanities:</p>
<ul>
<li>Erfarenheter från förskolan i Reggio Emilia (Experiences from preschool in Reggio Emilia), 2005
</li>
<li>Användbarhet i praktiken (Usability in practice), 2002
</li>
<li>VHDL, 1994
</li>
<li>COBOL for Mainframe and Micro, 1989
</li>
<li>Digitala kretsar (Digital circuits), 1996
</li>
<li>Framtidens intelligens (Future Intelligence), 2003
</li>
<li>Konst och filosofi (Arts and Philosophy), 1990
</li>
<li>Elementär fonetik (Elementary phonetics), 1987
</li>
<li>Introduktion till Sociologi (Introduction to Sociology), 2006
</li>
<li>Sociologisk teori (Sociological Theory), 1995</li>
<li>Bildbetydelser (Picture Meanings), 1992</li>
<li>Semiotik (Semiotics), 2004</li>
</ul>
<p>The Swedish version of Pomodoro Technique Illustrated will probably be available in the bookstores late 2010 or early 2011.</p>
<p><a href="http://www.pomodoro-book.com/en"><img src="http://brainmoda.files.wordpress.com/2008/02/idg_en.gif?w=480&#038;h=250" alt="Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC" title="Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC" width="480" height="250" class="aligncenter size-full wp-image-778" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brainmoda.wordpress.com/746/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brainmoda.wordpress.com/746/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brainmoda.wordpress.com/746/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brainmoda.wordpress.com/746/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brainmoda.wordpress.com/746/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brainmoda.wordpress.com/746/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brainmoda.wordpress.com/746/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brainmoda.wordpress.com/746/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brainmoda.wordpress.com/746/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brainmoda.wordpress.com/746/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brainmoda.wordpress.com/746/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brainmoda.wordpress.com/746/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brainmoda.wordpress.com/746/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brainmoda.wordpress.com/746/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.staffannoteberg.com&blog=2614182&post=746&subd=brainmoda&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.staffannoteberg.com/2010/05/23/pomodoro-technique-illustrated-in-swedish/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/892160c571f99f4c4f75dbd01ca95406?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">snoteberg</media:title>
		</media:content>

		<media:content url="http://brainmoda.files.wordpress.com/2010/05/swedishflag.jpg?w=300" medium="image">
			<media:title type="html">swedishflag</media:title>
		</media:content>

		<media:content url="http://brainmoda.files.wordpress.com/2008/02/idg_en.gif" medium="image">
			<media:title type="html">Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC</media:title>
		</media:content>
	</item>
		<item>
		<title>Regex process: Copy-Paste-Generalize</title>
		<link>http://blog.staffannoteberg.com/2010/05/22/regex-process-copy-paste-generalize/</link>
		<comments>http://blog.staffannoteberg.com/2010/05/22/regex-process-copy-paste-generalize/#comments</comments>
		<pubDate>Sat, 22 May 2010 21:14:50 +0000</pubDate>
		<dc:creator>Staffan Nöteberg</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Iterative]]></category>
		<category><![CDATA[Pomodoro Technique Illustrated]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Regex]]></category>
		<category><![CDATA[Regular Expressions]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[amazon]]></category>

		<guid isPermaLink="false">http://blog.staffannoteberg.com/?p=709</guid>
		<description><![CDATA[Regular Expressions is a flexible tool for matching strings of text. They can be really crisp and elegant, but how can you design them? Below is a design process. Name Copy-Paste-Generalize Intent Go from an idea to a flexible and generalized regular expression. Applicability You have a text example and you know what you want [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.staffannoteberg.com&blog=2614182&post=709&subd=brainmoda&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Regular_expression" target="re">Regular Expressions</a> is a flexible tool for matching strings of text. They can be really crisp and elegant, but how can you design them? Below is a design process.</p>
<p><strong>Name</strong></p>
<p>Copy-Paste-Generalize</p>
<p><strong>Intent</strong></p>
<p>Go from an idea to a flexible and generalized regular expression.</p>
<p><strong>Applicability</strong></p>
<p>You have a text example and you know what you want to extract. But, of course, you want your regular expression to be generalized enough to match other candidates.</p>
<p><strong>Consequences</strong></p>
<p>The Copy-Paste-Generalize pattern is easy to get you started and then you can develop your regular expression in an iterative and structured way.</p>
<p><strong>Mechanics</strong></p>
<ol>
<li>Copy a text example</li>
<li>Paste it as your initial regular expression</li>
<li>Generelaize the expression step by step until it matches any possible candidate</li>
</ol>
<p><strong>Other Names</strong></p>
<p>This process has many names. E.g. Mehran Habibi call something similar &#8220;The Pull Technique&#8221; in his book <a href="http://apress.com/book/view/9781590591079" target="jre">Java Regular Expressions</a>.</p>
<p><strong>Example</strong></p>
<div id="attachment_736" class="wp-caption aligncenter" style="width: 510px"><a target="amazon" href="http://www.amazon.com/Pomodoro-Technique-Illustrated-Really-Minutes/dp/1934356506"><img src="http://brainmoda.files.wordpress.com/2010/05/rank.jpg?w=500&#038;h=346" alt="Pomodoro Technique Illustrated info page at Amazon.com" title="Pomodoro Technique Illustrated info page at Amazon.com" width="500" height="346" class="size-full wp-image-736" /></a><p class="wp-caption-text">Pomodoro Technique Illustrated info page at Amazon.com</p></div>
<p>Amazon.com presents a sale rank of all books. The list is updated frequently and every book&#8217;s current rank can be found at <a href="http://www.amazon.com/Pomodoro-Technique-Illustrated-Really-Minutes/dp/1934356506" target="amazon">the book&#8217;s info page</a>. Suppose I want to match the current rank for my book <a href="http://www.pomodoro-book.com" target="pti">Pomodoro Technique Illustrated</a>. First I download an example text: the current page at Amazon:</p>
<ul>
<li><code>lynx -dump http://www.amazon.com/Pomodoro-Technique-Illustrated-Minutes-Pragmatic/dp/1934356506</code></li>
</ul>
<p>I use <a href="http://en.wikipedia.org/wiki/Lynx_%28web_browser%29" target="lynx">Lynx</a> (btw: by far the greatest web browser the world has ever seen) in CLI mode. The result is a rain of lines from <a href="http://www.pomodoro-book.com" target="pti">Pomodoro Technique Illustrated</a>&#8216;s info page at Amazon. I better grep something to make my example text smaller:</p>
<ul>
<li><code>lynx -dump http://www.amazon.com/Pomodoro-Technique-Illustrated-Minutes-Pragmatic/dp/1934356506|grep -i rank</code></li>
</ul>
<p>The result is:</p>
<ul>
<li><code>* Amazon Bestsellers Rank: #23,032 in Books ([89]See Top 100 in</code></li>
</ul>
<p>Great! This includes what I want to match. What I&#8217;ve done so far is the Copy part of this process. Next goes the Paste. I add an extremely simple Regular Expression and put it in a <a href="http://www.ruby-lang.org" target="ruby">Ruby</a> one-liner:</p>
<ul>
<li><code>lynx -dump http://www.amazon.com/Pomodoro-Technique-Illustrated-Minutes-Pragmatic/dp/1934356506 | ruby -pe 'puts $1 if $_[/<strong><em>Bestsellers Rank: #(23,032) in Books</em></strong>/]; next'</code></li>
</ul>
<p>As a matter of fact, the expression that resides between the dashes is just a Paste of what I got from the Lynx dump. And the result of this line is:</p>
<ul>
<li><code>23,032</code></li>
</ul>
<p>…and that&#8217;s because of the parenthesis.</p>
<p>Copy done. Paste Done. Let&#8217;s start to generalize. Next time I run this, I might get another rank than 23,032. Digits can be captured with the meta sequence \d. This implies the next iteration:</p>
<ul>
<li><code>lynx -dump http://www.amazon.com/Pomodoro-Technique-Illustrated-Minutes-Pragmatic/dp/1934356506 | ruby -pe 'puts $1 if $_[/<strong><em>Bestsellers Rank: #(\d\d,\d\d\d) in Books</em></strong>/]; next'</code></li>
</ul>
<p>Instead of cascading the \d, I can use the limiting repetition operator:</p>
<ul>
<li><code>lynx -dump http://www.amazon.com/Pomodoro-Technique-Illustrated-Minutes-Pragmatic/dp/1934356506 | ruby -pe 'puts $1 if $_[/<strong><em>Bestsellers Rank: #(\d{1,3},\d{3}) in Books</em></strong>/]; next'</code></li>
</ul>
<p>The text in between &#8220;Rank&#8221; and the number may change. It would be more robust to describe it as non-digits:</p>
<ul>
<li><code>lynx -dump http://www.amazon.com/Pomodoro-Technique-Illustrated-Minutes-Pragmatic/dp/1934356506 | ruby -pe 'puts $1 if $_[/<strong><em>Bestsellers Rank[^\d]*(\d{1,3},\d{3}) in Books</em></strong>/]; next'</code></li>
</ul>
<p>This expression will only work when the rank is between 1,000 and 999,999. Just in case this book gets extremely popular, let&#8217;s generalize the number part:</p>
<ul>
<li><code>lynx -dump http://www.amazon.com/Pomodoro-Technique-Illustrated-Minutes-Pragmatic/dp/1934356506 | ruby -pe 'puts $1 if $_[/<strong><em>Bestsellers Rank[^\d]*([\d,]*)</em></strong>/]; next'</code></li>
</ul>
<p>The expression has become pretty compact and robust. I stop here:</p>
<ul>
<li><code>Bestsellers Rank[^\d]*([\d,]*)</code></li>
</ul>
<p><strong>Challenge</strong></p>
<p>Even though it&#8217;s only a example above, you may know how to make the Regular Expression or the <a href="http://www.ruby-lang.org" target="ruby">Ruby</a>/<a href="http://en.wikipedia.org/wiki/Bash_%28Unix_shell%29" target="bash">Bash</a> code even more crisp. If you do, feel free to append a comment below.</p>
<p><a href="http://www.pomodoro-book.com/en"><img src="http://brainmoda.files.wordpress.com/2008/02/idg_en.gif?w=480&#038;h=250" alt="Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC" title="Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC" width="480" height="250" class="aligncenter size-full wp-image-778" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brainmoda.wordpress.com/709/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brainmoda.wordpress.com/709/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brainmoda.wordpress.com/709/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brainmoda.wordpress.com/709/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brainmoda.wordpress.com/709/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brainmoda.wordpress.com/709/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brainmoda.wordpress.com/709/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brainmoda.wordpress.com/709/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brainmoda.wordpress.com/709/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brainmoda.wordpress.com/709/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brainmoda.wordpress.com/709/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brainmoda.wordpress.com/709/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brainmoda.wordpress.com/709/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brainmoda.wordpress.com/709/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.staffannoteberg.com&blog=2614182&post=709&subd=brainmoda&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.staffannoteberg.com/2010/05/22/regex-process-copy-paste-generalize/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/892160c571f99f4c4f75dbd01ca95406?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">snoteberg</media:title>
		</media:content>

		<media:content url="http://brainmoda.files.wordpress.com/2010/05/rank.jpg" medium="image">
			<media:title type="html">Pomodoro Technique Illustrated info page at Amazon.com</media:title>
		</media:content>

		<media:content url="http://brainmoda.files.wordpress.com/2008/02/idg_en.gif" medium="image">
			<media:title type="html">Pomodoro Technique Illustrated -- New book from The Pragmatic Programmers, LLC</media:title>
		</media:content>
	</item>
	</channel>
</rss>