<?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>depth first search &#187; computing</title>
	<atom:link href="http://www.depthfirstsearch.net/blog/category/computing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.depthfirstsearch.net/blog</link>
	<description>“We can only see a short distance ahead, but we can see plenty there that needs to be done.&#34;</description>
	<lastBuildDate>Sun, 05 Feb 2012 13:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Topics and Services in ROS</title>
		<link>http://www.depthfirstsearch.net/blog/2012/01/26/topics-and-services-in-ros/</link>
		<comments>http://www.depthfirstsearch.net/blog/2012/01/26/topics-and-services-in-ros/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 23:45:15 +0000</pubDate>
		<dc:creator>JS</dc:creator>
				<category><![CDATA[computer science]]></category>
		<category><![CDATA[computing]]></category>

		<guid isPermaLink="false">http://www.depthfirstsearch.net/blog/?p=2623</guid>
		<description><![CDATA[As an exercise, I wrote some code to translate between ROS topics and services. Both directions turned out to be somewhat tricky. For example, I had to use a condition variable to coordinate updating data from the topic (which is taken care of behind the scenes in ROS using a provided callback) with calls to [...]]]></description>
			<content:encoded><![CDATA[<p>As an exercise, I wrote some <a href="https://github.com/stober/topic_service">code</a> to translate between ROS <a href="http://www.ros.org/wiki/ROS/Tutorials/UnderstandingTopics">topics</a> and <a href="http://www.ros.org/wiki/ROS/Tutorials/UnderstandingServicesParams">services</a>. Both directions turned out to be somewhat tricky. For example, I had to use a condition variable to coordinate updating data from the topic (which is taken care of behind the scenes in ROS using a provided callback) with calls to the service. I couldn&#8217;t figure out whether the way the callback is used under the hood is thread safe, so there may be some extraneous locking in my solution.</p>
<p>Going the other direction is complicated by the fact that service request and response objects, which walk and talk like messages, aren&#8217;t actually messages. So populating a call to a service and reading the response requires specifying some code in advance that knows how to translate a service response into a proper message. You can&#8217;t use the response object as a topic message type directly since it&#8217;s not actually a visible message type and roscore will complain that it can&#8217;t find the message definition.</p>
<p>In general, it would be nice if services and messages could be specified dynamically, but I suspect that the performance requirements of serialization require that these be specified in advance and compiled.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.depthfirstsearch.net/blog/2012/01/26/topics-and-services-in-ros/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SOPA/PIPA Video of the Day</title>
		<link>http://www.depthfirstsearch.net/blog/2012/01/18/sopapipa-video-of-the-day/</link>
		<comments>http://www.depthfirstsearch.net/blog/2012/01/18/sopapipa-video-of-the-day/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 07:01:30 +0000</pubDate>
		<dc:creator>JS</dc:creator>
				<category><![CDATA[computing]]></category>
		<category><![CDATA[culture]]></category>
		<category><![CDATA[politics]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.depthfirstsearch.net/blog/?p=2619</guid>
		<description><![CDATA[This site is not going dark in protest because, well, this site isn&#8217;t exactly turning heads. Anyway, if you want to learn more take a look at the video below or read a good breakdown of the current bills here. Now for some pointless musing about what&#8217;s really going on. The point of SOPA/PIPA is [...]]]></description>
			<content:encoded><![CDATA[<p>This site is not going dark in protest because, well, this site isn&#8217;t exactly turning heads. Anyway, if you want to learn more take a look at the video below or read a good breakdown of the current bills <a href="http://blog.reddit.com/2012/01/technical-examination-of-sopa-and.html">here</a>. </p>
<p><center><br />
<iframe src="http://player.vimeo.com/video/31100268?title=0&#038;byline=0&#038;portrait=0" width="480" height="300" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe></center></p>
<p>Now for some pointless musing about what&#8217;s really going on. The point of SOPA/PIPA is not to combat piracy in the sense that most people understand it. I finally figured out what&#8217;s going on when I realized that for people supporting SOPA, the biggest internet pirate isn&#8217;t some torrent site like The Pirate Bay, it&#8217;s <a href="https://twitter.com/#!/rupertmurdoch/status/158321072943542272">Google</a>.</p>
<p>The &#8220;secret&#8221; plan isn&#8217;t to censor the internet, or take down pirate sites, or throw Google/Facebook/Wikipedia offline. The goal is to maximize revenue for existing intellectual property and the method is straightforward crony capitalism. </p>
<p>1. Finance political campaigns.<br />
2. Lobby for a laws that provide leverage.<br />
3. Negotiate lucrative blanket license agreements with major players.</p>
<p>Nobody in Hollywood cares about real piracy because most smart people realize that there isn&#8217;t a lot of money there. The people who use sites with pirated content aren&#8217;t easily converted into paying customers. This law will do nothing to shut down sites like The Pirate Bay or prevent people from using them. Instead, this law is aimed squarely at more lucrative targets, with the intention of facilitating a transfer of wealth from companies like Google/Facebook/Twitter to associations of content creators. </p>
<p>My prediction: If SOPA/PIPA pass then some form of step 3 won&#8217;t be far behind.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.depthfirstsearch.net/blog/2012/01/18/sopapipa-video-of-the-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In a Pickle</title>
		<link>http://www.depthfirstsearch.net/blog/2011/10/25/in-a-pickle/</link>
		<comments>http://www.depthfirstsearch.net/blog/2011/10/25/in-a-pickle/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 22:17:58 +0000</pubDate>
		<dc:creator>JS</dc:creator>
				<category><![CDATA[computing]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.depthfirstsearch.net/blog/?p=2590</guid>
		<description><![CDATA[I like IPython, but I&#8217;m not sure I understand it, and my lack of understanding has caused me some pain recently when a pickle file (Python object serialization for the uninitiated) would not open. I&#8217;m not even sure I&#8217;ve figured out how to reproduce the problem, but I did find a very simple example of [...]]]></description>
			<content:encoded><![CDATA[<p>I like IPython, but I&#8217;m not sure I understand it, and my lack of understanding has caused me some pain recently when a pickle file (Python object serialization for the uninitiated) would not open. I&#8217;m not even sure I&#8217;ve figured out how to reproduce the problem, but I did find a very simple example of some code that runs fine in Python but not IPython:</p>
<p><script src="https://gist.github.com/1314491.js?file=ipickle.py"></script></p>
<p>Running this with</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">python ipickle.py</pre></div></div>

<p> gives:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">stober<span style="color: #7a0874; font-weight: bold;">&#91;</span>~<span style="color: #000000; font-weight: bold;">/</span>Dropbox<span style="color: #000000; font-weight: bold;">/</span>workspace<span style="color: #000000; font-weight: bold;">/</span>gist<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>laptop<span style="color: #7a0874; font-weight: bold;">&#125;</span>$ python ipickle.py
<span style="color: #000000; font-weight: bold;">&lt;</span>__main__.A instance at 0x10cc37bd8<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>Running the same thing with IPython</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ipython ipickle.py</pre></div></div>

<p> produces decidedly different output:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">&nbsp;
stober<span style="color: #7a0874; font-weight: bold;">&#91;</span>~<span style="color: #000000; font-weight: bold;">/</span>Dropbox<span style="color: #000000; font-weight: bold;">/</span>workspace<span style="color: #000000; font-weight: bold;">/</span>gist<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>laptop<span style="color: #7a0874; font-weight: bold;">&#125;</span>$ ipython ipickle.py 
<span style="color: #660033;">---------------------------------------------------------------------------</span>
AttributeError                            Traceback <span style="color: #7a0874; font-weight: bold;">&#40;</span>most recent call <span style="color: #c20cb9; font-weight: bold;">last</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>stober<span style="color: #000000; font-weight: bold;">/</span>Dropbox<span style="color: #000000; font-weight: bold;">/</span>workspace<span style="color: #000000; font-weight: bold;">/</span>gist<span style="color: #000000; font-weight: bold;">/</span>ipickle.py <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">&lt;</span>module<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
     <span style="color: #000000;">16</span>     pickle.dump<span style="color: #7a0874; font-weight: bold;">&#40;</span>A<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, open<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">&quot;A.pck&quot;</span>,<span style="color: #ff0000;">&quot;w&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
     <span style="color: #000000;">17</span> 
---<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000;">18</span>     a = pickle.load<span style="color: #7a0874; font-weight: bold;">&#40;</span>open<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">&quot;A.pck&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
     <span style="color: #000000;">19</span>     print a
&nbsp;
<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Frameworks<span style="color: #000000; font-weight: bold;">/</span>Python.framework<span style="color: #000000; font-weight: bold;">/</span>Versions<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2.7</span><span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>python2.7<span style="color: #000000; font-weight: bold;">/</span>pickle.pyc <span style="color: #000000; font-weight: bold;">in</span> load<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">file</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
   <span style="color: #000000;">1376</span> 
   <span style="color: #000000;">1377</span> def load<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">file</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>:
-<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000;">1378</span>     <span style="color: #7a0874; font-weight: bold;">return</span> Unpickler<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">file</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>.load<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
   <span style="color: #000000;">1379</span> 
   <span style="color: #000000;">1380</span> def loads<span style="color: #7a0874; font-weight: bold;">&#40;</span>str<span style="color: #7a0874; font-weight: bold;">&#41;</span>:
&nbsp;
<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Frameworks<span style="color: #000000; font-weight: bold;">/</span>Python.framework<span style="color: #000000; font-weight: bold;">/</span>Versions<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2.7</span><span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>python2.7<span style="color: #000000; font-weight: bold;">/</span>pickle.pyc <span style="color: #000000; font-weight: bold;">in</span> load<span style="color: #7a0874; font-weight: bold;">&#40;</span>self<span style="color: #7a0874; font-weight: bold;">&#41;</span>
    <span style="color: #000000;">856</span>             <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #000000;">1</span>:
    <span style="color: #000000;">857</span>                 key = <span style="color: #c20cb9; font-weight: bold;">read</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
--<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000;">858</span>                 dispatch<span style="color: #7a0874; font-weight: bold;">&#91;</span>key<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>self<span style="color: #7a0874; font-weight: bold;">&#41;</span>
    <span style="color: #000000;">859</span>         except _Stop, stopinst:
    <span style="color: #000000;">860</span>             <span style="color: #7a0874; font-weight: bold;">return</span> stopinst.value
&nbsp;
<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Frameworks<span style="color: #000000; font-weight: bold;">/</span>Python.framework<span style="color: #000000; font-weight: bold;">/</span>Versions<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2.7</span><span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>python2.7<span style="color: #000000; font-weight: bold;">/</span>pickle.pyc <span style="color: #000000; font-weight: bold;">in</span> load_inst<span style="color: #7a0874; font-weight: bold;">&#40;</span>self<span style="color: #7a0874; font-weight: bold;">&#41;</span>
   <span style="color: #000000;">1067</span>         module = self.readline<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>:-<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
   <span style="color: #000000;">1068</span>         name = self.readline<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>:-<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
-<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000;">1069</span>         klass = self.find_class<span style="color: #7a0874; font-weight: bold;">&#40;</span>module, name<span style="color: #7a0874; font-weight: bold;">&#41;</span>
   <span style="color: #000000;">1070</span>         self._instantiate<span style="color: #7a0874; font-weight: bold;">&#40;</span>klass, self.marker<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
   <span style="color: #000000;">1071</span>     dispatch<span style="color: #7a0874; font-weight: bold;">&#91;</span>INST<span style="color: #7a0874; font-weight: bold;">&#93;</span> = load_inst
&nbsp;
<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Frameworks<span style="color: #000000; font-weight: bold;">/</span>Python.framework<span style="color: #000000; font-weight: bold;">/</span>Versions<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2.7</span><span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>python2.7<span style="color: #000000; font-weight: bold;">/</span>pickle.pyc <span style="color: #000000; font-weight: bold;">in</span> find_class<span style="color: #7a0874; font-weight: bold;">&#40;</span>self, module, name<span style="color: #7a0874; font-weight: bold;">&#41;</span>
   <span style="color: #000000;">1124</span>         __import__<span style="color: #7a0874; font-weight: bold;">&#40;</span>module<span style="color: #7a0874; font-weight: bold;">&#41;</span>
   <span style="color: #000000;">1125</span>         mod = sys.modules<span style="color: #7a0874; font-weight: bold;">&#91;</span>module<span style="color: #7a0874; font-weight: bold;">&#93;</span>
-<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000;">1126</span>         klass = getattr<span style="color: #7a0874; font-weight: bold;">&#40;</span>mod, name<span style="color: #7a0874; font-weight: bold;">&#41;</span>
   <span style="color: #000000;">1127</span>         <span style="color: #7a0874; font-weight: bold;">return</span> klass
   <span style="color: #000000;">1128</span> 
&nbsp;
AttributeError: <span style="color: #ff0000;">'FakeModule'</span> object has no attribute <span style="color: #ff0000;">'A'</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.depthfirstsearch.net/blog/2011/10/25/in-a-pickle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git Internals</title>
		<link>http://www.depthfirstsearch.net/blog/2011/09/08/git-internals/</link>
		<comments>http://www.depthfirstsearch.net/blog/2011/09/08/git-internals/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 18:38:25 +0000</pubDate>
		<dc:creator>JS</dc:creator>
				<category><![CDATA[computing]]></category>

		<guid isPermaLink="false">http://www.depthfirstsearch.net/blog/2011/09/08/git-internals/</guid>
		<description><![CDATA[This blog post has been making the rounds and for good reason. It is the clearest explanation I&#8217;ve come across yet of git internals. A highlight on hashing: It turns out you’ll never generate two of the same SHA1 hashes. The chances are miniscule. There’s room for all kinds of flowery comparisons like: You’d have [...]]]></description>
			<content:encoded><![CDATA[<p>This blog <a href="http://nfarina.com/post/9868516270/git-is-simpler">post</a> has been making the rounds and for good reason. It is the clearest explanation I&#8217;ve come across yet of git internals. A highlight on hashing:</p>
<blockquote><p>It turns out you’ll never generate two of the same SHA1 hashes. The chances are miniscule. There’s room for all kinds of flowery comparisons like: You’d have to generate more hash codes than the number of stars in the universe before you’d get two of the same!</p>
<p>But my favorite is from Pro Git: “A higher probability exists that every member of your programming team will be attacked and killed by wolves in unrelated incidents on the same night.”</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.depthfirstsearch.net/blog/2011/09/08/git-internals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stash-Style Branching</title>
		<link>http://www.depthfirstsearch.net/blog/2011/07/04/stash-style-branching/</link>
		<comments>http://www.depthfirstsearch.net/blog/2011/07/04/stash-style-branching/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 09:11:27 +0000</pubDate>
		<dc:creator>JS</dc:creator>
				<category><![CDATA[computing]]></category>

		<guid isPermaLink="false">http://www.depthfirstsearch.net/blog/?p=2559</guid>
		<description><![CDATA[I&#8217;m starting to really grok the power of git. I&#8217;ve gotten into the habit of creating local branches for every planned code feature. For single developer projects these branches often just result in trivial &#8220;fast-forward&#8221; merges on the master branch, but they provide some easy encapsulation of the current working directory and make switching back [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m starting to really grok the power of git. I&#8217;ve gotten into the habit of creating local branches for every planned code feature. For single developer projects these branches often just result in trivial &#8220;fast-forward&#8221; merges on the master branch, but they provide some easy encapsulation of the current working directory and make switching back to a reference working version of the code easy with just a single command &#8212; <em>git checkout master</em>.</p>
<p>Since I&#8217;m sort of disorganized, I&#8217;ll often start working on a new feature and then remember that I&#8217;m working on master and not on a separate branch. Provided I haven&#8217;t made any commits, there&#8217;s an easy way to form a new branch out of the local changes &#8212; <em>git stash; git stash branch [branchname]</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.depthfirstsearch.net/blog/2011/07/04/stash-style-branching/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Your Email is Not Broken</title>
		<link>http://www.depthfirstsearch.net/blog/2011/06/23/your-email-is-not-broken/</link>
		<comments>http://www.depthfirstsearch.net/blog/2011/06/23/your-email-is-not-broken/#comments</comments>
		<pubDate>Thu, 23 Jun 2011 09:24:34 +0000</pubDate>
		<dc:creator>JS</dc:creator>
				<category><![CDATA[computing]]></category>
		<category><![CDATA[culture]]></category>

		<guid isPermaLink="false">http://www.depthfirstsearch.net/blog/?p=2544</guid>
		<description><![CDATA[I&#8217;ve mentioned a few of my modest life goals before, but I&#8217;d like to add another possibly-not-so-modest one to the list: 3. Be important enough to have an email problem. One strange trend is for people (usually from an engineering background) to complain on blogs and things about having an email problem. The phrase &#8220;email [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve mentioned a few of my modest life goals <a href="http://www.depthfirstsearch.net/blog/2011/04/20/just-a-small-slice-of-the-american-dream/">before</a>, but I&#8217;d like to add another possibly-not-so-modest one to the list:</p>
<p>3. Be important enough to have an email problem.</p>
<p>One strange trend is for people (usually from an engineering background) to complain on <a href="http://www.mattcutts.com/blog/matt-cutts-email/">blogs</a> and <a href="http://www.codinghorror.com/blog/2008/11/is-email-efail.html">things</a> about having an email problem. The phrase &#8220;email is broken&#8221; is usually mentioned.</p>
<p>What&#8217;s broken is the engineering mindset. Chances are if you are important enough to have an email problem, you are important enough to have an assistant devoted to prioritizing your email. Weird that this obvious solution isn&#8217;t adopted more often. (Maybe it is &#8212; not every successful person with a blog complains about email.) Instead we&#8217;re subjected to endless blog posts. I may never be important enough to have an email problem, much less an assistant of any kind, but for some reason the endless complaining about email online from people that are really rubs me the wrong way.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.depthfirstsearch.net/blog/2011/06/23/your-email-is-not-broken/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Reversing a Dictionary</title>
		<link>http://www.depthfirstsearch.net/blog/2011/05/10/reversing-a-dictionary/</link>
		<comments>http://www.depthfirstsearch.net/blog/2011/05/10/reversing-a-dictionary/#comments</comments>
		<pubDate>Tue, 10 May 2011 18:19:10 +0000</pubDate>
		<dc:creator>JS</dc:creator>
				<category><![CDATA[computer science]]></category>
		<category><![CDATA[computing]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.depthfirstsearch.net/blog/?p=2491</guid>
		<description><![CDATA[For some reason the code I&#8217;m writing requires a lot of mappings between different kinds of values, and I find myself trying to manipulate dictionaries in many ways. I wrote a simple function that reverses a dictionary: Then I remembered the setdefault method and was able to create a more concise function: Of course if [...]]]></description>
			<content:encoded><![CDATA[<p>For some reason the code I&#8217;m writing requires a lot of mappings between different kinds of values, and I find myself trying to manipulate dictionaries in many ways. I wrote a simple function that reverses a dictionary:</p>
<p><script src="https://gist.github.com/965024.js"> </script></p>
<p>Then I remembered the setdefault method and was able to create a more concise function:</p>
<p><script src="https://gist.github.com/965019.js"> </script></p>
<p>Of course if your dictionary is 1-1, you probably don&#8217;t want to introduce sets into the reverse version, so I created a function that composes nicely with the previous function:</p>
<p><script src="https://gist.github.com/965026.js"> </script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.depthfirstsearch.net/blog/2011/05/10/reversing-a-dictionary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Code(s for Failure)</title>
		<link>http://www.depthfirstsearch.net/blog/2011/04/21/google-codes-for-failure/</link>
		<comments>http://www.depthfirstsearch.net/blog/2011/04/21/google-codes-for-failure/#comments</comments>
		<pubDate>Thu, 21 Apr 2011 21:43:47 +0000</pubDate>
		<dc:creator>JS</dc:creator>
				<category><![CDATA[computing]]></category>

		<guid isPermaLink="false">http://www.depthfirstsearch.net/blog/?p=2474</guid>
		<description><![CDATA[Google Code seems to have a lot of AI related projects, but I was never really happy with control it offered a single developer like myself. For one, the service enforced a number of norms implicitly and explicitly in the way the service was built. The first project I tried to host was a set [...]]]></description>
			<content:encoded><![CDATA[<p>Google Code seems to have a lot of AI related projects, but I was never really happy with control it offered a single developer like myself. For one, the service enforced a number of norms implicitly and explicitly in the way the service was built. The first project I tried to host was a set of Python bindings for Logitech Orbit camera control. Google Code dinged me because of an inactive project from years ago with the same name as my own (pywebcam) on Sourceforge.</p>
<p>Pywebcam would have been a (very) niche tool with only a small long tail audience, but half the traffic to this blog is a result of a niche tool fixing a temporary bug in version 1.0 of the OpenCV Python bindings. I did end up hosting some code that I used for pages I wrote in a previous version of this blog, meant as simple Pythonic implementations of interesting machine learning algorithms. That project, pyrouette, is being migrated to Bitbucket after I neglected the public repository while doing a ton of development on my own private repo.</p>
<p>Here too, I think the design of the Google Code service is built around dissuading single developers on these kinds of long tail projects from ever updating their public repositories. This combined with the general lack of control over what and how things were presented made the service unusable for me. (No private repositories; Forced to choose a license upfront; No ability to embed code on my blog; Even deleting projects is dicey.) My code languished, my blogging about my code languished, and now I&#8217;m going to try a different service.</p>
<p>I may eventually end up on Github with the cool kids, but for now I&#8217;m sticking with Mercurial. The devil you know and all that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.depthfirstsearch.net/blog/2011/04/21/google-codes-for-failure/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux PDF Manipulation</title>
		<link>http://www.depthfirstsearch.net/blog/2011/04/07/linux-pdf-manipulation/</link>
		<comments>http://www.depthfirstsearch.net/blog/2011/04/07/linux-pdf-manipulation/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 16:45:04 +0000</pubDate>
		<dc:creator>JS</dc:creator>
				<category><![CDATA[computing]]></category>

		<guid isPermaLink="false">http://www.depthfirstsearch.net/blog/?p=2463</guid>
		<description><![CDATA[PDF manipulation on Linux can be a black art, but the available command line tools provide quite a great deal of flexibility for the power user. Today I made use of pdftk to combine a bunch of separate PDF documents: pdftk A.pdf B.pdf C.pdf cat output merged.pdf My PDF included an image file that was [...]]]></description>
			<content:encoded><![CDATA[<p>PDF manipulation on Linux can be a black art, but the available command line tools provide quite a great deal of flexibility for the power user.</p>
<p>Today I made use of pdftk to combine a bunch of separate PDF documents:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">pdftk A.pdf B.pdf C.pdf <span style="color: #c20cb9; font-weight: bold;">cat</span> output merged.pdf</pre></div></div>

<p>My PDF included an image file that was inflating the size past what would be appropriate to email. What is the etiquette on emailing big files these days anyway? I always try to keep things close to or less than 1mb, but I imagine less than 10mb must be closer to the norm. </p>
<p>pdftk is supposed to also have a compress/decompress option, but I could not figure out the syntax so I went with the always trusty but somewhat opaque ghostscript option.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">gs</span> <span style="color: #660033;">-sDEVICE</span>=pdfwrite <span style="color: #660033;">-dCompatibilityLevel</span>=<span style="color: #000000;">1.4</span> <span style="color: #660033;">-dPDFSETTINGS</span>=<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">screen</span> <span style="color: #660033;">-dNOPAUSE</span> <span style="color: #660033;">-dQUIET</span> <span style="color: #660033;">-dBATCH</span> <span style="color: #660033;">-sOutputFile</span>=output.pdf input.pdf</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.depthfirstsearch.net/blog/2011/04/07/linux-pdf-manipulation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Video of the Day</title>
		<link>http://www.depthfirstsearch.net/blog/2011/03/12/video-of-the-day-6/</link>
		<comments>http://www.depthfirstsearch.net/blog/2011/03/12/video-of-the-day-6/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 17:19:37 +0000</pubDate>
		<dc:creator>JS</dc:creator>
				<category><![CDATA[computing]]></category>
		<category><![CDATA[culture]]></category>

		<guid isPermaLink="false">http://www.depthfirstsearch.net/blog/?p=2431</guid>
		<description><![CDATA[I criticized the reaction to this talk before it was put online. There are some interesting ideas in the video, but there are a couple of obvious problems: Hard to see how the mechanized adaptive exercises would transfer to non-STEM areas of basic knowledge. Based on what little I know, problems in education are too [...]]]></description>
			<content:encoded><![CDATA[<p>I <a href="http://www.depthfirstsearch.net/blog/2011/03/02/b-s/">criticized</a> the reaction to this talk before it was put online. There are some interesting ideas in the video, but there are a couple of obvious problems:</p>
<ol>
<li>Hard to see how the mechanized adaptive exercises would transfer to non-STEM areas of basic knowledge.</li>
<li>Based on what little I know, problems in education are too complex for these kinds of solutions.</li>
<li>The people at TED are just totally blinded by privilege.</li>
<li>Also, there&#8217;s a bit of <a href="http://xkcd.com/793/">this</a> going on.</li>
<li>Better education will probably require real public engagement, not the ad hoc interest of a philanthropist for the latest technological fad.</li>
</ol>
<p><center><object width="446" height="326"><param name="movie" value="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="wmode" value="transparent" /><param name="bgColor" value="#ffffff" /><param name="flashvars" value="vu=http://video.ted.com/talks/dynamic/SalmanKhan_2011-medium.flv&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/TedTalks-1609.embed_thumbnail.jpg&amp;vw=432&amp;vh=240&amp;ap=0&amp;ti=1090&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=salman_khan_let_s_use_video_to_reinvent_education;year=2011;theme=a_taste_of_ted2011;theme=new_on_ted_com;event=TED2011;&amp;preAdTag=tconf.ted/embed;tile=1;sz=512x288;" /><embed type="application/x-shockwave-flash" width="446" height="326" src="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" pluginspace="http://www.macromedia.com/go/getflashplayer" wmode="transparent" bgcolor="#ffffff" allowfullscreen="true" allowscriptaccess="always" flashvars="vu=http://video.ted.com/talks/dynamic/SalmanKhan_2011-medium.flv&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/TedTalks-1609.embed_thumbnail.jpg&amp;vw=432&amp;vh=240&amp;ap=0&amp;ti=1090&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=salman_khan_let_s_use_video_to_reinvent_education;year=2011;theme=a_taste_of_ted2011;theme=new_on_ted_com;event=TED2011;"></embed></object></center></p>
]]></content:encoded>
			<wfw:commentRss>http://www.depthfirstsearch.net/blog/2011/03/12/video-of-the-day-6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/46 queries in 1.205 seconds using disk: basic
Object Caching 638/734 objects using disk: basic

Served from: www.depthfirstsearch.net @ 2012-02-08 13:48:39 -->
