<?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>Gradual Epiphany &#187; General</title>
	<atom:link href="http://dizzyd.com/blog/post/category/general/feed" rel="self" type="application/rss+xml" />
	<link>http://dizzyd.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 22 Feb 2010 15:01:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using Innostore with Riak</title>
		<link>http://dizzyd.com/blog/post/214</link>
		<comments>http://dizzyd.com/blog/post/214#comments</comments>
		<pubDate>Sat, 20 Feb 2010 23:49:43 +0000</pubDate>
		<dc:creator>dizzyd</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://dizzyd.com/blog/?p=214</guid>
		<description><![CDATA[Innostore is an Erlang application that provides an API for storing and retrieving key/value data using the InnoDB storage system. This storage system is the same one used by MySQL for reliable, transactional data storage. It's a proven, fast system and perfect for use with Riak if you have a large amount of data to [...]]]></description>
			<content:encoded><![CDATA[<p>Innostore is an Erlang application that provides an API for storing and retrieving key/value data using the InnoDB storage system. This storage system is the same one used by MySQL for reliable, transactional data storage. It's a proven, fast system and perfect for use with Riak if you have a large amount of data to store.  Let's take a look at how you can use Innostore as a backend for Riak.</p>
<p>(Note: I assume that you have successfully built an instance of Riak for your platform. If you built Riak from source in ~/riak, then set $RIAK to ~/riak/rel/riak.")</p>
<p>We first get started by grabbing a stable release of Innostore. You'll need to download the source for a release from: <code>http://bitbucket.org/basho/innostore/downloads/</code></p>
<p>Looking in the "Tags &#038; snapshots" section, you should download the source for the highest available RELEASE_* tag. In my case, RELEASE_4 is the most recent release, so I'll grab the bz2 file associated with it:<br />
<code></p>
<p>http://bitbucket.org/basho/innostore/get/RELEASE_4.tar.bz2</p>
<p></code></p>
<p>Once I have the source code, it's time to unpack it and build:<br />
<code><br />
$ tar -xjf innostore-RELEASE_4.tar.bz2<br />
$ cd innostore<br />
$ make<br />
</code></p>
<p>Depending on the speed of the machine you are building on, this may take a few minutes to complete. At the end, you should see a series of unit tests run, with the output ending:<br />
<code><br />
=======================================================<br />
  All 7 tests passed.<br />
100222  7:43:58  InnoDB: Shutdown completed; log sequence number 90283<br />
Cover analysis: /Users/dizzyd/src/public/innostore/.eunit/index.html<br />
</code></p>
<p>Now that we have successfully built innostore, it's time to install it into the Riak distribution:<br />
<code><br />
$ ./rebar install target=$RIAK/lib<br />
</code><br />
If you look in the $RIAK/lib directory now, you should see the innostore-4 directory alongside a bunch of .ez files and other directories which compose the Riak release.</p>
<p>Now, we need to tell Riak to use the innostore driver as a backend. Make sure Riak is not running. Edit $RIAK/etc/app.config, setting the value for "storage_backend" as follows:<br />
<code><br />
{storage_backend, innostore_riak},<br />
</code><br />
In addition, append the configuration for the Innostore application after the SASL section:<br />
<code><br />
{sasl, [ ....<br />
          ]},    %% < -- make sure you add a comma here!!</p>
<p>{innostore, [<br />
             {data_home_dir,            "data/innodb"}, %% Where data files go<br />
             {log_group_home_dir,       "data/innodb"}, %% Where log files go<br />
             {buffer_pool_size,         2147483648}     %% 2G in-memory buffer in bytes<br />
             ]}<br />
</code><br />
You may need to adjust the directories for your data_home_dir and log_group_home_dirs to match where you want the inno data and log files to be stored. If possible, make sure that the data and log dirs are on separate disks -- this can yield much better performance.</p>
<p>Once you've completed the changes to $RIAK/etc/app.config, you're ready to start Riak:<br />
</code><code><br />
$ $RIAK/bin/riak console<br />
</code><br />
As it starts up, you should see messages from Inno that end with something like:</p>
<p>100220 16:36:58  InnoDB: highest supported file format is Barracuda.<br />
100220 16:36:58 Embedded InnoDB 1.0.3.5325 started; log sequence number 45764</p>
<p>That's it! You're ready to start using Riak for storing truly massive amounts of data.</p>
]]></content:encoded>
			<wfw:commentRss>http://dizzyd.com/blog/post/214/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>1.44 am</title>
		<link>http://dizzyd.com/blog/post/210</link>
		<comments>http://dizzyd.com/blog/post/210#comments</comments>
		<pubDate>Thu, 18 Feb 2010 09:25:57 +0000</pubDate>
		<dc:creator>dizzyd</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://dizzyd.com/blog/?p=210</guid>
		<description><![CDATA[It's 1.44 am. Woke up feeling weird; then my mind went running, afraid of what it might find.
I was diagnosed with follicular lymphoma three weeks ago now. 
I'm blessed in a lot of ways. The cancer is slow moving, non aggressive -- or so it appears at this point. I might not even require treatment [...]]]></description>
			<content:encoded><![CDATA[<p>It's 1.44 am. Woke up feeling weird; then my mind went running, afraid of what it might find.</p>
<p>I was diagnosed with follicular lymphoma three weeks ago now. </p>
<p>I'm blessed in a lot of ways. The cancer is slow moving, non aggressive -- or so it appears at this point. I might not even require treatment in the near future. Even if I do require treatment, survival rates have jumped from 60% to 90% in the past five years -- the treatment for this cancer is progressing quickly. My company, Basho, has been wonderful to me in terms of helping me sort out a variety of insurance issues and arranging access to very good doctors. </p>
<p>All of these things are probably the reason I've not had any trouble sleeping until tonight.</p>
<p>It's still scary though. Cancer -- just the word inspires fear when you first hear it. You are struck, relatively quickly, with the fragility and preciousness of life. You suddenly have a deep desire to grow old. The prospect of death is a powerful incentive to live.</p>
<p>I cried more the first few days and weeks than I ever have in my 32 years. I cried because I was scared. I cried because I was worried about my wife, our 2 year old and the new baby on the way. I cried because it felt unfair, unwarranted! I cried because I realized that there were some areas of my life that I had wasted -- and I wondered if I would have the chance to rectify them. </p>
<p>As I've gotten further into this process, emotions have settled out a bit. I realize now just how good I have it with this cancer. What I'm facing is absolutely nothing compared to other people I know with chronic medical conditions. It's a smudge on the screen; a minor distraction. There might be some tough times ahead, but my overall probability for immediate mortality is relatively stable and low.</p>
<p>That said, I'm determined to make the most of this challenge. If I must go through this valley, I'm going to extract every bit of growth from it that I can. I choose to grow, to push my boundaries in every dimension: physically, spiritually, mentally, emotionally.  I choose to spend more time with my family and less time with wandering the mental spaces of coding. I choose to listen more and speak less. I choose to be grateful that all of these realizations have been granted to me at 32 instead of 64. </p>
<p>It's now 2.21 am. I think it was just the Chinese food from dinner that woke me up. </p>
]]></content:encoded>
			<wfw:commentRss>http://dizzyd.com/blog/post/210/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Rebar</title>
		<link>http://dizzyd.com/blog/post/194</link>
		<comments>http://dizzyd.com/blog/post/194#comments</comments>
		<pubDate>Sun, 10 Jan 2010 14:06:36 +0000</pubDate>
		<dc:creator>dizzyd</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://dizzyd.com/blog/?p=194</guid>
		<description><![CDATA[Over the past two months, I've been busy taking the lessons learned from erlbox and designing a pure Erlang build tool called rebar. While erlbox is a very complete toolkit of rake functions for building Erlang code, it has a couple of significant problems. First off, the external dependency on rake is often a significant [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past two months, I've been busy taking the lessons learned from <a href="http://dizzyd.com/blog/post/122">erlbox</a> and designing a pure Erlang build tool called <a href="http://hg.basho.com/rebar">rebar</a>. While erlbox is a very complete toolkit of rake functions for building Erlang code, it has a couple of significant problems. First off, the external dependency on rake is often a significant problem for developers who are not conversant in Ruby. While anyone can learn Ruby, if you're an Erlang developer you likely have other tasks to attend to than learning a language solely for the purpose of maintaining your build system. The other significant problem with erlbox is that it spends a lot of time going in/out of Erlang to do "Erlangy" sorts of checks -- like parsing/validating the .app file, running eunit, etc. This leads to erlbox being a relatively slow build system, not to mention a little awkward to maintain since it was an odd mix of Ruby and invocations of Erlang.</p>
<p>Thus, rebar was born. As a strictly Erlang implementation, it's possible for Erlang developers to dig into it and improve/modify with minimal effort. It's also wickedly fast, since it starts the VM up only once and has direct access to all the tools one needs to build and validate Erlang code. It has the added advantage of being able to take advantage of Erlang's inherent parallelism, so where possible, it runs commands concurrently. Finally, it's designed to be a self-contained escript, so using rebar doesn't introduce any build dependencies other than a stock Erlang install. You simply drop the rebar script into your code tree and go!</p>
<p>You can see a demonstration of converting an existing app to rebar <a href="http://vimeo.com/8311407">here</a>. </p>
<p>Create and compile a simple OTP application by doing the following steps on a terminal:<br />
<code><br />
$ mkdir myapp; cd myapp<br />
$ wget http://bitbucket.org/basho/rebar/downloads/rebar; chmod u+x rebar<br />
$ ./rebar create-app appid=myapp<br />
$ ./rebar compile<br />
</code></p>
<p>Documentation is still scarce -- that's something I'm going to be working on over the next few weeks. The core pieces of rebar are mostly at a point that I'm happy with; now it's time to polish. <img src='http://dizzyd.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If you have questions about rebar, or especially feedback after using it IRL, please ping me on Freenode IRC -- I'm typically in the #riak room.</p>
]]></content:encoded>
			<wfw:commentRss>http://dizzyd.com/blog/post/194/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Further thoughts on Dynamo&#8217;s &#8220;flawed architecture&#8221;</title>
		<link>http://dizzyd.com/blog/post/184</link>
		<comments>http://dizzyd.com/blog/post/184#comments</comments>
		<pubDate>Tue, 03 Nov 2009 18:53:44 +0000</pubDate>
		<dc:creator>dizzyd</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://dizzyd.com/blog/?p=184</guid>
		<description><![CDATA[Mr. Sarma revisits his claims that Dynamo is a universally "flawed architecture". I certainly concur that Dynamo has its flaws, but making sweeping claims about something being universally so is to under-value the contribution to production thinking that Dynamo contributes. So, once again, I'm going to take a few choice quotes from Mr. Sarma and [...]]]></description>
			<content:encoded><![CDATA[<p>Mr. Sarma <a href="http://jsensarma.com/blog/2009/11/dynamo-part-i-a-followup-and-re-rebuttals/">revisits</a> his claims that Dynamo is a universally "flawed architecture". I certainly concur that Dynamo has its flaws, but making sweeping claims about something being universally so is to under-value the contribution to production thinking that Dynamo contributes. So, once again, I'm going to take a few choice quotes from Mr. Sarma and respond to them.</p>
<blockquote><p>
However, i remain convinced that one should not force clients to deal with stale reads in<br />
environments where they can be avoided. As i have mentioned in the updated initial post - there<br />
are simple examples where stale reads cause havoc. One may not be able to do conflict<br />
resolution or the reads can affect other keys in ways that are hard to fix later.
</p></blockquote>
<p>Arguing applications "may not be able to do conflict resolution" is non-sensical -- by definition, Dynamo requires that the application be cognizant of conflict resolution! This isn't an arbitrary decision to make clients aware of conflicts. It's a part of a measured approach to building a robust system. One may not agree with it, but to claim that Dynamo is universally flawed just because it does not conform with one's personal feeling about layering is dis-ingenous at best. </p>
<p>Please understand me, I make no claim that Dynamo is the end-all-be-all for data stores. It is a terrible, terrible choice for some problem spaces. However, if you want a low-latency, highly-robust key/value store it works quite well. </p>
<blockquote><p>
About Vector Clocks and multiple versions - it’s not a surprise that they were not<br />
implemented in Cassandra. In Cassandra - the cost of having to retrieve many versions of a key<br />
increases the disk seek costs reads multi-fold. Due to the usage of LSM trees, a disk seek may<br />
be required for each file that has a version of the key. Even though the versions may not<br />
require reconciliation, one still has to read them.
</p></blockquote>
<p>This is an argument about implementation details of Cassandra and has nothing to do with whether or not Dynamo is a universally flawed architecture. I can say from experience that vector clocks do not have to be slow -- as with anything, careful implementation can yield surprisingly fast results. I would also note that in the production systems where I've deployed Dynamo-clones, the actual occurrence of multiple versions (or conflicts, in Dynamo terms) is quite rare. The original Dynamo paper (sect 6.3, para 3) notes that 99.94% of all requests return a single version; this matches closely with what I've observed in my own production deployments today (99.91%). </p>
<p>Also, implementation-wise, one doesn't typically keep resolved versions lying around -- the only time there are multiple versions present on disk is when a conflict has not been<br />
resolved. One _could_ keep old versions around, I suppose, and in that situation I agree that you would want to carefully design your store so as to avoid unnecessary seeks when reading the "current" version.</p>
<blockquote><p>
So, unfortunately, i am repeating this yet again - Dynamo’s quorum consensus<br />
protocol seems fundamentally broken. How can one write outside the quorum group and claim a<br />
write quorum? And when one does so - how can one get consistent reads without reading every<br />
freaking replica all the time? (well - the answer is - one doesn’t - which is why Dynamo is<br />
eventually consistent. I just hope that users/developers of Dynamo clones realize this now).
</p></blockquote>
<p>As Mr. Sarma astutely points out, the reason Dynamo works is because it makes no guarantees about instantaneous consistency. Assuming (again) that the client can tolerate conflicts and that the cluster will attempt to resync at the earliest possible opportunity, writing to non-authoritative nodes is perfectly fine. The system will _eventually_ come back into consensus.</p>
<p>Unfortunately, I'm pretty sure that my arguments will be insufficient to convince Mr. Sarma of the utility of Dynamo. I hope, however, that anyone reading this discussion will consider that reviewing the concepts of a paper is a very different task from executing on those concepts. As someone who has successfully executed ideas from that paper, I can assure Mr. Sarma that the concepts not only work, but they work surprisingly well. </p>
<p>Finally, the real contribution of the Dynamo paper is the balance that was struck between performance, reliability and pragmatism in the design of a production DHT. It underscores the importance of taking nothing for granted and being willing to consider counter-intutitive solutions to hard problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://dizzyd.com/blog/post/184/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Thoughts on Dynamo&#8217;s &#8220;flawed architecture&#8221;</title>
		<link>http://dizzyd.com/blog/post/172</link>
		<comments>http://dizzyd.com/blog/post/172#comments</comments>
		<pubDate>Sun, 01 Nov 2009 21:19:40 +0000</pubDate>
		<dc:creator>dizzyd</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://dizzyd.com/blog/?p=172</guid>
		<description><![CDATA[In general, I think it's a little inflammatory to make sweeping statements about the fitness of a given architecture. Every architecture has its flaws; it's an expected state when you are faced with diametrically opposing constraints. The real question that should be asked is whether or not an architecture solves the problems for which it [...]]]></description>
			<content:encoded><![CDATA[<p>In general, I think it's a little inflammatory to make sweeping statements about the fitness of a given architecture. Every architecture has its flaws; it's an expected state when you are faced with diametrically opposing constraints. The real question that should be asked is whether or not an architecture solves the problems for which it was designed in a reliable and efficient manner.</p>
<p>Joydeep Sarma posted an entry claiming that Dynamo is a <a href="http://jsensarma.com/blog/2009/11/dynamo-a-flawed-architecture-part-i/">"flawed architecture"</a>. I'm not really qualified to prove or disprove Mr. Sarma's claim, but having implemented a Dynamo clone, I think that he may be a little confused about how things work in these systems. What follows are a few quotes from his write-up followed by my own responses.</p>
<blockquote><p>
Let’s say that one is storing key-value pairs in Dynamo - where the value encodes a ‘list’. If<br />
Dynamo returns a stale read for a key and claims the key is missing, the application will<br />
create a new empty list and store it back in Dynamo. This will cause the existing key to be<br />
wiped out. Depending on how ’stale’ the read was - the data loss (due to truncation of the<br />
list) can be catastrophic. This is clearly unacceptable. No application can accept unbounded<br />
data loss - not even in the case of a Disaster.
</p></blockquote>
<p>Dynamo implementations protect against this scenario by using vector clocks. If we define a "stale read" as one which returns the key (or absence thereof) and an older vector clock, then any writes which use this older/non-existent vector clock will generate a conflict and the server will store two versions of the same key. The application then has the opportunity to resolve this conflict on the next read. When used in conjuction with quoroms for reads and writes, this approach proves to be exceedingly robust. </p>
<blockquote><p>
Dynamo starts by saying it’s eventually consistent - but then in Section 4.5. it claims<br />
a quorum consensus scheme for ensuring some degree of consistency. It is hinted that by setting<br />
the number of reads (R) and number of writes (W) to be more than the total number of replicas<br />
(N) (ie. R+W>N) - one gets consistent data back on reads. This is flat out misleading. On close<br />
analysis one observes that there are no barriers to joining a quorum group (for a set of<br />
keys). Nodes may fail, miss out on many many updates and then rejoin the cluster - but are<br />
admitted back to the quorum group without any resynchronization barrier. As a result, reading<br />
from R copies is not sufficient to give up-to-date data.
</p></blockquote>
<p>One of the foundational assumptions in the Dynamo system is that you define as many replicas as necessary to achieve your desired level of reliability. As with any replication based system, if you lose all of your replicas, there is no meaningful recovery. However, if we assume that you will always have some number of replicas functional, and we introduce an appropriate quorum on operations, we can identify those nodes which return stale data and repair them appropriately. In other words, it's perfectly possible not to have resync barrier on joining, yet still ensure consistency in the answers provided to the client.</p>
<p>It might be helpful to recall that there are three levels of repair: read-repairs, hinted handoffs and replica synchronization. Two of these three are done in near-real time, thus minimizing the actual drift between nodes. Read repair deals with stale data on a per key/operation basis; the coordinator for a request can identify nodes responding with stale data and update them accordingly, using responses from other less stale nodes. Hinted handoffs are a bulk operation that is done when a node rejoins the cluster -- the keys updated while the node was down are replayed (in essence) to the rejoining node. Replica sync is something that is typically done once a day and does require a traversal of all the data for a given partition. Tricks like Merkel trees, however, permit only the changed portion of the data to be exchanged, so in practice it's not nearly as expensive as one might imagine in the abstract.</p>
<blockquote><p>
Lack of point in time consistency at the surviving replica (that is evident in this scenario)<br />
is very problematic for most applications. In cases where one transaction (B) populates entites<br />
that refer to entities populated in previous transactions (A), the effect of B being applied to<br />
the remote replica without A being applied leads to inconsistencies that applications are<br />
typically ill equipped to handle (and doing so would make most applications complicated).
</p></blockquote>
<p>The Dynamo paper makes it very clear that applications do require more logic to deal with these situations. Yes, it's more work for the application, but in practice, it's not that bad. It's also important to point out that data dependencies are handled differently in these key/value stores than they are in a typical ACID environment. Usually apps will store the data in a denormalized form, so dependencies amongst key versions are minimal (if they exist at all). This makes it much easier to deal with conflicts as all the relevant data is on hand during the resolution phase.</p>
<p>I'll leave it to someone else to do a more exhaustive analysis of Mr. Samra's arguments. It's been my experience over the past 2 years that Dynamo is one of those systems that you really have to see in action (or implement it) to appreciate the wonderful elegance and resiliency of the design. It's certainly not a one-size-fits-all solution, but works very well in the appropriate problem space.</p>
]]></content:encoded>
			<wfw:commentRss>http://dizzyd.com/blog/post/172/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Drained</title>
		<link>http://dizzyd.com/blog/post/121</link>
		<comments>http://dizzyd.com/blog/post/121#comments</comments>
		<pubDate>Sun, 21 Dec 2008 05:00:38 +0000</pubDate>
		<dc:creator>dizzyd</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://dizzyd.com/blog/?p=121</guid>
		<description><![CDATA[The last portion of this year has been draining on many fronts. It's not a complaint -- just a statement. I was grading two classes, taking another and working full time. It was too much. I worked through everything, but at different times had to neglect things that I would have preferred to focus on. [...]]]></description>
			<content:encoded><![CDATA[<p>The last portion of this year has been draining on many fronts. It's not a complaint -- just a statement. I was grading two classes, taking another and working full time. It was too much. I worked through everything, but at different times had to neglect things that I would have preferred to focus on. </p>
<p>I am slowly recovering. Now in this slow, happy time of Christmas and New Year's I find myself without my normal drive. I feel empty and light; it's disturbing after the harried pace of the past 4 months. There are so many side projects that I want to work on, but simply can't find the energy or desire to focus on them. </p>
<p>Over the years I've come to realize that the creative expenditure of creating software comes at a price. I have a fixed capacity for creating software -- if I expend that capacity it requires time to refuel. In the interim, I can still create but at a much diminished pace, and typically with a much lower quality than what I am accustomed to. The best thing to do, typically, is NOT create. Wait, pause and be patient. Permit focus to drift until it's ready to snap back to laser precision for the next Push.</p>
<p>This post probably sounds like nonsense -- perhaps it is.</p>
]]></content:encoded>
			<wfw:commentRss>http://dizzyd.com/blog/post/121/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GTD and clarity</title>
		<link>http://dizzyd.com/blog/post/119</link>
		<comments>http://dizzyd.com/blog/post/119#comments</comments>
		<pubDate>Tue, 13 May 2008 20:16:51 +0000</pubDate>
		<dc:creator>dizzyd</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://dizzyd.com/blog/?p=119</guid>
		<description><![CDATA[I've recently been bitten by the "GTD":http://en.wikipedia.org/wiki/Getting_Things_Done bug. I'm not exactly a disorganized person -- I generally do get stuff done. What attracted me to the system is the core idea of striving for clarity of thought by eliminating (brain) clutter. 
I've always loved the feeling that I get when I lose myself to a [...]]]></description>
			<content:encoded><![CDATA[<p>I've recently been bitten by the "GTD":http://en.wikipedia.org/wiki/Getting_Things_Done bug. I'm not exactly a disorganized person -- I generally do get stuff done. What attracted me to the system is the core idea of striving for clarity of thought by eliminating (brain) clutter. </p>
<p>I've always loved the feeling that I get when I lose myself to a particularly challenging or fun piece of coding. It's that state of mind where you lose track of the passage of time and focus all your energies on turning ephemeral ideas into billions of electronic pulses. There is a clarity of thought in that state, and I would love to experience it more often.</p>
<p>The problem is, there is always clutter and noise. So, the logical question is, how does one eliminate these things and encourage a more constant state of clarity?</p>
<p>For myself, I've found that GTD is at least a starting point. It provides a framework on which to capture actions and ideas in a way that shunts the responsibility for tracking stuff from my brain to a more reliable store. As I've been consistently doing this for the past week, my list of actions/projects has grown far more rapidly than I would have ever thought. The amount of stuff that we juggle in our heads is truly prodigious -- no wonder the average attention span in our society is under 3 minutes.  </p>
]]></content:encoded>
			<wfw:commentRss>http://dizzyd.com/blog/post/119/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Breathe</title>
		<link>http://dizzyd.com/blog/post/118</link>
		<comments>http://dizzyd.com/blog/post/118#comments</comments>
		<pubDate>Fri, 14 Mar 2008 19:22:34 +0000</pubDate>
		<dc:creator>dizzyd</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://dizzyd.com/blog/post/118</guid>
		<description><![CDATA[Digits click,
Neuron to circuit, ideas flow;
Software breathes.
]]></description>
			<content:encoded><![CDATA[<p>Digits click,<br/><br />
Neuron to circuit, ideas flow;<br/><br />
Software breathes.</p>
]]></content:encoded>
			<wfw:commentRss>http://dizzyd.com/blog/post/118/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Morning</title>
		<link>http://dizzyd.com/blog/post/117</link>
		<comments>http://dizzyd.com/blog/post/117#comments</comments>
		<pubDate>Tue, 22 Jan 2008 16:04:32 +0000</pubDate>
		<dc:creator>dizzyd</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.dizzyd.com/blog/?p=117</guid>
		<description><![CDATA[Earl grey, hot. 
Morning brew, 
Happy soul.
]]></description>
			<content:encoded><![CDATA[<p>Earl grey, hot. <br/><br />
Morning brew, <br/><br />
Happy soul.</p>
]]></content:encoded>
			<wfw:commentRss>http://dizzyd.com/blog/post/117/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An emacs mini-hack</title>
		<link>http://dizzyd.com/blog/post/116</link>
		<comments>http://dizzyd.com/blog/post/116#comments</comments>
		<pubDate>Sun, 14 Oct 2007 15:34:42 +0000</pubDate>
		<dc:creator>dizzyd</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.dizzyd.com/blog/?p=116</guid>
		<description><![CDATA[There's been a whole host of changes in my life since my last blog post. I left "Ping":http://www.pingidentity.com back in August and am now working at "The Hive":http://thehive.com. My wife and I also welcomed our first child into the world a few weeks ago.  
At any rate, I'm now using emacs on a regular [...]]]></description>
			<content:encoded><![CDATA[<p>There's been a whole host of changes in my life since my last blog post. I left "Ping":http://www.pingidentity.com back in August and am now working at "The Hive":http://thehive.com. My wife and I also welcomed our first child into the world a few weeks ago. <img src='http://dizzyd.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>At any rate, I'm now using emacs on a regular basis for editing C/C++ code and got tired of switching buffers manually between header (.h/.hpp) and implementation (.c/.cpp) files. So I hacked a little lisp for my .emacs to make life better. Maybe someone else will find this useful too.. </p>
<pre><code>
;; Association list of extension -> inverse extension
(setq exts '(("cpp" . ("hpp" "h"))
             ("hpp" . ("cpp" "c"))
             ("h"   . ("cpp" "c"))))

;; Process the association list of extensions and find the last file
;; that exists
(defun find-other-file (fname fext)
  (dolist (value (cdr (assoc fext exts)) result)
    (if (file-exists-p (concat fname "." value))
        (setq result (concat fname "." value)))))

;; Toggle function that uses the current buffer name to open/find the
;; other file
(defun toggle-header-buffer()
  (interactive)
  (let ((ext (file-name-extension buffer-file-name))
        (fname (file-name-sans-extension buffer-file-name)))
    (find-file (find-other-file fname ext))))

;; Bind the toggle function to a global key
(global-set-key "\M-t" 'toggle-header-buffer)
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://dizzyd.com/blog/post/116/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
