<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="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" gd:etag="W/&quot;DkUFR3s4cCp7ImA9WhRaFEw.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273</id><updated>2012-02-17T01:43:36.538+08:00</updated><category term="ruby" /><category term="linux" /><category term="feeds" /><category term="tech" /><category term="business" /><category term="sysadmin" /><category term="java" /><category term="security" /><category term="f1standings-uwa" /><category term="programming" /><category term="inspiration" /><category term="versioncontrol" /><category term="rubyonrails" /><category term="creativity" /><category term="think" /><category term="regex" /><category term="firefox" /><category term="job" /><category term="web2.0" /><category term="git" /><category term="python" /><category term="sgmf-uwa" /><category term="windows" /><category term="design" /><category term="asp.net" /><category term=".net" /><category term="thought" /><category term="productivity" /><category term="testing" /><category term="ubuntu" /><category term="amarok" /><category term="widget" /><category term="usability" /><category term="management" /><category term="subversion" /><title>Code FTW</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://codeftw.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>51</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/atom+xml" href="http://feeds.feedburner.com/CodeFtw" /><feedburner:info uri="codeftw" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DUADR3czcSp7ImA9WhRQE0o.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-340484433129104405</id><published>2011-12-04T08:58:00.001+08:00</published><updated>2011-12-09T04:56:16.989+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-09T04:56:16.989+08:00</app:edited><title>Capistrano: Host key verification failed</title><content type="html">If you ever encounter the error message below when deploying using Capistrano, here's a solution for you.&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt; ** [12.12.12.12 :: err] Host key verification failed.
 ** [12.12.12.12 :: err] fatal: The remote end hung up unexpectedly
 ** [12.12.12.12 :: err] fetch-pack from 'git@github.com:abc/xyz.git' failed.&lt;/pre&gt;
&lt;br /&gt;

