<?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>amazing development</title>
	<atom:link href="http://amazing-development.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://amazing-development.com</link>
	<description>ruby, java and the rest</description>
	<lastBuildDate>Thu, 20 May 2010 06:31:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Customize Chrome Omnibar</title>
		<link>http://amazing-development.com/archives/2010/05/20/customize-chrome-omnibar/</link>
		<comments>http://amazing-development.com/archives/2010/05/20/customize-chrome-omnibar/#comments</comments>
		<pubDate>Thu, 20 May 2010 06:31:13 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://amazing-development.com/?p=453</guid>
		<description><![CDATA[I love Chrome! But one thing drove me crazy: we have numerous internal web-apps running on different hosts. From Firefox was easy to get to these tools by just typing the toolname (not the FQDN) in the url bar. Chrome knows it better and assumes that I want to search for toolname. A moment later [...]]]></description>
			<content:encoded><![CDATA[<p>I love Chrome! But one thing drove me crazy: we have numerous internal web-apps running on different hosts. From Firefox was easy to get to these tools by just typing the toolname (not the <a href="http://en.wikipedia.org/wiki/Fully_qualified_domain_name">FQDN</a>) in the url bar. Chrome knows it better and assumes that I want to search for toolname. A moment later it asked me if I meant toolname/ and remebers this choice (at least it annoys me only once per tool).</p>
<p>Yesterday I I got an idea and tryed a snippet of javascript as a search engine and was happy to see that it worked as intended. A few minutes of javascript hacking later the omnibar behaved the way I like it:</p>
<ul>
<li>multiple words are a search query</li>
<li>single words are URLs, even without the trailing slash, always!</li>
<li>fix broken http at the start of an URL (happens to me sometimes when I cut&#8217;n'paste)</li>
</ul>
<p>This is the current version of my default search engine, feel free to criticize, I&#8217;m a JS noob:<br />
<code>javascript:query="%s"; if (query.search(/\s/) != -1) { window.location="http://www.google.com/search?q=" + query; } else { query = query.replace(/^h?t?t?p?:\/\//, ""); window.location="http://"+query; } </code></p>
<p>Enjoy and let me know if you have other ideas on how to improve this!</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2010/05/20/customize-chrome-omnibar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dear Garmin&#8230;</title>
		<link>http://amazing-development.com/archives/2010/02/28/dear-garmin/</link>
		<comments>http://amazing-development.com/archives/2010/02/28/dear-garmin/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 09:22:29 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[outdoor]]></category>

		<guid isPermaLink="false">http://amazing-development.com/?p=444</guid>
		<description><![CDATA[Dear Garmin, I don&#8217;t know if anyone told you that you build pretty good hardware but your firmware SUCKS! It&#8217;s Nearly March 2010 and your customers still have to fight with an embarrassing Y2010 bug in your code, the UI is horrible and getting anything on or off the device is a pain. I am [...]]]></description>
			<content:encoded><![CDATA[<p>Dear Garmin,</p>
<p>I don&#8217;t know if anyone told you that you build pretty good hardware but your firmware SUCKS! It&#8217;s Nearly March 2010 and your customers still have to fight with an embarrassing Y2010 bug in your code, the UI is horrible and getting anything on or off the device is a pain. I am the not-so-proud owner of an eTrex HCx but I can&#8217;t remember the last time I actually used it. Why? Because a <a href="www.google.com/phone">Nexus One</a> with <a href="http://mytracks.appspot.com/">My Tracks</a> is way better than anything you have to offer. No need to jump through hoops to get tracks off the device, no proprietary drivers that work with one and a half operating systems and I carry it anyway&#8230;</p>
<p>Do you want me back as a customer?</p>
<p>Build the <strong>eTrex Android</strong>.</p>
<p>Specs:</p>
<ul>
<li>rugged version of the Nexus One (same screen, processor, etc.)</li>
<li>replaceable batteries (with a tiny battery in the device to let me switch batteries without shutting it down)</li>
<li>better GPS antenna &#038; chips</li>
<li>tiny solar panel on the back</li>
</ul>
<p>If you or any other company would build a device like that, you could ask ANY price and I would buy it. So please build it. Please&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2010/02/28/dear-garmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Buzz&#8230;</title>
		<link>http://amazing-development.com/archives/2010/02/10/buzz/</link>
		<comments>http://amazing-development.com/archives/2010/02/10/buzz/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 14:35:16 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://amazing-development.com/?p=439</guid>
		<description><![CDATA[This is mainly a test to see how adding this blog to my Buzz account works. Additionally I want to say how thrilled I am to finally buzz with people outside work]]></description>
			<content:encoded><![CDATA[<p>This is mainly a test to see how adding this blog to my Buzz account works. Additionally I want to say how thrilled I am to finally buzz with people outside work <img src='http://amazing-development.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2010/02/10/buzz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JRuby on appengine with Ubuntu</title>
		<link>http://amazing-development.com/archives/2010/01/06/jruby-on-appengine-with-ubuntu/</link>
		<comments>http://amazing-development.com/archives/2010/01/06/jruby-on-appengine-with-ubuntu/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 11:09:20 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[JRuby]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[appengine]]></category>

		<guid isPermaLink="false">http://amazing-development.com/?p=426</guid>
		<description><![CDATA[Overall the instructions on code.google.com are really good, so this is just a dump to remind me of the Ubuntu specific stuff I did on a pristine Ubuntu installation&#8230; sudo apt-get install sun-java6-jdk sudo apt-get install ruby-full rubygems This installs only rubygems 1.3.1 but appengine needs 1.3.5. ERROR: Error installing google-appengine: bundler requires RubyGems version [...]]]></description>
			<content:encoded><![CDATA[<p>Overall the instructions on <a href="http://code.google.com/p/appengine-jruby/wiki/Introduction">code.google.com</a> are really good, so this is just a dump to remind me of the Ubuntu specific stuff I did on a pristine Ubuntu installation&#8230;</p>
<p><code><br />
sudo apt-get install sun-java6-jdk<br />
sudo apt-get install ruby-full rubygems<br />
</code></p>
<p>This installs only rubygems 1.3.1 but appengine needs 1.3.5.</p>
<blockquote><p>
ERROR:  Error installing google-appengine:<br />
	bundler requires RubyGems version >= 1.3.5
</p></blockquote>
<p><code><br />
sudo gem install rubygems-update<br />
sudo /var/lib/gems/1.8/bin/update_rubygems<br />
sudo gem install google-appengine<br />
</code></p>
<p>Et voilà! Ten minutes later I have a running hello world in the cloud <img src='http://amazing-development.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2010/01/06/jruby-on-appengine-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pgrep or pkill sometimes do not find process</title>
		<link>http://amazing-development.com/archives/2009/10/15/pgrep-or-pkill-do-not-find-process/</link>
		<comments>http://amazing-development.com/archives/2009/10/15/pgrep-or-pkill-do-not-find-process/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 10:07:33 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://amazing-development.com/?p=415</guid>
		<description><![CDATA[The usual problem: you want to kill a process. $ ps aux &#124; grep randomprocessname psycho 20429 0.0 0.0 11824 1580 pts/7 S+ 12:00 0:00 /bin/bash ./randomprocessname psycho 20528 0.0 0.0 4188 740 pts/17 R+ 12:00 0:00 grep randomprocessname $ pkill -9 randomprocessname WTF? Kill that sucker! $ pkill -9 randomprocessname No typo... Am I [...]]]></description>
			<content:encoded><![CDATA[<p>The usual problem: you want to kill a process.</p>
<p><code>$ ps aux | grep randomprocessname<br />
psycho   20429  0.0  0.0  11824  1580 pts/7    S+   12:00   0:00 /bin/bash ./randomprocessname<br />
psycho   20528  0.0  0.0   4188   740 pts/17   R+   12:00   0:00 grep randomprocessname<br />
$ pkill -9 randomprocessname<br />
<font color="red">WTF? Kill that sucker!</font><br />
$ pkill -9 randomprocessname<br />
<font color="red">No typo... Am I crazy?</font><br />
$ pgrep randomprocessname<br />
<font color="red">What's wrong?</font><br />
$ pgrep randomprocessna<br />
20429<br />
$ pkill -9 randomprocessna</code></p>
<p>For some arcane reason <code>pgrep/pkill</code> matches only the first 15 characters.</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2009/10/15/pgrep-or-pkill-do-not-find-process/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Android scripting environment supports JRuby</title>
		<link>http://amazing-development.com/archives/2009/08/04/android-scripting-environment-supports-jruby/</link>
		<comments>http://amazing-development.com/archives/2009/08/04/android-scripting-environment-supports-jruby/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 06:21:19 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[android]]></category>

		<guid isPermaLink="false">http://amazing-development.com/?p=396</guid>
		<description><![CDATA[Quite some time has passed since the last time I wrote something on this blog, mostly because I did little non-work related worth mentioning. But last week I helped Damon to finally support JRuby on his Android Scripting Environment (ASE). Downloaded JRuby sources (jruby&#45;1.2.0RC1) from http&#58;//www.jruby.org/download. Patched the build.xml to not include doc/index.html from dynalang.jar [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" src="http://static.amazing-development.com/blog_images/09/ASE.jpg"/><a href="http://www.flickr.com/photos/dino_olivieri/391541320/"><img class="alignright" src="http://static.amazing-development.com/blog_images/09/robot_red_planet.jpg"/></a>Quite some time has passed since the last time I wrote something on this blog, mostly because I did little non-work related worth mentioning.</p>
<p />
But last week I helped <a href="http://damonkohler.com/">Damon</a> to finally support JRuby on his <a href="http://code.google.com/p/android-scripting/">Android Scripting Environment (ASE)</a>. </p>
<ul>
<li>Downloaded JRuby sources (jruby&#45;1.2.0RC1) from <a href="http://www.jruby.org/download">http&#58;//www.jruby.org/download</a>.</li>
<li>Patched the <tt>build.xml</tt> to not include <tt>doc/index.html</tt> from <tt>dynalang.jar</tt> otherwise dx will complain about an HTML page in the ruby&#45;complete.jar.<br />
<br clear="all"/></p>
<pre>$ diff &#45;r jruby&#45;1.2.0RC1 jruby&#45;1.2.0RC1.patched/
Only in jruby&#45;1.2.0RC1.patched/&#58; build
diff &#45;r jruby&#45;1.2.0RC1/build.xml jruby&#45;1.2.0RC1.patched/build.xml
42c42
&lt;
&#45;&#45;&#45;
&gt;
238c238,240
&lt;         &lt;zipfileset src=&quot;${build.lib.dir}/dynalang&#45;0.3.jar&quot;/&gt;
&#45;&#45;&#45;
&gt;         &lt;zipfileset src=&quot;${build.lib.dir}/dynalang&#45;0.3.jar&quot;&gt;
&gt;           &lt;exclude name=&quot;**/doc/index.html&quot;/&gt;
&gt;         &lt;/zipfileset&gt;
268c270,272
&lt;         &lt;zipfileset src=&quot;${build.lib.dir}/dynalang&#45;0.3.jar&quot;/&gt;
&#45;&#45;&#45;
&gt;         &lt;zipfileset src=&quot;${build.lib.dir}/dynalang&#45;0.3.jar&quot;&gt;
&gt;           &lt;exclude name=&quot;**/doc/index.html&quot;/&gt;
&gt;         &lt;/zipfileset&gt;
387c391,393
&lt;         &lt;zipfileset src=&quot;${build.lib.dir}/dynalang&#45;0.3.jar&quot;/&gt;
&#45;&#45;&#45;
&gt;         &lt;zipfileset src=&quot;${build.lib.dir}/dynalang&#45;0.3.jar&quot;&gt;
&gt;           &lt;exclude name=&quot;**/doc/index.html&quot;/&gt;
&gt;         &lt;/zipfileset&gt;</pre>
</li>
<li>Downloaded the JSON sources from <a href="http://rubyforge.org/frs/?group_id=953 and put them in lib/ruby/1.8/json/">http&#58;//rubyforge.org/frs/?group_id=953 and put them in <tt>lib/ruby/1.8/json/</tt></a></li>
<li>Copied <a href="http://code.google.com/p/android-scripting/source/browse/trunk/jruby/ase/android.rb">android.rb</a> to <tt>lib/ruby/1.8/</tt>.</li>
<li>Built jar&#45;complete (<tt>ant jar-complete</tt>) and added <tt>jruby&#45;complete.jar</tt> to eclipse project.</li>
<li>Connected the bits and pieces in <a href="http://code.google.com/p/android-scripting/source/browse/#svn/trunk/android/AndroidScriptingEnvironment/src/com/google/ase/interpreter/jruby"><tt>com.google.ase.interpreter.jruby</tt></a></li>
</ul>
<ul>
<p>But beware! The new ASE apk is HUGE (4.6M) and JRuby is fairly slow. But it works <img src='http://amazing-development.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </ul>
<p><img src="http://static.amazing-development.com/blog_images/09/ase1.jpg"/><br />
<img src="http://static.amazing-development.com/blog_images/09/ase2.jpg"/></p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2009/08/04/android-scripting-environment-supports-jruby/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Android G1 gprs setup for simyo with 1gb data plan</title>
		<link>http://amazing-development.com/archives/2009/03/03/android-g1-gprs-setup-for-simyo-with-1gb-data-plan/</link>
		<comments>http://amazing-development.com/archives/2009/03/03/android-g1-gprs-setup-for-simyo-with-1gb-data-plan/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 08:52:38 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Computer]]></category>

		<guid isPermaLink="false">http://amazing-development.com/?p=382</guid>
		<description><![CDATA[Last week I added the 1gb data plan to my Simyo contract to use the SIM with my Christmas G1. I tried a few configurations I found online for simyo but they did not work for me. After some frustration I tried an eplus configuration and this one finally worked for me: Name: does not [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://flickr.com/photos/modenadude/3299053044/"><img class="alignright" src="http://static.amazing-development.com/blog_images/09/g1_black.jpg"/></a>Last week I added the 1gb data plan to my Simyo contract to use the SIM with my Christmas G1. I tried a few configurations I found online for simyo but they did not work for me. After some frustration I tried an eplus configuration and this one finally worked for me:</p>
<p><code><br />
<b>Name:</b> does not matter<br />
<b>APN:</b> internet.eplus.de<br />
<b>Proxy:</b> &lt;empty&gt;<br />
<b>Port:</b> &lt;empty&gt;<br />
<b>Username:</b> eplus<br />
<b>Password:</b> &lt;empty&gt;<br />
<b>Server:</b> &lt;empty&gt;<br />
<b>MMSC:</b> &lt;empty&gt;<br />
<b>MMS proxy:</b> &lt;empty&gt;<br />
<b>MMC:</b> 262<br />
<b>MNC:</b> 03<br />
<b>APN type:</b> &lt;empty&gt;<br />
</code></p>
<p><i>Update:</i></p>
<p>The recommended configuration is:</p>
<p><code><br />
<b>Name:</b> does not matter<br />
<b>APN:</b> internet.eplus.de<br />
<b>Proxy:</b> &lt;empty&gt;<br />
<b>Port:</b> &lt;empty&gt;<br />
<b>Username:</b> <font color="red">simyo</font><br />
<b>Password:</b> <font color="red">simyo</font><br />
<b>Server:</b> &lt;empty&gt;<br />
<b>MMSC:</b> &lt;empty&gt;<br />
<b>MMS proxy:</b> &lt;empty&gt;<br />
<b>MMC:</b> 262<br />
<b>MNC:</b> 03<br />
<b>APN type:</b> &lt;empty&gt;<br />
</code></p>
<p>After the initial success with the eplus configuration, I had some problems with it, too. But I guess these errors were internal eplus network hiccups because they were gone without me changing anything and now both configs work.</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2009/03/03/android-g1-gprs-setup-for-simyo-with-1gb-data-plan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tab + Firefox on OS X</title>
		<link>http://amazing-development.com/archives/2009/02/26/tab-firefox-on-os-x/</link>
		<comments>http://amazing-development.com/archives/2009/02/26/tab-firefox-on-os-x/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 17:19:30 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Computer]]></category>

		<guid isPermaLink="false">http://amazing-development.com/?p=377</guid>
		<description><![CDATA[A few days ago I finally upgraded my (== my employer&#8217;s) Macbook Pro from Tiger to Leopard. Everything worked flawless except for one crazy problem: I could not use to tab key the way I used to in forms. My usual routine of quickly entering username, tab, password, tab, hit return did not work anymore. [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago I finally upgraded my (== my employer&#8217;s) Macbook Pro from Tiger to Leopard. Everything worked flawless except for one crazy problem: I could not use to tab key the way I used to in forms. My usual routine of quickly entering username, tab, password, tab, hit return did not work anymore. I searched through the Firefox settings but couldn&#8217;t find the &#8220;Drive psycho crazy&#8221;-option.</p>
<p><img class="alignright" src="http://static.amazing-development.com/blog_images/09/tab_osx.png"/>But thanks to the omniscient internet I found <a href="http://bjkeefe.blogspot.com/2006/03/yaroct-macfirefox-tab-key-nav.html">a solution</a>. At the bottom of the &#8220;Keyboard &#038; Mouse&#8221; preferences page is a setting which allows you to navigate only between text boxes or between all controls. I don&#8217;t know who came up with the great idea that the default should be &#8220;text boxes and lists only&#8221;, but I guess the mighty Steve knows what he is doing.</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2009/02/26/tab-firefox-on-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First sighting of JRuby on Android</title>
		<link>http://amazing-development.com/archives/2009/02/24/first-sighting-of-jruby-on-android/</link>
		<comments>http://amazing-development.com/archives/2009/02/24/first-sighting-of-jruby-on-android/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 13:25:24 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[all]]></category>

		<guid isPermaLink="false">http://amazing-development.com/?p=368</guid>
		<description><![CDATA[Last week I cross-compiled miniruby to Android (more details on that adventure later). I asked some time ago about JRuby on Android and it seems like Charles Nutter finally managed to run JRuby on Android. # cat test.rb require 'java' import java.lang.System class Ruboto &#160;&#160;def greet(who) &#160;&#160;&#160;&#160;puts "Hello, #{who}!" &#160;&#160;end end name = System.get_property('java.runtime.name') Ruboto.new.greet(name) [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I cross-compiled miniruby to Android (more details on that adventure later). I asked some time ago <a href="/archives/2007/12/14/jruby-on-android/">about JRuby on Android</a> and it <a href="http://blog.headius.com/2009/02/domo-arigato-mr-ruboto.html">seems like Charles Nutter finally managed to run JRuby on Android</a>.</p>
<pre># cat test.rb
require 'java'
import java.lang.System

class Ruboto
&nbsp;&nbsp;def greet(who)
&nbsp;&nbsp;&nbsp;&nbsp;puts "Hello, #{who}!"
&nbsp;&nbsp;end
end

name = System.get_property('java.runtime.name')
Ruboto.new.greet(name)

# dalvikvm -classpath ruboto.jar org.jruby.Main -X-C test.rb
Hello, Android Runtime!</pre>
<p>This leaves only one question: where can I get ruboto.jar to start playing around with it <img src='http://amazing-development.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2009/02/24/first-sighting-of-jruby-on-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code reviews work</title>
		<link>http://amazing-development.com/archives/2009/02/22/code-reviews-work/</link>
		<comments>http://amazing-development.com/archives/2009/02/22/code-reviews-work/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 20:24:50 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://amazing-development.com/?p=354</guid>
		<description><![CDATA[Seems like nowadays I only write blog posts in response to other blog articles&#8230; But I hope this is better than not writing at all. Ted Neward asks if code reviews do actually work because evidence suggests, that the scientific review process does not. Only 8% members of the Scientific Research Society agreed that &#8220;peer [...]]]></description>
			<content:encoded><![CDATA[<p>Seems like nowadays I only write blog posts in response to other blog articles&#8230; But I hope this is better than not writing at all. <a href="http://blogs.tedneward.com/2009/02/22/As+For+Peer+Review+Code+Review.aspx">Ted Neward asks if code reviews do actually work</a> because evidence suggests, that the scientific review process does not.<span id="more-354"></span></p>
<p><a href="http://en.wikipedia.org/wiki/File:Hooke-microscope.png"><img class="alignright" src="http://static.amazing-development.com/blog_images/09/microscope.png"/></a></p>
<blockquote><p>Only 8% members of the Scientific Research Society agreed that &#8220;peer review works well as it is&#8221;. (Chubin and Hackett, 1990; p.192).</p>
<p>&#8220;A recent U.S. Supreme Court decision and an analysis of the peer review system substantiate complaints about this fundamental aspect of scientific research.&#8221; (Horrobin, 2001)</p>
<p>Horrobin concludes that peer review &#8220;is a non-validated charade whose processes generate results little better than does chance.&#8221; (Horrobin, 2001). This has been statistically proven and reported by an increasing number of journal editors.</p>
<p>But, &#8220;Peer Review is one of the sacred pillars of the scientific edifice&#8221; (Goodstein, 2000), it is a necessary condition in quality assurance for Scientific/Engineering publications, and &#8220;Peer Review is central to the organization of modern science…why not apply scientific [and engineering] methods to the peer review process&#8221; (Horrobin, 2001).</p>
<p>&#8230;</p>
<p>Chubin, D. R. and Hackett E. J., 1990, Peerless Science, Peer Review and U.S. Science Policy; New York, State University of New York Press.</p>
<p>Horrobin, D., 2001, &#8220;Something Rotten at the Core of Science?&#8221; Trends in Pharmacological Sciences, Vol. 22, No. 2, February 2001. Also at <a href="http://www.whale.to/vaccine/sci.html">http://www.whale.to/vaccine/sci.html</a> and <a href="http://post.queensu.ca/~forsdyke/peerrev4.htm">http://post.queensu.ca/~forsdyke/peerrev4.htm</a> (both pages were accessed on February 1, 2009)</p>
<p>Goodstein, D., 2000, &#8220;How Science Works&#8221;, U.S. Federal Judiciary Reference Manual on Evidence, pp. 66-72 (referenced in Hoorobin, 2000)</p></blockquote>
<p>This sounds so true to me. I heard way more than one story from Ph.D. students where the professors who were supposed to review papers just forwarded this work to their slaves.</p>
<p>But the fact that academic peer reviews are possibly a failure should not be used to argue against the usefulness of code reviews.</p>
<p><b>As a reviewee</b><br />
My first project at Google was written in Python. I had never written a single line of Python before. The feedback I got from the first few reviews helped me learn a lot about Python in a very short time. I don&#8217;t know how many times I got these &#8220;Yes, this would work but if you replace these 6 lines with that short statement it would work, too&#8221; comments.</p>
<p>The same is true for my second project in C++. I have written some C++ before but this was for my Diploma thesis and the code was far from professional. Again the feedback I got from my reviewers helped me learn C++ a lot faster than I would have otherwise. This project was a lot bigger than the first one so I got a few &#8220;we already have this implemented here&#8221; comments.</p>
<p><b>As a reviewer</b><br />
I usually don&#8217;t pay that much attention to our coding conventions but my pet peeve is looking out for missing comments. Every time I have to think about a single line of code, this is a pretty good signal that a comment is missing.</p>
<p>Reviewing other people&#8217;s code makes sure that I have at least a little knowledge about the areas of our project I do not work on directly.</p>
<p><b>Conclusion</b><br />
Code reviews take time and need the proper tool support. But if it is done right, they are useful and help in a couple of different areas:</p>
<ul>
<li>Learning a new language or about new piece of code.</li>
<li>Avoiding code duplication.</li>
<li>Making sure code is documented.</li>
<li>Distribute the knowledge.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2009/02/22/code-reviews-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pair Programming killed the Uber-coder&#8230;</title>
		<link>http://amazing-development.com/archives/2009/02/21/pair-programming-killed-the-uber-coder/</link>
		<comments>http://amazing-development.com/archives/2009/02/21/pair-programming-killed-the-uber-coder/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 20:49:22 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Computer]]></category>

		<guid isPermaLink="false">http://amazing-development.com/?p=347</guid>
		<description><![CDATA[I stumbled over a great essay on pair-programming (via James Shore). Rod Hilton explains it much better than I could ever do, why you should Pair-Program. But I haven&#8217;t heard about the &#8220;ping-pong pairing&#8221;: When doing Test-Driven Development, one of the things we do is called “ping-pong pairing”. So the other developer will write a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://flickr.com/photos/indi/116404571/"><img class="alignright" src="http://static.amazing-development.com/blog_images/09/keyboard.jpg"/></a>I stumbled over a <a href="http://www.nomachetejuggling.com/2009/02/21/i-love-pair-programming/">great essay on pair-programming</a> (via <a href="http://jamesshore.com/Blog/Whats-Pair-Programming-Really-Like.html">James Shore</a>).</p>
<p>Rod Hilton explains it much better than I could ever do, why you should Pair-Program. But I haven&#8217;t heard about the &#8220;ping-pong pairing&#8221;:</p>
<blockquote><p>When doing Test-Driven Development, one of the things we do is called “ping-pong pairing”. So the other developer will write a test, then make it compile but fail. Then he passes the keyboard to me. I implement the feature just enough to make the test pass, then I write another failing test and pass it back.</p></blockquote>
<p>I have to try this on Monday&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2009/02/21/pair-programming-killed-the-uber-coder/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Drop all tables from a mysql database</title>
		<link>http://amazing-development.com/archives/2009/01/31/drop-all-tables-from-a-mysql-database/</link>
		<comments>http://amazing-development.com/archives/2009/01/31/drop-all-tables-from-a-mysql-database/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 19:19:45 +0000</pubDate>
		<dc:creator>schlumpf</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[all]]></category>

		<guid isPermaLink="false">http://amazing-development.com/?p=335</guid>
		<description><![CDATA[Sometimes you want to reset a database to its virgin state, without actually deleting and re-creating the whole database (perhaps because your user doesn&#8217;t have the right to create a database). There are a lot of links out there that give you a quick answer on how to drop all tables from a database in [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you want to reset a database to its virgin state, without actually deleting and re-creating the whole database (perhaps because your user doesn&#8217;t have the right to create a database). There are a lot of links out there that give you a quick answer on how to drop all tables from a database in a single-line shell script. Some examples:</p>
<ul>
<li><a href="http://www.thingy-ma-jig.co.uk/blog/10-10-2006/mysql-drop-all-tables">http://www.thingy-ma-jig.co.uk/blog/10-10-2006/mysql-drop-all-tables</a></li>
<li><a href="http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/">http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/</a></li>
<li><a href="http://knaddison.com/technology/mysql-drop-all-tables-database-using-single-command-line-command">http://knaddison.com/technology/mysql-drop-all-tables-database-using-single-command-line-command</a></li>
</ul>
<p>However this does not work if there are foreign key constraints between the tables (because the tables constraining others need to be deleted first). Here&#8217;s the advanced version that solves this problem: </p>
<pre>
#!/bin/bash
USERNAME=myUser
PASSWORD=myPassword
HOSTNAME=dbHost
DATABASE=mydb
while (true) ; do
    TABLES=`mysql -h $HOSTNAME -u $USERNAME -D $DATABASE --password=$PASSWORD \
                  --batch -e "show tables" | grep -v Tables_in`
    if [ -z $TABLES ] ; then break; fi
    for i in $TABLES ; do
        mysql -h $HOSTNAME -u $USERNAME -D $DATABASE --password=$PASSWORD  -e "drop table $i"
    done
done
</pre>
<p>I agree this is not <em>nice</em> because it&#8217;s a brute force approach &#8211; but hey, it works! And resetting a database is most probably not a performance-critical task anyway. </p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2009/01/31/drop-all-tables-from-a-mysql-database/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Euruko 2009 &#8211; Barcelona 9-10 May 2009</title>
		<link>http://amazing-development.com/archives/2008/12/11/euruko-2009-barcelona-9-10-may-2009/</link>
		<comments>http://amazing-development.com/archives/2008/12/11/euruko-2009-barcelona-9-10-may-2009/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 13:29:20 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[all]]></category>

		<guid isPermaLink="false">http://amazing-development.com/?p=334</guid>
		<description><![CDATA[The date for Euruoko 2009 was announced. The location was announced a few months ago but the planned date was Q1 2009. This year&#8217;s Euruko in Prague was great and I will try hard to come to Barcelona, too.]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" src="http://static.amazing-development.com/blog_images/euruko2009.png"/>The date for <a href="http://euruko2009.org">Euruoko 2009</a> was <a href="http://euruko2009.org/archives/2008/12/10/dates_for_euruko_2009/">announced</a>. The location was announced a few months ago but the planned date was Q1 2009. This year&#8217;s <a href="http://www.euruko2008.org/">Euruko in Prague</a> was great and I will try hard to come to Barcelona, too.</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2008/12/11/euruko-2009-barcelona-9-10-may-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript &#8220;close hook&#8221; for browser window</title>
		<link>http://amazing-development.com/archives/2008/11/25/javascript-close-hook-for-browser-window/</link>
		<comments>http://amazing-development.com/archives/2008/11/25/javascript-close-hook-for-browser-window/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 21:38:32 +0000</pubDate>
		<dc:creator>schlumpf</dc:creator>
				<category><![CDATA[Computer]]></category>

		<guid isPermaLink="false">http://amazing-development.com/?p=333</guid>
		<description><![CDATA[Today I wanted to implement something that would prevent me from accidentally closing the browser window while I was doing stuff in my webapp. I&#8217;m no javascript expert, so I checked some newsgroups and found more and more complex solutions the longer the threads were. Here&#8217;s what works for me: &#60;script type="text/javascript"> window.onbeforeunload = function(){ [...]]]></description>
			<content:encoded><![CDATA[<p>Today I wanted to implement something that would prevent me from accidentally closing the browser window while I was doing stuff in my webapp. I&#8217;m no javascript expert, so I checked some newsgroups and found more and more complex solutions the longer the threads were. <span id="more-333"></span></p>
<p>Here&#8217;s what works for me: </p>
<pre>
&lt;script type="text/javascript">
  window.onbeforeunload = function(){
    return "Did you save your stuff?"
  }
&lt;/script>
</pre>
<p>I have no idea why this behaves as it does, it must be one of those &#8220;very interesting ideas&#8221; Frank mentioned about javascript. </p>
<p>What it does is this: When the user presses the browser&#8217;s &#8220;x&#8221; to close the window, this dialog box is shown:<br />
<center><img src="http://ujap.de/external/javascript-close-hook.png" width="497" height="175" alt="confirm dialog box" style="border: 1pt solid black"/></center></p>
<p>If the user presses Cancel, the box disappears and the browser window remains open, and if she presses Okay, the browser window closes (who&#8217;d have guessed). So far, so good. Unfortunately the message is displayed even if the user clicks on a link or submits a form (to do something within the webapp) . </p>
<p>So how do I fix this? The newsgroups said that I could add a condition to check if I really want to warn the user about closing, like this: </p>
<pre>
&lt;script type="text/javascript">
  var hook=true;
  window.onbeforeunload = function() {
    if (hook) {
      return "Did you save your stuff?"
    }
    // no return value obviously means no dialog box.
  }
  function unhook() {
     hook=false;
  }
&lt;/script>
</pre>
<p>The default is to use the hook, and I can use the <code>unhook()</code> function to disable the hook. How does this help? How do I know when I want the hook disabled? Frank knew the solution, and it&#8217;s really very simple: I want to disable the hook whenever the user clicks on one of my own links or buttons within the webapp.  This can be done by adding an <code>onClick</code> event to each link or button like this: </p>
<pre>
&lt;a href="..." onClick="unhook()">Some link within my app&lt;/a>
</pre>
<p>At first it looks a bit cumbersome to change all the links and buttons, but in a webapp, most of the links will be written by some application code anyway so it&#8217;s not much trouble to change them all at once. </p>
<p>It&#8217;s a bit strange because what I&#8217;m doing here is programming some general behaviour (the hook) and then exclude all the common use-cases (internal links, by calling unhook()) because I can&#8217;t make javascript react to the few exceptions (browser close button) directly. </p>
<p>The final page looks something like this: </p>
<pre>
&lt;html>
  &lt;head>
    &lt;script type="text/javascript">
      var hook = true;
      window.onbeforeunload = function() {
        if (hook) {
          return "Did you save your stuff?"
        }
      }
      function unhook() {
        hook=false;
      }
    &lt;/script>
  &lt;/head>
  &lt;body>
    &lt;!-- this will ask for confirmation: -->
    &lt;a href="http://google.com">external link&lt;/a>

    &lt;!-- this will go without asking: -->
    &lt;a href="anotherPage.html" onClick="unhook()">internal link, un-hooked&lt;/a>
  &lt;/body>
&lt;/html>
</pre>
<p>Closing or re-loading the window will display the confirm box, too.<br />
<script type="text/javascript">
    var hook = true;
    window.onbeforeunload = function(){
    if (hook) {
        return "Hope you like it."
    }
    }
    function unhook() {
    hook=false;
    }
</script><br />
Use the following links to check that it works:<br />
<a href="http://google.com">Don&#8217;t leave for Google</a> before you <a href="#respond" onClick="unhook()">leave a comment</a>.<br />
You shouldn&#8217;t be able to close this page without warning, either. </p>
<p>There&#8217;s one small problem left: if you click on the &#8220;leave a comment&#8221; link, the page will not be re-loaded because it&#8217;s just a page-internal link, and after that, the hook variable will be false and you won&#8217;t be asked for confirmation if you click on the google link again. But thankfully I don&#8217;t have these page-internal links in my webapp&#8230; </p>
<p><strong>Addendum:</strong> <a href="http://blog.formatvorlage.de/" target="_blank">Claus Augusti</a> directed my attention to two official documentation sites about the <tt>onbeforeunload</tt> event. Thanks you! The documentation in the <a href="https://developer.mozilla.org/En/DOM/Window.onbeforeunload" target="_blank">Mozilla Developer Center</a> explains that one should not just return a string, but should assign a value to the <tt>returnValue</tt> property of the <tt>onbeforeunload</tt> event (browser-dependent), like this: </p>
<pre>
window.onbeforeunload = function (e) {
  var e = e || window.event;
  if (e) {   // For IE and Firefox
    e.returnValue = 'Any string';
  }
  return 'Any string';   // For Safari
};
</pre>
<p>This is contradictory to the example given in <a target="_blank" href="http://msdn.microsoft.com/en-us/library/ms536907(VS.85).aspx">Microsoft&#8217;s documentation</a> (returning a string is sufficient), and contrary to my experience with Firefox, but at least it helps to understand why this works at all. </p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2008/11/25/javascript-close-hook-for-browser-window/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Where was CamelCase invented?</title>
		<link>http://amazing-development.com/archives/2008/10/10/where-was-camelcase-invented/</link>
		<comments>http://amazing-development.com/archives/2008/10/10/where-was-camelcase-invented/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 16:57:48 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Fun]]></category>

		<guid isPermaLink="false">http://amazing-development.com/?p=331</guid>
		<description><![CDATA[Useless and probably false trivia of the day: Where was CamelCase invented?: In Scottland]]></description>
			<content:encoded><![CDATA[<p>Useless and probably false trivia of the day: </p>
<p><b>Where was CamelCase invented?</b>: <a href="http://www.clarkeching.com/2008/10/camelcase.html">In Scottland</a></p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2008/10/10/where-was-camelcase-invented/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hamster across america</title>
		<link>http://amazing-development.com/archives/2008/09/29/hamster-across-america/</link>
		<comments>http://amazing-development.com/archives/2008/09/29/hamster-across-america/#comments</comments>
		<pubDate>Mon, 29 Sep 2008 13:15:36 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Fun]]></category>

		<guid isPermaLink="false">http://amazing-development.com/?p=330</guid>
		<description><![CDATA[If you ever wondered how fast a hamster runs or what Google engineers do when they are bored (or drunk?) have a look hamsteracrossamerica.com/. They attached a sensor to the wheel of a hamster and plot the distance using Google Maps to see if it is possible that a hamster runs all across America in [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" src="http://static.amazing-development.com/blog_images/hamster_title.gif"/>If you ever wondered <a href="http://hamsteracrossamerica.blogspot.com/2008/09/how-fast-does-hamster-run.html">how fast a hamster runs</a> or what Google engineers do when they are bored (or drunk?) have a look <a href="http://hamsteracrossamerica.blogspot.com">hamsteracrossamerica.com/</a>. </p>
<p>They attached a sensor to the wheel of a hamster and plot the distance using <a href="http://maps.google.com">Google Maps</a> to see if it is possible that a hamster runs all across America in his lifetime.</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2008/09/29/hamster-across-america/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
