<?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>Push cx &#187; email</title>
	<atom:link href="http://push.cx/tag/email/feed" rel="self" type="application/rss+xml" />
	<link>http://push.cx</link>
	<description>A traveling geek&#039;s blog on development, games, and the web</description>
	<lastBuildDate>Thu, 19 Apr 2012 20:39:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Inbox Zero</title>
		<link>http://push.cx/2009/inbox-zero</link>
		<comments>http://push.cx/2009/inbox-zero#comments</comments>
		<pubDate>Tue, 10 Nov 2009 02:16:57 +0000</pubDate>
		<dc:creator>Peter Harkins</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[inbox zero]]></category>
		<category><![CDATA[mutt]]></category>
		<category><![CDATA[sup]]></category>
		<category><![CDATA[to-do]]></category>

		<guid isPermaLink="false">http://push.cx/?p=669</guid>
		<description><![CDATA[A few minutes ago, for the first time in around a decade, I emptied my email inbox. I&#8217;ve been steadily whittling it down (or at least holding the line) for the last few months: catching up on mailing lists, responding to outstanding emails, admitting there&#8217;s some things that are so old I&#8217;m not going to [...]]]></description>
			<content:encoded><![CDATA[<p>
A few minutes ago, for the first time in around a decade, I emptied my email inbox. I&#8217;ve been steadily whittling it down (or at least holding the line) for the last few months: catching up on mailing lists, responding to outstanding emails, admitting there&#8217;s some things that are so old I&#8217;m not going to respond to them, and moving work items onto a proper to-do list. So I have an impressively boring screenshot:
</p>

<img src="http://push.cx/wp-content/uploads/2009/11/sup.png" alt="sup" title="sup" width="490" height="352" class="alignnone size-full wp-image-1229" />

<p>
Watching Merlin Mann&#8217;s <a href="http://push.cx/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2luYm94emVyby5jb20vaW5ib3h6ZXJvL3ZpZGVv">Inbox Zero</a> video and reading the <a href="http://push.cx/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2luYm94emVyby5jb20vYXJ0aWNsZXMv">preceeding articles</a> was the impetus for the final push to zero. It&#8217;s not that there&#8217;s anything I didn&#8217;t know in there. But there was the sense that it was not only possible but achievable.
</p>

<p>
So I immediately did what Mann suggested not to do and spent, oh, a full day changing email clients from <a href="http://push.cx/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL211dHQub3Jn">mutt</a> to <a href="http://push.cx/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N1cC5ydWJ5Zm9yZ2Uub3Jn">sup</a>. It sounds like an awesome amount of time-wasting, but I read the sup <a href="http://push.cx/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N1cC5ydWJ5Zm9yZ2Uub3JnL1BoaWxvc29waHkudHh0">philosophical statement</a> a while ago and it resonated:
</p>

<blockquote>
The problem with traditional clients like Mutt is that they deal with individual pieces of email. This places a high mental cost on the user for each incoming email, by forcing them to ask: Should I keep this email, or delete it? If I keep it, where should I file it? I&#8217;ve spent the last 10 years of my life laboriously hand-filing every email message I received and feeling a mild sense of panic every time an email was both &#8220;from Mom&#8221; and &#8220;about school&#8221;.
</blockquote>

<p>
The flip side of this is that once if you&#8217;ve set up automatic filters you have to remember to go check those folders, which is a habit I&#8217;ve never been able to form. And once I&#8217;ve ignored a folder for two weeks, hell, I&#8217;ll leave it another day or two, why hurry to find out if I missed out on something interesting or if I let someone down? Or three days. Or&#8230;
</p>

<p>
And so I&#8217;ve poured all of my email into sup&#8217;s index and started mercilessly hacking away at that last couple hundred messages I hadn&#8217;t yet dealt with. Read and delete, or archive, or note on my to-do list, or suck it up and start another email with &#8220;I&#8217;m sorry it took so long to get back to you&#8230;&#8221; And now it&#8217;s cleaned out, to my pleasant amazement.
</p>

<p>
There is, of course, the terrible chance I&#8217;ve missed something important, but I couldn&#8217;t let that risk of something getting lost in the upheavel continue to paralyze me. Perfect is the enemy of good. If you&#8217;ve been waiting on a reply from me about anything and didn&#8217;t get it in the last few minutes, I&#8217;m sorry, please let me know. And if you&#8217;ve thought about contacting me but haven&#8217;t because I did so poorly with the last few emails, I&#8217;m sorry, I&#8217;m going to keep trying to do better.
</p> <img src="http://push.cx/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=669" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://push.cx/2009/inbox-zero/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Command/Query Separation</title>
		<link>http://push.cx/2009/commandquery-separation</link>
		<comments>http://push.cx/2009/commandquery-separation#comments</comments>
		<pubDate>Thu, 26 Feb 2009 20:42:40 +0000</pubDate>
		<dc:creator>Peter Harkins</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[command/query separation]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[ListLibrary.net]]></category>
		<category><![CDATA[referential transparency]]></category>
		<category><![CDATA[threading]]></category>

		<guid isPermaLink="false">http://push.cx/?p=727</guid>
		<description><![CDATA[Objects contain both state (data) and methods, and methods should be classifiable into commands that change state and queries that introspect state. The principle of Command/Query Separation (CQS) expresses a design principle I&#8217;ve intuitively used as a rule of thumb. With the conscious consideration that comes from hearing it, I knew how to improve some [...]]]></description>
			<content:encoded><![CDATA[<p>
Objects contain both state (data) and methods, and methods should be classifiable into <em>commands</em> that change state and <em>queries</em> that introspect state. The principle of <a href="http://push.cx/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9Db21tYW5kLXF1ZXJ5X3NlcGFyYXRpb24=">Command/Query Separation</a> (CQS) expresses a design principle I&#8217;ve intuitively used as a rule of thumb. With the conscious consideration that comes from hearing it, I knew how to improve some of my own code.
</p>

<p>
I violated CQS in part of the design of ListLibrary.net (<a href="http://push.cx/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=LzIwMDkvc21hbGwtcGxhbnM=">mentioned here</a>). It was both beneficial and harmful (especially in debugging).
</p>

<a href="http://push.cx/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2xpc3RsaWJyYXJ5Lm5ldC9tdWQtZGV2Mi8yMDA5LzAxLzAwM3d3MERl"><img src="http://push.cx/wp-content/uploads/2009/02/example_thread.png" alt="Example Thread" title="Example Thread" width="482" height="186" class="alignnone size-full wp-image-730" /></a>

<p>
Emails are threaded together to show the flow of responses. In this example Chris, Mike, and Jon all responded directly to Tiago and there was a series of responses to Mike. It&#8217;s difficult to put these threads together well because email clients often don&#8217;t (accurately) include the metadata to specify the message an email is responding to. You sometimes just have to guess what goes where, and it&#8217;s further complicated by messages that are lost or (in date-organized archives) split off into other directories.
</p>

<p>
I started with the <a href="http://push.cx/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5qd3oub3JnL2RvYy90aHJlYWRpbmcuaHRtbA==">threading heuristic by JWZ</a>. It&#8217;s a well-described, often-implemented bit of code. I implemented in two steps: first, as messages are added, their references are examined to do some basic relatinships between them (JWZ&#8217;s step 1). The rest of the steps require more computation and are more likely to be invalidated as messages are added, so I do them lazily: the threading is calculated (and cached) when it&#8217;s requested&#8230; violating CQS. The query to list the threads in a message also acts as a command to generate them.
</p>

<p>
This is both a performance win (yes, I tested) and leads to better-threaded messages, using all available messages are in reduces the amount of ambiguous situations it has to guess at, which can persist even after adding other messages that would have resolved it. But it&#8217;s also a great way to make my life difficult in testing: when I insert debugging <em>queries</em> they can trigger <em>commands</em> that change the way messages are threaded. It creates <a href="http://push.cx/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9VbnVzdWFsX3NvZnR3YXJlX2J1ZyNIZWlzZW5idWdz">heisenbugs</a>, bugs that appear, disappear, or change when they are being debugged.
</p>

<p>
I was really frustrated by heisenbugs for a while: I need to violate CQS for performance, but I&#8217;m creating all this extra work for myself in the most complex piece of the codebase. The solution is to create <a href="http://push.cx/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9SZWZlcmVudGlhbF90cmFuc3BhcmVuY3lfKGNvbXB1dGVyX3NjaWVuY2Up">referentially transparent</a> query commands specifically for debugging. They&#8217;ll introspect on the internal data structures and present them in their raw forms without triggering threading (making them useless for non-debugging work, but that&#8217;s OK), and their tests can confirm this.
</p>

<p>
I find the CQS principle to be a really useful tool. Its application leads to better-designed and easier-test code, and its violation can indicate bad code (a <a href="http://push.cx/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2MyLmNvbS9jZ2kvd2lraT9Db2RlU21lbGw=">Code Smell</a>).
</p> <img src="http://push.cx/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=727" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://push.cx/2009/commandquery-separation/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

