<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-12015963</atom:id><lastBuildDate>Tue, 01 Nov 2011 07:29:08 +0000</lastBuildDate><category>solr</category><category>discussion</category><category>updates. technology</category><category>graduation</category><category>news</category><category>notify-osd</category><category>bug</category><category>autotest</category><category>interesting</category><category>technique</category><category>bitt</category><category>events</category><category>self</category><category>open source</category><category>presentation</category><category>firefox</category><category>gwibber</category><category>git</category><category>society</category><category>left-field</category><category>rails</category><category>redbubble</category><category>work</category><category>rant</category><category>scripting</category><category>sunspot</category><category>ubuntu zebra</category><category>malaysia</category><category>business</category><category>reports</category><category>rails3</category><category>policy</category><category>bash</category><category>links</category><category>full-text search</category><category>batch</category><category>rspec</category><category>tale of the white lion</category><category>unpage</category><category>people</category><category>panic</category><category>up</category><category>ssl</category><category>summer of code</category><category>compiz fusion</category><category>trackerd</category><category>ubuntu</category><category>project</category><category>suspend</category><category>hazard</category><category>blogging</category><category>wellington</category><category>ubuntu gnome x11 dbus</category><category>tales</category><category>karmic</category><category>enter</category><category>ruby</category><category>education</category><category>technology</category><category>delicious bookmarks</category><category>life imitating games</category><category>find_each</category><category>muffin</category><category>short</category><category>opengovt</category><category>map</category><category>feisty</category><category>firefox3</category><category>thumbnails</category><category>gadget</category><category>collection</category><category>photos</category><category>inspiration</category><category>ubuntu zesty zebra</category><category>it</category><category>gutsy</category><category>duplicate</category><category>fglrx</category><category>honours</category><category>mcs</category><category>hardy heron</category><category>melbourne</category><category>usability</category><category>friends</category><category>image upload</category><category>growl</category><category>recovery</category><category>bubblewrap</category><category>rands</category><category>twitter client</category><category>politics</category><category>programming</category><category>broadband</category><category>random</category><category>intent</category><category>games</category><category>autocomplete</category><category>strengths</category><category>life</category><category>hackfest</category><category>sudo</category><category>yi wen</category><category>wisdom</category><category>swap</category><category>terse</category><category>vuw</category><category>communications</category><category>lessons learnt</category><category>fiction</category><category>rambling</category><category>deadlock</category><category>gmail</category><title>YT!</title><description>A blog from Y. Thong Kuah</description><link>http://blog.kuahyeow.com/</link><managingEditor>noreply@blogger.com (YT Kuah)</managingEditor><generator>Blogger</generator><openSearch:totalResults>91</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/yt" /><feedburner:info uri="yt" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-6816582389625072678</guid><pubDate>Sun, 25 Sep 2011 00:01:00 +0000</pubDate><atom:updated>2011-09-25T13:07:53.349+13:00</atom:updated><title>Land and Waste New Zealand - #mixandmashnz</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;a href="http://3.bp.blogspot.com/-NOZR1gdsPPA/TnKttEg3sWI/AAAAAAAAAkY/FtJRVnPuRig/s1600/tilemill-map.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;img border="0" height="186" src="http://3.bp.blogspot.com/-NOZR1gdsPPA/TnKttEg3sWI/AAAAAAAAAkY/FtJRVnPuRig/s320/tilemill-map.png" width="320" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption"&gt;&lt;span style="font-family: inherit;"&gt;Land And Waste New Zealand&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;br /&gt;Here's a behind the scenes write-up for my Mix and Mash NZ mashup.&lt;br /&gt;&lt;br /&gt;Check it out here :&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.landandwaste.co.nz/"&gt;http://www.landandwaste.co.nz&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This mashup attempts to show land and waste data as it changes, and hopefully illuminates any improvements of our environmental impact as well as regressions.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The journey&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;It started out as an idea to gather all kerb recycling data from all 75 odd local councils in New Zealand. That meant scraping the data off the websites of various local and unitary councils. I quickly backed away once I found that lots of councils forbade any re-use, and the data that's available is too inconsistent for me to compare and visualize.&lt;br /&gt;&lt;br /&gt;Therefore much time and effort was spent looking for suitable data. I was interested in mainly environmental type data, which was to found mainly on the Ministry for the Environment website. I was also interested in regional level data, instead of a single national figure, which wasn't that interesting .&lt;br /&gt;&lt;br /&gt;In the end, I found suitable data for land use, rates, farm animal counts, population, and waste. Given more time, I would have hunted for transport data, which would then completely encompass all the major responsibilities of a regional council.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Putting it together&lt;/b&gt;&lt;br /&gt;This mashup was made with Ruby on Rails, TileMill (&lt;a href="http://mapbox.com/tilemill/"&gt;http://mapbox.com/tilemill/&lt;/a&gt;), d3 (&lt;a href="http://mbostock.github.com/d3/"&gt;http://mbostock.github.com/d3/&lt;/a&gt;) and polymaps (&lt;a href="http://polymaps.org/"&gt;http://polymaps.org/&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;The excellent Koordinates.com put up a CC licensed shapefile of various land types in New Zealand. Instead of reaching for the de-facto choice of Google maps, this time I chose to try my hand at creating custom map tiles from that data. This had the advantage of being able to design the map to be far friendlier for statistical visualizations like cartograms, etc. &lt;br /&gt;&lt;br /&gt;TileMill is simply a brilliant piece of software, which allows once to pull data from various sources and create beautiful maps, using any style you want. In addition, there are options for mouseover and click events.&lt;br /&gt;&lt;br /&gt;There is an export function which will allow you to host the map tiles online ala Google Maps. I chose to utilise the hosted service at TileStream (&lt;a href="http://mapbox.com/#/tilestream"&gt;http://mapbox.com/#/tilestream&lt;/a&gt;). It is completely possible to self-host as well, as the hosting code has been made available at&lt;a href="https://github.com/mapbox/tilestream"&gt;https://github.com/mapbox/tilestream&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The final map I produced using TileMill can be seen at &lt;a href="http://www.landandwaste.co.nz/land"&gt;http://www.landandwaste.co.nz/land&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Importing and processing the tabular data seen on the mashup was just a matter of using a combination of Google Docs, Google Refine, and csv files. Choosing a suitable graphical representation for each set of data was slightly tougher. I used a combination of sparklines, quantile maps, and just plain text. This was done using d3 and polymaps. &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-MnQn0PIOVMM/TnKttOStGrI/AAAAAAAAAkc/CwZkK1vs-hY/s1600/Screen+shot+2011-09-16+at+1.44.48+PM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="193" src="http://4.bp.blogspot.com/-MnQn0PIOVMM/TnKttOStGrI/AAAAAAAAAkc/CwZkK1vs-hY/s320/Screen+shot+2011-09-16+at+1.44.48+PM.png" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Land use area visualization (example here for Bay of Plenty)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div&gt;
&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Qvkm2ZT6ap8/TnKttfInuiI/AAAAAAAAAkg/LG-0rtqBknk/s1600/Screen+shot+2011-09-16+at+1.43.05+PM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="262" src="http://2.bp.blogspot.com/-Qvkm2ZT6ap8/TnKttfInuiI/AAAAAAAAAkg/LG-0rtqBknk/s320/Screen+shot+2011-09-16+at+1.43.05+PM.png" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Waste visualization for each region in New Zealand&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div&gt;
&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Where to from here&lt;/b&gt;&lt;br /&gt;It was a huge learning experience. I learnt that creating something useful is very possible, and takes less time than I expected. Creating something polished requires far more time. I will definitely find a designer or improve my own design skills next time.&lt;/span&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-6816582389625072678?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2011/09/land-and-waste-new-zealand-mixandmashnz.html</link><author>noreply@blogger.com (YT Kuah)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-NOZR1gdsPPA/TnKttEg3sWI/AAAAAAAAAkY/FtJRVnPuRig/s72-c/tilemill-map.png" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-7752228357789704581</guid><pubDate>Sun, 12 Sep 2010 23:07:00 +0000</pubDate><atom:updated>2010-09-13T11:07:21.031+12:00</atom:updated><title>Fix home/end keybindings in Terminal.app on OS X</title><description>&lt;div class="Amp_Content_Outer_Bookmark"&gt;&lt;div class="Amp_Bookmark_Link"&gt;&lt;a rel="clipsource" target="_blank" title="http://www.yaroze.org/?p=79" href="http://www.yaroze.org/?p=79"&gt;http://www.yaroze.org/?p=79&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="Amp_Commentary_Wrap"&gt;&lt;div class="Amp_Post_Text"&gt;&lt;p&gt;Go all the way to the end of the less buffer! Drove me crazy the way end behaves exactly like page down instead. This tip fixed that for me.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="Amp_Link"&gt;See this Amp at &lt;a href="http://amplify.com/u/abkv"&gt;http://amplify.com/u/abkv&lt;/a&gt;&lt;/div&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-7752228357789704581?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2010/09/fix-homeend-keybindings-in-terminalapp.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-5134718727887978716</guid><pubDate>Wed, 01 Sep 2010 22:56:00 +0000</pubDate><atom:updated>2010-09-02T10:56:48.091+12:00</atom:updated><title>Why Users Fill Out Forms Faster With Top Aligned Labels | UXMovement.com</title><description>&lt;div class="Amp_Content_Outer_Bookmark"&gt;&lt;div class="Amp_Bookmark_Link"&gt;URL: &amp;nbsp;&lt;a rel="clipsource" target="_blank" title="http://uxmovement.com/design-articles/faster-with-top-aligned-labels" href="http://uxmovement.com/design-articles/faster-with-top-aligned-labels"&gt;http://uxmovement.com/design-articles/faster-with-top-a...&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="Amp_Link"&gt;See this Amp at &lt;a href="http://amplify.com/u/9kjp"&gt;http://amplify.com/u/9kjp&lt;/a&gt;&lt;/div&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-5134718727887978716?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2010/09/why-users-fill-out-forms-faster-with.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-4419405479750917508</guid><pubDate>Mon, 23 Aug 2010 02:35:00 +0000</pubDate><atom:updated>2010-08-23T14:35:01.818+12:00</atom:updated><title>Untitled</title><description>&lt;div class="Amp_Content_Outer"&gt;&lt;div class="Amp_Top_Wrap"&gt;&lt;div class="Amp_Source_First"&gt;&lt;span&gt;Amplify&amp;rsquo;d from &lt;a rel="clipsource" target="_blank" title="http://martinfowler.com/eaaCatalog/identityMap.html" href="http://martinfowler.com/eaaCatalog/identityMap.html"&gt;martinfowler.com&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="Amp_Middle_Wrap"&gt;&lt;blockquote class="Amp_Content_Item" cite="http://martinfowler.com/eaaCatalog/identityMap.html"&gt;&lt;table cellpadding="0" cellspacing="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;h1 align="center" id="AutoGeneratedID-0"&gt;Identity Map&lt;/h1&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/blockquote&gt;&lt;div class="Amp_Content_Hr"&gt;&lt;/div&gt;&lt;blockquote class="Amp_Content_Item" cite="http://martinfowler.com/eaaCatalog/identityMap.html"&gt;&lt;table cellpadding="0" cellspacing="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;i id="AutoGeneratedID-1"&gt;Ensures that each object gets loaded only once by keeping&lt;br /&gt;every loaded object in a map. Looks up objects using the map when&lt;br /&gt;referring to them.&lt;/i&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/blockquote&gt;&lt;div class="Amp_Content_Hr"&gt;&lt;/div&gt;&lt;blockquote class="Amp_Content_Item" cite="http://martinfowler.com/eaaCatalog/identityMap.html"&gt;&lt;table cellpadding="0" cellspacing="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;p id="AutoGeneratedID-3"&gt;An old proverb says that a man with two watches never knows&lt;br /&gt;what time it is. If two watches are confusing, you can get in an even&lt;br /&gt;bigger mess with loading objects from a database. If you aren't&lt;br /&gt;careful you can load the data from the same database record into two&lt;br /&gt;different objects. Then, when you update them both you'll have an&lt;br /&gt;interesting time writing the changes out to the database&lt;br /&gt;correctly.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/blockquote&gt;&lt;div class="Amp_Content_Hr"&gt;&lt;/div&gt;&lt;blockquote class="Amp_Content_Item" cite="http://martinfowler.com/eaaCatalog/identityMap.html"&gt;&lt;table cellpadding="0" cellspacing="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;p id="AutoGeneratedID-4"&gt;An Identity Map keeps a record of all objects that have been&lt;br /&gt;read from the database in a single business transaction. Whenever you&lt;br /&gt;want an object, you check the Identity Map first to see if you already&lt;br /&gt;have it.&lt;/p&gt;&lt;span class="Amp_Source_Button"&gt;&lt;a rel="clipsource" target="_blank" title="http://martinfowler.com/eaaCatalog/identityMap.html" href="http://martinfowler.com/eaaCatalog/identityMap.html"&gt;Read more at martinfowler.com&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div class="Amp_Bottom_Wrap"&gt;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div class="Amp_Link"&gt;See this Amp at &lt;a href="http://amplify.com/u/92bh"&gt;http://amplify.com/u/92bh&lt;/a&gt;&lt;/div&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-4419405479750917508?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2010/08/untitled.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-2284399396468441600</guid><pubDate>Mon, 23 Aug 2010 00:29:00 +0000</pubDate><atom:updated>2010-08-23T12:29:21.601+12:00</atom:updated><title>Facebook - greedy defaults and jarring configs</title><description>Commited Facebook Suicide for the second time. Where do I start? ...&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;The first thing that jarred me was that my full birthday is published. This in combination with search engine visibility means that it's spammer time.&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;Next thing that happened is that the privacy settings had "Everyone", "Friends of Friends", and "Friends". Nice and simple, I thought. But no, I have to exclude my full birthday again from everyone. (I know about how your friend's applications can just mine everyone's data through friends).&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;Ok, I'll just &lt;em&gt;configure&lt;/em&gt; that again.&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;What do I see next. Social &lt;strong&gt;Ads&lt;/strong&gt;. Ads. Default On. In my name. I hate Ads that purport to be in my name. That's it. Goodbye.&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;--&lt;br /&gt;
&lt;br /&gt;Here are some tools below that can help you, but to be honest, I don't think anyone can keep up with the myriad of configurations.&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;a class="ot-anchor" href="http://www3.untangle.com/saveface"&gt;http://www3.untangle.com/saveface&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;a class="ot-anchor" href="http://www.reclaimprivacy.org/"&gt;http://www.reclaimprivacy.org/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;a class="ot-anchor" href="http://github.com/mjpizz/reclaimprivacy"&gt;http://github.com/mjpizz/reclaimprivacy&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;a class="ot-anchor" href="http://itunes.apple.com/us/app/s-n-a-p/id384773305"&gt;http://itunes.apple.com/us/app/s-n-a-p/id384773305&lt;/a&gt;&lt;div class="Amp_Link"&gt;See this Amp at &lt;a href="http://amplify.com/u/9252"&gt;http://amplify.com/u/9252&lt;/a&gt;&lt;/div&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-2284399396468441600?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2010/08/facebook-greedy-defaults-and-jarring.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-2553421279819125599</guid><pubDate>Fri, 18 Jun 2010 03:07:00 +0000</pubDate><atom:updated>2010-06-18T15:07:59.262+12:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">rspec</category><category domain="http://www.blogger.com/atom/ns#">technology</category><category domain="http://www.blogger.com/atom/ns#">bash</category><category domain="http://www.blogger.com/atom/ns#">rails</category><category domain="http://www.blogger.com/atom/ns#">scripting</category><title>Bash hackery to get around old rspec</title><description>I have a problem where a project is using an older version of RSpec (currently the lastest version is RSpec 1.3.0). Therefore running&lt;br /&gt;
&lt;blockquote&gt;spec spec/model/some_model_spec.rb&lt;/blockquote&gt;gives me an error&lt;br /&gt;
&lt;blockquote&gt;/spec/models/../spec_helper.rb:23: undefined method `use_transactional_fixtures='&lt;/blockquote&gt;The solution would be to use the older, vendored spec. Now, the spec binary that is installed as part of the gem installation should do this (some gems do checked for vendor'ed binaries) and my rspec is installed under vendor/plugins, not vendor/gems. Therefore, &amp;nbsp;I use some bash trickery to dynamically redefine the "&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;spec&lt;/span&gt;" command. Put the code below in .bashrc :&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
vendored_or_path_spec() {
  if [ -x vendor/plugins/rspec/bin/spec ];
  then 
    echo 'vendor/plugins/rspec/bin/spec';
  else
    echo '*spec';
  fi
}
alias spec='$(vendored_or_path_spec) $@'&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Some explanations. The hardest thing to figure out was how to dynamically alias something. After such scrumbling and asking on vark.com, I managed to find &lt;a href="https://secure.wikimedia.org/wikipedia/en/wiki/Command_substitution"&gt;command substitutions&lt;/a&gt;, which is the $(command) part. Combining that with $@ for all arguments meant that I can run any command in the alias. &lt;br /&gt;
&lt;br /&gt;
Because I'm aliasing spec, I use *spec to refer to the original un-aliased spec.&lt;br /&gt;
&lt;br /&gt;
That's it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-2553421279819125599?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2010/06/bash-hackery-to-get-around-old-rspec.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-5914952240349144688</guid><pubDate>Fri, 23 Apr 2010 10:09:00 +0000</pubDate><atom:updated>2010-04-23T22:12:53.004+12:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">firefox3</category><category domain="http://www.blogger.com/atom/ns#">karmic</category><category domain="http://www.blogger.com/atom/ns#">ubuntu</category><title>How to upgrade to Firefox 3.6 for Karmic (Ubuntu 9.10) - firefox-stable</title><description>There are a plethora of install instructions out there for Firefox 3.6 Karmic (which uses Firefox 3.5 by default), however it mostly suggests the mozilla-daily build.&lt;br /&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;By chance, I found the firefox-stable ppa (&lt;a href="https://launchpad.net/~mozillateam/+archive/firefox-stable/"&gt;https://launchpad.net/~mozillateam/+archive/firefox-stable/&lt;/a&gt;)&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Here's how (enter each in turn):&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;blockquote&gt;sudo add-apt-repository ppa:mozillateam/firefox-stable&lt;/blockquote&gt;&lt;blockquote&gt;sudo apt-get update&lt;/blockquote&gt;&lt;blockquote&gt;sudo apt-get upgrade&lt;/blockquote&gt;&lt;blockquote&gt;sudo apt-get dist-upgrade&lt;/blockquote&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Here's what it looks like:&lt;/span&gt;&lt;/div&gt;&lt;blockquote&gt;~ $ sudo apt-get upgrade&lt;/blockquote&gt;&lt;blockquote&gt;Reading package lists... Done&lt;/blockquote&gt;&lt;blockquote&gt;Building dependency tree &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/blockquote&gt;&lt;blockquote&gt;Reading state information... Done&lt;/blockquote&gt;&lt;blockquote&gt;The following packages have been kept back:&lt;/blockquote&gt;&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;firefox firefox-3.5 firefox-3.5-branding firefox-gnome-support&lt;/blockquote&gt;&lt;blockquote&gt;0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.&lt;/blockquote&gt;&lt;blockquote&gt;~ $ sudo apt-get dist-upgrade&lt;/blockquote&gt;&lt;blockquote&gt;Reading package lists... Done&lt;/blockquote&gt;&lt;blockquote&gt;Building dependency tree &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/blockquote&gt;&lt;blockquote&gt;Reading state information... Done&lt;/blockquote&gt;&lt;blockquote&gt;Calculating upgrade... Done&lt;/blockquote&gt;&lt;blockquote&gt;The following NEW packages will be installed:&lt;/blockquote&gt;&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;firefox-branding&lt;/blockquote&gt;&lt;blockquote&gt;The following packages will be upgraded:&lt;/blockquote&gt;&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;firefox firefox-3.5 firefox-3.5-branding firefox-gnome-support&lt;/blockquote&gt;&lt;blockquote&gt;4 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.&lt;/blockquote&gt;&lt;blockquote&gt;Need to get 12.5MB of archives.&lt;/blockquote&gt;&lt;blockquote&gt;After this operation, 32.4MB of additional disk space will be used.&lt;/blockquote&gt;&lt;blockquote&gt;Do you want to continue [Y/n]? y&lt;/blockquote&gt;&lt;div&gt;You will now get &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;/usr/binfirefox&lt;/span&gt; as Firefox 3.6&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-5914952240349144688?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2010/04/how-to-install-firefox-36-for-karmic.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-6598038129799355398</guid><pubDate>Sun, 07 Feb 2010 03:02:00 +0000</pubDate><atom:updated>2010-02-07T16:06:12.888+13:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">technology</category><category domain="http://www.blogger.com/atom/ns#">programming</category><category domain="http://www.blogger.com/atom/ns#">rails3</category><title>Rails 3 presentation</title><description>At the January &lt;a href="http://groups.google.co.nz/group/WellRailed"&gt;WellRailed&lt;/a&gt;&amp;nbsp;(Wellington Rails User group), I gave a presentation on the upcoming &lt;a href="http://guides.rails.info/3_0_release_notes.html"&gt;Rails 3.0&lt;/a&gt;, with special emphasis on cool new things.&lt;br /&gt;
&lt;div&gt;&lt;div&gt;&lt;br /&gt;
You can view the slides after the jump. There are a huge number of changes, but it should be all good fun :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div id="__ss_3009317" style="text-align: left; width: 425px;"&gt;&lt;a href="http://www.slideshare.net/kuahyeow/rails-3-cool-new-things" style="display: block; font: 14px Helvetica,Arial,Sans-serif; margin: 12px 0 3px 0; text-decoration: underline;" title="Rails 3 : Cool New Things"&gt;Rails 3 : Cool New Things by Thong Kuah&lt;/a&gt;&lt;object height="355" style="margin: 0px;" width="425"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=rails3newthings-100127180934-phpapp02&amp;stripped_title=rails-3-cool-new-things" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=rails3newthings-100127180934-phpapp02&amp;stripped_title=rails-3-cool-new-things" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;div style="font-family: tahoma,arial; font-size: 11px; height: 26px; padding-top: 2px;"&gt;View more &lt;a href="http://www.slideshare.net/" style="text-decoration: underline;"&gt;presentations&lt;/a&gt; from &lt;a href="http://www.slideshare.net/kuahyeow" style="text-decoration: underline;"&gt;Y. Thong Kuah&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Note: &lt;a href="http://weblog.rubyonrails.org/2010/2/5/rails-3-0-beta-release"&gt;Rails 3.0pre&lt;/a&gt; was released after the presentation&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-6598038129799355398?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2010/02/rails-3-presentation.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-6567984681986839360</guid><pubDate>Tue, 27 Oct 2009 09:33:00 +0000</pubDate><atom:updated>2009-10-28T11:02:15.292+13:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">technology</category><category domain="http://www.blogger.com/atom/ns#">lessons learnt</category><category domain="http://www.blogger.com/atom/ns#">life</category><category domain="http://www.blogger.com/atom/ns#">wisdom</category><category domain="http://www.blogger.com/atom/ns#">inspiration</category><category domain="http://www.blogger.com/atom/ns#">business</category><title>Nuggets of inspiration</title><description>Some good Software Engineering pearls of wisdom :&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.codinghorror.com/blog/archives/001303.html"&gt;Coding Horror: The Xanadu Dream&lt;/a&gt;&lt;br /&gt;
&lt;blockquote&gt;The bottom line is that a lot of the time it's OK to create a solution that solves 80% of the problem. Always remember that &lt;i&gt;&lt;b&gt;shipping is a feature&lt;/b&gt;&lt;/i&gt;.&lt;br /&gt;
&lt;/blockquote&gt;&lt;a href="http://joi.ito.com/weblog/2009/08/11/agile-developme.html" title="Agile development, startups and government policy"&gt;Agile development, startups and government policy&lt;/a&gt;&lt;br /&gt;
&lt;blockquote&gt;My recommendation to just about anyone with an idea is to just build the thing, iterate until you have some user traction, then pitch angel investors based on that traction. This is very much in line with the old IETF motto of "&lt;i&gt;&lt;b&gt;rough consensus, running code&lt;/b&gt;&lt;/i&gt;."&lt;br /&gt;
&lt;/blockquote&gt;And from the startup side of things:&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.techcrunch.com/2009/10/11/finding-your-co-founders/" rel="bookmark" title="Finding Your Co-Founders"&gt;Finding Your Co-Founders&lt;/a&gt;&lt;br /&gt;
&lt;blockquote&gt;It’s most comfortable to hang out with people like ourselves, but those are exactly the folks you probably don’t want to co-found a startup with. ...The best founding team for a startup is a group of two or three people who have &lt;i&gt;&lt;b&gt;synergistic – not overlapping&lt;/b&gt;&lt;/i&gt; – skills. Note that it’s also important your goals and passions be similar.&lt;br /&gt;
&lt;/blockquote&gt;This matches well to what the &lt;a href="http://en.wikipedia.org/wiki/The_Black_Swan_%28Taleb_book%29"&gt;Black Swan book&lt;/a&gt; says - maximise your serendipity, you increase your chances of success this way&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-6567984681986839360?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2009/10/nuggets-of-inspiration.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-3624729657430404216</guid><pubDate>Mon, 19 Oct 2009 08:42:00 +0000</pubDate><atom:updated>2009-10-19T21:42:10.445+13:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">wellington</category><category domain="http://www.blogger.com/atom/ns#">map</category><category domain="http://www.blogger.com/atom/ns#">gadget</category><category domain="http://www.blogger.com/atom/ns#">hazard</category><category domain="http://www.blogger.com/atom/ns#">opengovt</category><title>Wellington Hazard Map</title><description>Reading this &lt;a href="http://www.stuff.co.nz/dominion-post/local/2957143/Full-list-of-hazards-revealed"&gt;article about Wellington Hazards&lt;/a&gt; just makes me want to plot it on a map. It took a while, but here is a &lt;a href="http://maps.google.co.nz/maps/ms?ie=UTF8&amp;amp;hl=en&amp;amp;msa=0&amp;amp;msid=105368590499327803003.000475dc20f9a8d9d5142&amp;amp;t=h&amp;amp;z=11"&gt;map of Wellington Hazards / Contamination&lt;/a&gt;. Below is a screenshots of the hazards on Google Earth and Google Maps (Google Earth shot nicely prepared by &lt;a href="http://www.cameron-prebble.com/"&gt;Cameron&lt;/a&gt;).&amp;nbsp; Let me know what do you think?&lt;br /&gt;
&lt;br /&gt;
Read on after the jump for hyper-technical explanation of how I made the map.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_ftRNxhptfh4/StuP4I5qc-I/AAAAAAAAAc4/wwsroHQdujg/s1600/hazardmapgered.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" class="" more="" src="http://4.bp.blogspot.com/_ftRNxhptfh4/StuP4I5qc-I/AAAAAAAAAc4/wwsroHQdujg/s400/hazardmapgered.png" title="Wellington Hazards and Contaminants map" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_ftRNxhptfh4/StuSjYMCw6I/AAAAAAAAAdA/M0AGg0zv2YM/s1600-h/Hazards+Wellington_1255470787905.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_ftRNxhptfh4/StuSjYMCw6I/AAAAAAAAAdA/M0AGg0zv2YM/s400/Hazards+Wellington_1255470787905.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Here's the lowdown on the technical wizardry. The data is based on &lt;a href="http://static.stuff.co.nz/files/WCC-slur.pdf"&gt;http://static.stuff.co.nz/files/WCC-slur.pdf&lt;/a&gt;. I had to extract the data out from the pdf, obtaining a spreadsheet that looks like this:&lt;br /&gt;
&lt;blockquote&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;No &amp;amp; STREET &amp;amp; City &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HAIL &amp;amp; CLASSIFICATION&amp;amp; CONTAMINANTS &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;50 BUCKLE ST EASTERN&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Service Stations Verified History of Hazardous Activity or Industry &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;75 DARLINGTON RD EASTERN &amp;nbsp;&amp;nbsp;&amp;nbsp; Landfill Verified History of Hazardous Activity or Industry &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;501 EVANS BAY PDE EASTERN &amp;nbsp;&amp;nbsp; Service Stations Verified History of Hazardous Activity or Industry &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;9 -11 KENT TCE EASTERN &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Storage Verified History of Hazardous Activity or Industry &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/blockquote&gt;The address leaves a lot to be desired. Having data like 'Eastern' for the city column makes no sense to anyone or a program. Cleaning that up and adding "Wellington NZ" would make it easier for geocoding. We now have this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;HAIL &amp;amp; CLASSIFICATION&amp;amp; CONTAMINANTS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Full Cleaned Address&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Service Stations Verified History of Hazardous Activity or Industry &amp;nbsp; 50 BUCKLE ST&amp;nbsp; Wellington New Zealand&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Landfill Verified History of Hazardous Activity or Industry &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 75 DARLINGTON RD&amp;nbsp; Wellington New Zealand&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Service Stations Verified History of Hazardous Activity or Industry &amp;nbsp; 501 EVANS BAY PDE&amp;nbsp; Wellington New Zealand&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Storage Verified History of Hazardous Activity or Industry &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9 -11 KENT TCE&amp;nbsp; Wellington New Zealand&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can now geocode, using the &lt;a href="http://pamelafox-samplecode.googlecode.com/svn/trunk/spreadsheetsgeocoder/spreadsheetsgeocoder.xml"&gt;helpful spreadsheet geocoder&lt;/a&gt; (&lt;a href="http://www.mail-archive.com/google-maps-api@googlegroups.com/msg09461.html"&gt;instructions here&lt;/a&gt;). The only limitation was that only 100 addresses can be geo-coded at one time. But that's fine as I only have 592 addresses.&lt;br /&gt;
&lt;br /&gt;
Now here is the tricky bit, there is no good way to get items from a spreadsheet onto a map. The best way I could was use KML. I used the &lt;a href="http://earth.google.com/outreach/tutorial_spreadsheet.html"&gt;Spreadsheet Mapper v2.0&lt;/a&gt;, but it was far too painful with the browser locking with just 600 rows. Here is the resultant spreadsheet: &lt;a href="http://spreadsheets.google.com/pub?key=tXlYA3d_eh42qOboocs8zug&amp;amp;output=html"&gt;http://spreadsheets.google.com/pub?key=tXlYA3d_eh42qOboocs8zug&amp;amp;output=html&lt;/a&gt;. I will most likely use PostGis and the &lt;a href="http://postgis.refractions.net/docs/ST_AsKML.html"&gt;asKML function&lt;/a&gt; next time.&lt;br /&gt;
&lt;br /&gt;
Data spreadsheet: &lt;a href="http://spreadsheets.google.com/pub?key=t_4WKBgw34UvW_zQMChuVKw&amp;amp;gid=0"&gt;http://spreadsheets.google.com/pub?key=t_4WKBgw34UvW_zQMChuVKw&amp;amp;gid=0&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Google Maps (my maps): &lt;a href="http://maps.google.co.nz/maps/ms?ie=UTF8&amp;amp;hl=en&amp;amp;msa=0&amp;amp;msid=105368590499327803003.000475dc20f9a8d9d5142&amp;amp;t=h&amp;amp;z=11"&gt;http://maps.google.co.nz/maps/ms?ie=UTF8&amp;amp;hl=en&amp;amp;msa=0&amp;amp;msid=105368590499327803003.000475dc20f9a8d9d5142&amp;amp;t=h&amp;amp;z=11&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
KML file (.kml): &lt;a href="http://maps.google.co.nz/maps/ms?ie=UTF8&amp;amp;hl=en&amp;amp;t=h&amp;amp;msa=0&amp;amp;output=nl&amp;amp;msid=105368590499327803003.000475dc20f9a8d9d5142"&gt;http://maps.google.co.nz/maps/ms?ie=UTF8&amp;amp;hl=en&amp;amp;t=h&amp;amp;msa=0&amp;amp;output=nl&amp;amp;msid=105368590499327803003.000475dc20f9a8d9d5142&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-3624729657430404216?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2009/10/wellington-hazard-map.html</link><author>noreply@blogger.com (YT Kuah)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_ftRNxhptfh4/StuP4I5qc-I/AAAAAAAAAc4/wwsroHQdujg/s72-c/hazardmapgered.png" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-8578298205065113791</guid><pubDate>Tue, 29 Sep 2009 09:41:00 +0000</pubDate><atom:updated>2009-09-29T22:41:36.286+13:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">people</category><category domain="http://www.blogger.com/atom/ns#">lessons learnt</category><category domain="http://www.blogger.com/atom/ns#">life</category><category domain="http://www.blogger.com/atom/ns#">rands</category><category domain="http://www.blogger.com/atom/ns#">friends</category><title>Rands In Repose: Your People</title><description>Came upon this really good post about people you should cherish: &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.randsinrepose.com/archives/2009/09/07/your_people.html"&gt;Rands In Repose: Your People&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Really good insight - "As we edit our days into these stories, there is always a risk of fiction. This is why you need to identify and nurture Your People."&lt;br /&gt;
&lt;br /&gt;
What are Your People? &lt;br /&gt;
&lt;blockquote&gt;"You tell these stories to Your People without reservation. Your People love your stories — fiction and all. They love how you tell them, they laugh about the lies you tell yourself, and then they stop and they tell you the &lt;b&gt;truth&lt;/b&gt;." &lt;br /&gt;
&lt;/blockquote&gt;You need someone to keep you honest. Read the post for a clear definition of &lt;a href="http://www.randsinrepose.com/archives/2009/09/07/your_people.html"&gt;Your People&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-8578298205065113791?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2009/09/rands-in-repose-your-people.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-487428929223441398</guid><pubDate>Tue, 22 Sep 2009 08:52:00 +0000</pubDate><atom:updated>2009-09-22T20:54:24.048+12:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">games</category><category domain="http://www.blogger.com/atom/ns#">life imitating games</category><category domain="http://www.blogger.com/atom/ns#">tales</category><category domain="http://www.blogger.com/atom/ns#">lessons learnt</category><category domain="http://www.blogger.com/atom/ns#">strengths</category><category domain="http://www.blogger.com/atom/ns#">life</category><title>Strengths, weaknesses and games</title><description>&lt;a href="http://www.amazon.com/StrengthsFinder-2-0-Upgraded-Discover-Strengths/dp/159562015X"&gt;StrengthsFinder&lt;/a&gt; is an amazing book, and an assessment tool that helps you &lt;a href="http://www.strengthsfinder.com/"&gt;discover your strength&lt;/a&gt;s. Its central concept is that you should focus on your strengths, not your weaknesses. I was introduced to it at the &lt;a href="http://www.summerofcode.co.nz/"&gt;Summer of Code&lt;/a&gt; (NZ) program several years ago. The concept of focusing on strengths was just brilliant. &lt;br /&gt;
&lt;br /&gt;
This really reminded me of my game playing style, especially in &lt;a href="http://en.wikipedia.org/wiki/Role-playing_game"&gt;RPGs&lt;/a&gt;, where you have to increase the levels and skills of your character(s) in order to be able to fight enemies that pop up with increasing difficulty and toughness.&lt;br /&gt;
&lt;br /&gt;
What is the usual strategy here? Increase your strong attributes up to insane levels. Weaker attributes would be increased only for the sake of 'balance'.&amp;nbsp; To translate into gamer-speak: &lt;br /&gt;
&lt;blockquote style="font-family: &amp;quot;Helvetica Neue&amp;quot;,Arial,Helvetica,sans-serif;"&gt;Level up all magic skills for the mage, and have some combat skills to keep up with the group. Increase the tank's combat and defense skills to insane, and increase healing and magic if there's a chance.&lt;br /&gt;
&lt;/blockquote&gt;Balance is important as weaknesses cannot be so abysmally weak that you cannot function if a team member which has that strength was unavailable. In gamer-speak again:&lt;br /&gt;
&lt;blockquote style="font-family: &amp;quot;Helvetica Neue&amp;quot;,Arial,Helvetica,sans-serif;"&gt;Tank has to be able to self-heal and revive mage if mage goes down, and hang on until mage revives and heals group.&lt;br /&gt;
&lt;/blockquote&gt;Imagine instead we concentrate on improving weakness more than improving strengths. What would result is a group that has similar strengths and weakness, i.e. a homogeneous group, but at levels lower than peak strengths. This team of 'all-rounders' would then be able to do each other's jobs, but none would available to handle particularly &lt;i&gt;difficult&lt;/i&gt; problems. In game-land, this is referred to as:&lt;br /&gt;
&lt;blockquote style="font-family: &amp;quot;Helvetica Neue&amp;quot;,Arial,Helvetica,sans-serif;"&gt;Boss kills mediocre party in one stroke.&lt;br /&gt;
&lt;/blockquote&gt;Whereas a team with people who has different and fully-developed skills will have a better chance of tackling the problem. In game-land, this scenario is better:&lt;br /&gt;
&lt;blockquote style="font-family: &amp;quot;Helvetica Neue&amp;quot;,Arial,Helvetica,sans-serif;"&gt;Boss unleashes stroke of hell, tank survives and manages to revive others. Or Mage casts protective spell powerful enough to protect party.&lt;br /&gt;
&lt;/blockquote&gt;Which brings us to complementary strengths. The team must have a variety of different strengths to deal with different problems that crop up. This, ideally should be addressed when you are starting to hire for the team. Of course it's hard to figure out strengths in an interview. Take time, figure out what strengths are needed for teams, as you never know what &lt;strike&gt;high-level boss&lt;/strike&gt; crazy, hairy problem your team will face...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-487428929223441398?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2009/09/strengths-weaknesses-and-games.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-911689796864841014</guid><pubDate>Tue, 15 Sep 2009 10:13:00 +0000</pubDate><atom:updated>2009-09-15T22:13:13.379+12:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ruby</category><category domain="http://www.blogger.com/atom/ns#">collection</category><category domain="http://www.blogger.com/atom/ns#">technology</category><category domain="http://www.blogger.com/atom/ns#">rails</category><category domain="http://www.blogger.com/atom/ns#">links</category><title>Ruby and Rails links, Best of</title><description>Monthly collection of Ruby links that I'll regret forgetting about:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://yehudakatz.com/2009/08/24/my-10-favorite-things-about-the-ruby-language/"&gt;My 10 Favorite Things About the Ruby Language � Katz Got Your Tongue?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dablog.rubypal.com/2009/1/14/10-things-to-be-aware-of-in-moving-to-ruby-1-9"&gt;http://dablog.rubypal.com/2009/1/14/10-things-to-be-aware-of-in-moving-to-ruby-1-9&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dablog.rubypal.com/2009/1/16/son-of-10-things-to-be-aware-of-in-ruby-1-9"&gt;http://dablog.rubypal.com/2009/1/16/son-of-10-things-to-be-aware-of-in-ruby-1-9&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.manning.com/black2/"&gt;http://www.manning.com/black2/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://weblog.rubyonrails.org/2009/9/4/ruby-on-rails-2-3-4"&gt;Upgrade to Rails 2.3.4, 2.2.3&lt;/a&gt; (Security Release) &lt;/li&gt;
&lt;li&gt;&lt;a href="http://weblog.rubyonrails.org/2009/9/1/gem-packaging-best-practices"&gt;Riding Rails: Gem Packaging: Best Practices&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-911689796864841014?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2009/09/ruby-and-rails-links-best-of.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-261352529560893827</guid><pubDate>Tue, 08 Sep 2009 11:11:00 +0000</pubDate><atom:updated>2009-09-09T00:13:38.741+12:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">batch</category><category domain="http://www.blogger.com/atom/ns#">find_each</category><category domain="http://www.blogger.com/atom/ns#">rails</category><category domain="http://www.blogger.com/atom/ns#">bug</category><category domain="http://www.blogger.com/atom/ns#">intent</category><title>find_each bites</title><description>&lt;a href="http://ryandaigle.com/articles/2009/2/23/what-s-new-in-edge-rails-batched-find"&gt; ActiveRecord::Base#find_each&lt;/a&gt; is an awesome idiom for batch processing large sets of data. It combines the neat DSL of ActiveRecord and allows you to operate at the level of the individual item.&lt;br /&gt;
&lt;br /&gt;
So, imagine my surprise when I debugged my code and discovered that find_each introduces a scope into ActiveRecord calls within the block. Demonstrating by example:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Slam.find_each(:conditions =&amp;gt; {:value =&amp;gt; nil}) do |slam|&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;#....&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; Slam.find_by_key(slam.key)   #Find  related key&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; #However, in effect becomes Slam.find_by_key(:key =&amp;gt; slam.key, :value =&amp;gt; nil)&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;end&lt;/div&gt;&lt;br /&gt;
Looking at the SQL in the logs, I expected to see:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;select * from slams where key = 'abcde';&lt;/div&gt;&lt;br /&gt;
Instead I saw:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;select * from slams where key = 'abcde' and value is null;&lt;/div&gt;&lt;br /&gt;
&lt;span style="font-family: inherit;"&gt;It took me fifteen minutes to check and verify there is no code that should be generating that SQL, so the next candidate was find_each. Lo and behold, it was. Turns out find_each is &lt;a href="https://rails.lighthouseapp.com/projects/8994/tickets/2791-activerecordbasefind_in_batches-puts-a-with_scope-into-the-block-that-is-executed"&gt;using&lt;/a&gt; &lt;a href="http://davedupre.com/2009/05/20/gotcha-with-find_each-and-find_in_batches/"&gt;with_scope&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Looking around, there are already some bug reports for this behaviour:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="https://rails.lighthouseapp.com/projects/8994/tickets/2791-activerecordbasefind_in_batches-puts-a-with_scope-into-the-block-that-is-executed"&gt;https://rails.lighthouseapp.com/projects/8994/tickets/2791-activerecordbasefind_in_batches-puts-a-with_scope-into-the-block-that-is-executed&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://rails.lighthouseapp.com/projects/8994/tickets/2227-batches-conditions-for-each-are-applied-to-each-modelfind-within-the-each-loop"&gt;https://rails.lighthouseapp.com/projects/8994/tickets/2227-batches-conditions-for-each-are-applied-to-each-modelfind-within-the-each-loop&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;Question: Is this intended or this a bug? I think, given the "side-effect" feel of it, it's a bug&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Update&lt;/b&gt;:&amp;nbsp; I have reviewed one &lt;a href="https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2227-batches-conditions-for-each-are-applied-to-each-modelfind-within-the-each-loop#ticket-2227-5"&gt;promising patch to fix this&lt;/a&gt;. Needs one more person to review and approve this patch!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-261352529560893827?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2009/09/findeach-bites.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-3761842928757550310</guid><pubDate>Sun, 06 Sep 2009 09:17:00 +0000</pubDate><atom:updated>2009-09-06T21:17:12.915+12:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">technology</category><category domain="http://www.blogger.com/atom/ns#">random</category><category domain="http://www.blogger.com/atom/ns#">left-field</category><title>Fear the singularity</title><description>I found several interesting things this month. &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Super fast &lt;a href="http://www.youtube.com/watch?v=96dWOEa4Djs"&gt;SSD&lt;/a&gt; hard disks&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;21GB &lt;a href="http://www.tomshardware.com/news/pirate-bay-torrent-bittorrent-download,8465.html"&gt;pirate bay index&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Technological_singularity"&gt;Singularity&lt;/a&gt; &lt;a href="http://en.wikipedia.org/wiki/Rainbows_End"&gt;in&lt;/a&gt; &lt;a href="http://www-rohan.sdsu.edu/faculty/vinge/misc/singularity.html"&gt;thirty years&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;Ok, the last one is really out there, but it points the way. Imagine the whole sum of human creative endeavor (at least the popular ones) indexed in just 21GB. All we need is just some sort of instant hash expansion for that 21GB (and 20 more years of PC power advancement). And so on and so forth. Value of data or content would be worth next to nothing.&lt;br /&gt;
&lt;br /&gt;
Will that happen? Probably, after &lt;a href="http://en.wikipedia.org/wiki/Flying_car_%28fiction%29"&gt;flying cars&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-3761842928757550310?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2009/09/fear-singularity.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-880401477730532833</guid><pubDate>Sun, 06 Sep 2009 09:01:00 +0000</pubDate><atom:updated>2009-09-06T21:01:57.896+12:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ruby</category><category domain="http://www.blogger.com/atom/ns#">discussion</category><category domain="http://www.blogger.com/atom/ns#">technology</category><category domain="http://www.blogger.com/atom/ns#">random</category><category domain="http://www.blogger.com/atom/ns#">left-field</category><title>Trying to do the impossible</title><description>Someone always asks this question -&amp;nbsp; how do you &lt;a href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/58eaa27c3e6409f7?hl=en#"&gt;check types in Ruby&lt;/a&gt;? (*Hint: Ruby use &lt;a href="http://en.wikipedia.org/wiki/Dynamic_type#Dynamic_typing"&gt;dynamic typing&lt;/a&gt;) This typical newbie question would ask this and be answered with various levels of &lt;i&gt;helpfulness&lt;/i&gt; - typically none - sadly. &lt;br /&gt;
&lt;br /&gt;
However this thread is just &lt;b&gt;beautiful&lt;/b&gt; in its helpfulness. &lt;a href="http://groups.google.com/group/comp.lang.ruby/msg/eb4b49a511e44be6?hl=en"&gt;http://groups.google.com/group/comp.lang.ruby/msg/eb4b49a511e44be6?hl=en&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
What happended snarkiness, or Slashdot / Youtube style comments? All this helpfulness must come from somewhere. I blame &lt;a href="http://search.twitter.com/search?q=helpful"&gt;Twitter&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-880401477730532833?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2009/09/trying-to-do-impossible.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-6751812426488218067</guid><pubDate>Mon, 31 Aug 2009 09:47:00 +0000</pubDate><atom:updated>2009-09-01T12:20:29.561+12:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">open source</category><category domain="http://www.blogger.com/atom/ns#">hackfest</category><category domain="http://www.blogger.com/atom/ns#">technology</category><category domain="http://www.blogger.com/atom/ns#">opengovt</category><title>Hackfest at the OpenGovtDataNZ</title><description>Hacking for the greater good : the good being helping to free up &lt;a href="http://cat.open.org.nz/"&gt;important government information&lt;/a&gt;. A &lt;a href="http://groups.google.com/group/nzopengovtbarcamp"&gt;Barcamp and Hackfest&lt;/a&gt; was held just this weekend, in the last days of August. I participated in the Hackfest, which was held at the amazing Southern Cross Bar. Great food and nice private room made for a good environment for coding.&lt;br /&gt;&lt;br /&gt;The Hackfest was a bit more structured than previous events I have been to, but I'll say this had a positive effect of helping people choose what and who they wanted to work with. There were some suggested ideas from the Barcamp, but people were free to work on their ideas too. Here are some projects that was worked on at this event :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://github.com/opennewzealand/scavenger/tree/master"&gt;http://github.com/opennewzealand/scavenger/tree/master&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.open.org.nz/What_Do_They_Know_NZ"&gt;http://wiki.open.org.nz/What_Do_They_Know_NZ&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://github.com/wombleton/whatdotheyknow/tree/master"&gt;http://github.com/wombleton/whatdotheyknow/tree/master&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;And many more, which is listed at:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://wiki.open.org.nz/Hackfest"&gt;http://wiki.open.org.nz/Hackfest&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It was great collaborating and working with great people and programmers. Hope to do this again very soon!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-6751812426488218067?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2009/08/hackfest-at-opengovtdatanz.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-3138951155637895244</guid><pubDate>Mon, 24 Aug 2009 09:35:00 +0000</pubDate><atom:updated>2010-02-23T11:35:47.855+13:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ruby</category><category domain="http://www.blogger.com/atom/ns#">full-text search</category><category domain="http://www.blogger.com/atom/ns#">solr</category><category domain="http://www.blogger.com/atom/ns#">rails</category><category domain="http://www.blogger.com/atom/ns#">sunspot</category><category domain="http://www.blogger.com/atom/ns#">autocomplete</category><title>Solr, and Sunspot</title><description>&lt;b&gt;Update&lt;/b&gt;: I have found a nicer way of doing autocomplete. Basically, use the string type with the "&lt;span class="Apple-style-span" style="color: #444444; font-family: Monaco, Consolas, 'DejaVu Sans Mono', monospace; font-size: 11px; line-height: 14px; white-space: pre;"&gt;starting_with"&amp;nbsp;&lt;/span&gt;method.&amp;nbsp;See this &lt;a href="http://outoftime.lighthouseapp.com/projects/20339/tickets/55-wildcard-searches#ticket-55-10"&gt;ticket comment&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://lucene.apache.org/solr/"&gt;Solr&lt;/a&gt; is really nice search engine which has the added advantage of being able to &lt;a href="http://wiki.apache.org/solr/SchemaXml#head-73cdcd26354f1e31c6268b365023f21ee8796613"&gt;return items&lt;/a&gt; that you put into the search engine, unlike say, sphinx (which is really fast but only returns the &lt;a href="http://www.sphinxsearch.com/docs/current.html#data-restrictions"&gt;document id&lt;/a&gt;).&lt;br /&gt;
&lt;br /&gt;
However, Solr &lt;a href="http://wiki.apache.org/solr/SolrQuerySyntax"&gt;is&lt;/a&gt; &lt;a href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html"&gt;very&lt;/a&gt; &lt;a href="http://wiki.apache.org/solr/SolrPlugins"&gt;complex&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Thankfully, there is a very neat &lt;a href="http://outoftime.github.com/sunspot/"&gt;ruby abstraction for Solr&lt;/a&gt;, called &lt;a href="http://github.com/outoftime/sunspot/tree"&gt;Sunspot&lt;/a&gt;. Given I needed to do autocomplete on it, i.e. "query*" type stuff, I had to &lt;a href="http://github.com/kuahyeow/sunspot/tree/master"&gt;fork Sunspot&lt;/a&gt;. Here is the relevant change I made to &lt;a href="http://github.com/kuahyeow/sunspot/commit/033ac410446bb506f4c09e8ca93a9648ec8abca0"&gt;enable wildcard searches with Sunspot&lt;/a&gt;:&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://pastie.org/592897"&gt;http://pastie.org/592897&lt;/a&gt;&lt;br /&gt;
&lt;script src="http://pastie.org/592897.js"&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
For those interested in how this works, it uses the &lt;a href="http://wiki.apache.org/solr/DisMaxRequestHandler#head-9d23a23915b7932490069d3262ef7f3625e398ff"&gt;q.alt parameter&lt;/a&gt; as Sunspot uses the rather "user-friendly" &lt;a href="http://wiki.github.com/outoftime/sunspot/fulltext-search"&gt;DisMaxRequestHandler&lt;/a&gt;, which ignores "*" characters.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-3138951155637895244?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2009/08/solr-and-sunspot.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-4921592031973168600</guid><pubDate>Sat, 22 Aug 2009 05:39:00 +0000</pubDate><atom:updated>2009-08-22T17:43:50.035+12:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">technique</category><category domain="http://www.blogger.com/atom/ns#">programming</category><category domain="http://www.blogger.com/atom/ns#">project</category><title>Throw away code</title><description>Let's start simple. Here is a situation I have encountered more than once. We have this big long class or method, and embedded in it are several blocks of code, &lt;span style="font-weight: bold;"&gt;all commented out&lt;/span&gt;.&lt;br /&gt;&lt;pre&gt;def some_method(a)&lt;br /&gt;do_something(a)&lt;br /&gt;calc_another&lt;br /&gt;&lt;br /&gt;# wow&lt;br /&gt;# do_do&lt;br /&gt;# calc_calc&lt;br /&gt;# zcalc(z)&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;What should I do? Given the code is &lt;a href="http://git-scm.com/"&gt;version controlled&lt;/a&gt;, I would happily throw it away.&lt;br /&gt;&lt;br /&gt;The code is commented out and will have no effect whatsoever on any program or user. Another programmer may be affected by it, though. So, make a note in the commit message :&lt;br /&gt;&lt;blockquote&gt;"removed commented-out code in such-and-such method. haven't been used in a while"&lt;br /&gt;&lt;/blockquote&gt;Caveats apply for very large blocks of commented-out code, or it has warnings not to remove. But these can be easily solved with some programmer-to-programmer communication.&lt;br /&gt;&lt;br /&gt;There are other things that can be &lt;a href="http://www.joelonsoftware.com/articles/fog0000000069.html"&gt;theoretically thrown away&lt;/a&gt;, such as:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Once off experiments / prototype&lt;/li&gt;&lt;li&gt;Quick and dirty functions&lt;/li&gt;&lt;li&gt;Generally ugly code in the project&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;However, each of this has it's own set of code, teamwork and business-related problems. Yes, there is the urge to reduce mental strain - &lt;a href="http://www.codinghorror.com/blog/archives/000684.html"&gt;working what does piece of code do&lt;/a&gt; - which leads to "let's rewrite" moments. I would love to know what a programmer or a team can do in each of this instances. I have some ideas, but these will be topics for later discussions.&lt;br /&gt;&lt;br /&gt;* I have always wanted to write down some of my experiences as I embark on a programming life. This is my starting contribution.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-4921592031973168600?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2009/08/throw-away-code.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-1879663772839190715</guid><pubDate>Wed, 12 Aug 2009 00:23:00 +0000</pubDate><atom:updated>2009-08-22T17:05:48.306+12:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ruby</category><category domain="http://www.blogger.com/atom/ns#">technology</category><title>Riding Rails: Community Highlights: IronRuby</title><description>Consider this question from &lt;a href="http://weblog.rubyonrails.org/2009/8/11/community-highlights-ironruby"&gt;Riding Rails: Community Highlights: IronRuby&lt;/a&gt; (emphasis mine).&lt;br /&gt;&lt;div class="itv-question"&gt;&lt;span class="matt-aimonetti"&gt;&lt;/span&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div class="itv-question"&gt;&lt;span class="matt-aimonetti"&gt;Matt:&lt;/span&gt;  Are there any limitations that our readers should be aware of before starting to develop on IronRuby?&lt;/div&gt; &lt;div class="itv-answer"&gt;&lt;span class="Jimmy"&gt;Jimmy:&lt;/span&gt; The main limitation is that IronRuby does not support any of the C-based Ruby libraries, and only after 1.0 will we &lt;span style="font-style: italic; font-weight: bold;"&gt;consider building an interop layer&lt;/span&gt; between the Ruby C API and IronRuby. In the meantime, people have been porting their favorite C-based Ruby libraries over to C# so it can be used from IronRuby, like &lt;a href="http://github.com/nrk/ironruby-hpricot/tree/master"&gt;Hpricot&lt;/a&gt;. While this seems like a large limitation, most of the C-based libraries Ruby code depends on have an equivalent API in the .NET framework, which IronRuby has direct integration with, making either using directly or porting really easy. For example, the Rails app I showed at RailsConf &lt;span style="font-weight: bold; font-style: italic;"&gt;did image resizing directly with the System.Windows.Drawing APIs rather than ImageMagick&lt;/span&gt;. If your code does not depend on anything outside of the Ruby standard library that is C-based, you should have no problems. Take a look at the documentation for running Rails on IronRuby to make sure things go smoothly: &lt;a href="http://ironruby.net/Documentation/Rails"&gt;http://ironruby.net/Documentation/Rails&lt;/a&gt;. &lt;/div&gt;&lt;/blockquote&gt;&lt;div class="itv-answer"&gt;&lt;/div&gt;Sure reminds me of &lt;a href="http://en.wikipedia.org/wiki/Embrace,_extend_and_extinguish"&gt;Embrace, extend, extinguish&lt;/a&gt;. I'm sure the interop layer is being considered, but the absence of it will tie IronRuby to .NET and away from Ruby. I hope the interop layer will be done soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-1879663772839190715?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2009/08/riding-rails-community-highlights.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-3909776673493999642</guid><pubDate>Wed, 05 Aug 2009 23:21:00 +0000</pubDate><atom:updated>2009-09-15T22:15:11.226+12:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">technology</category><category domain="http://www.blogger.com/atom/ns#">summer of code</category><category domain="http://www.blogger.com/atom/ns#">git</category><category domain="http://www.blogger.com/atom/ns#">presentation</category><title>Git Workshop</title><description>I did a Git workshop for &lt;a href="http://www.summerofcode.co.nz/"&gt;Summer of Code NZ&lt;/a&gt; students. Here it is:&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div id="__ss_1793947" style="text-align: left; width: 425px;"&gt;&lt;a href="http://www.slideshare.net/kuahyeow/code-management" style="display: block; font-family: Helvetica,Arial,Sans-serif; font-size-adjust: none; font-size: 14px; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 12px 0pt 3px; text-decoration: underline;" title="Code Management"&gt;Code Management&lt;/a&gt;&lt;object height="355" style="margin: 0px;" width="425"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=code-management-git-090730230249-phpapp02&amp;amp;rel=0&amp;amp;stripped_title=code-management"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=code-management-git-090730230249-phpapp02&amp;amp;rel=0&amp;amp;stripped_title=code-management" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;div style="font-family: tahoma,arial; font-size: 11px; height: 26px; padding-top: 2px;"&gt;View more &lt;a href="http://www.slideshare.net/" style="text-decoration: underline;"&gt;documents&lt;/a&gt; from &lt;a href="http://www.slideshare.net/kuahyeow" style="text-decoration: underline;"&gt;kuahyeow&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Full details at the Summer of Code blog:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://blog.summerofcode.co.nz/2009/07/31/code-management-git-workshop/"&gt;http://blog.summerofcode.co.nz/2009/07/31/code-management-git-workshop/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-3909776673493999642?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2009/08/git-workshop.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-5327730423291772425</guid><pubDate>Wed, 05 Aug 2009 23:16:00 +0000</pubDate><atom:updated>2009-08-06T11:20:50.595+12:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ruby</category><category domain="http://www.blogger.com/atom/ns#">updates. technology</category><category domain="http://www.blogger.com/atom/ns#">rails3</category><title>Rails 3 updates</title><description>(Cross-posted from &lt;a href="http://blog.projectxtech.com/2009/08/06/rails-3-updates/"&gt;http://blog.projectxtech.com/2009/08/06/rails-3-updates/&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://yehudakatz.com/2009/06/11/rails-edge-architecture/"&gt;Rails 3&lt;/a&gt; is a rewrite / merger with Merb, and includes Yehuda Katz, Merb lead developer working on it full-time. Here are some posts which were published recently:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://yehudakatz.com/2008/12/23/rails-and-merb-merge/"&gt;http://yehudakatz.com/2008/12/23/rails-and-merb-merge/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://weblog.rubyonrails.org/2009/7/30/community-highlights-yehuda-katz"&gt;http://weblog.rubyonrails.org/2009/7/30/community-highlights-yehuda-katz&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://yehudakatz.com/2009/03/06/alias_method_chain-in-models/"&gt;http://yehudakatz.com/2009/03/06/alias_method_chain-in-models/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.engineyard.com/blog/2009/6-steps-to-refactoring-rails-for-mere-mortals/"&gt;http://www.engineyard.com/blog/2009/6-steps-to-refactoring-rails-for-mere-mortals/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There are lots of lessons and techniques in ruby, rails and general programming to be learnt from these posts. Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-5327730423291772425?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2009/08/rails-3-updates.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-2751115165442495420</guid><pubDate>Sun, 17 May 2009 21:51:00 +0000</pubDate><atom:updated>2009-05-18T21:29:06.190+12:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">technology</category><category domain="http://www.blogger.com/atom/ns#">gwibber</category><category domain="http://www.blogger.com/atom/ns#">growl</category><category domain="http://www.blogger.com/atom/ns#">twitter client</category><category domain="http://www.blogger.com/atom/ns#">notify-osd</category><category domain="http://www.blogger.com/atom/ns#">ubuntu</category><title>Jaunty, Twitter and 'Growl' type notifications (notify-osd)</title><description>It's been a long, two-stepped journey to get to Jaunty from Hardy, all so that I can experience &lt;a href="https://wiki.ubuntu.com/NotifyOSD"&gt;notify-osd&lt;/a&gt; with Twitter updates.&lt;br /&gt;&lt;br /&gt;The upgrade has been long and slow (NZ internet!) but  I found the end result strangely unsatisfying. Yes, notifications work, and there's a new "Computer Janitor", but that's it. A bit let down.&lt;br /&gt;&lt;br /&gt;Then I found out about &lt;a href="https://wiki.ubuntu.com/Gwibber"&gt;Gwibber&lt;/a&gt;, the new twitter client on Ubuntu. It is by far superior to other clients on Linux. Previously, pidgin-twitter had to suffice, but no longer. However, Gwibber does not seem to do notifications on my Jaunty laptop. In my Intrepid desktop, notification bubbles do pop up, though in non-NotifyOSD style at the bottom.&lt;br /&gt;&lt;br /&gt;In other news, I've hit a bug / issue with my Intrepid desktop where I &lt;a href="https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/376345"&gt;can't open any folder&lt;/a&gt; in the File Manager. :( Gnome or Nautilus experts that can help would be much appreciated&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-2751115165442495420?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2009/05/jaunty-twitter-and-growl-type.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-4936095674929134355</guid><pubDate>Tue, 09 Sep 2008 10:42:00 +0000</pubDate><atom:updated>2008-09-09T22:47:18.509+12:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">rant</category><category domain="http://www.blogger.com/atom/ns#">short</category><category domain="http://www.blogger.com/atom/ns#">rambling</category><category domain="http://www.blogger.com/atom/ns#">unpage</category><title>'View as single page'</title><description>Just wanted to rant about how news websites have the annoying feature of splitting up articles into 'pages' - of just two or so paragraphs. There'll be &lt;span style="font-weight: bold; font-style: italic;"&gt;three &lt;/span&gt;or &lt;span style="font-weight: bold; font-style: italic;"&gt;four &lt;/span&gt;of these 'pages'. But once you click on the 'view as single page',  you realise how ridiculously short the article is, to even split to any page. I wish there's a magic &lt;span style="font-weight: bold;"&gt;unpage&lt;/span&gt;! bookmarklet out there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-4936095674929134355?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2008/09/view-as-single-page.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-12015963.post-7796559646060626400</guid><pubDate>Wed, 27 Aug 2008 04:19:00 +0000</pubDate><atom:updated>2008-08-27T16:21:02.497+12:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">technology</category><category domain="http://www.blogger.com/atom/ns#">short</category><category domain="http://www.blogger.com/atom/ns#">communications</category><title>Google Talk for your domains - Pidgin</title><description>Just found out that Pidgin now has Google Talk. That means my GAFYD GTalk now works. Awesome!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015963-7796559646060626400?l=blog.kuahyeow.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.kuahyeow.com/2008/08/google-talk-for-your-domains-pidgin.html</link><author>noreply@blogger.com (YT Kuah)</author><thr:total>0</thr:total></item></channel></rss>

