<?xml version='1.0' encoding='utf-8' ?>
<!--  If you are running a bot please visit this policy page outlining rules you must respect. http://www.livejournal.com/bots/  -->
<rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/'>
<channel>
  <title>jkakar</title>
  <link>http://jkakar.livejournal.com/</link>
  <description>jkakar - LiveJournal.com</description>
  <lastBuildDate>Fri, 04 Jul 2008 00:20:03 GMT</lastBuildDate>
  <generator>LiveJournal / LiveJournal.com</generator>
  <lj:journal>jkakar</lj:journal>
  <lj:journaltype>personal</lj:journaltype>
  <image>
    <url>http://p-userpic.livejournal.com/43125596/9812331</url>
    <title>jkakar</title>
    <link>http://jkakar.livejournal.com/</link>
    <width>96</width>
    <height>96</height>
  </image>

<item>
  <guid isPermaLink='true'>http://jkakar.livejournal.com/3287.html</guid>
  <pubDate>Fri, 04 Jul 2008 00:20:03 GMT</pubDate>
  <title>Wed designer companies</title>
  <link>http://jkakar.livejournal.com/3287.html</link>
  <description>I&apos;m looking for a local (to Vancouver) web design company to work&lt;br /&gt;with me to improve the look and feel of Landscape.  Do you have any&lt;br /&gt;recommendations?</description>
  <comments>http://jkakar.livejournal.com/3287.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://jkakar.livejournal.com/2937.html</guid>
  <pubDate>Wed, 13 Feb 2008 17:25:28 GMT</pubDate>
  <title>Time of day</title>
  <link>http://jkakar.livejournal.com/2937.html</link>
  <description>The part about moving slowly like a relaxed cat sounds about right.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.the-n.com/games/quiz/3321&quot;&gt;&lt;img src=&quot;http://www.the-n.com/media/quiz/badges/timeofday_quiz/649.gif&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;</description>
  <comments>http://jkakar.livejournal.com/2937.html</comments>
  <category>meme</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://jkakar.livejournal.com/2605.html</guid>
  <pubDate>Mon, 14 Jan 2008 02:11:48 GMT</pubDate>
  <title>Analysis is hard</title>
  <link>http://jkakar.livejournal.com/2605.html</link>
  <description>After even further analysis, it turns out that using or not using ON&lt;br /&gt;DELETE CASCADE isn&apos;t the thing that really affects the time it takes&lt;br /&gt;to delete the data.  The speed-up is gained by using 3 separate&lt;br /&gt;statements to delete rows from child tables first followed by the&lt;br /&gt;parent table.  The same speed-up is present when ON DELETE CASCADE&lt;br /&gt;rules are present.</description>
  <comments>http://jkakar.livejournal.com/2605.html</comments>
  <category>postgres database</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://jkakar.livejournal.com/2487.html</guid>
  <pubDate>Sat, 05 Jan 2008 22:48:32 GMT</pubDate>
  <title>Database performance</title>
  <link>http://jkakar.livejournal.com/2487.html</link>
  <description>A couple of days ago I debugged a performance issue that was coming up&lt;br /&gt;when trying to remove rows from tables in a PostgreSQL database.&lt;br /&gt;There were three tables involved:&lt;br /&gt;&lt;pre&gt;
parent:
    id SERIAL PRIMARY KEY

child_a:
    id SERIAL PRIMARY KEY
    parent_id INTEGER NOT NULL ON DELETE CASCADE

child_b:
    id SERIAL PRIMARY KEY
    parent_id INTEGER NOT NULL ON DELETE CASCADE