This seems to mean that the RSA key fingerprint needs to be verified (I'm not 100% sure on this). My solution is to do &lt;code&gt;git clone&lt;/code&gt; on the server and confirm the fingerprint prompt, but there is a better approach. You can also do &lt;code&gt;ssh git@github.com&lt;/code&gt; and confirm the prompt.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-340484433129104405?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/KmAkuMQ1QK4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/340484433129104405/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=340484433129104405" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/340484433129104405?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/340484433129104405?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/KmAkuMQ1QK4/capistrano-host-key-verification-failed.html" title="Capistrano: Host key verification failed" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2011/12/capistrano-host-key-verification-failed.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYCRns8eip7ImA9WhRWEk4.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-1929046099084222080</id><published>2011-08-25T19:14:00.000+08:00</published><updated>2011-12-30T16:02:47.572+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-30T16:02:47.572+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rubyonrails" /><title>Creating Rails project from a local checkout of Rails repository</title><content type="html">For my forgetful brain:&lt;br /&gt;
&lt;br /&gt;
&lt;tt&gt;ruby /rails_repo/bin/rails new projectname --dev&lt;/tt&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-1929046099084222080?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/he78T25JecI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/1929046099084222080/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=1929046099084222080" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/1929046099084222080?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/1929046099084222080?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/he78T25JecI/running-rails-project-from-local.html" title="Creating Rails project from a local checkout of Rails repository" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2011/08/running-rails-project-from-local.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMAQXg8cSp7ImA9WhRWEk4.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-7977722337528314049</id><published>2011-08-15T21:43:00.001+08:00</published><updated>2011-12-30T16:24:00.679+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-30T16:24:00.679+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><title>Superstitious programming</title><content type="html">Some programmers tend to think that something causes a problem without examining it further and confirming it. Then they just "fix" it or work around it, blaming it on the suspected cause.&lt;br /&gt;
&lt;br /&gt;
For example, you're using an external library and you found that things went haywire. There are possible causes to this. First, the library causes it. How likely is it? You can look at the number of users (in other word, popularity) of the library. The more users, the less likely that it is the library's problem. Of course there's a remote possibility of you discovering a rare bug. But more likely, perhaps you're just not using the library right.&lt;br /&gt;
&lt;br /&gt;
Here's a way of thinking that is also applicable in real life. Always check your assumption. Ensure that when you think something is causing the other, that it really is the case. Remove or change the cause and see if the effect changes or disappears. Only when you have that correlation that you can confidently say, "Yes, that's really the cause."&lt;br /&gt;
&lt;br /&gt;
Having a knowledge of the &lt;a href="http://www.youtube.com/watch?v=zcavPAFiG14"&gt;scientific method&lt;/a&gt; will help greatly when doing this, and as a bonus, also when navigating life generally.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;"Assumptions that aren't based on well-established facts are the bane of all projects." (from &lt;a href="http://pragprog.com/the-pragmatic-programmer/extracts/coincidence"&gt;The Pragmatic Programmer&lt;/a&gt; by Andrew Hunt and David Thomas)&lt;/blockquote&gt;
&lt;blockquote&gt;"One of the biggest differences between hobbyists and professional programmers is the difference that grows out of superstition into understanding." (from &lt;a href="http://cc2e.com/"&gt;Code Complete, Second Edition&lt;/a&gt; by Steve McConnell)&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-7977722337528314049?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/Z_V_tLYNHmk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/7977722337528314049/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=7977722337528314049" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/7977722337528314049?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/7977722337528314049?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/Z_V_tLYNHmk/superstitious-programming.html" title="Superstitious programming" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2011/08/superstitious-programming.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck4ERX8ycCp7ImA9Wx5WE0k.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-2931775083307911199</id><published>2010-09-24T23:08:00.000+08:00</published><updated>2010-09-24T23:08:24.198+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-24T23:08:24.198+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="sysadmin" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>The promise of chef, fulfilled</title><content type="html">After using &lt;a href="http://www.opscode.com/chef/"&gt;chef&lt;/a&gt; (a system configuration management) for more than a year, it is finally a working solution for me. The first time it ran from scratch without a hitch, it was quite a strange experience. Wait a second, everything works? It's magic!&lt;br /&gt;
&lt;br /&gt;
It probably came about because it was run on &lt;a href="http://ubuntuguide.org/wiki/Ubuntu:Lucid"&gt;Ubuntu Lucid&lt;/a&gt;, which is an LTS release and probably better supported by the &lt;a href="http://github.com/opscode/cookbooks"&gt;cookbooks&lt;/a&gt;. Turned out the old cookbooks I was using were not up to task to deal with Lucid. So I might as well update it to the latest version and deal with many &lt;a href="http://wiki.opscode.com/display/chef/Breaking+Changes+from+0.7.x+to+0.8.x"&gt;broken&lt;/a&gt; things, which required a lot of head scratching and whatever else needed scratching.&lt;br /&gt;
&lt;br /&gt;
I still don't get the hang of the whole thing about the similar but different variables usage like &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;node&lt;/span&gt;, &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;params&lt;/span&gt;, and others (nor do I really care, it's not that important), but it works beautifully and that's good enough.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-2931775083307911199?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/JrNCxxOa468" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/2931775083307911199/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=2931775083307911199" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/2931775083307911199?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/2931775083307911199?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/JrNCxxOa468/promise-of-chef-fulfilled.html" title="The promise of chef, fulfilled" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2010/09/promise-of-chef-fulfilled.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE4DQn45eyp7ImA9WxBaEUk.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-6916777836814951662</id><published>2010-03-21T12:13:00.005+08:00</published><updated>2010-03-21T12:49:33.023+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-21T12:49:33.023+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="management" /><category scheme="http://www.blogger.com/atom/ns#" term="business" /><title>It's critical but please get it done as cheap as IMpossible</title><content type="html">A nice &lt;a href="http://www.reddit.com/r/programming/comments/bg12b/what_did_i_do_wrong_or_how_are_you_supposed_to/c0mlbmj"&gt;quote&lt;/a&gt; to &lt;del&gt;shove&lt;/del&gt; show to people that want softwares to be cheaply done:&lt;br /&gt;&lt;blockquote&gt;What always amazes me is the companies who consider such a piece of software to be "critical" to their company -- but then try to get it done as cheaply as possible. (Chances are that more money was spent on the bathroom facilities in your office than you want to spend developing this program... yet your business success/failure hinges on whether this program is done correctly. Does that sound insane or what? I mean you have 5 employees, and EACH of those employees will cost you MULTIPLE TIMES MORE in a single year than you want/expect to spend developing this critical application -- an application that once completed, could easily make your employees much more efficient &amp; your firm more productive, OR which alternately could cause needless frustration and even reduce their efficiency and productivity.)&lt;/blockquote&gt;The answer is it doesn't work. Those who offer low price are just bidding for any jobs, even the impossible (a very hard and so far &lt;a href="http://news.ycombinator.com/item?id=376238"&gt;unsolved problem quoted for $300-$1000&lt;/a&gt;) or ridiculous ones (&lt;a href="http://www.examiner.com/x-1652-Gadgets-Examiner~y2008m11d14-oDesk-Guru-Elance-and-RentACoder--Are-they-worth-it"&gt;a clone of eBay for under $500&lt;/a&gt;). The old adage still stands, price is a good indicator of goods.&lt;br /&gt;&lt;br /&gt;Now, how do you find the excellent companies or programmers? That's a different ball game. Maybe on the next article, maybe.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-6916777836814951662?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/yLx6XE5Db8Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/6916777836814951662/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=6916777836814951662" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/6916777836814951662?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/6916777836814951662?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/yLx6XE5Db8Q/its-critical-but-please-get-it-done-as.html" title="It's critical but please get it done as cheap as IMpossible" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2010/03/its-critical-but-please-get-it-done-as.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cERH4zeyp7ImA9Wx5WE0k.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-6041973231397739743</id><published>2010-03-17T22:51:00.003+08:00</published><updated>2010-09-24T23:10:05.083+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-24T23:10:05.083+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="usability" /><title>How people use Google Maps</title><content type="html">Watching people press the arrow buttons on Google Maps is painful, but that's the state of most Internet users. Watch around 15:30.&lt;br /&gt;
&lt;br /&gt;
&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/QckIzHC99Xc&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;rel=0&amp;amp;start=930"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/QckIzHC99Xc&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;rel=0&amp;amp;start=930" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="385" width="480"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;br /&gt;
The funny thing is that the usability advices given in this video are not applied on the &lt;a href="http://www.zipcar.com/sf/check-rates"&gt;site&lt;/a&gt; itself.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-6041973231397739743?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/6QJ1RDlsYqI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/6041973231397739743/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=6041973231397739743" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/6041973231397739743?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/6041973231397739743?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/6QJ1RDlsYqI/how-people-use-google-maps.html" title="How people use Google Maps" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2010/03/how-people-use-google-maps.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkQAQHs_fCp7ImA9WxBXFkg.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-1519864390558023346</id><published>2010-01-28T11:40:00.004+08:00</published><updated>2010-01-28T11:45:41.544+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-28T11:45:41.544+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="inspiration" /><title>Tomorrow would be better</title><content type="html">A quote from Sergey Brin taken from Seth Godin's The Dip:&lt;br /&gt;&lt;blockquote&gt;We knew that Google was going to get better every single day as we worked on it, and we knew that sooner or later, everyone was going to try it. So our feeling was that the later you tried it, the better it was for us because we'd make a better impression with better technology. So we were never in a big hurry to get you to use it today. Tomorrow would be better.&lt;/blockquote&gt;Doesn't mean that you'll never ship it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-1519864390558023346?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/zPNiEfKczsQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/1519864390558023346/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=1519864390558023346" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/1519864390558023346?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/1519864390558023346?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/zPNiEfKczsQ/tomorrow-would-be-better.html" title="Tomorrow would be better" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2010/01/tomorrow-would-be-better.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEFQHk-eyp7ImA9WxBQFUg.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-6569118084794019891</id><published>2010-01-15T19:12:00.003+08:00</published><updated>2010-01-15T19:23:31.753+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-15T19:23:31.753+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rubyonrails" /><title>Auto reload Rails plugin</title><content type="html">One day we all need to quickly get that plugin to work our way. But plugin development can be painful with restarting the server all the time.&lt;br /&gt;&lt;br /&gt;Here is how to reload Rails plugin on every request on Rails 2.3.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Add "config.reload_plugins = true" on config/environment.rb. It has to be there, you can't put it on config/environments/development.rb due to the Rails start up steps. You may add "if RAILS_ENV = 'development'" instead.&lt;br /&gt;&lt;pre name="code" class="ruby"&gt;&lt;br /&gt;  # config/environment.rb&lt;br /&gt;  config.reload_plugins = true&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;On the plugin's init.rb, add the following line:&lt;br /&gt;&lt;pre name="code" class="ruby"&gt;&lt;br /&gt;  # init.rb&lt;br /&gt;  ActiveSupport::Dependencies.explicitly_unloadable_constants = 'YourPluginModuleName'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;That's all. Don't forget to remove it when you're done.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-6569118084794019891?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/kW9cjMwWOZA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/6569118084794019891/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=6569118084794019891" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/6569118084794019891?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/6569118084794019891?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/kW9cjMwWOZA/auto-reload-rails-plugin.html" title="Auto reload Rails plugin" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2010/01/auto-reload-rails-plugin.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkYHQXYyfSp7ImA9WxBRFkw.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-1026452810814201743</id><published>2010-01-04T23:07:00.004+08:00</published><updated>2010-01-04T23:15:30.895+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-04T23:15:30.895+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="management" /><title>Defining milestones</title><content type="html">Apparently my brain can remember the gist quite well while forgetting the source. Before I forget again:&lt;br /&gt;&lt;blockquote&gt;For picking the milestones there is only one relevant rule. Milestones must be concrete, specific, measurable events, defined with knife-edge sharpness. Coding, for a counterexample, is "90 percent finished" for half of the total coding time. Debugging is "99 percent complete" most of the time. "Planning complete" is an event one can proclaim almost at will.&lt;br /&gt;&lt;br /&gt;Concrete milestones on the other hand, are 100-percent events. "Specifications signed by architects and implementers," "source coding 100 percent complete, keypunched, entered into disk library", "debugged version passes all test cases". These concrete milestones demark the vague phases of planning, coding, debugging. (Fred Brooks - The Mythical Man-Month: Essays on Software Engineering)&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-1026452810814201743?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/wwlfJS239h8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/1026452810814201743/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=1026452810814201743" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/1026452810814201743?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/1026452810814201743?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/wwlfJS239h8/defining-milestones.html" title="Defining milestones" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2010/01/defining-milestones.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUNR3w5cCp7ImA9WxBREkk.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-4387797411442147995</id><published>2009-12-31T16:16:00.004+08:00</published><updated>2009-12-31T16:31:36.228+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-31T16:31:36.228+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rubyonrails" /><title>Uploadify "406 Not Acceptable" error with Rails</title><content type="html">To some poor souls out there, if you encounter "406 Not Acceptable" error when uploading file with Uploadify on IE, Firefox, or Chrome on Windows, you may want to remove or replace the respond_to block, if you can.&lt;br /&gt;&lt;br /&gt;From what I can figure out, those Windows browsers send text/* as the HTTP_ACCEPT header, while on Linux, it sends */*. I suspect this is caused by different behavior of Flash on different OS and the header from Windows is considered invalid by Rails.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-4387797411442147995?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/L3kyJtNnvU4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/4387797411442147995/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=4387797411442147995" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/4387797411442147995?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/4387797411442147995?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/L3kyJtNnvU4/uploadify-406-not-acceptable-error-with.html" title="Uploadify &quot;406 Not Acceptable&quot; error with Rails" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2009/12/uploadify-406-not-acceptable-error-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMBQXgyfCp7ImA9WxBREEg.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-1604358158639393117</id><published>2009-12-29T11:32:00.003+08:00</published><updated>2009-12-29T11:47:30.694+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-29T11:47:30.694+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="creativity" /><category scheme="http://www.blogger.com/atom/ns#" term="thought" /><title>Reading obscure texts</title><content type="html">I've just read Zed Shaw's &lt;a href="http://zedshaw.com/essays/master_and_expert.html"&gt;The Master, The Expert, The Programmer&lt;/a&gt;. Talk about the obscure &lt;a href="http://en.wikipedia.org/wiki/The_book_of_five_rings"&gt;Go Rin No Sho (The Book of Five Ring)&lt;/a&gt; by Miyamoto Musashi, I'm thinking that maybe it's good to read those obscure texts like &lt;a href="http://en.wikipedia.org/wiki/The_Art_of_War"&gt;The Art of War&lt;/a&gt; or Zen &lt;a href="http://en.wikipedia.org/wiki/Koan"&gt;koans&lt;/a&gt;. They're supposedly full of wisdom, but we don't understand them. We simply don't because we've lost the context (in the case of Go Rin No Sho and The Art of War) or it's intentionally created to be non rational like the Zen koans.&lt;br /&gt;&lt;br /&gt;It may be able to train your creativity, flexing those neuron connections, making you think outside of your daily thoughts and peering deep into yourself. And since it's obscure, the answer you get is most likely something inside you which you probably have never known.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-1604358158639393117?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/zlcuqPuOmc8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/1604358158639393117/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=1604358158639393117" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/1604358158639393117?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/1604358158639393117?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/zlcuqPuOmc8/reading-obscure-texts.html" title="Reading obscure texts" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2009/12/reading-obscure-texts.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcAR3ozeSp7ImA9WxJVGUk.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-6799645164973521962</id><published>2009-07-02T14:42:00.008+08:00</published><updated>2009-07-07T14:27:26.481+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-07T14:27:26.481+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="firefox" /><category scheme="http://www.blogger.com/atom/ns#" term="tech" /><title>How to find character encoding of a text file</title><content type="html">Is it UTF8, ISO-8859-1, or UTF16-LE? How do you know which encoding a text file uses?&lt;br /&gt;&lt;br /&gt;Unfortunately, it's not so easy to find out. Unicode has been around for more than 15 years and there is one program called Excel that still exports CSV files in its own fancy &lt;a href="http://en.wikipedia.org/wiki/ISO/IEC_8859-1"&gt;ISO-8859-1 (Latin-1)&lt;/a&gt; encoding that is bound to mess up pretty much anything if you have some characters not in the US keyboard. But of course you didn't know what encoding the CSV file is, even after almost pulling your hairs off googling for answer.&lt;br /&gt;&lt;br /&gt;So, why bother about encoding? It's because my program can't read it if it's not converted to UTF-8. After trying many text editors hoping that it has a feature to show the current encoding, it finally dawned on me that there is this thing called Firefox which seems to recognize a file's character encoding.&lt;br /&gt;&lt;br /&gt;Here's how to do it. Open the file in Firefox, then go to View, then choose Character Encoding. The selected one &lt;span style="font-style:italic;"&gt;should&lt;/span&gt; be the encoding of the text file.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/_6sdwfCI727k/SkxcoIBdVmI/AAAAAAAAAJI/44p_yh7-6xI/s400/ff_encoding.png" alt="Firefox character encoding screenshot" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-6799645164973521962?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/fMnJj0W8iF4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/6799645164973521962/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=6799645164973521962" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/6799645164973521962?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/6799645164973521962?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/fMnJj0W8iF4/how-to-find-character-encoding-of-text.html" title="How to find character encoding of a text file" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_6sdwfCI727k/SkxcoIBdVmI/AAAAAAAAAJI/44p_yh7-6xI/s72-c/ff_encoding.png" height="72" width="72" /><thr:total>7</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2009/07/how-to-find-character-encoding-of-text.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C04ASXs-eCp7ImA9WxJTEEs.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-1850545836812703516</id><published>2009-04-18T20:35:00.013+08:00</published><updated>2009-04-18T21:39:08.550+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-18T21:39:08.550+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="testing" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Standalone autotest with Rspec 1.2.0</title><content type="html">If you're looking for how to do autotest with Rspec for standalone project, you might end up with &lt;a href="http://blog.nicksieger.com/articles/2007/01/30/rspec-autotest-for-standalone-projects"&gt;this old article from 2007&lt;/a&gt;. But sadly, it doesn't work anymore with the latest Rspec (1.2.0).&lt;br /&gt;&lt;br /&gt;After angrily scratching your head for why it doesn't work, you might dive into the source code and eventually solved the problem by writing some code. Then you found out that it's already supported by Rspec, no extra code required and you wondered why you didn't think of that. After all, if the problem seems common enough, somebody must have solved it. (Replace you with I)&lt;br /&gt;&lt;br /&gt;And how do you do it? Let's dive in.&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;Install Rspec and ZenTest.&lt;br /&gt;&lt;pre name="code" class="sh"&gt;&lt;br /&gt;  gem install rspec&lt;br /&gt;  gem install ZenTest&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;  &lt;/li&gt;&lt;li&gt;Set up Rspec.&lt;p&gt;Create &lt;code&gt;spec&lt;/code&gt; folder at your project root and put your spec files inside.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;Run autospec.&lt;p&gt;Type &lt;code&gt;autospec&lt;/code&gt; at your project root and it's done. I thought it's &lt;code&gt;autotest&lt;/code&gt; and ended up wasting time figuring out why it doesn't work.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;That's basically all, but there is more.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Adding color and other spec options&lt;/h4&gt;&lt;br /&gt;Just create &lt;code&gt;spec.opts&lt;/code&gt; file inside &lt;code&gt;spec&lt;/code&gt; directory. Fill it with some options, for example:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;--color&lt;br /&gt;--reverse&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You can see the list of options available by executing &lt;code&gt;spec --help&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Scan spec files within subdirectories&lt;/h4&gt;&lt;br /&gt;For one, the default behavior only scans spec files inside spec directory non-recursively. So if you like to organize your spec better, you're out of luck. But here is how to do it. In &lt;code&gt;.autotest&lt;/code&gt; file in your project root, add the following code:&lt;br /&gt;&lt;pre name="code" class="ruby"&gt;&lt;br /&gt;module Autotest::RspecMod&lt;br /&gt;  Autotest.add_hook :initialize do |autotest|&lt;br /&gt;    # Map to all "*_spec.rb" files inside spec and its sub directory.&lt;br /&gt;    regexp = %r%^lib/(.*)\.rb$%&lt;br /&gt;&lt;br /&gt;    autotest.remove_mapping(regexp)&lt;br /&gt;    autotest.add_mapping(regexp) do |filename, m|&lt;br /&gt;      autotest.files_matching(%r%^spec/.*#{m[1]}_spec.rb$%)&lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Pop up notification on Ubuntu&lt;/h4&gt;&lt;br /&gt;If you're on Ubuntu, you can follow these steps to have pop up notification when the test is finished. First, make sure you have &lt;code&gt;libnotify-bin&lt;/code&gt; by running:&lt;br /&gt;&lt;pre&gt;sudo apt-get install libnotify-bin&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then add the code below in &lt;code&gt;.autotest&lt;/code&gt;.&lt;br /&gt;&lt;pre name="code" class="ruby"&gt;&lt;br /&gt;require 'autotest/redgreen'&lt;br /&gt;&lt;br /&gt;module Autotest::GnomeNotify&lt;br /&gt;  # Time notification will be displayed before disappearing automatically.&lt;br /&gt;  EXPIRATION_IN_SECONDS = 3&lt;br /&gt;  ERROR_ICON = 'gtk-dialog-error'&lt;br /&gt;  PENDING_ICON = 'gtk-dialog-warning'&lt;br /&gt;  SUCCESS_ICON = 'gtk-dialog-info'&lt;br /&gt;&lt;br /&gt;  # Convenience method to send an error notification message&lt;br /&gt;  #&lt;br /&gt;  # [title]         Notification message title.&lt;br /&gt;  # [message]       Core message for the notification.&lt;br /&gt;  # [icon]          An icon filename or stock icon to display.&lt;br /&gt;  # [urgency]       The urgency level (low, normal, critical).&lt;br /&gt;  # [time]          The timeout in milliseconds at which to expire the notification.&lt;br /&gt;  def self.notify(title, message, icon, urgency='low', time=(EXPIRATION_IN_SECONDS * 1000))&lt;br /&gt;    `notify-send -i #{icon} -u #{urgency} -t #{time} '#{title}' '#{message}'`&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;  Autotest.add_hook :ran_command do |autotest|&lt;br /&gt;    results = [autotest.results].flatten.join("\n")&lt;br /&gt;    output = results.slice(/(\d+)\s+examples?,\s*(\d+)\s+failures?(,\s*(\d+)\s+pending)?/)&lt;br /&gt;&lt;br /&gt;    if output  =~ /[1-9]\d*\spending?/&lt;br /&gt;      notify 'PENDING:', "#{output}", PENDING_ICON, 'normal', 5000&lt;br /&gt;    elsif output =~ /0 failures/&lt;br /&gt;      notify 'PASS:', "#{output}", SUCCESS_ICON&lt;br /&gt;    else&lt;br /&gt;      notify 'FAIL:', "#{output}", ERROR_ICON, 'critical', 10000&lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-1850545836812703516?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/3MVdCPZZoLk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/1850545836812703516/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=1850545836812703516" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/1850545836812703516?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/1850545836812703516?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/3MVdCPZZoLk/standalone-autotest-with-rspec-120.html" title="Standalone autotest with Rspec 1.2.0" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2009/04/standalone-autotest-with-rspec-120.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUGQHc-fyp7ImA9WxVaEEQ.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-6996159028451740107</id><published>2009-03-30T12:02:00.006+08:00</published><updated>2009-04-07T16:50:21.957+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-07T16:50:21.957+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="design" /><category scheme="http://www.blogger.com/atom/ns#" term="think" /><title>The Genius of SMRT</title><content type="html">Here is an example of why you need to think.&lt;br /&gt;&lt;br /&gt;Long time ago, there used to be a drawing that showed how long it took to travel from one station to another by Singapore's MRT.&lt;br /&gt;&lt;br /&gt;This is how it looks like:&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/_6sdwfCI727k/SdsPF9IfvjI/AAAAAAAAAIw/NcqTD9ECqJw/s400/mrt_travel_good.png" border="0" id="BLOGGER_PHOTO_ID_5321863979652333106" /&gt;&lt;br /&gt;&lt;br /&gt;And there is a newer version, which looks like this one below:&lt;br /&gt;&lt;a href="http://www.smrt.com.sg/trains/images/timing_average_big.gif"&gt;&lt;img src="http://2.bp.blogspot.com/_6sdwfCI727k/SdsPZiW6SzI/AAAAAAAAAI4/FkJwHKe5G_U/s400/mrt_travel_bad.png" id="BLOGGER_PHOTO_ID_5321864316062419762" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Using both maps, tell me how long do I need to go from Bukit Gombak to Woodlands? Now you know that the newer version simply serves no purpose whatsoever to help people other than the fact that the timing seems to be updated and more current.&lt;br /&gt;&lt;br /&gt;That, is the genius of non thinking.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;The original document is still available on &lt;a href="http://www.smrt.com.sg/trains/documents/RailTravelTimes61.pdf"&gt;here&lt;/a&gt; though I can't find it linked from anywhere in the site. And there is a fancier, overkill one from &lt;a href="http://www.transitlink.com.sg/images/eguide/MRT_Journey_Time.jpg"&gt;TransitLink&lt;/a&gt;.&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-6996159028451740107?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/3oM3uK57qPA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/6996159028451740107/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=6996159028451740107" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/6996159028451740107?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/6996159028451740107?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/3oM3uK57qPA/genius-of-smrt.html" title="The Genius of SMRT" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_6sdwfCI727k/SdsPF9IfvjI/AAAAAAAAAIw/NcqTD9ECqJw/s72-c/mrt_travel_good.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2009/03/genius-of-smrt.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYNSX8yeip7ImA9WxVbFkk.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-2201635573543512894</id><published>2009-03-26T11:19:00.004+08:00</published><updated>2009-04-02T11:16:38.192+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-02T11:16:38.192+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tech" /><title>Delicious screws it up, again</title><content type="html">So one &lt;a href="http://codeftw.blogspot.com/2008/06/delicious-20-extension-messing-up-my.html"&gt;mistake&lt;/a&gt; in the past is not enough.&lt;br /&gt;&lt;br /&gt;Now the Delicious toolbar is as clean as toilet water, annoying, but still can live with it. And guess what, the Awesome Bar is screwed too.&lt;br /&gt;&lt;br /&gt;And the worst thing is, I can't downgrade! It kept coming up with "Invalid file hash" error. Great!&lt;br /&gt;&lt;br /&gt;I'm talking about the Firefox add-on, version 2.1.032.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Update: Managed to downgrade to 2.1.018 and it works perfectly.&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-2201635573543512894?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/TPRKPNcvBXM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/2201635573543512894/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=2201635573543512894" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/2201635573543512894?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/2201635573543512894?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/TPRKPNcvBXM/delicious-screws-it-up-again.html" title="Delicious screws it up, again" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2009/03/delicious-screws-it-up-again.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MGR305fyp7ImA9WxVVE0k.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-1986739160251500633</id><published>2009-03-06T21:01:00.004+08:00</published><updated>2009-03-06T21:17:06.327+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-06T21:17:06.327+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="management" /><title>Why bureaucracy</title><content type="html">&lt;blockquote&gt;... the purpose of bureaucracy is to compensate for incompetence and lack of discipline — a problem that largely goes away if you have the right people in the first place. (&lt;a href="http://www.amazon.com/Good-Great-Companies-Leap-Others/dp/0066620996"&gt;GOOD TO GREAT - Jim Collins&lt;/a&gt;)&lt;/blockquote&gt;&lt;br /&gt;I've never thought of it that way but it makes a lot of sense. Bureaucracy seemed to me like something that naturally evolves to manage people, especially many people. And now I know the why.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-1986739160251500633?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/VLgkb2AC1iA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/1986739160251500633/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=1986739160251500633" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/1986739160251500633?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/1986739160251500633?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/VLgkb2AC1iA/why-bureaucracy.html" title="Why bureaucracy" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2009/03/why-bureaucracy.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UEQHg5eyp7ImA9WxVREEw.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-8698138616356002661</id><published>2009-01-15T17:07:00.004+08:00</published><updated>2009-01-15T17:20:01.623+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-15T17:20:01.623+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rubyonrails" /><title>Resizing animated gif on attachment_fu's Rmagick</title><content type="html">So your animated GIF doesn't animate after going through attachment_fu's Rmagick resizing?&lt;br /&gt;&lt;br /&gt;Go find the file lib/technoweenie/attachment_fu/processors/rmagick_processor.rb inside plugins/attachment_fu.&lt;br /&gt;&lt;br /&gt;Then find this part:&lt;br /&gt;&lt;pre name="code" class="ruby"&gt;&lt;br /&gt;def with_image(file, &amp;block)&lt;br /&gt;  ...&lt;br /&gt;  binary_data = file.is_a?(Magick::Image) ? file : Magick::Image.read(file).first unless !Object.const_defined?(:Magick)&lt;br /&gt;  ...&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and change Magick::Image.read(file) to Magick::ImageList.read(file). The result is:&lt;br /&gt;&lt;pre name="code" class="ruby"&gt;&lt;br /&gt;def with_image(file, &amp;block)&lt;br /&gt;  ...&lt;br /&gt;  binary_data = file.is_a?(Magick::Image) ? file : Magick::ImageList.read(file).first unless !Object.const_defined?(:Magick)&lt;br /&gt;  ...&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-8698138616356002661?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/adE2U9x4uWo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/8698138616356002661/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=8698138616356002661" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/8698138616356002661?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/8698138616356002661?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/adE2U9x4uWo/resizing-animated-gif-on-attachmentfus.html" title="Resizing animated gif on attachment_fu's Rmagick" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2009/01/resizing-animated-gif-on-attachmentfus.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEECSHY-fSp7ImA9WxVSGEQ.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-5160814439922223051</id><published>2009-01-14T09:26:00.003+08:00</published><updated>2009-01-14T09:31:09.855+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-14T09:31:09.855+08:00</app:edited><title>Cooperation and punishment</title><content type="html">Apparently we need to introduce an element of punishment to get people to cooperate, but this is only good in democratic societies.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;In countries like the USA, Switzerland and the UK, freeloaders accepted their punishment and became much more co-operative. But in countries based on more authoritarian and parochial social institutions such as Oman, Saudi Arabia, Greece and Russia, the freeloaders took revenge — retaliating against those who had punished them. - &lt;a href="http://www.physorg.com/news124046352.html"&gt;http://www.physorg.com/news124046352.html&lt;/a&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-5160814439922223051?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/cSIVOiYKFew" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/5160814439922223051/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=5160814439922223051" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/5160814439922223051?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/5160814439922223051?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/cSIVOiYKFew/cooperation-and-punishment.html" title="Cooperation and punishment" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2009/01/cooperation-and-punishment.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUENQXo6eSp7ImA9WxVSFU0.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-8582969331995361546</id><published>2009-01-09T21:26:00.001+08:00</published><updated>2009-01-09T21:28:10.411+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-09T21:28:10.411+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><title>ddate</title><content type="html">Go and type &lt;pre&gt;ddate&lt;/pre&gt; on your Linux console and be surprised.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-8582969331995361546?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/cXRXNZTwk1c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/8582969331995361546/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=8582969331995361546" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/8582969331995361546?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/8582969331995361546?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/cXRXNZTwk1c/ddate.html" title="ddate" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2009/01/ddate.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQNQX44fip7ImA9WxVTEE8.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-3849198021398322175</id><published>2008-12-23T17:17:00.003+08:00</published><updated>2008-12-23T17:26:30.036+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-23T17:26:30.036+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="versioncontrol" /><category scheme="http://www.blogger.com/atom/ns#" term="git" /><category scheme="http://www.blogger.com/atom/ns#" term="subversion" /><title>Viewing single commit diff in Git</title><content type="html">I have started using Git for my projects and am very impressed by it. More about it in later post.&lt;br /&gt;&lt;br /&gt;In the mean time, I just want to share about how to view a diff of single commit.&lt;br /&gt;&lt;br /&gt;In SVN, this is what I usually do:&lt;br /&gt;&lt;code&gt;svn diff -c ARG&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I didn't know the equivalent of it in Git and I used to do this, which is a pain:&lt;br /&gt;&lt;code&gt;git diff  &amp;lt;commit&amp;gt;^ &amp;lt;commit&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;That is, until I found out about:&lt;br /&gt;&lt;code&gt;git show  &amp;lt;commit&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Problem solved.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-3849198021398322175?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/H-AB8ivNJR4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/3849198021398322175/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=3849198021398322175" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/3849198021398322175?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/3849198021398322175?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/H-AB8ivNJR4/viewing-single-commit-diff-in-git.html" title="Viewing single commit diff in Git" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2008/12/viewing-single-commit-diff-in-git.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEcAQX85eCp7ImA9WxRUF0w.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-3367005126404626045</id><published>2008-11-26T23:07:00.001+08:00</published><updated>2008-11-26T23:07:20.120+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-26T23:07:20.120+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="design" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><title>The "Reverse AHA"</title><content type="html">&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Have you ever designed a program where you have designed to the best to your ability of the problem at hand, but there were some details that you knew might be tricky but you just didn't bother to explore it more because as I said before, it's been designed according to the problem being solved, changing the design didn't seem like a good idea. So you chose to tackle the problem later when you arrived at it.&lt;br/&gt;&lt;br/&gt;So you implemented it and when you arrived at the problem, you realized that it's actually easier than you thought and due to the nature of the language or library or whatever (in my case, it's Ruby's duck typing), it's actually helping me solve another problem that I tried to tackle differently, the results of which, the code becomes simpler and cleaner.&lt;br/&gt;&lt;br/&gt;AHA! Didn't even know that.&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-3367005126404626045?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/keNjpHc9pD0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/3367005126404626045/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=3367005126404626045" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/3367005126404626045?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/3367005126404626045?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/keNjpHc9pD0/aha.html" title="The &amp;quot;Reverse AHA&amp;quot;" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2008/11/aha.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EMRnszfCp7ImA9Wx5UFEU.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-42477559986669196</id><published>2008-11-03T21:44:00.006+08:00</published><updated>2010-10-19T18:54:47.584+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-19T18:54:47.584+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="job" /><title>Indonesian Style Job Ads</title><content type="html">&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;This is about job ads in Indonesia, which is by US standard is discriminatory and will sued in no time.&lt;br /&gt;
&lt;br /&gt;
The source of the ads is &lt;a href="http://tech.groups.yahoo.com/group/id-ruby/message/4585"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
And here are my commentaries:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;"Pria Usia maksimal 28 tahun, belum menikah." (Translation: Male, maximum age 28 years, not married). That's three discrimination counts in one sentence: sex, age, and marital status!&lt;/li&gt;
&lt;li&gt;"Male or Female". Well, erm.. I thought those are the only genders there are. Or you mean you don't accept transvestites?&lt;/li&gt;
&lt;li&gt;"Excellent health and interpersonal skills". Health discrimination? I've never seen this in any Singapore job ads.&lt;/li&gt;
&lt;li&gt;"Pleasant appearance". I'm pretty sure that pleasant appearance is highly subjective.&lt;/li&gt;
&lt;li&gt;"Ability to work underpressure". Can't even spell "under pressure".&lt;/li&gt;
&lt;li&gt;"Send us your updated resume + latest full color photograph". That's for a "Web and Graphic Designer" job and some others. In countries like US, photograph is a only required for models, actors/actresses, strippers and porn actors/actresses.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;"manageably efficient in using resources". I don't understand what this means.&lt;/li&gt;
&lt;li&gt;"having supportive attitude". Meaning a Mr. Yes Man?&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;"Mempunyai sikap, kepribadian baik" (Translation: Have good attitude and personality). Hm.. I guess that goes without saying for all jobs. How redundant.&lt;/li&gt;
&lt;li&gt;"Mau bekerja keras, rajin, jujur" (Translation: Willing to work hard, diligent, honest). I think honesty is expected of every single person in this world. Another redundancy.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;"We are, the pioneer in the mobile media business, introducing our state-of-the-art advertising media services into Indonesian Market." I'm not sure if the sentence makes a lot sense.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-42477559986669196?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/nF4vtKxYlTE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/42477559986669196/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=42477559986669196" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/42477559986669196?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/42477559986669196?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/nF4vtKxYlTE/indonesian-style-job-ads.html" title="Indonesian Style Job Ads" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2008/11/indonesian-style-job-ads.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYHSHs5fyp7ImA9WxRREEQ.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-4854048346799377688</id><published>2008-09-22T22:18:00.001+08:00</published><updated>2008-09-22T22:18:59.527+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-22T22:18:59.527+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><title>My grub died on me</title><content type="html">&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;My laptop stopped working with grub error 17. Maybe because I changed the drive partition using Windows. Is it going to be another day of re-installation? Damn it, I have a side project to work on. Luckily reinstalling grub is quite easy. Here is how: &lt;a href='http://ubuntuforums.org/showthread.php?t=224351'&gt;http://ubuntuforums.org/showthread.php?t=224351&lt;/a&gt;. Lesson learned: never use Windows to do partitioning.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-4854048346799377688?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/WoIB6RXASJY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/4854048346799377688/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=4854048346799377688" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/4854048346799377688?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/4854048346799377688?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/WoIB6RXASJY/my-grub-died-on-me.html" title="My grub died on me" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2008/09/my-grub-died-on-me.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MAR3c_eCp7ImA9WxVSE00.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-2752666098532794239</id><published>2008-09-15T20:47:00.007+08:00</published><updated>2009-01-07T14:24:06.940+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-07T14:24:06.940+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rubyonrails" /><title>Rails routing to handle crawler bots</title><content type="html">To handle pesky bots triggering exception on non existing path, we can use:&lt;br /&gt;&lt;pre name="code" class="ruby"&gt;&lt;br /&gt;  # Catchall so we can gracefully handle badly formed requests&lt;br /&gt;  map.catch_all "*anything" , :controller =&gt; 'blog', :action =&gt; 'unknown_request'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Explanation about *anything:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt; Specifying *[string] as part of a rule like:&lt;br /&gt; &lt;pre&gt; map.connect '*path' , :controller =&gt; 'blog' , :action =&gt; 'unrecognized?'&lt;/pre&gt;&lt;br /&gt; will glob all remaining parts of the route that were not recognized earlier. This idiom must appear at the end of the path. The globbed values are in params[:path] in this case.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;small&gt;&lt;br /&gt; &lt;em&gt;Code snippet a little modified from Agile Web Development with Rails Second Edition. Explanation taken from the &lt;a href="http://api.rubyonrails.org/classes/ActionController/Routing.html"&gt;docs&lt;/a&gt;.&lt;br /&gt; &lt;/em&gt;&lt;br /&gt;&lt;/small&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-2752666098532794239?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/kvzb_BhW6Mk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/2752666098532794239/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=2752666098532794239" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/2752666098532794239?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/2752666098532794239?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/kvzb_BhW6Mk/rails-routing-to-handle-crawler-bots.html" title="Rails routing to handle crawler bots" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2008/09/rails-routing-to-handle-crawler-bots.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQASHo-fCp7ImA9WxdaGUk.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-2144459520407395472</id><published>2008-08-29T00:26:00.002+08:00</published><updated>2008-08-29T00:52:29.454+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-29T00:52:29.454+08:00</app:edited><title>Sharp's dirty advertisement</title><content type="html">Well, as far as I know, Sharp currently only sells LCD TV, though I admit that their LCD screens are one of the best if not the best.&lt;br /&gt;&lt;br /&gt;But look at this ad.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://htimage.googlepages.com/sharp_plasma_tv.png" /&gt;&lt;br /&gt;&lt;br /&gt;Such a lowly and misleading ad. It brings you to this &lt;a href="http://www.sharp.com.sg/web/products/ProdList.asp?Catid=2"&gt;page full of LCD TVs&lt;/a&gt;. Do they need to do that?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-2144459520407395472?l=codeftw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/4UP4xfnE8C8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/2144459520407395472/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=2144459520407395472" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/2144459520407395472?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/2144459520407395472?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/4UP4xfnE8C8/sharps-dirty-advertisement.html" title="Sharp's dirty advertisement" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2008/08/sharps-dirty-advertisement.html</feedburner:origLink></entry></feed>

