<?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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">

<channel>
	<title>the law of averages &#187; development</title>
	<atom:link href="http://yergler.net/blog/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://yergler.net/blog</link>
	<description>...because eventually i'll be right...</description>
	<pubDate>Tue, 23 Sep 2008 22:37:28 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
	http://creativecommons.org/licenses/by-sa/3.0/us/<creativeCommons:license></creativeCommons:license>		<item>
		<title>Unicode output from Zope 3</title>
		<link>http://yergler.net/blog/2008/07/19/unicode-output-from-zope-3/</link>
		<comments>http://yergler.net/blog/2008/07/19/unicode-output-from-zope-3/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 19:57:33 +0000</pubDate>
		<dc:creator>Nathan Y.</dc:creator>
		
		<category><![CDATA[cc]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[license engine]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[zope]]></category>

		<guid isPermaLink="false">http://yergler.net/blog/?p=563</guid>
		<description><![CDATA[	The Creative Commons licene engine has gone through several iterations, the most recent being a Zope 3 / Grok application. This has actually been a great implementation for us1, but since the day it was deployed there&#8217;s been a warning in README.txt:

If you get a UnicodeDecodeError from the cc.engine (you'll see this if it's
running in [...]]]></description>
			<content:encoded><![CDATA[	<p>The Creative Commons licene engine has gone through several iterations, the most recent being a Zope 3 / Grok application. This has actually been a great implementation for us<sup><a href="#fn182382479048ea656dcd3a8">1</a></sup>, but since the day it was deployed there&#8217;s been a warning in <a href="http://code.creativecommons.org/svnroot/cc.engine/trunk/README.txt"><code>README.txt</code></a>:</p>
<pre>
If you get a UnicodeDecodeError from the cc.engine (you'll see this if it's
running in the foreground) when you try to access the http://host:9080/license/
then it's likely that the install of python you are using is set to use ASCII
as it's default output.  You can change this to UTF-8 by creating the file
/usr/lib/python&lt;version&gt;/sitecustomize.py and adding these lines:
  import sys
  sys.setdefaultencoding("utf-8")
</pre>
	<p>This always struck me as a bit inelegant&#8212;having to muck with something outside my application directory.  After all, this belief that the application should be self-contained is the reason I use <a href="http://pypi.python.org/zc.buildout">zc.buildout</a> and share Jim&#8217;s belief in the evil of the system Python.  Like a lot of inelegant things, though, it never rose quite to the level of annoyance needed to motivate me to <em>do it right</em>.</p>
	<p>Today I was working on moving the license engine to a different server<sup><a href="#fn81984132348ea656de4b43">2</a></sup> and ran into this problem again.  I decided to dig in and see if I could track it down.  In fact I did track down the initial problem&#8212;I was <a href="http://code.creativecommons.org/viewsvn?view=rev&#38;revision=10535">making a comparison</a> between an encoded Unicode string and without specifying an explicit codec to use for the decode.  Unfortunately once I fixed that I found it was <a href="http://en.wikipedia.org/wiki/Turtles_all_the_way_down">turtles all the way down</a>.</p>
	<p>Turns out the default Zope 3 page template machinery uses <a href="http://www.python.org/doc/lib/module-StringIO.html"><code>StringIO</code></a> to collect the output.  <code>StringIO</code> uses, uh, strings&#8212;strings with the default system encoding.  Reading the module documentation, it would appear that mixing String and Unicode input in your StringIO will cause this sort of issue.</p>
	<p>Andres suggested marking my templates as UTF-8 XML using something like:</p>
<pre>
 &lt; ?xml version="1.0" encoding="UTF-8" ?&gt;
</pre>
	<p>but even after doing this and fixing the resulting entity errors, there&#8217;s still obviously some 8 bit Strings leaking into the output.  In conversations on IRC the question was then asked: &#8220;is there a reason you don&#8217;t want a reasonable system wide encoding if your locale can support it?&#8221;  </p>
	<p>I guess not<sup><a href="#fn197846932948ea656de5264">3</a></sup>.</p>
	<p><strong>UPDATE</strong> Martijn has a tangentially related <a href="http://faassen.n--tree.net/blog/view/weblog/2005/08/02/0">post</a> which sheds some light on why Python does/should ship with <code>ascii</code> as the default codec.  At least people smarter than me have problems with this sort of thing, too.</p>
	<p><hr noshade /></p>
	<p id="fn182382479048ea656dcd3a8"><sup>1</sup> Yes, I may be a bit biased&#8212;I wrote the Zope3/Grok implementation.  Of course, I wrote the previous implementation, too, and I can say without a doubt it was&#8230; <em>&#8220;sub-optimal&#8221;</em>.</p>
	<p id="fn81984132348ea656de4b43"><sup>2</sup> We&#8217;re doing a lot of shuffling lately to complete a 32 to 64 bit conversion; see the <a href="http://labs.creativecommons.org/2008/07/15/32-to-64bit-remotely/">CC Labs blog post</a> for the harrowing details.</p>
	<p id="fn197846932948ea656de5264"><sup>3</sup> So the warning remains.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://yergler.net/blog/2008/07/19/unicode-output-from-zope-3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Avoiding git PTSD</title>
		<link>http://yergler.net/blog/2008/06/13/avoiding_git_ptsd/</link>
		<comments>http://yergler.net/blog/2008/06/13/avoiding_git_ptsd/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 21:56:25 +0000</pubDate>
		<dc:creator>Nathan Y.</dc:creator>
		
		<category><![CDATA[cc]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[git]]></category>

		<category><![CDATA[ptsd]]></category>

		<guid isPermaLink="false">http://yergler.net/blog/?p=554</guid>
		<description><![CDATA[	In an attempt to prevent additional git (or maybe just git-svn?) induced PTSD, Asheesh kindly created a git phrasebook.  If you, too, are a Subversion deserter and want to figure out how the whole branching thing works in git, this may be useful to you.  
	Someday I&#8217;ll write up my thoughts on distributed [...]]]></description>
			<content:encoded><![CDATA[	<p>In an attempt to prevent additional <a href="http://en.wikipedia.org/wiki/Git_(software)">git</a> (or maybe just git-svn?) induced <a href="http://en.wikipedia.org/wiki/PTSD">PTSD</a>, <a href="http://asheesh.org">Asheesh</a> kindly created a <a href="http://wiki.creativecommons.org/Git_phrasebook">git phrasebook</a>.  If you, too, are a <a href="http://en.wikipedia.org/wiki/Subversion_(software)">Subversion</a> deserter and want to figure out how the whole branching thing works in git, this may be useful to you.  </p>
	<p>Someday I&#8217;ll write up my thoughts on distributed version control and &#8220;convention versus configuration&#8221;, which seem to overlap in this deployment.  But not today.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://yergler.net/blog/2008/06/13/avoiding_git_ptsd/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Sane Merging in SVN</title>
		<link>http://yergler.net/blog/2007/11/06/sane-merging-in-svn/</link>
		<comments>http://yergler.net/blog/2007/11/06/sane-merging-in-svn/#comments</comments>
		<pubDate>Tue, 06 Nov 2007 18:32:25 +0000</pubDate>
		<dc:creator>Nathan Y.</dc:creator>
		
		<category><![CDATA[development]]></category>

		<category><![CDATA[branch]]></category>

		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://yergler.net/blog/2007/11/06/sane-merging-in-svn/</guid>
		<description><![CDATA[	We use Subversion for version control at work.  We try to version control everything: code, content, graphics, site configuration.  Everything.  This does wonders for our sanity, but we can do more.  Recently (n < 6 months)) we&#8217;ve started doing something we should have done from Day 1: develop in one tree, [...]]]></description>
			<content:encoded><![CDATA[	<p>We use <a href="http://subversion.tigris.org">Subversion</a> for <a href="http://en.wikipedia.org/wiki/Revision_control">version control</a> at <a href="http://creativecommons.org">work</a>.  We try to version control everything: code, content, graphics, site configuration.  <a href="http://cctools.svn.sourceforge.net">Everything</a>.  This does wonders for our sanity, but we can do more.  Recently (<code>n < 6</code> months)</code>) we&#8217;ve started doing something we should have done from Day 1: develop in one tree, deploy in another.  In our case we&#8217;re developing in the <code>trunk</code>, and there&#8217;s a long-lived branch cleverly named <code>production</code>.  This is great, with one little problem: cherry-picking revisions to merge in Subversion is a pain in the ass.</p>
	<p>Last week I was looking at the <a href="http://subversion.tigris.org/roadmap.html">upcoming features</a> in Subversion 1.5.  <a href="http://asheesh.org/note/">Asheesh</a> had pointed out the <a href="http://subversion.tigris.org/merge-tracking/">merge tracking</a> feature, which sounded lovely.  And it probably will be.  The thing I discovered, though, is that you can get it today in the form of <a href="http://www.orcaware.com/svn/wiki/Svnmerge.py">svnmerge</a>.</p>
<code>svnmerge</code> allows you to track what revisions you&#8217;ve merged from a branch (or trunk), block certain revisions (features you might not want to deploy just yet), and performs the merges for you when that time arrives (including generating a nice commit message containing all the log messages you&#8217;re merging; handy).  I spent an hour yesterday and an hour today getting the merges recorded for the packages I&#8217;m currently working on, and it already feels better.  No more wondering if I remembered to merge something; just <code>svnmerge avail</code> and see if anything shows up.  
	<p>Sure, it&#8217;ll be great to get this feature into the core application (and an interactive mode ala <a href="http://darcs.net">darcs</a> would be slick, too), but to paraphrase Scarlett O&#8217;Hara, &#8220;with god as my witness, I will never <code>svn merge</code> again&#8221;.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://yergler.net/blog/2007/11/06/sane-merging-in-svn/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Sun Rewrites Java Browser Plugin</title>
		<link>http://yergler.net/blog/2007/10/22/sun-rewrites-java-browser-plugin/</link>
		<comments>http://yergler.net/blog/2007/10/22/sun-rewrites-java-browser-plugin/#comments</comments>
		<pubDate>Tue, 23 Oct 2007 01:37:34 +0000</pubDate>
		<dc:creator>Nathan Y.</dc:creator>
		
		<category><![CDATA[development]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://yergler.net/blog/2007/10/22/sun-rewrites-java-browser-plugin/</guid>
		<description><![CDATA[	I&#8217;m not sure that Java applets are even relevant to software development today, but this interview (via Ajaxian) regarding the rewritten Java browser plugin caught my attention:
	
Java Applets Reborn from Dion Almaer on Vimeo.
	So the most interesting things (to me):
	
		The plugin itself is mostly written in Java.  I love these sort of recursive language [...]]]></description>
			<content:encoded><![CDATA[	<p>I&#8217;m not sure that Java applets are even relevant to software development today, but this interview (via <a href="http://ajaxian.com/archives/ken-russell-on-the-new-java-plugin">Ajaxian</a>) regarding the <a href="http://ajaxian.com/archives/sun-has-rewritten-the-browser-java-plugin">rewritten Java browser plugin</a> caught my attention:</p>
	<p><object type="application/x-shockwave-flash" width="400" height="225" data="http://vimeo.com/moogaloop.swf?clip_id=346751&#038;server=vimeo.com&#038;fullscreen=1&#038;show_title=1&#038;show_byline=1&#038;show_portrait=0&#038;color="><param name="quality" value="best" /><param name="allowfullscreen" value="true" /><param name="scale" value="showAll" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=346751&#038;server=vimeo.com&#038;fullscreen=1&#038;show_title=1&#038;show_byline=1&#038;show_portrait=0&#038;color=" /></object><br />
<a href="http://vimeo.com/346751/l:embed_346751">Java Applets Reborn</a> from <a href="http://vimeo.com/user275301/l:embed_346751">Dion Almaer</a> on <a href="http://vimeo.com/l:embed_346751">Vimeo</a>.</p>
	<p>So the most interesting things (to me):</p>
	<ul>
		<li>The plugin itself is mostly written in Java.  I love these sort of recursive language exercises (see <a href="http://en.wikipedia.org/wiki/PyPy">PyPy</a>), if nothing else for their <a href="http://en.wikipedia.org/wiki/Turtles_all_the_way_down">turtles all the way down</a> effect.  But I suppose this actually makes a certain degree of sense: if you have a fixed set of resources and you&#8217;re putting lots of them towards improving the JVM/JRE, you can take advantage of those improvements by writing your plugin in Java.  They don&#8217;t talk about the architecture of the old plugin much, but I wouldn&#8217;t be terribly surprised to find out the native-code &#8220;shim&#8221; used to communicate between the browser and the JVM is easier to maintain than the old plugin was.</li>
		<li>Applets run in a completely independent process (not just thread).</li>
	</ul>
	<ul>
		<li>An applet can demand to run with a particular JRE version.  They label this &#8220;enterprise support.&#8221;  I&#8217;d call it &#8220;sanity support.&#8221;
	<p>None of this really speaks to whether it&#8217;s too little, too late.  It seems like a good move on Sun&#8217;s part, especially given the recent attention on rich internet applications (RIAs) has focused (not necessarily undeservedly) on <a href="http://en.wikipedia.org/wiki/Adobe_Flash">Flash</a>, <a href="http://en.wikipedia.org/wiki/Adobe_AIR">Adobe AIR</a> (the vapor-ware jokes write themselves, don&#8217;t they?) and <a href="http://en.wikipedia.org/wiki/Microsoft_Silverlight">Microsoft Silverlight</a>.  The amount of press and attention may indicate this is an area whose time has come.  And while I admit having a begrudging soft spot for Java, it seems that companies (especially capital-&#8221;E&#8221; &#8220;enterprise&#8221; companies) who already have lots of in house Java expertise could benefit from being able to extend that knowledge down to the desktop.  Maybe.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://yergler.net/blog/2007/10/22/sun-rewrites-java-browser-plugin/feed/</wfw:commentRss>
		</item>
		<item>
		<title>For Some Definition of &#8220;online&#8221;</title>
		<link>http://yergler.net/blog/2007/03/06/for-some-definition-of-online/</link>
		<comments>http://yergler.net/blog/2007/03/06/for-some-definition-of-online/#comments</comments>
		<pubDate>Tue, 06 Mar 2007 14:08:27 +0000</pubDate>
		<dc:creator>Nathan Y.</dc:creator>
		
		<category><![CDATA[annoyance]]></category>

		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://yergler.net/blog/2007/03/06/for-some-definition-of-online/</guid>
		<description><![CDATA[	Starting yesterday afternoon I found that I couldn&#8217;t commit code to Creative Commons&#8217; Subversion repository at Sourceforge.  &#8220;Just another intermittent outage,&#8221; I thought.  I even took a look at the site status page, saw that Subversion was &#8220;online&#8221; and figured it&#8217;d be resolved by the morning.
	Well this morning it&#8217;s still down, so I [...]]]></description>
			<content:encoded><![CDATA[	<p>Starting yesterday afternoon I found that I couldn&#8217;t commit code to Creative Commons&#8217; Subversion repository at <a href="http://sourceforge.net/projects/cctools">Sourceforge</a>.  &#8220;Just another intermittent outage,&#8221; I thought.  I even took a look at the <a href="http://sourceforge.net/docs/A04">site status</a> page, saw that Subversion was &#8220;online&#8221; and figured it&#8217;d be resolved by the morning.</p>
	<p>Well this morning it&#8217;s still down, so I took another look.  Yup, still online:</p>
	<p><a href='http://yergler.net/blog/wp-content/uploads/2007/03/sf_lies.png' title='SF.net Lies'><img src='http://yergler.net/blog/wp-content/uploads/2007/03/sf_lies.png' alt='SF.net Lies' /></a></p>
	<p>And then you scroll down and find the truth:</p>
	<p><a href='http://yergler.net/blog/wp-content/uploads/2007/03/sf_truth.png' title='SF.net Truth'><img src='http://yergler.net/blog/wp-content/uploads/2007/03/sf_truth.png' alt='SF.net Truth' /></a></p>
	<p>So can someone explain to me how &#8220;completely inaccessible due to a massive DDOS attack&#8221; (my words) is in any way equivalent to &#8220;online&#8221;?  </p>

 ]]></content:encoded>
			<wfw:commentRss>http://yergler.net/blog/2007/03/06/for-some-definition-of-online/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PyCon Day 1, Morning Sessions</title>
		<link>http://yergler.net/blog/2007/02/23/pycon-day-1-morning-sessions/</link>
		<comments>http://yergler.net/blog/2007/02/23/pycon-day-1-morning-sessions/#comments</comments>
		<pubDate>Fri, 23 Feb 2007 18:36:19 +0000</pubDate>
		<dc:creator>Nathan Y.</dc:creator>
		
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://yergler.net/blog/2007/02/23/pycon-day-1-morning-sessions/</guid>
		<description><![CDATA[	This morning following the &#8220;keynote&#8221;, I attended the &#8220;State fo Zope Panel&#8221;.  As Jim pointed out at the start (and as I remember from past years), this is typically part one of the Jim Show (part two being about Zope 3 or the Zope Component Architecture).  This year the panel consists of four [...]]]></description>
			<content:encoded><![CDATA[	<p>This morning following the &#8220;keynote&#8221;, I attended the &#8220;State fo Zope Panel&#8221;.  As Jim pointed out at the start (and as I remember from past years), this is typically part one of the Jim Show (part two being about Zope 3 or the Zope Component Architecture).  This year the panel consists of four developers, with someone representing Zope 3, Zope 2, Plone and Zope writ large (including the Zope Foundation).  After hearing about the state of Plone, Zope 2, and Zope 3, Jim spoke about the Zope Foundation.  I was particularly suprised to that there are only 48 committer members in the foundation.  Given that I&#8217;m one of them, well&#8230; wow<sup><a href="#fn125985094648ea656e3c2f6">1</a></sup>.  I appreciated Jim&#8217;s frankess about the challenges the Foundation faces, as well as his thoughts on Zope as a Pluggable Application versus Zope as a Library.  </p>
	<p>Based on the questions to the panel, there still seems to be lots of angst over the future of Zope 2 with respect to Zope 3.  Jim made some deceptively sane comments about Zope 2 and Zope 3 last year<sup><a href="#fn96498188948ea656e3cacb">2</a></sup>, and it seems like people still want to know &#8220;when will Zope 3 be the <strong>real</strong> Zope&#8221; which implies the corollary, &#8220;when will Zope 2 die?&#8221;  I think this agnst stems from the desire not to invest in a &#8220;dead&#8221; technology, or to invest too early in an immature one.  But the answer just doesn&#8217;t matter.  Zope 2 is appropriate for use cases which Zope 3 is not, and vice versa.</p>
	<p><hr noshade /></p>
	<p>Following the Zope Panel I attended Ernesto Posse&#8217;s talk on writing parsers using grammar transformation.  Posse set out to implement the <a href="http://en.wikipedia.org/wiki/LL%281%29">LL(1) parsing algorithm</a> based on its simplicity and speed.  However, given the limited expressiveness of an LL(1) grammar, his solution (called <a href="http://moncs.cs.mcgill.ca/people/eposse/projects/aperiot/">aperiot</a>) was to writer a parser grammar transformation which transforms a non-LL(1) grammar to an LL(1) grammar.  Aperiot allows you to generate a parser as a Python module from a give grammar definition.  </p>
	<p>Grammar parsing is one of those topics which I find academically interesting, but which I have a real problem following in the course of a talk.  Especially with 2 hours of sleep.  But from what I was able to absorb, I think aperiot is something I&#8217;d investigate if I needed to write a parser.</p>
	<p><hr noshade /></p>
	<p>The final morning talk I attended was an overview of developing desktop applications with Dabo.  Ed presented on <a href="http://dabodev.com/">Dabo</a> two years ago at PyCon is DC; I remember it well because I was in the same track as him<sup><a href="#fn206054728048ea656e3ecbb">3</a></sup>, presenting about cross-platform development with <a href="http://wxpython.org">wxPython</a>. If I recall correctly, Ed&#8217;s talk in DC talked a lot about the automated database to UI development.  Today&#8217;s talk focused on how Dabo wraps the wxPython API to make it more &#8220;Python-ic&#8221;.  Ed has a really good point: wxPython is powerful, and it looks great on each platform, because it uses native widgets.  But when it comes to the API, knowing how C++ works is unfortunately a benefit, because it&#8217;s C++ roots show through<sup><a href="#fn192307301848ea656e3f5cc">4</a></sup>.</p>
	<p>After some slides presenting an overview of Dabo&#8217;s API, Ed presented a deceptively simple example program.  The example loads an image, and allows the user to rotate, resize, stretch, clip, etc.  Image handling is a particular token of pain in wxPython, so the demo really resonated with me.  Particularly cool points:</p>
	<ul>
		<li>Loading an image is as simple as assigning a file path to the picture property of an image control; Dabo handles the loading process.</li>
	</ul>
	<ul>
		<li>Python objects can act as &#8220;data sources&#8221;; more accurately, Dabo has a really flexible binding method, which allows you to do things like create a drop-down that changes the image clipping mode (this is really simple, but hey, saving 4 lines of code is saving 4 lines of code).
	<p>For his final image demo, Ed demonstrated adding drag and drop support to the image control.  Drag and drop is&#8230; well, it <strong>still</strong> doesn&#8217;t work exactly right under some edge cases in ccPublisher or ccLookup, and that code&#8217;s been reworked half a dozen times with special exceptions and handlers.   I think the total code to add support was something like 3 or 4 lines. If it works half as well as the demo, that&#8217;s really cool.</p>
	<p>Ed wrapped up his talk with a demonstration of creating a wxPython grid bound to a database.  Holy crap.  I&#8217;m not sure exactly when I&#8217;ll use Dabo, but the next time I&#8217;m doing cross-platform desktop development, <a href="http://dabodev.com">dabodev.com</a> will be one of my first stops.</p>
	<p><hr noshade /></p>
	<p id="fn125985094648ea656e3c2f6"><sup>1</sup>  I say &#8220;wow&#8221; only because my contributions have been sparse and sporadic, to put it generously.</p>
	<p id="fn96498188948ea656e3cacb"><sup>2</sup> Zope 3 doesn&#8217;t need to replace Zope 2, maybe it never will, or maybe there should be something called Zope 5 that just builds Zope 2 as an application on the Zope 3 library&#8230; or something like that.  It <strong>was</strong> a year ago, and I <strong>have</strong> been to Rio since then.</p>
	<p id="fn206054728048ea656e3ecbb"><sup>3</sup> It was sort of the year of the desktop development talk, if I recall correctly.</p>
	<p id="fn192307301848ea656e3f5cc"><sup>4</sup> Admittedly they show through to a much smaller degree now, but there are still moment</p>

 ]]></content:encoded>
			<wfw:commentRss>http://yergler.net/blog/2007/02/23/pycon-day-1-morning-sessions/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Snowed In</title>
		<link>http://yergler.net/blog/2007/02/13/snowed-in/</link>
		<comments>http://yergler.net/blog/2007/02/13/snowed-in/#comments</comments>
		<pubDate>Tue, 13 Feb 2007 22:54:45 +0000</pubDate>
		<dc:creator>Nathan Y.</dc:creator>
		
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://yergler.net/blog/2007/02/13/snowed-in/</guid>
		<description><![CDATA[	So Fort Wayne and the surrounding county is under a &#8220;Level 2 Snow Emergency&#8221; until further notice.  This basically means that if you park on the street, you will be towed.  If you drive, you better have a damn good reason.  So I&#8217;m doing neither.  I&#8217;m sitting at home coding, of [...]]]></description>
			<content:encoded><![CDATA[	<p>So Fort Wayne and the surrounding county is under a &#8220;Level 2 Snow Emergency&#8221; until further notice.  This basically means that if you park on the street, you will be towed.  If you drive, you better have a damn good reason.  So I&#8217;m doing neither.  I&#8217;m sitting at home coding, of course.</p>
	<p>I gave up the two-machine (desktop and laptop) dichotomy last year, selling my iMac on eBay when I found it just wasn&#8217;t getting the use I thought it needed to.  In the interim I&#8217;ve had moments where I thought that was exactly the right decision and moments where I just wasn&#8217;t sure.  Usually I came down on the &#8220;it&#8217;d probably be nice to have a desktop&#8221; side: sure, there are all sorts of problems with keeping things in sync, but the (relatively) cheap storage for things like audio and video means I don&#8217;t have to pay a premium for a big ass laptop drive.  </p>
	<p>Over the weekend I received a check for some consulting work I did, so yesterday I went to <a href="http://sweetwater.com">my local Apple dealer</a> and bought a new <a href="http://apple.com/imac">iMac</a>.  I have admittedly mixed feelings about Mac OS X (see <a href="http://diveintomark.org/archives/2006/06/02/when-the-bough-breaks">Mark&#8217;s thoughts</a>, which mirror mine to a certain extent), but I figured I either have to pay the Microsoft Tax or the Apple Tax, so I may as well have a machine I find aesthetically pleasing that will make a great <a href="http://www.ubuntu.com/">Ubuntu</a> box<sup><a href="#fn87059470648ea656e4c8a2">1</a></sup>.</p>
	<p>Anyway, I haven&#8217;t installed Ubuntu yet, but I was playing with Dashcode a bit this afternoon.  So if you like <a href="http://ccmixter.org">ccMixter</a> (and I think you should), check out the <a href="http://wiki.creativecommons.org/CcMixterWidget">ccMixter Editors&#8217; Picks</a> widget.</p>
	<p><img src='http://yergler.net/blog/wp-content/uploads/2007/02/widget_screen.png' alt='ccMixter Editors’ Picks widget' /></p>
	<p>When you install it in the Dashboard it lets you easily play the latest Editors&#8217; Picks from ccMixter.  And if you want more information, just click the &#8221;>&#8221; button and it&#8217;ll open the selected track at ccMixter.org.</p>
	<p><hr noshade /></p>
	<p id="fn87059470648ea656e4c8a2"><sup>1</sup> And it&#8217;s not an HP.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://yergler.net/blog/2007/02/13/snowed-in/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Little Things</title>
		<link>http://yergler.net/blog/2007/01/30/the-little-things/</link>
		<comments>http://yergler.net/blog/2007/01/30/the-little-things/#comments</comments>
		<pubDate>Tue, 30 Jan 2007 13:00:21 +0000</pubDate>
		<dc:creator>Nathan Y.</dc:creator>
		
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://yergler.net/blog/2007/01/30/the-little-things/</guid>
		<description><![CDATA[	I&#8217;m knee deep in several projects right now, some using darcs and some using subversion for version control.  There are things I like about both, but that&#8217;s a different topic.  There&#8217;s really only one thing I loathe about Subversion, and it looks like this:

$ svn propget svn:externals .
  svn: Inconsistent line ending [...]]]></description>
			<content:encoded><![CDATA[	<p>I&#8217;m knee deep in several projects right now, some using <a href="http://darcs.net">darcs</a> and some using <a href="http://subversion.tigris.org/">subversion</a> for version control.  There are things I like about both, but that&#8217;s a different topic.  There&#8217;s really only <em>one thing</em> I loathe about Subversion, and it looks like this:</p>
<pre><code>
$ svn propget svn:externals .
  svn: Inconsistent line ending style
</code></pre>
	<p>Arghhh!</p>
	<p>Insert rant about how the hell line endings get inconsistent on something Subversion should have complete control over here.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://yergler.net/blog/2007/01/30/the-little-things/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Wiki Licensing for MoinMoin</title>
		<link>http://yergler.net/blog/2007/01/10/wiki-licensing-for-moinmoin/</link>
		<comments>http://yergler.net/blog/2007/01/10/wiki-licensing-for-moinmoin/#comments</comments>
		<pubDate>Wed, 10 Jan 2007 22:11:10 +0000</pubDate>
		<dc:creator>Nathan Y.</dc:creator>
		
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://yergler.net/blog/2007/01/10/wiki-licensing-for-moinmoin/</guid>
		<description><![CDATA[	I&#8217;ve been using MoinMoin for managing the non-blog content of yergler.net for some time now, and its mostly been a great choice for me.  Just enough through-the-web management to make maintaining the content less burdensome.  One feature I noticed it was missing (compared to MediaWiki, which we use at work) is Creative Commons [...]]]></description>
			<content:encoded><![CDATA[	<p>I&#8217;ve been using <a href="http://moinmoin.wikiwikiweb.de/">MoinMoin</a> for managing the non-blog content of <a href="http://yergler.net">yergler.net</a> for some time now, and its mostly been a great choice for me.  Just enough through-the-web management to make maintaining the content less burdensome.  One feature I noticed it was missing (compared to <a href="http://mediawiki.org">MediaWiki</a>, which we use <a href="http://wiki.creativecommons.org">at work</a>) is Creative Commons license support.  After I started to do some digging I found that there <em>is</em> support for a wiki license page.  If enabled, this adds some text to the editor pages notifying contributors that their content will be subject to the site license.</p>
	<p><img src="http://yergler.net/blog/wp-content/uploads/2007/01/moinlicense.png" border="0" style="text-align:center; border: 1px solid #000;" /></p>
	<p>So over the weekend I put together <a href="http://yergler.net/MoinLicense">MoinLicense</a>.  MoinLicense is a pair of actions and a macro for MoinMoin which enables license selection.  In addition to supporting a site-wide license, MoinLicense allows you to select a particular license for any page.  Details, download information and known issues are in <a href="http://yergler.net/MoinLicense">the wiki</a>, natch.</p>


 ]]></content:encoded>
			<wfw:commentRss>http://yergler.net/blog/2007/01/10/wiki-licensing-for-moinmoin/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Deploying Python Code: Support Services</title>
		<link>http://yergler.net/blog/2006/12/15/deploying-python-code-support-services/</link>
		<comments>http://yergler.net/blog/2006/12/15/deploying-python-code-support-services/#comments</comments>
		<pubDate>Fri, 15 Dec 2006 22:00:12 +0000</pubDate>
		<dc:creator>Nathan Y.</dc:creator>
		
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://yergler.net/blog/2006/12/15/deploying-python-code-support-services/</guid>
		<description><![CDATA[	Just over a month ago I blogged about my first experience with zc.buildout.  For those that don&#8217;t remember (shame on you!), zc.buildout is a Python tool developed by Jim Fulton of Zope fame for constructing software installations.  &#8220;Buildouts&#8221;, if you will.  The attraction to this over, say, just distutils or just setuptools [...]]]></description>
			<content:encoded><![CDATA[	<p>Just over a month ago I <a href="http://yergler.net/blog/2006/11/07/deploying-python-applications/">blogged</a> about my first experience with <a href="http://cheeseshop.python.org/pypi/zc.buildout/">zc.buildout</a>.  For those that don&#8217;t remember (shame on you!), zc.buildout is a Python tool developed by Jim Fulton of Zope fame for constructing software installations.  &#8220;Buildouts&#8221;, if you will.  The attraction to this over, say, just <a href="http://www.python.org/doc/lib/module-distutils.html">distutils</a> or just <a href="http://peak.telecommunity.com/DevCenter/setuptools">setuptools</a> is that you can go from a bare-bones <a href="http://python.org">Python</a> installation and source code checkout (or tar-ball) to a fully functional application, with dependencies and the trimmings, in a predictable, sane way.  The fact that dependencies are installed in a local folder makes this especially appealing for deploying code on hosts where you don&#8217;t have write access to <code>site-packages</code>.  But enough re-hashing my last zc.buildout post.</p>
	<p>As I mentioned in my previous post, I&#8217;ve been using zc.buildout mostly to deploy the web applications that power <a href="http://creativecommons.org">Creative Commons&#8217;</a> <a href="http://api.creativecommons.org">web services</a>  These are written using CherryPy, and were previously invoked as simple CGI scripts.  However, as usage grew, we needed to move them to independent processes, which Apache proxied to using mod_rewrite.  zc.buildout provided a great way to generate the wrapper script for running that process, but early this week we ran into a problem: we didn&#8217;t have a good way to detect if the process died for some reason and needed to be restarted.</p>
	<p>I decided that a simple approach was best for the initial go-round, and wrote a small shell script that looks at the <code>pid</code> file, checks if it&#8217;s still running and if not starts the process.  Put this in a cron job that runs every 10 minutes or so, and you have a poor man&#8217;s watchdog<sup><a href="#fn208288732848ea656e6bc92">1</a></sup>.  After writing two of these, I realized that this is something that should really be automated as part of my software installation: I always want to have a &#8220;am I up?&#8221; check script available, and so my first custom zc.buildout recipe, <code>build_script</code>, is born. </p>
	<p><a href="http://cheeseshop.python.org/pypi/buildout_script">build_script</a> is a recipe that takes a template file, fills in values using Python <a href="http://www.python.org/doc/lib/typesseq-strings.html">string formatting</a> and marks it as executable.  It has one template included, <code>paster-check</code> that we&#8217;re using to check on a <a href="http://pythonpaste.org/script">paster</a> process, and you can use templates that are part of the egg itself or are part of your codebase (via the <code>template_dir</code> setting).</p>
	<p>You can find the code for <b>build_script</b> itself in Creative Commons&#8217; <a href="http://sourceforge.net/svn/?group_id=80503">subversion repository</a> (<a href="http://cctools.svn.sourceforge.net/viewvc/cctools/buildout_script/">web view</a>), and an example of how we&#8217;re using it for our web services is <a href="http://cctools.svn.sourceforge.net/viewvc/cctools/api/trunk/buildout.cfg?revision=HEAD">here</a>.</p>
	<p>Suggestions, comments, questions all welcome, as are additional templates that might be useful to include in the egg itself.</p>
	<p id="fn208288732848ea656e6bc92"><sup>1</sup> I&#8217;m sure there&#8217;s a better, more robust way to do this, but this is where we&#8217;re comfortable on the down time v. implementation time continuum.  That said, if someone knows of an easy, more robust way, of course I&#8217;d like to hear about it.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://yergler.net/blog/2006/12/15/deploying-python-code-support-services/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