&lt;/pre&gt;&lt;br /&gt;The parent table contained about 1400 rows, 700 of which I wanted to&lt;br /&gt;delete.  The child_a and child_b tables contained 5 million and 2&lt;br /&gt;million rows, respectively, related to the 700 parent rows I wanted to&lt;br /&gt;delete.  The first thing I did was run a delete query without changing&lt;br /&gt;anything about the schema.  The query took 198 minutes to run.&lt;br /&gt;&lt;br /&gt;The first obvious problem, exposed by PostgreSQL&apos;s EXPLAIN statement,&lt;br /&gt;was that the foreign key columns in the child tables weren&apos;t indexed.&lt;br /&gt;Running the same delete query took 97 minutes after adding indexes for&lt;br /&gt;the parent_id columns in the child_a and child_b tables.  A&lt;br /&gt;significant win, but still far too long.  It&apos;s not acceptable to run a&lt;br /&gt;query on our production servers that would effectively make the&lt;br /&gt;database unusable for 97 minutes.&lt;br /&gt;&lt;br /&gt;I dug further into PostgreSQL&apos;s EXPLAIN documentation and discovered&lt;br /&gt;EXPLAIN ANALYZE.  When the ANALYZE keyword is provided the query is&lt;br /&gt;executed to help produce a more detailed query plan.  Running the&lt;br /&gt;query with ANALYZE showed that a significant portion of the time was&lt;br /&gt;taken up with foreign key triggers.  I wondered if the issue was&lt;br /&gt;related to foreign key constraints.  I removed the constraints&lt;br /&gt;entirely and ran queries to remove the same set of data.  They ran in&lt;br /&gt;77 seconds.  What a huge performance gain!  I then wondered if the&lt;br /&gt;issue wasn&apos;t really with the foreign key constraints themselves but&lt;br /&gt;with the ON CASCADE DELETE rules.  I added the constraints back&lt;br /&gt;without the ON CASCADE DELETE rules and the delete query ran in 148&lt;br /&gt;seconds.  That&apos;s still fast enough without giving up the safety&lt;br /&gt;provided by foreign key checks.&lt;br /&gt;&lt;br /&gt;The conclusion is that ON CASCADE DELETE is not suitable for anything&lt;br /&gt;beyond very small datasets.</description>
  <comments>http://jkakar.livejournal.com/2487.html</comments>
  <category>postgres database</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://jkakar.livejournal.com/2144.html</guid>
  <pubDate>Sun, 25 Nov 2007 21:01:04 GMT</pubDate>
  <title>Quality is a habit</title>
  <link>http://jkakar.livejournal.com/2144.html</link>
  <description>The way I write software has evolved over time.  Over the years I&apos;ve&lt;br /&gt;learned a series of practices that are now core parts of the way I&lt;br /&gt;work.  I do branch-based development, which means I make small changes&lt;br /&gt;in short iterations so that I can start and complete a task in a&lt;br /&gt;matter of hours or days.  This keeps me motivated because I&apos;m&lt;br /&gt;constantly accomplishing little goals.  I do test-driven development,&lt;br /&gt;which means I write tests that my software has to pass before I&lt;br /&gt;consider it complete.  This builds self-validation into the software&lt;br /&gt;and helps me focus on the behaviour the software must implement to&lt;br /&gt;solve the problem I&apos;m tackling.  I participate in code reviews, which&lt;br /&gt;means other people look at the changes I&apos;ve made and give me feedback&lt;br /&gt;soon after I complete a task.  I&apos;m constantly learning from the people&lt;br /&gt;around me and am continually growing my overall knowledge of the&lt;br /&gt;software we work on.&lt;br /&gt;&lt;br /&gt;I have a theory that &quot;the things that contribute to quality need to be&lt;br /&gt;part of your daily work flow.&quot;  One of the key aspects of the&lt;br /&gt;practices I described above is that I apply them daily.  In software,&lt;br /&gt;and in life, problems tend to be harder to fix the longer we leave&lt;br /&gt;them unfixed.  As time goes on the problems become more and more&lt;br /&gt;deeply ingrained.  The practices above cause problems to be caught&lt;br /&gt;before they&apos;re hard to fix and a focus on quality encourages us to fix&lt;br /&gt;them before we move on.  I think this applies to most of the things&lt;br /&gt;people do.  You don&apos;t improve your health by eating a really healthy&lt;br /&gt;meal once-a-week.  Neither do you improve your fitness by exercising&lt;br /&gt;for several hours only on the weekend.  Learning anything is very&lt;br /&gt;difficult if you don&apos;t practice regularly.  Maintaining a friendship&lt;br /&gt;is hard if you don&apos;t have frequent contact.  I think that good habits,&lt;br /&gt;those that contribute to quality, are about course correction.  If you&lt;br /&gt;apply them frequently you stay on course because you are constantly&lt;br /&gt;correcting.  If you apply them infrequently you get some benefit but&lt;br /&gt;it&apos;s easier to veer off over time and end up on the wrong path.&lt;br /&gt;&lt;br /&gt;When I reflect on my life and identify things that I want to change&lt;br /&gt;I&apos;m increasingly asking myself the question, &quot;What do I need to change&lt;br /&gt;in my daily routine to realize the results I desire?&quot;</description>
  <comments>http://jkakar.livejournal.com/2144.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://jkakar.livejournal.com/1877.html</guid>
  <pubDate>Sat, 08 Sep 2007 01:06:01 GMT</pubDate>
  <title>Facebook</title>
  <link>http://jkakar.livejournal.com/1877.html</link>
  <description>Only a few hours after deactivating my Facebook account I&apos;ve gone and&lt;br /&gt;reactivated it.  I was walking to the studio today to play some drums&lt;br /&gt;and thinking about the whole thing when I realized that my decision to&lt;br /&gt;deactivate the account goes against my basic principles.  That is, I&lt;br /&gt;don&apos;t believe in making decisions based on fear of the unknown.  If&lt;br /&gt;you know something is dangerous, then sure, weigh the risks and make a&lt;br /&gt;decision about whether you want to go further.&lt;br /&gt;&lt;br /&gt;I think that making decisions based on the fear that some unknown bad&lt;br /&gt;thing might happen is a very negative way to live.  That kind of&lt;br /&gt;behaviour excludes a whole range of positive things that could happen.&lt;br /&gt;It also excludes bad things from happening.  No one wants bad things&lt;br /&gt;to happen, but on the other hand the only way you grow is to&lt;br /&gt;experience adversity and learn how to deal with it.  If you&apos;re&lt;br /&gt;comfortable you&apos;re probably not growing.  I want a positive attitude&lt;br /&gt;that treats adversity as an opportunity for growth.&lt;br /&gt;&lt;br /&gt;I believe an important part of this is having a soft mind.  By that I&lt;br /&gt;mean that it&apos;s important to have a mind able change when it discovers&lt;br /&gt;a better way to do things.  In this particular case the change is very&lt;br /&gt;trivial and easy.  Nonetheless, part of the reactivation is about,&lt;br /&gt;given that I realized my behaviour is not in line with the way I want&lt;br /&gt;to live, changing myself to be in line with how I want to be.</description>
  <comments>http://jkakar.livejournal.com/1877.html</comments>
  <category>facebook</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://jkakar.livejournal.com/1718.html</guid>
  <pubDate>Fri, 07 Sep 2007 03:50:22 GMT</pubDate>
  <title>Facebook</title>
  <link>http://jkakar.livejournal.com/1718.html</link>
  <description>I&apos;ve deactivated my Facebook account after less than two weeks of&lt;br /&gt;using it.  I&apos;m disappointed that it&apos;s deactivated and not removed.</description>
  <comments>http://jkakar.livejournal.com/1718.html</comments>
  <category>facebook</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://jkakar.livejournal.com/1335.html</guid>
  <pubDate>Wed, 05 Sep 2007 17:23:41 GMT</pubDate>
  <title>Discovering Ubuntu</title>
  <link>http://jkakar.livejournal.com/1335.html</link>
  <description>hsifyppah recently wrote about switching to Ubuntu and a few other&lt;br /&gt;people chimed in about running it.  The Ubuntu Screencast Team is&lt;br /&gt;doing cool stuff to try to make discovering Ubuntu easier,&lt;br /&gt;particularly this month.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://screencasts.ubuntu.com/&quot;&gt;http://screencasts.ubuntu.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Another good way to discover the going on in Ubuntu-land is to read&lt;br /&gt;Planet Ubuntu.  Planet Ubuntu aggregates blog posts from a variety of&lt;br /&gt;people involved in Ubuntu.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://planet.ubuntu.com/&quot;&gt;http://planet.ubuntu.com/&lt;/a&gt;</description>
  <comments>http://jkakar.livejournal.com/1335.html</comments>
  <category>ubuntu</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://jkakar.livejournal.com/1062.html</guid>
  <pubDate>Wed, 08 Aug 2007 22:20:43 GMT</pubDate>
  <title>Storm 0.10</title>
  <link>http://jkakar.livejournal.com/1062.html</link>
  <description>Storm is a Python ORM developed to satisfy the needs of the project I&lt;br /&gt;work on at Canonical.  It was recently released under the LGPL.  Those&lt;br /&gt;of you I&apos;ve been chatting up about it might be interested to know that&lt;br /&gt;the 0.10 release is available!&lt;br /&gt;&lt;br /&gt;Web site: &lt;a href=&quot;http://storm.canonical.com/&quot;&gt;http://storm.canonical.com/&lt;/a&gt;&lt;br /&gt;Downloads: &lt;a href=&quot;https://launchpad.net/storm/+download&quot;&gt;https://launchpad.net/storm/+download&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is the second release since the project was open sourced.  A&lt;br /&gt;community is already forming and submitting changesets!</description>
  <comments>http://jkakar.livejournal.com/1062.html</comments>
  <category>canonical storm python work</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://jkakar.livejournal.com/946.html</guid>
  <pubDate>Tue, 24 Jul 2007 05:32:43 GMT</pubDate>
  <title>Landscape!</title>
  <link>http://jkakar.livejournal.com/946.html</link>
  <description>I&apos;ve been working on a &quot;secret&quot; project at Canonical for the last 14&lt;br /&gt;months or so.  It&apos;s called Landscape.  It&apos;s a web-based system that&lt;br /&gt;allows administrators to manage networks of Ubuntu machines.  One of&lt;br /&gt;the cool things about it is that every operation is the same whether&lt;br /&gt;you want affect one machine or a hundred machines.  It was publicly&lt;br /&gt;announced yesterday at Ubuntu Live! in Portland and has been receiving&lt;br /&gt;some fanfare in the press:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://linux-watch.com/news/NS5288220442.html&quot;&gt;http://linux-watch.com/news/NS5288220442.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Yay!</description>
  <comments>http://jkakar.livejournal.com/946.html</comments>
  <category>canonical work</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://jkakar.livejournal.com/706.html</guid>
  <pubDate>Thu, 24 May 2007 16:29:46 GMT</pubDate>
  <title>Björk!</title>
  <link>http://jkakar.livejournal.com/706.html</link>
  <description>Björk dances like a crazy voodoo lady.  It&apos;s kind of scary.</description>
  <comments>http://jkakar.livejournal.com/706.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://jkakar.livejournal.com/502.html</guid>
  <pubDate>Fri, 11 May 2007 06:11:46 GMT</pubDate>
  <title>Hiccups</title>
  <link>http://jkakar.livejournal.com/502.html</link>
  <description>I&apos;ve had a harrowing episode of the hiccups today.  They were non-stop&lt;br /&gt;for six hours.  They came in spurts after that for several more hours.&lt;br /&gt;I think they&apos;re gone now.&lt;br /&gt;&lt;br /&gt;I hate hiccups.</description>
  <comments>http://jkakar.livejournal.com/502.html</comments>
  <category>hiccups</category>
  <lj:security>public</lj:security>
</item>
</channel>
</rss>
