<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>michaeldehaan.net &#187; linux</title>
	<atom:link href="http://michaeldehaan.net/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://michaeldehaan.net</link>
	<description>It's Not Just About Llamas</description>
	<lastBuildDate>Mon, 01 Feb 2010 23:42:32 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='michaeldehaan.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/71f9921e96ffb82d9c29b7c638d90ab3?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>michaeldehaan.net &#187; linux</title>
		<link>http://michaeldehaan.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://michaeldehaan.net/osd.xml" title="michaeldehaan.net" />
		<item>
		<title>Joining Reductive Labs</title>
		<link>http://michaeldehaan.net/2010/02/01/joining-reductive-labs/</link>
		<comments>http://michaeldehaan.net/2010/02/01/joining-reductive-labs/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 23:41:48 +0000</pubDate>
		<dc:creator>mpdehaan</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[puppet]]></category>

		<guid isPermaLink="false">http://michaeldehaan.net/?p=1584</guid>
		<description><![CDATA[As this thread indicates, I am very glad to announce I&#8217;ve joined Reductive Labs as their new Product Manager.
As most folks on Fedora Planet know, killer OSS communities and taking over the computer world with intelligent software are some of my favorite things.   Puppet excels at both of these, and Reductive Labs is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michaeldehaan.net&blog=6867609&post=1584&subd=mpdehaan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p><A HREF="http://groups.google.com/group/puppet-users/browse_thread/thread/94d548e96edf16cd">As this thread indicates</A>, I am very glad to announce I&#8217;ve joined Reductive Labs as their new Product Manager.</p>
<p>As most folks on Fedora Planet know, killer OSS communities and taking over the computer world with intelligent software are some of my favorite things.   Puppet excels at both of these, and Reductive Labs is full of amazing people.   I simply cannot think of any better place to be right now.   The present state of things with Puppet is great, and there are lots of places it can go.</p>
<p>It is also great to be seeing many of the same nics on the lists and IRC again, and I plan to be running into a lot more of you at conferences as well.    If anyone wants to talk shop about their Puppet usage or management challenges, I&#8217;ll always be up for it.  I&#8217;m mpdehaan on #puppet and <A HREF="mailto:michael@reductivelabs.com">michael@reductivelabs.com</A> over email.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mpdehaan.wordpress.com/1584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mpdehaan.wordpress.com/1584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mpdehaan.wordpress.com/1584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mpdehaan.wordpress.com/1584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mpdehaan.wordpress.com/1584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mpdehaan.wordpress.com/1584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mpdehaan.wordpress.com/1584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mpdehaan.wordpress.com/1584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mpdehaan.wordpress.com/1584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mpdehaan.wordpress.com/1584/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michaeldehaan.net&blog=6867609&post=1584&subd=mpdehaan&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://michaeldehaan.net/2010/02/01/joining-reductive-labs/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3c1b7e921632632e11d5d2ee59403f5f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mpdehaan</media:title>
		</media:content>
	</item>
		<item>
		<title>Source Code Visualization with Gource.</title>
		<link>http://michaeldehaan.net/2010/01/15/source-code-visualization-with-gource/</link>
		<comments>http://michaeldehaan.net/2010/01/15/source-code-visualization-with-gource/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 02:05:40 +0000</pubDate>
		<dc:creator>mpdehaan</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://michaeldehaan.net/?p=1540</guid>
		<description><![CDATA[Gource is an amazing program for visualizing commit history in a git-based code project.        What I like about it is that it can also show what areas of the project are active in an easy to understand way, to show whether there is community around a whole project [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michaeldehaan.net&blog=6867609&post=1540&subd=mpdehaan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p><A HREF="http://code.google.com/p/gource/">Gource</A> is an amazing program for visualizing commit history in a git-based code project.        What I like about it is that it can also show what areas of the project are active in an easy to understand way, to show whether there is community around a whole project or just aspects of it.    What looks like a shiny useless visualization is, in fact, pretty useful stuff.   I&#8217;ll get to that in a bit.</p>
<p>So, I needed something to scan and past OSS things I&#8217;ve been involved with were logical first targets.    To index the history on Cobbler into a concise video, I ran the following:</p>
<pre class="brush: bash;">
gource -s 0.03 --auto-skip-seconds 0.1 --file-idle-time 500 --max-files 500 --multi-sampling -1280x720 --stop-at-end   --output-ppm-stream - | ffmpeg -y -b 3000K -r 24 -f image2pipe -vcodec ppm -i - -vcodec mpeg4 gource.mp4
</pre>
<p>Want to run this yourself?    You will likely have to build gource from source.  I&#8217;ll warn you that building from source involves installing a ton of deps, though all are in Ubuntu 9.10, and once ./configure finally passes it does build fast.   Fedora was downlevel with respect to ftgl, and compiling ftgl from source was difficult, hence the Ubuntu usage.    The parameters I use above result in a large video (75MB) but are intended for YouTube HD.    </p>
<p>The result is below.  Note that I didn&#8217;t keep my source control commit attribution for the first couple of years on the project (lesson learned in how to use git!), I used to do development on devel and switched to master (this video shows master), and koan was grafted into the cobbler tree late in the game.   Early on, I committed from two different user IDs.  As a result, the video is not perfect &#8212; things tend to &#8220;pop&#8221; into view as releases happen.  You&#8217;ll see the first outside attribution happen about 1/2 way through, though of course this was happening much much earlier.    Still, the acceleration at the end, I think, means we achieved something pretty decent.   Not all projects do.  </p>
<p>Perhaps this is a start of a good meme.   Get your code up on YouTube.    Show us the life of your code and who you collaborate with.</p>
<p><A HREF="http://www.youtube.com/watch?v=uOw7BjkOrRM">Watch</A></p>
<p><span style="text-align:center; display: block;"><a href="http://michaeldehaan.net/2010/01/15/source-code-visualization-with-gource/"><img src="http://img.youtube.com/vi/uOw7BjkOrRM/2.jpg" alt="" /></a></span></p>
<p>I can see gource being immediately useful for a one major purpose.  When evaluating OSS software for use in business, you always need to know if the community is solid and self sustaining.   This allows you to watch a short video and find out.   Coupled with looking through the mailing list archives, that&#8217;s a pretty good check.   It can also help identify interesting patterns of large scale refactoring, new development, or stagnation. </p>
<p>Gource may also a great way to explain open source to people who don&#8217;t immediately understand how collaboration can work, and how contributors come and go.</p>
<p>That is what I call good TV.   It is also rather trippy to look at.   Please turn up the Floyd.</p>
<p>If we had a free supercomputer and infinite development time, my ultimate dream visualization would be a 20&#215;20 foot wall section of these graphs, showing multiple projects side by side, with developers flying between projects.     Who flies between projects?   Is that common? What are the clustering patterns of these projects that share contributors?   Where are the hubs and spokes?  Are the hubs bigger projects than the spokes? (Can we get that in 3D?).   There is something to be learned here, even if we don&#8217;t know what that is.</p>
<p>Install Gource.   Let&#8217;s see your project video.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mpdehaan.wordpress.com/1540/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mpdehaan.wordpress.com/1540/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mpdehaan.wordpress.com/1540/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mpdehaan.wordpress.com/1540/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mpdehaan.wordpress.com/1540/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mpdehaan.wordpress.com/1540/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mpdehaan.wordpress.com/1540/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mpdehaan.wordpress.com/1540/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mpdehaan.wordpress.com/1540/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mpdehaan.wordpress.com/1540/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michaeldehaan.net&blog=6867609&post=1540&subd=mpdehaan&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://michaeldehaan.net/2010/01/15/source-code-visualization-with-gource/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3c1b7e921632632e11d5d2ee59403f5f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mpdehaan</media:title>
		</media:content>

		<media:content url="http://img.youtube.com/vi/uOw7BjkOrRM/2.jpg" medium="image" />
	</item>
		<item>
		<title>Flattening Hashes In Python</title>
		<link>http://michaeldehaan.net/2010/01/05/flattening-hashes-in-python/</link>
		<comments>http://michaeldehaan.net/2010/01/05/flattening-hashes-in-python/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 16:02:46 +0000</pubDate>
		<dc:creator>mpdehaan</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://michaeldehaan.net/?p=1514</guid>
		<description><![CDATA[I was looking for a simple way to diff two complex hashes.   In order to make the output nicely readable for humans, I&#8217;d first like to flatten the hashes.   For example:

test = {
         &#34;a&#34; : [ &#34;dog&#34;, &#34;cat&#34;, &#34;chicken&#34; ],
    [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michaeldehaan.net&blog=6867609&post=1514&subd=mpdehaan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>I was looking for a simple way to diff two complex hashes.   In order to make the output nicely readable for humans, I&#8217;d first like to flatten the hashes.   For example:</p>
<pre class="brush: python;">
test = {
         &quot;a&quot; : [ &quot;dog&quot;, &quot;cat&quot;, &quot;chicken&quot; ],
         &quot;b&quot; : {
             &quot;c&quot; : 0,
             &quot;d&quot; : [ &quot;red&quot;, &quot;yellow&quot;, &quot;blue&quot; ],
         },
         &quot;e&quot; : &quot;shiny&quot;
   }
</pre>
<p>Becomes:</p>
<pre class="brush: python;">
{
    'a': ['dog', 'cat', 'chicken'],
    'b.c': 0,
    'b.d': ['red', 'yellow', 'blue'],
    'e': 'shiny',
}
</pre>
<p><A HREF="http://cpansearch.perl.org/src/BBC/Hash-Flatten-1.16/lib/Hash/Flatten.pm">Here</A> is a very long Perl module that does this.    Here&#8217;s my cut:</p>
<pre class="brush: python;">
  def _flatten_ds(self, ds, result=None, memo=&quot;&quot;):
        if result is None:
            result = {}
        assert type(ds) == type({})
        for (k,v) in ds.iteritems():
                if memo == &quot;&quot;:
                    new_memo = k
                else:
                    new_memo = &quot;%s.%s&quot; % (memo,k)
                if type(v) == type({}):
                    self._flatten_ds(v, result=result, memo=new_memo)
                else:
                    result[new_memo] = v
        return result
</pre>
<p>Almost 300 lines shorter than the Perl module <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mpdehaan.wordpress.com/1514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mpdehaan.wordpress.com/1514/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mpdehaan.wordpress.com/1514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mpdehaan.wordpress.com/1514/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mpdehaan.wordpress.com/1514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mpdehaan.wordpress.com/1514/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mpdehaan.wordpress.com/1514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mpdehaan.wordpress.com/1514/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mpdehaan.wordpress.com/1514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mpdehaan.wordpress.com/1514/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michaeldehaan.net&blog=6867609&post=1514&subd=mpdehaan&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://michaeldehaan.net/2010/01/05/flattening-hashes-in-python/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3c1b7e921632632e11d5d2ee59403f5f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mpdehaan</media:title>
		</media:content>
	</item>
		<item>
		<title>Git Statistics &#8212; Simpler, Faster</title>
		<link>http://michaeldehaan.net/2010/01/01/git-statistics-simpler-faster/</link>
		<comments>http://michaeldehaan.net/2010/01/01/git-statistics-simpler-faster/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 21:06:56 +0000</pubDate>
		<dc:creator>mpdehaan</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://michaeldehaan.net/?p=1511</guid>
		<description><![CDATA[Today I&#8217;ve reworked LookAtGit which was a project I originally implemented because (A) I was really bored, and (B) I wanted to learn Scala.
The new &#8220;v2&#8243; is done in Ruby, which is nice because the regexes there don&#8217;t make me want to hurt someone and Ruby is generally awesome, and I&#8217;ve forgotten how much I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michaeldehaan.net&blog=6867609&post=1511&subd=mpdehaan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>Today I&#8217;ve reworked <A HREF="http://github.com/mpdehaan/lookatgit">LookAtGit</A> which was a project I originally implemented because (A) I was really bored, and (B) I wanted to learn Scala.</p>
<p>The new &#8220;v2&#8243; is done in Ruby, which is nice because the regexes there don&#8217;t make me want to hurt someone and Ruby is generally awesome, and I&#8217;ve forgotten how much I missed it having a lot of corporate Python jobs.   Ruby is fun.</p>
<p>So, lookatgit&#8230; I&#8217;ve also optimized it a HUGE amount since last time, for one &#8212; I found &#8220;git log &#8211;shortstat&#8221;, it has to execute a billion less commands and can also skip binary commits.</p>
<p>The rewrite doesn&#8217;t quite yet offer some of the statistics-oriented statistics (SOS) that the previous version offered, but it does offer some additional reports, arbitrary field sorting, and will enable adding lots more other reports in the future.</p>
<p>To get started, check out from <A HREF="http://github.com/mpdehaan/lookatgit">github</A> and read the README file in the &#8220;v2&#8243; directory <A HREF="http://github.com/mpdehaan/lookatgit/blob/master/v2/README">here</A>.</p>
<p>You can see from those instructions how to do simple things like see the top 50 most active files in a repo, or the top 100 contributors sorted by arbitrary statistics.</p>
<p>Here&#8217;s an example from Spacewalk.   Spacewalk is a HUGE repo, and while I&#8217;m limiting the length of the output below, the report time is spent in the calculations, rather than the output, so with a reasonable machine it will only take a minute to scan the repo.</p>
<pre class="brush: bash;">
mdehaan@snowball:~/code/lookatgit/v2$ time ruby lookatgit.rb -r ~/code/spacewalk/ --limit 10 -T -F --header --verbose
scanning...
processing 9534 commits...
generating report...
--------------------------------------------------
TOP CONTRIBUTORS REPORT
name,lines_changed,lines_added,lines_removed,commit_ct
--------------------------------------------------
Miroslav Suchý &lt;msuchy@redhat.com&gt;,1587958,143182,1444776,1650
Jan Pazdziora &lt;jpazdziora@redhat.com&gt;,183227,121126,62101,1428
Michael Mraka &lt;michael.mraka@redhat.com&gt;,196978,94669,102309,781
Devan Goodwin &lt;dgoodwin@redhat.com&gt;,146951,44522,102429,611
Justin Sherrill &lt;jsherril@redhat.com&gt;,1398046,763492,634554,587
Pradeep Kilambi &lt;pkilambi@redhat.com&gt;,726023,361122,364901,476
Mike McCune &lt;mmccune@gmail.com&gt;,39470,27793,11677,447
jesus m. rodriguez &lt;jesusr@redhat.com&gt;,392192,112554,279638,430
Partha Aji &lt;paji@redhat.com&gt;,49294,29033,20261,406
Milan Zazrivec &lt;mzazrivec@redhat.com&gt;,42101,22507,19594,375
------------------------------------------
TOP FILES REPORT
filename,lines_changed,change_ct,author_ct,commit_ct
------------------------------------------
java/spacewalk-java.spec,2718,246,17,246
backend/spacewalk-backend.spec,2420,235,14,235
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml,23742,202,19,202
java/code/webapp/WEB-INF/struts-config.xml,8040,147,18,147
rel-eng/packages/spacewalk-java,291,146,13,146
web/spacewalk-web.spec,1739,139,11,139
java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml,8999,128,14,128
schema/spacewalk/spacewalk-schema.spec,726,121,10,121
rel-eng/packages/spacewalk-backend,237,119,11,119
proxy/installer/spacewalk-proxy-installer.spec,533,99,7,99

real	1m1.190s
user	0m6.912s
sys	0m0.340s
</pre>
<p>The next step is to build in those &#8220;statistics oriented statistics&#8221; and enhance the query capabilities.   For instance, I&#8217;d like to be able to generate a report on the standard deviation times between commits, to show which developers on a given project are slacking off <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .   Similarly, I&#8217;d like to generate aggregate statistics on a project so I can show that Project X contributors typically commit changes with certain distribution patterns, which may or may not be revealing.</p>
<p>Contributors are very welcome.  I currently do not have a project list, but if enough folks are interested we can get this going.   It is not so much about what it can generate now but what we can generate in the future.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mpdehaan.wordpress.com/1511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mpdehaan.wordpress.com/1511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mpdehaan.wordpress.com/1511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mpdehaan.wordpress.com/1511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mpdehaan.wordpress.com/1511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mpdehaan.wordpress.com/1511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mpdehaan.wordpress.com/1511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mpdehaan.wordpress.com/1511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mpdehaan.wordpress.com/1511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mpdehaan.wordpress.com/1511/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michaeldehaan.net&blog=6867609&post=1511&subd=mpdehaan&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://michaeldehaan.net/2010/01/01/git-statistics-simpler-faster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3c1b7e921632632e11d5d2ee59403f5f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mpdehaan</media:title>
		</media:content>
	</item>
		<item>
		<title>All The New Stuff You Can&#8217;t Use</title>
		<link>http://michaeldehaan.net/2009/12/31/all-the-new-stuff-you-cant-use/</link>
		<comments>http://michaeldehaan.net/2009/12/31/all-the-new-stuff-you-cant-use/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 18:45:09 +0000</pubDate>
		<dc:creator>mpdehaan</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://michaeldehaan.net/?p=1507</guid>
		<description><![CDATA[Do you get excited about new language features?   Probably.    Can you use them immediately at work?   Sometimes.   If you write software that you distribute though, you often can&#8217;t!
Wouldn&#8217;t it be awesome if I could get all of the Python Package and Ruby gems (and CPAN) as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michaeldehaan.net&blog=6867609&post=1507&subd=mpdehaan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>Do you get excited about new language features?   Probably.    Can you use them immediately at work?   Sometimes.   If you write software that you distribute though, you often can&#8217;t!</p>
<p>Wouldn&#8217;t it be awesome if I could get all of the Python Package and Ruby gems (and CPAN) as RPMs on EL 4 and I get to pick my interpreter version (any version I like) and be able to choose from multiple interpreter versions to run on the same system?</p>
<p>Part of the problem with writing software that you want to be easy to set up and install for users is that you can&#8217;t use the shiny newness.   For instance, if you have to support EL 2, you won&#8217;t be excited about new features in Python 2.5, as you&#8217;ll never be able to use them.   Same deal with Rails 3 or TurboGears 4000.    </p>
<p>If you are a hosted service, you could decide to do a lot of work and become a mini-distribution (packaging these things for yourself and tracking security updates and other bugfixes), but that&#8217;s a lot of duplicated IT across the world for everyone trying similar things.   Each new library you want to use becomes a discussion with IT because someone needs to package it and look after updates.  Ouch!</p>
<p>I am not a fan of the java-style mode of deployment as it seems to imply a great chance for security vulnerabilities (due to lack of updates by packaging a sub-module with your code), retards progress, and also tends to encourages forking.   However I can kind of understand why it occurs.   Fear of the outside world breaking your code, or not being able to deploy what you want where you want it.   </p>
<p>Virtual appliances are also the wrong answer to deployment, because of the same update concerns, and the fact they take a sledgehammer to the problem and waste resources.    </p>
<p>Ideally what I think I want is a cross-distribution build server that all upstream software projects could use that would automatically build packages for different interpreter versions and distributions.  By cross distribution I not only mean all of Fedora, CentOS, and RHEL, but also Debian and Ubuntu.  If we are lucky, also OS X.  I&#8217;m tired of OS X deployments working differently.</p>
<p>Then I should be able to do:</p>
<p>yum install python25-simplejson python24-simplejson</p>
<p>and run the same interpreter on the same box.</p>
<p>Some issues are to be had with contention over Apache, I&#8217;m assuming, though I think it would be really awesome if we could take every hosted service developer in the world out of having to maintain their own libraries when Enterprise Linuxes are too far behind and the likes of Fedora or Lefty Lemur are too fast-changing and unstable.</p>
<p>I don&#8217;t forsee this happening, of course&#8230; but you know&#8230; sometimes I think it would be nicer if the newness was easier to deploy on the oldness.    To do this though, we really have to take the human distro-specific packagers out of the equation, and make a build service that is very very encouraging for all upstream developers to use.  And it should (because of the upstream focus) ideally involve a partnership between distributions.    This may also require unifying Debian and RHEL packaging in order to gain widespread adoption of software developers packaging their own content and submitting it to common build servers.   If possible, do OS X as well. </p>
<p>Also, I want a pony.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mpdehaan.wordpress.com/1507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mpdehaan.wordpress.com/1507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mpdehaan.wordpress.com/1507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mpdehaan.wordpress.com/1507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mpdehaan.wordpress.com/1507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mpdehaan.wordpress.com/1507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mpdehaan.wordpress.com/1507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mpdehaan.wordpress.com/1507/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mpdehaan.wordpress.com/1507/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mpdehaan.wordpress.com/1507/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michaeldehaan.net&blog=6867609&post=1507&subd=mpdehaan&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://michaeldehaan.net/2009/12/31/all-the-new-stuff-you-cant-use/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3c1b7e921632632e11d5d2ee59403f5f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mpdehaan</media:title>
		</media:content>
	</item>
		<item>
		<title>Use REST, you Merry Gentlemen</title>
		<link>http://michaeldehaan.net/2009/12/22/use-rest-you-merry-gentlemen/</link>
		<comments>http://michaeldehaan.net/2009/12/22/use-rest-you-merry-gentlemen/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 13:09:14 +0000</pubDate>
		<dc:creator>mpdehaan</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://michaeldehaan.net/?p=1492</guid>
		<description><![CDATA[On Christmas Eve Eve Eve, I bring to you to the greatest software carol about web client/server communication ever composed to date.   I know because I spent like 15 minutes on it.
Use REST, you Merry Gentlemen

Use REST you Merry Gentlemen
Let nothing stateful stay
Remember Hypertext our Saviour
Gets out of the firewalls way
To save us [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michaeldehaan.net&blog=6867609&post=1492&subd=mpdehaan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>On Christmas Eve Eve Eve, I bring to you to the greatest software carol about web client/server communication ever composed to date.   I know because I spent like 15 minutes on it.</p>
<p><B>Use REST, you Merry Gentlemen</B></p>
<blockquote><p>
Use REST you Merry Gentlemen<br />
Let nothing stateful stay<br />
Remember Hypertext our Saviour<br />
Gets out of the firewalls way<br />
To save us all from SOAPs confusion<br />
When we were gone astray<br />
O tidings of interoperability and joy,<br />
Interoperability and joy<br />
O tidings of interoperability and joy</p>
<p>In Irvine, in Cali-forn-ia,<br />
This methodology was born,<br />
And shared among the intertubes,<br />
The W3C did morn.<br />
To which the Enterprise crowd<br />
Did rather take in scorn<br />
O tidings of simplicity and joy,<br />
simplicity and joy<br />
O tidings of simplicity and joy</p>
<p>From code to our ed-it-ors<br />
The aforementioned practice came;<br />
And unto certain code-o-ers<br />
Brought tidings of the same:<br />
While not quite well defined as XMLRPC<br />
It works almost the same.<br />
O tidings of interoperability and joy,<br />
Interoperability and joy<br />
O tidings of interoperability and joy</p>
<p>Now to fast JSON sing our praises,<br />
All you within this place,<br />
And with true love and brotherhood<br />
Each language it does embrace;<br />
This great tide of options;<br />
Lock in now replaced.<br />
O tidings of interoperability and joy,<br />
Interoperability and joy<br />
O tidings of interoperability and joy
</p></blockquote>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mpdehaan.wordpress.com/1492/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mpdehaan.wordpress.com/1492/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mpdehaan.wordpress.com/1492/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mpdehaan.wordpress.com/1492/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mpdehaan.wordpress.com/1492/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mpdehaan.wordpress.com/1492/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mpdehaan.wordpress.com/1492/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mpdehaan.wordpress.com/1492/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mpdehaan.wordpress.com/1492/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mpdehaan.wordpress.com/1492/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michaeldehaan.net&blog=6867609&post=1492&subd=mpdehaan&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://michaeldehaan.net/2009/12/22/use-rest-you-merry-gentlemen/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3c1b7e921632632e11d5d2ee59403f5f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mpdehaan</media:title>
		</media:content>
	</item>
		<item>
		<title>Pragmatic Object Oriented Design</title>
		<link>http://michaeldehaan.net/2009/12/18/pragmatic-object-oriented-design/</link>
		<comments>http://michaeldehaan.net/2009/12/18/pragmatic-object-oriented-design/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 01:43:35 +0000</pubDate>
		<dc:creator>mpdehaan</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://michaeldehaan.net/?p=1469</guid>
		<description><![CDATA[I&#8217;m reclaiming &#8220;Pragmatic&#8221; from Dave Thomas et al.   He doesn&#8217;t get to own it  
Things I would like to see more of among OO Software Developers:

OO design that is about message passing and accurately modelled domain objects, not setter/getter boilerplate, which is actually quite procedural, and breaks modeling, nor abstract objects that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michaeldehaan.net&blog=6867609&post=1469&subd=mpdehaan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>I&#8217;m reclaiming &#8220;Pragmatic&#8221; from Dave Thomas et al.   He doesn&#8217;t get to own it <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Things I would like to see more of among OO Software Developers:</p>
<ul>
<li>OO design that is about message passing and accurately modelled domain objects, not setter/getter boilerplate, which is actually quite procedural, and breaks modeling, nor abstract objects that don&#8217;t accurately model the problem they are solving.
</li>
<li>Design Patterns being used in the sense that Christopher Alexander intended them, as a way to talk about code, not as a LEGO kit.   Don&#8217;t use a Factory to replace an if conditional if you&#8217;ll only use it once.     Don&#8217;t use a Command to replace a function call.   Queue the popular expression:   If all you have is a hammer, good luck removing those lug nuts.  <A HREF="http://perl.plover.com/yak/design/samples/slide001.html">Read this</A>.
</li>
<li>More Of the Unix Philosophy.   Small components that can talk to each other are easier to understand (think find, pipes, and xargs).   Black boxes are our friends.   Well defined interfaces between modules help us build those boxes.
</li>
<li>YAGNI being exercised as a first principle with regard to abstraction layers that are probably not going to be needed.   (Exception: databases).   Write code that does something useful today, not something that plans for an uncertain future.   If the code is small enough, that future can be quickly dealt with later.
</li>
<li>Love of small codebases in general.    You can do amazing things in under 20k of code.    Taking pride in how little code you write, not how much code you write.   Keep It Simple.  Simple is awesome.   Clever is usually bad.   (Fun, But &#8230; Bad)
</li>
<li>More hybrid OO functional/development.    Side effects can often be eliminated, and lead more to that message passing idea and better traceable code.
</li>
<li>More truly modular software.    Almost every component of your software system should be confined to a small enough area to be replaceable.   It should not be abstracted out as a first principle, as that is just added work&#8230;. but you should know that it would be possible to replace it in the future.   Investing heavily in any particular framework limits future options, especially when the framework starts to limit technology decisions.   It is for this reason that I really like the concept of language agnostic message buses, or at least XMLRPC.
</li>
<li>More Use of Dynamic, Duck Typed Languages.   Static typing errors don&#8217;t actually happen much in practice unless someone fails to write functional tests, and even then don&#8217;t happen very often.    They can also be avoided with simple asserts, just ask if the &#8220;Duck&#8221; is able to quack or not, not whether something is a Duck.    Such languages are not only more fun to work with, one person can do the work of five Java developers.
</li>
<li>More Use of Other JVM Languages.   If interacting with Java libraries is a requirement, more use of Groovy, Closure, or Scala can go a long way to allow folks to be more productive and to write more sustaintable codebases.   Not enough people know they have options, which tends to perpetuate some bad design decisions.   The Java platform tends to require (unfortunately) components that also speak Java standards, because the community isn&#8217;t so interested in truly open standards that give all languages the same footing.   Why is that a problem?   Just as Perl isn&#8217;t REALLY that horrible of a language, it is just that the best practices surrounding Perl are not so good usually, Java best practices tend to favor overdesign that eventually leads towards unmaintainable and impenetrably dense software.   Being able to choose languages that enforce better design practices (when you are forced to use something Java compatible) can help avoid this slippery slope.</li>
</ul>
<p>Yes, I just said that using Java leads to unmaintainable software.    You may print that.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mpdehaan.wordpress.com/1469/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mpdehaan.wordpress.com/1469/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mpdehaan.wordpress.com/1469/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mpdehaan.wordpress.com/1469/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mpdehaan.wordpress.com/1469/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mpdehaan.wordpress.com/1469/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mpdehaan.wordpress.com/1469/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mpdehaan.wordpress.com/1469/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mpdehaan.wordpress.com/1469/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mpdehaan.wordpress.com/1469/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michaeldehaan.net&blog=6867609&post=1469&subd=mpdehaan&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://michaeldehaan.net/2009/12/18/pragmatic-object-oriented-design/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3c1b7e921632632e11d5d2ee59403f5f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mpdehaan</media:title>
		</media:content>
	</item>
		<item>
		<title>Text Mode Interface for Microsoft Word Prototype</title>
		<link>http://michaeldehaan.net/2009/12/09/text-mode-interface-for-microsoft-word-prototype/</link>
		<comments>http://michaeldehaan.net/2009/12/09/text-mode-interface-for-microsoft-word-prototype/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 22:00:37 +0000</pubDate>
		<dc:creator>mpdehaan</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://michaeldehaan.net/?p=1461</guid>
		<description><![CDATA[
 ________________________________________
&#60; it looks like you are writing a letter &#62;
 ----------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
   [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michaeldehaan.net&blog=6867609&post=1461&subd=mpdehaan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><pre class="brush: bash;">
 ________________________________________
&lt; it looks like you are writing a letter &gt;
 ----------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mpdehaan.wordpress.com/1461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mpdehaan.wordpress.com/1461/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mpdehaan.wordpress.com/1461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mpdehaan.wordpress.com/1461/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mpdehaan.wordpress.com/1461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mpdehaan.wordpress.com/1461/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mpdehaan.wordpress.com/1461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mpdehaan.wordpress.com/1461/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mpdehaan.wordpress.com/1461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mpdehaan.wordpress.com/1461/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michaeldehaan.net&blog=6867609&post=1461&subd=mpdehaan&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://michaeldehaan.net/2009/12/09/text-mode-interface-for-microsoft-word-prototype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3c1b7e921632632e11d5d2ee59403f5f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mpdehaan</media:title>
		</media:content>
	</item>
		<item>
		<title>Minimal Python JSON Serialization/Deserialization</title>
		<link>http://michaeldehaan.net/2009/12/09/minimal-python-json-serializationdeserialization/</link>
		<comments>http://michaeldehaan.net/2009/12/09/minimal-python-json-serializationdeserialization/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 21:36:32 +0000</pubDate>
		<dc:creator>mpdehaan</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://michaeldehaan.net/?p=1459</guid>
		<description><![CDATA[Cobbler leveraged JSON for saving object representations to disk (though not for wire transport, where it used XMLRPC, but that is another story).  The object representation system in 2.0, which I called &#8220;FIELDS&#8221; was used to define the members of each object was a little more heavy weight than I liked.   This [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michaeldehaan.net&blog=6867609&post=1459&subd=mpdehaan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p><A HREF="http://fedorahosted.org/cobbler">Cobbler</A> leveraged JSON for saving object representations to disk (though not for wire transport, where it used XMLRPC, but that is another story).  The object representation system in 2.0, which I called &#8220;FIELDS&#8221; was used to define the members of each object was a little more heavy weight than I liked.   This made it difficult to add new &#8220;nouns&#8221; into Cobbler, and made modelling system interfaces (which I didn&#8217;t want quite to be their own objects), rather hard.    Why?  The serialization and de-serialization to and from objects was not as recursive as it could be.   We also had a top level orchestrator object called &#8220;config&#8221; that did not do much, that I always wanted to get rid of.    </p>
<p>I have.</p>
<p><A HREF="http://github.com/mpdehaan/snippets/blob/master/py_serializer/demo.py">Here</A> is a rough example of doing all of that more automagically.  </p>
<p>The base class is /somewhat/ gnarly because of the automagic, but I don&#8217;t think the object classes could be any simpler.   Notice the type checking that is also built in.   Bonus!    So you can work in JSON objects all day, but your code gets to work in /objects/, not error prone nested hashes.</p>
<p>Extra validation can be added by writing setter functions, which are, by default, optional .. you get free type checking without the setters.</p>
<p><A HREF="http://github.com/mpdehaan/snippets/blob/master/py_serializer/demo.py">[github.com]</A></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mpdehaan.wordpress.com/1459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mpdehaan.wordpress.com/1459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mpdehaan.wordpress.com/1459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mpdehaan.wordpress.com/1459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mpdehaan.wordpress.com/1459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mpdehaan.wordpress.com/1459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mpdehaan.wordpress.com/1459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mpdehaan.wordpress.com/1459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mpdehaan.wordpress.com/1459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mpdehaan.wordpress.com/1459/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michaeldehaan.net&blog=6867609&post=1459&subd=mpdehaan&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://michaeldehaan.net/2009/12/09/minimal-python-json-serializationdeserialization/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3c1b7e921632632e11d5d2ee59403f5f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mpdehaan</media:title>
		</media:content>
	</item>
		<item>
		<title>Streaming HTTP Uploads With Python&#8217;s Poster</title>
		<link>http://michaeldehaan.net/2009/12/09/streaming-http-uploads-with-pythons-poster/</link>
		<comments>http://michaeldehaan.net/2009/12/09/streaming-http-uploads-with-pythons-poster/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 21:06:52 +0000</pubDate>
		<dc:creator>mpdehaan</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://michaeldehaan.net/?p=1456</guid>
		<description><![CDATA[There&#8217;s not much to say beyond the documentation examples, but I was looking for a way to do streaming uploads from Python, and poster delivers nicely on the client side.
Writing a server side streaming downloader in mod_python is infinitely easier and looks something like this:

   def handle_upload(self):
       [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michaeldehaan.net&blog=6867609&post=1456&subd=mpdehaan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>There&#8217;s not much to say beyond the documentation examples, but I was looking for a way to do streaming uploads from Python, and <A HREF="http://pypi.python.org/pypi/poster/">poster</a> delivers nicely on the client side.</p>
<p>Writing a server side streaming downloader in mod_python is infinitely easier and looks something like this:</p>
<pre class="brush: python;">
   def handle_upload(self):
       self.form_data = util.FieldStorage(self.request)
       for key in self.form_data.keys():
           value = self.form_data[key]
           if type(value) == types.InstanceType:
               if isinstance(value, util.StringField):
                   pass
               elif isinstance(value, util.Field):
                   filename = value.filename
                   content_type = value.type
                   base = os.path.basename(value.filename).strip()
                   fd = open(&quot;/tmp/apache/%s\n&quot; % base, &quot;wb&quot;)
                   while True:
                       data = value.file.read(1024)
                       fd.write(data)
                       if data == &quot;&quot;:
                           fd.close()
                       break
       return apache.OK
</pre>
<p>Security and error handling (as well as writing the rest of the mod_python handler, however minimal that might be) are left as an exercise to the reader.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mpdehaan.wordpress.com/1456/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mpdehaan.wordpress.com/1456/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mpdehaan.wordpress.com/1456/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mpdehaan.wordpress.com/1456/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mpdehaan.wordpress.com/1456/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mpdehaan.wordpress.com/1456/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mpdehaan.wordpress.com/1456/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mpdehaan.wordpress.com/1456/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mpdehaan.wordpress.com/1456/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mpdehaan.wordpress.com/1456/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=michaeldehaan.net&blog=6867609&post=1456&subd=mpdehaan&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://michaeldehaan.net/2009/12/09/streaming-http-uploads-with-pythons-poster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3c1b7e921632632e11d5d2ee59403f5f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mpdehaan</media:title>
		</media:content>
	</item>
	</channel>
</rss>