<?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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DkcBRnY6fCp7ImA9WxJUGUs.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273</id><updated>2009-07-19T08:40:57.814+08:00</updated><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></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>40</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><link rel="self" href="http://feeds.feedburner.com/CodeFtw" type="application/atom+xml" /><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'/&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="https://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=6799645164973521962" title="0 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:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></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 xmlns:thr="http://purl.org/syndication/thread/1.0">0</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'/&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="https://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:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">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'/&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="https://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:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></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 xmlns:thr="http://purl.org/syndication/thread/1.0">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'/&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="https://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:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">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'/&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="https://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:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">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'/&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="https://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=8698138616356002661" title="0 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:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</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'/&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="https://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:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">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'/&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="https://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:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">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'/&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="https://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:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">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'/&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="https://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:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2008/11/aha.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8CSHY_fSp7ImA9WxJVGUk.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-42477559986669196</id><published>2008-11-03T21:44:00.005+08:00</published><updated>2009-07-07T14:41:09.845+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-07T14:41:09.845+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 discriminations count 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'/&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="https://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:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">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'/&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="https://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:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">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'/&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="https://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:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">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'/&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="https://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:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2008/08/sharps-dirty-advertisement.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MMQnY6fyp7ImA9WxVSE00.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-3969783433106662156</id><published>2008-08-08T11:48:00.005+08:00</published><updated>2009-01-07T14:24:43.817+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-07T14:24:43.817+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><title>Ruby return &amp; ensure gotcha</title><content type="html">If you have &lt;code&gt;return&lt;/code&gt; and &lt;code&gt;ensure&lt;/code&gt; in your method, be very very careful. What happens is when you call &lt;code&gt;return&lt;/code&gt;, the method will not return immediately, but it will execute the &lt;code&gt;ensure&lt;/code&gt; block.&lt;br /&gt;&lt;br /&gt;This can become a problem on Rails and I guess most of other things.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="ruby"&gt;&lt;br /&gt;  def some_action&lt;br /&gt;    return render :action =&gt; 'something' if some_condition&lt;br /&gt;    # do other things&lt;br /&gt;  rescue Exception =&gt; ex&lt;br /&gt;    # handle exception&lt;br /&gt;  ensure&lt;br /&gt;    if other_condition&lt;br /&gt;      render :action =&gt; 'other_thing'&lt;br /&gt;    else&lt;br /&gt;      render :action =&gt; 'default'&lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Let's say &lt;code&gt;some_condition&lt;/code&gt; is true, you'll end up with the &lt;code&gt;render&lt;/code&gt; inside &lt;code&gt;ensure&lt;/code&gt; block and things will get double rendering fun.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-3969783433106662156?l=codeftw.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/pu4kex6yDc8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/3969783433106662156/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=3969783433106662156" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/3969783433106662156?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/3969783433106662156?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/pu4kex6yDc8/ruby-return-ensure-gotcha.html" title="Ruby return &amp; ensure gotcha" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2008/08/ruby-return-ensure-gotcha.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YDQ38yeCp7ImA9WxdQE0s.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-5502493227897386545</id><published>2008-06-13T21:52:00.001+08:00</published><updated>2008-06-13T21:52:52.190+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-13T21:52:52.190+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="firefox" /><category scheme="http://www.blogger.com/atom/ns#" term="web2.0" /><category scheme="http://www.blogger.com/atom/ns#" term="tech" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Delicious 2.0 extension messing up my Firefox</title><content type="html">&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Delicious extension seems to cause problems with Firefox.&lt;br/&gt;&lt;br/&gt;First at my work Ubuntu laptop, the location bar became a blank bar. Fixed by disabling the extension or reverting to previous version.&lt;br/&gt;&lt;br/&gt;Now on my home Windows XP PC, the title bar is doesn't change when I switch tab. I'm going to revert it too.&lt;br/&gt;&lt;br/&gt;Anyway, I thought version 2 will make bookmark searching faster. Turned out I was wrong. So there is no point in using version 2 for me.&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-5502493227897386545?l=codeftw.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/3gr4uYTdOs0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/5502493227897386545/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=5502493227897386545" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/5502493227897386545?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/5502493227897386545?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/3gr4uYTdOs0/delicious-20-extension-messing-up-my.html" title="Delicious 2.0 extension messing up my Firefox" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2008/06/delicious-20-extension-messing-up-my.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEEHRH4_fCp7ImA9WxdUFUw.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-2384684552936336620</id><published>2008-04-20T11:04:00.003+08:00</published><updated>2008-07-31T23:03:55.044+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-31T23:03:55.044+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rubyonrails" /><title>Starting Rails Project from Scratch - Part 1</title><content type="html">&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;While I've been working with Rails for about 4 months now, I've never started any project from scratch. As I'm doing my personal project while also learning more about Rails, let me just document my journey here.&lt;br /&gt;&lt;br /&gt;I'm creating my project with Rails 2.0.2 on Windows platform using Netbeans as the IDE. Somehow Ruby programs take some time to load on my PC, which is why I have some extra time to write this, lol.&lt;br /&gt;&lt;br /&gt;OK, let's go to the meat. These are the first few steps I did.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Configure Subversion for Rails&lt;/span&gt;&lt;br /&gt;&lt;a href="http://wiki.rubyonrails.org/rails/pages/HowtoUseRailsWithSubversion"&gt;http://wiki.rubyonrails.org/rails/pages/HowtoUseRailsWithSubversion&lt;/a&gt;&lt;br /&gt;Just follow it blindly. I tried to be smart and ended up missing out some things. Don't forget to create the branches, tags, and trunk structure in the first place.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Import to NetBeans&lt;/span&gt;&lt;br /&gt;And ignore the NetBeans project files: svn propedit svn:ignore nbproject&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Use Piston for Plugins&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.rubyinside.com/advent2006/12-piston.html"&gt;http://www.rubyinside.com/advent2006/12-piston.html&lt;/a&gt;&lt;br /&gt;Those unfamiliar with Piston need to know that Piston doesn't work like script/plugin. You must specify where the plugin files are created.&lt;br /&gt;&lt;pre&gt;piston import http://dev.rubyonrails.org/svn/rails/plugins/simply_helpful/ &lt;span style="font-weight: bold;"&gt;vendor/plugins/simply_helpful&lt;/span&gt;&lt;/pre&gt;&lt;span style="font-weight: bold;"&gt;Add authentication using Restful Authentication&lt;/span&gt;&lt;br /&gt;&lt;a href="http://railscasts.com/episodes/67"&gt;http://railscasts.com/episodes/67&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.railsforum.com/viewtopic.php?id=14216"&gt;http://www.railsforum.com/viewtopic.php?id=14216&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Note:&lt;br /&gt;If you're following the Railscast and creating "session" controller instead of "sessions", this error might happen when you try to log in:&lt;br /&gt;&lt;pre&gt;Error: uninitialized constant SessionsController&lt;/pre&gt;at routes.rb add this &lt;pre&gt;map.resource :session, :controller =&gt; 'session'&lt;/pre&gt; instead of &lt;pre&gt;map.resource :session&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-2384684552936336620?l=codeftw.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/oK3n5ncfgyk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/2384684552936336620/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=2384684552936336620" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/2384684552936336620?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/2384684552936336620?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/oK3n5ncfgyk/starting-rails-project-from-scratch.html" title="Starting Rails Project from Scratch - Part 1" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2008/04/starting-rails-project-from-scratch.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck4MQ3g4fip7ImA9WxZbFks.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-7472933720053892133</id><published>2008-04-17T22:12:00.003+08:00</published><updated>2008-04-20T11:09:42.636+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-20T11:09:42.636+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="web2.0" /><title>People You May Know in Facebook</title><content type="html">&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;This is the kind of feature that I have been hoping to have in social network sites, yet none of them that I know did although it's very simple to implement. And here is Facebook doing it, although it's way too late. Unfortunately, the first 3 people they show on my home page are people that I don't know. Going to the details, I only found one guy that I really know. I guess my network in Facebook is pretty saturated.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-7472933720053892133?l=codeftw.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/7poLnPU4XXs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/7472933720053892133/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=7472933720053892133" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/7472933720053892133?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/7472933720053892133?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/7poLnPU4XXs/people-you-may-know-in-facebook.html" title="People You May Know in Facebook" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2008/04/people-you-may-know-in-facebook.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cMR3s7eyp7ImA9WxZbEEU.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-732962922298949785</id><published>2008-04-13T19:10:00.001+08:00</published><updated>2008-04-13T19:11:26.503+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-13T19:11:26.503+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="management" /><title>Countering The Dead Sea Effect</title><content type="html">&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;There is a new idea called &lt;a href='http://brucefwebster.com/2008/04/11/the-wetware-crisis-the-dead-sea-effect/'&gt;the Dead Sea effect&lt;/a&gt; which is basically saying that in large corporate, the more talented IT engineers are the ones most likely to leave because they're they most likely can't put up with the stupidities and inefficiencies in the workplace, not to mention all the problems.&lt;br/&gt;&lt;br/&gt;And the worse thing about it is the vicious cycle effect that happens. Talented IT engineers are not likely to join a defunct team and the only way they can get a talented people is from entry positions. But they'll leave too once they know enough.&lt;br/&gt;&lt;br/&gt;How to escape this situation? I don't think it's impossible, but it's certainly difficult. This is what I thought. First, get a talented people (of course, if they can find it), pay them high, and give them super power (authority). Talented person knows talented people. He'll get either his talented friends, or he'll hire other talented people. Then they'll start fixing things up. Looks simple? No. It's very difficult because they'll face resistance from old people who're afraid they'll lose their jobs. These people may even hide important informations (you know, the tricky parts which only one guy knows) or restrict access to them (you can't touch my server!) making their progress slower. Not to mention that whatever they want to change will have rotten codes which are very difficult to understand. But I believe it's doable, given that the people doing it strife till the end. Or they might just decide that enough is enough, no amount of money can make them do this, etc. Then the company is screwed.&lt;br/&gt;&lt;br/&gt;Eventually, the best way for them is probably to keep the way things are. They're big, they can afford it. But if they want to beat the competition, they should look into how they can make their IT more agile. A good in-house IT team can make a lot of things happen. The least, they can cut down the manual works. Then, with software applications, they can make people work more efficiently and faster.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-732962922298949785?l=codeftw.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/wGuahiqEgIA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/732962922298949785/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=732962922298949785" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/732962922298949785?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/732962922298949785?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/wGuahiqEgIA/dead-sea-effect.html" title="Countering The Dead Sea Effect" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2008/04/dead-sea-effect.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEMAQHw6fCp7ImA9WxZUGUs.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-2925221494040828675</id><published>2008-04-12T10:14:00.001+08:00</published><updated>2008-04-12T10:14:01.214+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-12T10:14:01.214+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="usability" /><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="windows" /><title>Moving Vista Taskbar Buttons</title><content type="html">&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Five years of development and the Windows team can't get a simple thing right.&lt;br /&gt;&lt;br /&gt;The first few days I used Vista, there was one thing I expected to work, considering that Vista is a major improvement for Windows. That thing is moving the taskbar buttons around to arrange them in the order that I like. Linux desktop managers can do that since a long time and I was expecting that Vista was able to do it since it's just a simple thing. Guess what, it didn't work.&lt;br /&gt;&lt;br /&gt;Arranging the taksbar buttons is so important for me that if one of the application crashes, I'd rather restart the others just to arrange it again. That's during the Windows time anyways. Because I've been using Linux on work for quite some time, it's not an issue anymore. Of course there are some free third party applications to do it, but why do we have to deal with it when it should be part of the OS?&lt;br /&gt;&lt;br /&gt;It's always good to know that things are where you expect them to be.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-2925221494040828675?l=codeftw.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/Js9ic51YqNs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/2925221494040828675/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=2925221494040828675" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/2925221494040828675?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/2925221494040828675?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/Js9ic51YqNs/moving-vista-taskbar-buttons.html" title="Moving Vista Taskbar Buttons" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2008/04/moving-vista-taskbar-buttons.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EGSHkzeyp7ImA9WxRXEk4.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-874490734149800610</id><published>2008-04-10T21:06:00.001+08:00</published><updated>2008-10-17T17:27:09.783+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-17T17:27:09.783+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="firefox" /><title>Remember the Milk widget crashes Firefox 2.0.0.13</title><content type="html">&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Just to make the noise louder, my Netvibes started crashing my Firefox since a few days ago. I thought Netvibes will fix it soon but it doesn't happen and it's getting itchy here. A &lt;a href='http://groups.google.com/group/mozilla.support.firefox/browse_thread/thread/0ed963c347b65639/e107233c18b125a4'&gt;Google search&lt;/a&gt; later, I found that the problem is with Remember the Milk widget. I archived the widget and Netvibes works again.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-874490734149800610?l=codeftw.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/2u9nwzE5L80" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/874490734149800610/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=874490734149800610" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/874490734149800610?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/874490734149800610?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/2u9nwzE5L80/remember-milk-widget-crashes-firefox.html" title="Remember the Milk widget crashes Firefox 2.0.0.13" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2008/04/remember-milk-widget-crashes-firefox.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04HQ3oyeyp7ImA9WxZQGEk.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-6203714929472250985</id><published>2008-02-24T18:35:00.003+08:00</published><updated>2008-02-24T18:45:32.493+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-02-24T18:45:32.493+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="usability" /><title>Way to lose your site user: ban them</title><content type="html">I haven't used StumbleUpon for a long time and when I wanted to use it, this is what I get.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://htimage.googlepages.com/su_too_many_acc.png"&gt;&lt;/img&gt;&lt;br /&gt;&lt;br /&gt;OK, so some spammers used my &lt;span style="font-weight:bold;"&gt;dynamically allocated&lt;/span&gt; IP address and created a lot of accounts and StumbleUpon banned the IP to protect themselves.&lt;br /&gt;&lt;br /&gt;But I'm a &lt;span style="font-weight:bold;"&gt;logged in&lt;/span&gt; legitimate user and I'm also banned? Well, I won't bother contacting them for this. I'll simply don't use it until I feel like it, which might be a few months, a year, or never.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-6203714929472250985?l=codeftw.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/McjxikyZOYI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/6203714929472250985/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=6203714929472250985" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/6203714929472250985?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/6203714929472250985?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/McjxikyZOYI/way-to-lose-your-site-user-ban-them.html" title="Way to lose your site user: ban them" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2008/02/way-to-lose-your-site-user-ban-them.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D04HRHs6eCp7ImA9WB9VGEs.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-5290170140389838375</id><published>2007-12-05T22:44:00.000+08:00</published><updated>2007-12-05T22:45:35.510+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-12-05T22:45:35.510+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="python" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><title>Python makes you fly</title><content type="html">&lt;a href="http://xkcd.com/353/"&gt;&lt;img src="http://widgetftw.googlepages.com/python.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;That's about what I felt when I learned Python. It really opened my eyes to a whole new world. What I thought was scary like dynamic typing turns out to hardly matter at all (provided the the code is well written of course, otherwise it's hell).&lt;br /&gt;&lt;br /&gt;Then the new concepts that I found from scripting languages like strong vs weak typing, dynamic vs static typing, list comprehension, functional programming, closures, map, etc. It's just so cool.&lt;br /&gt;&lt;br /&gt;I thought I need to tune my brain to different way of thinking when programming in scripting language. Turns out I'm doing alright. What needs tweaking is the way I tried to solve a problem, apparently. I think I need to zoom out and see things as a whole.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-5290170140389838375?l=codeftw.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/q9zuFP4ChQY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/5290170140389838375/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=5290170140389838375" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/5290170140389838375?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/5290170140389838375?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/q9zuFP4ChQY/python-makes-you-fly.html" title="Python makes you fly" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2007/12/python-makes-you-fly.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0IASXY-cSp7ImA9WB9QEEs.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-8246245553028963762</id><published>2007-10-22T22:47:00.000+08:00</published><updated>2007-10-22T23:05:48.859+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-10-22T23:05:48.859+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="widget" /><title>Netvibes widget is going multi platform, really</title><content type="html">I'm happy &lt;a href="http://dev.netvibes.com/blog/2007/10/20/uwa-widgets-now-available-on-windows-vista-and-livecom/"&gt;they did so&lt;/a&gt;. I thought the Universal in UWA (Universal Widget API) only means Netvibes, iGoogle, and Apple Dashboard.&lt;br /&gt;&lt;br /&gt;I was considering to come up with iGoogle version of my &lt;a href="http://codeftw.blogspot.com/2007/07/f1-standings-widget.html"&gt;F1 Standings Widget&lt;/a&gt; since iGoogle seems to have more users. In fact, I have a working version already, just need to touch up a bit.&lt;br /&gt;&lt;br /&gt;It makes my Netvibes effort all worth it now that the widgets are available for these platforms:&lt;br /&gt;&lt;img src="http://htimage.googlepages.com/netvibes-platforms.jpg" alt="Netvibes Platforms" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;Upcoming is Yahoo! Widgets (formerly Konfabulator). Go for it!&lt;br /&gt;&lt;br /&gt;Now, how can I publish my widgets to all these platforms?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-8246245553028963762?l=codeftw.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/yV_HtKNsaJw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/8246245553028963762/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=8246245553028963762" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/8246245553028963762?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/8246245553028963762?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/yV_HtKNsaJw/netvibes-widget-is-going-multi-platform.html" title="Netvibes widget is going multi platform, really" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2007/10/netvibes-widget-is-going-multi-platform.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMARHw6eCp7ImA9WB9RF08.&quot;"><id>tag:blogger.com,1999:blog-7396374313002634273.post-4329701078605019034</id><published>2007-10-18T23:58:00.000+08:00</published><updated>2007-10-19T00:20:45.210+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-10-19T00:20:45.210+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><title>When conditionally deleting from a list, iterate backward</title><content type="html">My ex colleague once told me, if you need to delete some element of a list or array based on some condition, iterate though the list backward. That way, the index will remain the same while traversing the list. Never been in that situation, I thought.&lt;br /&gt;&lt;br /&gt;I was faced with this problem recently and thinking about how to solve it, it seems not so straight forward. Then I remembered that advice. Problem solved, yay.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7396374313002634273-4329701078605019034?l=codeftw.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeFtw/~4/qc8G3nv_tm8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://codeftw.blogspot.com/feeds/4329701078605019034/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=7396374313002634273&amp;postID=4329701078605019034" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/4329701078605019034?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7396374313002634273/posts/default/4329701078605019034?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodeFtw/~3/qc8G3nv_tm8/when-conditionally-deleting-from-list.html" title="When conditionally deleting from a list, iterate backward" /><author><name>Hendy Tanata</name><uri>http://www.blogger.com/profile/12970275896974540871</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="02129392912091862681" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://codeftw.blogspot.com/2007/10/when-conditionally-deleting-from-list.html</feedburner:origLink></entry></feed>
