<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>international geographic &#187; development</title>
	<atom:link href="http://www.chetanislazy.com/blog/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chetanislazy.com/blog</link>
	<description>ooh, shiny!</description>
	<lastBuildDate>Thu, 19 May 2011 04:16:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Profiling Java programs on OS X</title>
		<link>http://www.chetanislazy.com/blog/2011/05/18/profiling-java-programs-on-os-x/</link>
		<comments>http://www.chetanislazy.com/blog/2011/05/18/profiling-java-programs-on-os-x/#comments</comments>
		<pubDate>Thu, 19 May 2011 04:15:01 +0000</pubDate>
		<dc:creator>chetan</dc:creator>
				<category><![CDATA[computers suck]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[profiling]]></category>
		<category><![CDATA[shark]]></category>
		<category><![CDATA[tptp]]></category>

		<guid isPermaLink="false">http://www.chetanislazy.com/blog/?p=282</guid>
		<description><![CDATA[Sounds easy, doesn&#8217;t it? Well it actually is quite simple but the error messages along the way can really trip you up! My first attempt at profiling a bit of code was to use the full-boat Eclipse stack: Eclipse Test &#038; Performance Tools Platform Project! Well, what they don&#8217;t tell you anywhere on the project [...]]]></description>
			<content:encoded><![CDATA[<p>Sounds easy, doesn&#8217;t it? Well it actually is quite simple but the error messages along the way can really trip you up!</p>
<p>My first attempt at profiling a bit of code was to use the full-boat Eclipse stack: <a href="http://www.eclipse.org/tptp/">Eclipse Test &#038; Performance Tools Platform Project</a>! Well, what they don&#8217;t tell you anywhere on the project page is that it&#8217;s only supported on Windows and Linux. A Mac port was started sometime around 2004 and never completed. Yeah, it&#8217;s been that long!</p>
<p>And so this brings us to Apple&#8217;s <a href="http://developer.apple.com/tools/sharkoptimize.html">Shark</a>: an extremely barebones, no-frills profiler, but, what the heck, it&#8217;s free. For the basics on using this tool with your Java app, this <a href="http://ninjamonkeys.co.za/2008/02/21/java-performance-profiling-on-mac-for-free-using-shark/">great post</a> has all the details. There&#8217;s just one catch: 64-bit support. There is none. If you&#8217;re on a 64-bit stack and you try to run it, you&#8217;ll see something like the following:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">$ java -agentlib:Shark -cp foo.jar com.foo.Bar
Error occurred during initialization of VM
Could not find agent library: libShark.jnilib (searched /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries:/System/Library/Java/Extensions:/Library/Java/Extensions:.)</pre></div></div>

<p>Er, what? Now let&#8217;s see here&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">$ ls -al /System/Library/Java/Extensions/libShark.jnilib 
-rwxr-xr-x 1 root wheel 50352 Oct 24  2010 /System/Library/Java/Extensions/libShark.jnilib</pre></div></div>

<p>Well, that&#8217;s odd. But it said it looked there, right?! Well, as it turns out, the Shark JNI library only supports 32-bit JVMs. So finally, we arrive at the following:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">$ java -d32 -agentlib:Shark -cp foo.jar com.foo.Bar
2011-05-18 23:05:20.756 java[84473:20f] Shark for Java enabled...</pre></div></div>

<p>Great sucess! And now, back to work, just a little less sane&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chetanislazy.com/blog/2011/05/18/profiling-java-programs-on-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An easy way to browse HDFS clusters</title>
		<link>http://www.chetanislazy.com/blog/2010/12/30/an-easy-way-to-browse-hdfs-clusters/</link>
		<comments>http://www.chetanislazy.com/blog/2010/12/30/an-easy-way-to-browse-hdfs-clusters/#comments</comments>
		<pubDate>Thu, 30 Dec 2010 15:05:21 +0000</pubDate>
		<dc:creator>chetan</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[hadoop]]></category>
		<category><![CDATA[hdfs]]></category>
		<category><![CDATA[mucommander]]></category>

		<guid isPermaLink="false">http://www.chetanislazy.com/blog/?p=222</guid>
		<description><![CDATA[After spending the better part of a day trying to get HDFS to mount on my Mac, I finally gave up. Luckily, I was able to find MuCommander, a cross-platform Java port of the Norton Commander of old, and as luck would have it, it supports HDFS in the latest version! Very handy for quickly [...]]]></description>
			<content:encoded><![CDATA[<p>After spending the better part of a day trying to get <a href="http://wiki.apache.org/hadoop/MountableHDFS">HDFS to mount</a> on my Mac, I finally gave up. Luckily, I was able to find <a href="http://www.mucommander.com/">MuCommander</a>, a cross-platform Java port of the Norton Commander of old, and as luck would have it, it supports HDFS in the latest version! Very handy for quickly browsing your HDFS clusters if you can&#8217;t mount it or don&#8217;t have the Hadoop toolset installed. </p>
<p><img src="http://content.screencast.com/users/csarva/folders/Jing/media/c40b1b47-9965-464f-8caa-6366b3f57389/00000053.png" class="border" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chetanislazy.com/blog/2010/12/30/an-easy-way-to-browse-hdfs-clusters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Distributing JARs for Map/Reduce jobs via HDFS</title>
		<link>http://www.chetanislazy.com/blog/2010/12/29/distributing-jars-for-mapreduce-jobs-via-hdfs/</link>
		<comments>http://www.chetanislazy.com/blog/2010/12/29/distributing-jars-for-mapreduce-jobs-via-hdfs/#comments</comments>
		<pubDate>Thu, 30 Dec 2010 02:59:27 +0000</pubDate>
		<dc:creator>chetan</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[hadoop]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.chetanislazy.com/blog/?p=217</guid>
		<description><![CDATA[Hadoop has a built-in feature for easily distributing JARs to your worker nodes via HDFS but, unfortunately, it&#8217;s broken. There&#8217;s a couple of tickets open with a patch again 0.18 and 0.21 (trunk) but for some reason they still haven&#8217;t been committed yet. We&#8217;re currently running 0.20 so the patch does me no good anyway. [...]]]></description>
			<content:encoded><![CDATA[<p>Hadoop has a <a href="http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/filecache/DistributedCache.html#addArchiveToClassPath(org.apache.hadoop.fs.Path,%20org.apache.hadoop.conf.Configuration)">built-in feature</a> for easily distributing JARs to your worker nodes via HDFS but, unfortunately, it&#8217;s <a href="https://issues.apache.org/jira/browse/MAPREDUCE-752">broken</a>. There&#8217;s a couple of tickets open with a patch again 0.18 and 0.21 (trunk) but for some reason they still haven&#8217;t been committed yet. We&#8217;re currently running 0.20 so the patch does me no good anyway. So here&#8217;s my simple solution:</p>
<p><script src="https://gist.github.com/759391.js"> </script></p>
<p>I essentially copied the technique used by ToolRunner when you pass a &#8220;libjars&#8221; argument on the command line. You simply pass the function the HDFS paths to the JAR files you want included and it&#8217;ll take care of the rest. </p>
<p>Example usage:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">int</span> run<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">Exception</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    JobConf job <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> JobConf<span style="color: #009900;">&#40;</span>getConf<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// ... job setup ...</span>
&nbsp;
    NerfUtils.<span style="color: #006633;">addJarsToJobClasspath</span><span style="color: #009900;">&#40;</span>job, 
        <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#123;</span> 
            <span style="color: #0000ff;">&quot;/libraries/java/solr-commons-csv-1.4.1.jar&quot;</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// ... more job setup ...</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">return</span> JobClient.<span style="color: #006633;">runJob</span><span style="color: #009900;">&#40;</span>job<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getJobState</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Might not be the prettiest or best solution but it works for me!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chetanislazy.com/blog/2010/12/29/distributing-jars-for-mapreduce-jobs-via-hdfs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Hadoop&#8217;s DistributedCache</title>
		<link>http://www.chetanislazy.com/blog/2010/12/28/using-hadoops-distributedcache/</link>
		<comments>http://www.chetanislazy.com/blog/2010/12/28/using-hadoops-distributedcache/#comments</comments>
		<pubDate>Tue, 28 Dec 2010 22:40:34 +0000</pubDate>
		<dc:creator>chetan</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[hadoop]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.chetanislazy.com/blog/?p=206</guid>
		<description><![CDATA[Using Hadoop&#8217;s DistributedCache mechanism is fairly straightforward, but as I&#8217;m finding is common with everything-Hadoop, not very well documented. Adding files When setting up your Job configuration: // Create symlinks in the job's working directory using the link name // provided below DistributedCache.createSymlink&#40;conf&#41;; &#160; // Add a file to the cache. It must already exist [...]]]></description>
			<content:encoded><![CDATA[<p>Using Hadoop&#8217;s DistributedCache mechanism is fairly straightforward, but as I&#8217;m finding is common with everything-Hadoop, not very well documented. </p>
<h3>Adding files</h3>
<p>When setting up your Job configuration:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Create symlinks in the job's working directory using the link name </span>
<span style="color: #666666; font-style: italic;">// provided below</span>
DistributedCache.<span style="color: #006633;">createSymlink</span><span style="color: #009900;">&#40;</span>conf<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Add a file to the cache. It must already exist on HDFS. The text</span>
<span style="color: #666666; font-style: italic;">// after the hash is the link name.</span>
DistributedCache.<span style="color: #006633;">addCacheFile</span><span style="color: #009900;">&#40;</span>
    <span style="color: #000000; font-weight: bold;">new</span> URI<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;hdfs://localhost:9000/foo/bar/baz.txt#baz.txt&quot;</span><span style="color: #009900;">&#41;</span>, conf<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>Accessing files</h3>
<p>Now that we&#8217;ve cached our file, let&#8217;s access it:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Direct access by name</span>
<span style="color: #003399;">File</span> baz <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">File</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;baz.txt&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// prints &quot;true&quot; since the file was found in the working directory</span>
<span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>baz.<span style="color: #006633;">exists</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;">// We can also get a list of all cached files</span>
Path<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> cached <span style="color: #339933;">=</span> DistributedCache.<span style="color: #006633;">getLocalCacheFiles</span><span style="color: #009900;">&#40;</span>conf<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> cached.<span style="color: #006633;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    Path path <span style="color: #339933;">=</span> cached<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #003399;">String</span> filename <span style="color: #339933;">=</span> path.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.chetanislazy.com/blog/2010/12/28/using-hadoops-distributedcache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using MySQL with JRuby</title>
		<link>http://www.chetanislazy.com/blog/2010/02/23/using-mysql-with-jruby/</link>
		<comments>http://www.chetanislazy.com/blog/2010/02/23/using-mysql-with-jruby/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 01:35:02 +0000</pubDate>
		<dc:creator>chetan</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jruby]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[reference]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.chetanislazy.com/blog/?p=139</guid>
		<description><![CDATA[For some reason, I had a relatively hard time finding this info all in one spot, so here it is: Using MySQL with JRuby is actually pretty easy (and no annoying arch issues on OS X! :-) Install GEMs (DBI, JDBC driver, DBI adapter): $ jgem install dbi jdbc-mysql dbd-jdbc Then use it! require 'dbi' [...]]]></description>
			<content:encoded><![CDATA[<p>For some reason, I had a relatively hard time finding this info all in one spot, so here it is:</p>
<p>Using MySQL with JRuby is actually pretty easy (and no annoying arch issues on OS X! :-)</p>
<p>Install GEMs (DBI, JDBC driver, DBI adapter):</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">$ jgem install dbi jdbc-mysql dbd-jdbc</pre></div></div>

<p>Then use it!</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'dbi'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'jdbc/mysql'</span>
dbh = DBI.<span style="color:#9900CC;">connect</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'dbi:jdbc:mysql://localhost:3306/test'</span>, <span style="color:#996600;">'root'</span>, <span style="color:#996600;">''</span>, 
                  <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">&quot;driver&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;com.mysql.jdbc.Driver&quot;</span> <span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.chetanislazy.com/blog/2010/02/23/using-mysql-with-jruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hooking app exit in Firefox extensions</title>
		<link>http://www.chetanislazy.com/blog/2010/02/10/hooking-app-exit-in-firefox-extensions/</link>
		<comments>http://www.chetanislazy.com/blog/2010/02/10/hooking-app-exit-in-firefox-extensions/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 23:44:16 +0000</pubDate>
		<dc:creator>chetan</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[extensions]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://www.chetanislazy.com/blog/?p=126</guid>
		<description><![CDATA[I&#8217;ve spent the last few days since joining Better Advertising working on a new feature for a Firefox extension called Ghostery. We&#8217;ll be announcing the new feature soon, but until then I thought I&#8217;d share some of what I&#8217;ve learned so far. I&#8217;ve never worked on an extension before but as it turns out, it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent the last few days since joining <a href="http://www.betteradvertising.com/">Better Advertising</a> working on a new feature for a Firefox extension called <a href="http://www.ghostery.com/">Ghostery</a>. We&#8217;ll be announcing the new feature soon, but until then I thought I&#8217;d share some of what I&#8217;ve learned so far. </p>
<p>I&#8217;ve never worked on an extension before but as it turns out, it&#8217;s really quite easy to pick up; some fairly simple XML (aka XUL) for composing the UI and JavaScript for the rest. One of the trickier bits has to do with scope. After doing some testing I figured out that the entry point into an extension is via the browser window; that is, your extension code will be executed each time you open a new window and that means that all your code is basically scoped to a single window. </p>
<p>In developing the new Ghostery feature I needed a way to run some code when the user quits Firefox. Luckily, the extension architecture is extremely flexible (if poorly documented at times) and I didn&#8217;t have to jump through any hoops to do it. Almost anything, it seems can be either chained or hooked in some way. In this case, the <a href="https://developer.mozilla.org/en/NsIObserverService">nsIObserverService</a> gives us access to the necessary <a href="https://developer.mozilla.org/en/Observer_Notifications">shutdown</a> event to which we can attach an observer using a simple interface. </p>
<p>The problem, then, was that since our code is run every time a new window is created, I needed a way to register the hook only once to avoid firing multiple times on exit. My first thought was to try to register the hook outside of the window scope (e.g. using a different chrome overlay) but that appeared to be a dead end. Using a globally scoped variable as a lock was also a dead end. In the end I settled on something I already knew how to use: preferences. Essentially, I created a simple lock around a preference variable which, while I don&#8217;t need to store it between sessions, is in fact a global storage area that can be accessed from different windows. </p>
<p>Check out the code below for an example implementation. I left out the actual <a href="https://developer.mozilla.org/en/Code_snippets/Preferences">preferences</a> code since it&#8217;s not crucial to understanding the solution.</p>
<p><script src="http://gist.github.com/300959.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chetanislazy.com/blog/2010/02/10/hooking-app-exit-in-firefox-extensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pointless rewrite? Probably.</title>
		<link>http://www.chetanislazy.com/blog/2008/08/06/pointless-rewrite-probably/</link>
		<comments>http://www.chetanislazy.com/blog/2008/08/06/pointless-rewrite-probably/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 21:41:29 +0000</pubDate>
		<dc:creator>chetan</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[philosophy]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.chetanislazy.com/blog/?p=66</guid>
		<description><![CDATA[Del.icio.us (sorry, it&#8217;s just plain old &#8220;Delicious&#8221; now) 2.0 finally launched a few days ago and the response so far has been mixed. But now that the dust has settled some, it&#8217;s time to think about just how we got here and if it was really worth all the trouble. According to the official blog [...]]]></description>
			<content:encoded><![CDATA[<p>Del.icio.us (sorry, it&#8217;s just plain old &#8220;Delicious&#8221; now) 2.0 <a href="http://www.techcrunch.com/2008/07/31/delicious-20-launches-really-it-totally-launched/">finally</a> <a href="http://blog.delicious.com/blog/2008/07/oh-happy-day.html">launched</a> a few days ago and the <a href="http://www.readwriteweb.com/archives/delicious_finally_launches_ver.php">response</a> so far <a href="http://furrier.org/2008/08/01/yahoo-launches-delicious-20-does-anyone-care/">has been</a> <a href="http://www.mathewingram.com/work/2008/07/31/delicious-20-who-bookmarks-any-more/">mixed</a>. But now that the dust has settled some, it&#8217;s time to think about just how we got here and if it was really worth all the <a href="http://venturebeat.com/2008/07/31/heres-delicious-20-what-on-earth-took-them-so-long/">trouble</a>. </p>
<p>According to the <a href="http://blog.delicious.com/blog/2008/07/oh-happy-day.html ">official blog post</a>, the new and improved Delicious brings us <em>speed</em>, <em>usability</em>, and oh so <em>good looks</em> among other features and it was a long time in the making. The Yahoo acquisition was <a href="http://blog.delicious.com/blog/2005/12/yahoo.html">announced</a> on Dec 9, 2005 and the new site finally went live a little over two and a half years later on July 31, 2008. So why did it take them so long?</p>
<p>A key change as a result of the Yahoo! acquisition was their decision to <a href="http://www.cincomsmalltalk.com/blog/blogView?showComments=true&#038;printTitle=The_Wages_of_Pointless_Rewrites&#038;entry=3394981268">rewrite the whole thing</a> <a href="http://www.symfony-project.org/blog/2007/10/02/delicious-preview-built-with-symfony">in PHP</a> using the <a href="http://www.symfony-project.org/">Symfony framework</a>, for no other reason than that it&#8217;s the current <a href="http://developers.slashdot.org/article.pl?sid=02/10/29/2052239">corporate standard at Yahoo!</a>. Oh, and, coincidentally, <a href="http://bookmarks.yahoo.com/">Yahoo! Bookmarks</a> was also built on PHP+Symfony. </p>
<p>So now it starts to make a bit of sense: you take a system being actively used by millions of users around the world and you start over from scratch with the goal of building it bigger and better, toss in a couple of hot buzzwords to meet Web 2.0 compliance guidelines, and before you know it 2 years have gone by. </p>
<p>I find it very hard to believe that with all the talent and the thousands of man years combined software development experience over there, that no one understands the pros and cons of rewriting vs refactoring a code base, especially given the enormous success of the service and the relatively trouble-free history as compared to, say, Twitter. </p>
<p>At the same time, I understand it all too well. From where I sit, and having been involved in a similar situation in the past as well as with my current employer, the decision to move to PHP was clearly not based on a <a href="http://www.1729.com/blog/EconomicsOfTestingUglyCode.html">cost/benefit analysis</a> of maintaing the current system. In fact, I wonder if they even understood what the real problems, if any, were with the existing system before deciding to not just rewrite it, but write it in another language. </p>
<p>Moving to <a href="http://www.codinghorror.com/blog/archives/001119.html">another language</a> is a pretty drastic step to take and will <a href="http://www.alleyinsider.com/2008/5/why_can_t_twitter_scale_blaine_cook_tries_to_explain">rarely</a> <a href="http://romeda.org/blog/2008/05/scalability.html">solve</a> your problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chetanislazy.com/blog/2008/08/06/pointless-rewrite-probably/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SimpleDB: MapReduce for the masses?</title>
		<link>http://www.chetanislazy.com/blog/2007/12/16/simpledb-mapreduce-for-the-masses/</link>
		<comments>http://www.chetanislazy.com/blog/2007/12/16/simpledb-mapreduce-for-the-masses/#comments</comments>
		<pubDate>Sun, 16 Dec 2007 19:32:17 +0000</pubDate>
		<dc:creator>chetan</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[madras]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.chetanislazy.com/blog/2007/12/16/simpledb-mapreduce-for-the-masses/</guid>
		<description><![CDATA[On Thursday, Amazon announced SimpleDB, &#8220;a web service for running queries on structured data in real time.&#8221; As many others have noted this more or less completes the cloud computing stack that Amazon has been steadily building, ever since they launched the Simple Storage Service (S3), early last year. Where their earlier releases (S3, Elastic [...]]]></description>
			<content:encoded><![CDATA[<p>On Thursday, Amazon <a href="http://www.amazon.com/b/ref=sc_fe_c_1_3435361_1?ie=UTF8&#038;node=342335011&#038;no=3435361&#038;me=A36L942TSJ2AJA">announced SimpleDB</a>, &#8220;a web service for running queries on structured data in real time.&#8221; As many <a href="http://gigaom.com/2007/12/14/amazon-simple-db/">others</a> have <a href="http://radar.oreilly.com/archives/2007/12/amazon_launches.html">noted</a> this more or less completes the cloud computing stack that Amazon has been steadily building, ever since they launched the <a href="http://aws.amazon.com/s3">Simple Storage Service</a> (S3), early last year.</p>
<p>Where their earlier releases (S3, <a href="http://www.amazon.com/b/ref=sc_fe_l_2?ie=UTF8&#038;node=201590011&#038;no=3435361&#038;me=A36L942TSJ2AJA">Elastic Compute Cloud</a> [EC2], <a href="http://www.amazon.com/b/ref=sc_fe_l_2?ie=UTF8&#038;node=342430011&#038;no=3435361&#038;me=A36L942TSJ2AJA">Flexible Payments</a>, <a href="http://www.amazon.com/Mechanical-Turk-AWS-home-page/b/ref=sc_fe_l_2?ie=UTF8&#038;node=15879911&#038;no=3435361&#038;me=A36L942TSJ2AJA">Mechanical Turk</a>) commoditized much of the infrastructure required for building scalable applications, SimpleDB (SDB) and the earlier <a href="http://www.amazon.com/Simple-Queue-Service-home-page/b/ref=sc_fe_l_2?ie=UTF8&#038;node=13584001&#038;no=3435361&#038;me=A36L942TSJ2AJA">Simple Queue Service</a> (SQS) are bringing cutting edge technologies and design patterns to the masses. First they made it cheap and easy to <em>have</em> a cluster; now they&#8217;ve made it cheap and easy to <em>use</em> a cluster! Amazing. </p>
<p>What&#8217;s even more startling is just how much Amazon <em>gets it</em>, and just how far off base Salesforce was earlier this year when they announced <a href="http://www.salesforce.com/platform/">Force.com</a>, as a &#8220;platform as a service&#8221;. </p>
<p>Then again, maybe they&#8217;re not even competing services at all.</p>
<p>Amazon is clearly providing services targeted towards developers and entrepreneurs with the goal of enabling them to explore new and innovative ideas by lowering the cost of entry. They&#8217;re providing the basic building blocks for developers to do exactly what they have done (and spent the last 10 years building) and they&#8217;re providing it at a very competitive price. </p>
<p>The Force.com proposition is different: they market to the same target audience but the selling point is not their tools &#8212; they offer a run of the mill JAVA-based platform &#8212; their selling point is the market that they can deliver. A built-in customer base of salesforce.com [enterprise] users and a marketplace for connecting those users with the applications they want. </p>
<p>But I digress. Amazon&#8217;s SimpleDB is an important, if small, step towards moving the web to column-oriented databases like Google&#8217;s <a href="http://en.wikipedia.org/wiki/BigTable">BigTable</a>, or the relatively unknown, opensource <a href="http://lucene.apache.org/hadoop/">Hadoop</a> project, now <a href="http://radar.oreilly.com/archives/2007/08/yahoos_bet_on_h.html">largely sponsored by Yahoo!</a>.</p>
<p>What sticks out to me most, however, is the choice of name. It&#8217;s called &#8220;SimpleDB&#8221; and yet it&#8217;s neither a &#8220;database&#8221;, as most would understand it, nor is the concept of a column-oriented database &#8220;simple&#8221;; it requires an orthogonal way of thinking. What <em>is</em> clear, however, is that the choice of name was a very deliberate move by Amazon to market this technology to the masses. It will take some time for developers to come around and see the light, but when they do, we&#8217;re in for another huge advance in dynamic web applications. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.chetanislazy.com/blog/2007/12/16/simpledb-mapreduce-for-the-masses/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>You call that content management?</title>
		<link>http://www.chetanislazy.com/blog/2007/02/07/you-call-that-content-management/</link>
		<comments>http://www.chetanislazy.com/blog/2007/02/07/you-call-that-content-management/#comments</comments>
		<pubDate>Wed, 07 Feb 2007 19:12:12 +0000</pubDate>
		<dc:creator>chetan</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.chetanislazy.com/blog/2007/02/07/you-call-that-content-management/</guid>
		<description><![CDATA[A large part of my job here at ICAR has been wrestling with various so-called content management systems (CMS). In an effort to build various applications I&#8217;ve been evaluating many popular opensource CMS projects and I&#8217;ve run into the same basic problem with just about all of them: I don&#8217;t want a blog, I want [...]]]></description>
			<content:encoded><![CDATA[<p>A large part of my job here at ICAR has been wrestling with various so-called <a href="http://en.wikipedia.org/wiki/Content_management_system">content management systems</a> (CMS). In an effort to build various applications I&#8217;ve been evaluating many popular opensource CMS projects and I&#8217;ve run into the same basic problem with just about all of them: I don&#8217;t want a blog, I want content management. They all claim to be flexible systems with all the latest doodads but in the end, they&#8217;re just glorified blogs. Case in point, almost every system sets itself up as a blog out of the box, and, in general, that&#8217;s the most complete part of the system. Other areas are sorely lacking.</p>
<p><span id="more-36"></span></p>
<p>Here&#8217;s a few of the systems I&#8217;ve looked at:</p>
<ul>
<li><a href="http://typo3.org/">typo3</a> &#8211; Our <a href="http://www.baselgovernance.org/icar">website</a>, which we inherited, runs on it.  It&#8217;s conceptually fairly good but suffers from an utterly unusable admin interface. Best of the bunch for non-blog sites, but the admin interface is just <i>that</i> bad.</li>
<li><a href="http://drupal.org/">Drupal</a> (5.1) &#8211; Right out of the gate, a poor experience &#8212; it failed to install, spewing error after error. I tried a couple more times, even checked out from CVS, to no avail. Eventually got it running after a <code>chown -R apache drupal/</code> but a day later it mysteriously would no longer let me login to the admin area.</li>
<li><a href="http://radiantcms.org/">RadiantCMS</a> &#8211; The only Ruby-based package I looked at. Building on the wonderful Ruby on Rails, this was a disappointment. It&#8217;s got CMS right there in the name but it&#8217;s still <a href="http://demo.radiantcms.org/">just a blog</a>.</li>
<li><a href="http://www.joomla.org/">Joomla!</a> (1.0.x, 1.5) &#8211; I initially toyed with 1.5 but found it to be still too early in the beta stage, with many (most?) extensions not yet compatible with it. I&#8217;ve since settled on the 1.0 series and that&#8217;s what I&#8217;m using now. It&#8217;s still far too blog-centric for my tastes but an attractive admin interface really goes a long way, especially when it comes time for the <i>users</i> to come in and screw everything up.</li>
</ul>
<p>So what&#8217;s wrong with all of these systems? They don&#8217;t handle content in a generic way. They all make assumptions about what kind of content you&#8217;re dealing with. A proper system should let me work with content from multiple disparate systems using a common interface and then put it all together however I see fit. </p>
<p>For instance, right now we&#8217;re building an application that combines content from a document management system, an online learning system, blogs, discussion boards, and news feeds and presents them all in a single application. In today&#8217;s CMS world, we would implement each of these features as some sort of extension or module where each would by default be completely independent from one another. Integrating them on the administration end is difficult if not impossible. In the end, you end up writing as much as code as you would have if you started from scratch.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chetanislazy.com/blog/2007/02/07/you-call-that-content-management/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

