<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.3" -->
<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/"
	>

<channel>
	<title>Ian Bicking: a blog</title>
	<link>http://blog.ianbicking.org</link>
	<description></description>
	<pubDate>Sun, 23 Nov 2008 20:48:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>
	<language>en</language>
			<item>
		<title>Where Next For Plone Development?</title>
		<link>http://blog.ianbicking.org/2008/11/06/where-next-for-plone-development/</link>
		<comments>http://blog.ianbicking.org/2008/11/06/where-next-for-plone-development/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 04:15:58 +0000</pubDate>
		<dc:creator>Ian Bicking</dc:creator>
		
		<category><![CDATA[Zope/Plone]]></category>

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

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

		<guid isPermaLink="false">http://blog.ianbicking.org/2008/11/06/where-next-for-plone-development/</guid>
		<description><![CDATA[
I attended PloneConf 2008 recently, to talk about Deliverance.  But I&#8217;ll talk here more about my observations as a relative outsider to that community.  (This post is really written for the Plone community &#8212; if you aren&#8217;t familiar with Plone this post probably won&#8217;t make much sense or be very useful.)
One of the [...]]]></description>
			<content:encoded><![CDATA[<div class="document">
<p>I attended <a class="reference external" href="http://plone.org/events/conferences/2008-washington-dc/">PloneConf 2008</a> recently, to talk about <a class="reference external" href="http://deliverance.openplans.org">Deliverance</a>.  But I&#8217;ll talk here more about my observations as a relative outsider to that community.  (This post is really written for the <a class="reference external" href="http://plone.org">Plone</a> community &#8212; if you aren&#8217;t familiar with Plone this post probably won&#8217;t make much sense or be very useful.)</p>
<p>One of the ongoing concerns in the Plone community has been the difficulty of attracting and maintaining developer interest in the community, and generally making Plone easier to work with as a developer.  It&#8217;s been a very successful community for consulting and integration work, but it has not been as rewarding for developers.  There&#8217;s the idea of a &quot;Plone Tax&quot;, which means different things to different people but just generally speaks to the sense that Plone takes a little off the top &#8212; time to restart, time to run the tests, time to dig into code that just goes too deep.  There are some distinct <em>problems</em> with Plone, but probably the biggest problem is the quantity of small challenges and the general size and complexity of the system.</p>
<p>At the moment there is no clear path forward to resolve this.  A previous effort to fix things is a project called <a class="reference external" href="http://codespeak.net/z3/five/">&quot;Five&quot;</a>, which referred to Zope 2+3 &#8212; backporting libraries and techniques from Zope 3 into Zope 2.  Plone is intimately tied to Zope 2, and Five let them use new code without having to do abandon the old environment.  But the result wasn&#8217;t terribly satisfying: Five didn&#8217;t <em>remove</em> any complexity, it only added to it.  Even if the new components were superior that doesn&#8217;t make them <em>simple</em>.  Plone is aching for more <em>simplicity</em>, not more power.</p>
<p>It&#8217;s unclear how Plone can actually reform itself as a codebase.  Zope 2 is a behemoth, and its metaphors are deeply intertwined with existing code.  <a class="reference external" href="http://wiki.zope.org/zope2/Acquisition">Acquisition</a> in particular is ubiquitous, essential to lots of the machinery, and deeply confusing.  I saw a general interest in two directions: one was to encourage non-content-management tasks to be implemented in a complementary (but separate) technology, another direction is continuing to refactor the existing codebase while somehow trying to maintain backward compatibility.</p>
<p>It&#8217;s unclear how to refactor the existing codebase in such a way that it is any simpler, but I suppose these two directions are not exclusive.  I want to focus on the idea of a complementary environment.  There&#8217;s two products in particular that have been attracting interest: <a class="reference external" href="http://grok.zope.org/">Grok</a> and <a class="reference external" href="http://repoze.org/">Repoze</a>.</p>
<p>These two products usually go under the umbrella of &quot;exciting new ways to improve the developer experience in Plone&quot; which is a kind of generic positive sentiment.  But to my mind they represent two significantly different paths forward, and the differences deserve some more critical thought.</p>
<p>Grok is a layer on top of Zope 3 that attempts to make development in that environment more pleasing.  It eliminates most ZCML (ZCML is Zope 3&#8217;s XML-based language for declaring the relation of various components in a system).  Grok uses conventions and introspection to make Zope 3 look more like a traditional web framework, with simple views and models and templates, and less of the wiring you have to set up in typical Zope 3 architectures.  At the same time, you can add all the Zope 3 declarations to break out of the automatic conventions.  Grok is a more pleasant layer on top of Zope 3, but it&#8217;s entirely focused on Zope 3, and it is led by <a class="reference external" href="http://faassen.n--tree.net/blog/">Martijn Faassen</a> and <a class="reference external" href="http://www.z3lab.org/sections/blogs/philipp-weitershausen/">Philipp von Weitershausen</a> who are both very involved with the Zope 3 community.</p>
<p>Repoze is a more recent project, led by <a class="reference external" href="http://plope.com/">Chris McDonough</a>, Tres Seaver, and <a class="reference external" href="http://radio.weblogs.com/0116506/">Paul Everitt</a> (well, Paul might call himself more of a cheerleader).  They all work together at <a class="reference external" href="http://agendaless.com/">Agendaless Consulting</a>.  They&#8217;ve been highly involved in Zope 2 for a long time, and are all former employees of Zope Corp and major contributors to Zope 2.  I don&#8217;t think they&#8217;ve ever quite made the jump to Zope 3, and their consulting and experience kept them involved with Zope 2.  A while back they got some WSGI religion and started splitting out some pieces of Zope into WSGI middleware and other independent libraries.  This included things like pulling out the transaction handler from Zope, reimplementing the Zope 2 publisher so it was more WSGIish, and a <a class="reference external" href="http://repoze.org/repoze_components.html#libraries">variety of other libraries</a>.  These libraries are essentially extractions from Zope, or in the case of the Zope publisher and <a class="reference external" href="http://svn.repoze.org/repoze.plone/trunk/">repoze.plone</a>, a way to wrap what would be considered a &quot;legacy&quot; application in the same interface as other newer pieces.  Having extracted nearly everything they wanted, they&#8217;ve started work on a framework intended to be familiar to the Zope community, <a class="reference external" href="http://static.repoze.org/bfgdocs/">repoze.bfg</a>.  This framework uses some Zope 3 concepts, but it&#8217;s more built from scratch than it is built from Zope 3, and it is attached to Zope 2 only insofar as it uses the pieces they&#8217;ve extracted and the ideas they&#8217;ve become comfortable with.  They&#8217;ve described it as the framework they want to use when someone asks them to build something in Zope 2.</p>
<p>Grok and Repoze have a significantly different development methodology.  One is a layer on Zope 3, the other is an extraction of ideas from Zope 2 (and a few from Zope 3).  In part I think the distinction hasn&#8217;t been presented very clearly because the Repoze and Grok communities overlap a great deal, and everyone is quite congenial with each other, and they are reluctant to enter debates about the designs.  While I <em>also</em> consider them all colleagues, I also feel pretty strongly about the design differences and I feel a discussion contrasting them is important.</p>
<p>Martijn recently <a class="reference external" href="http://faassen.n--tree.net/blog/view/weblog/2008/10/18/0">wrote a post on why Plone should consider Grok</a> and a <a class="reference external" href="http://faassen.n--tree.net/blog/view/weblog/2008/10/19/0">follow-up post</a>.  These posts speak to a variety of advantages Grok has over plain Zope 3, which Grok can offer to Plone to manage its existing use of Zope 3 technologies.</p>
<p>I think Plone shouldn&#8217;t be so focused on managing the complexity of its stack, but focus on reducing that complexity.  And it should reduce that complexity by focusing on content management and moving all the other pieces people have built on Plone out of Plone.  It can&#8217;t just leave people hanging, which is why developing a clear story for how those other pieces should be developed is essential.  Plone <em>the community</em> doesn&#8217;t have to map one-to-one to Plone <em>the software</em>.  Plone the software should become smaller and more focused.  Plone the community doesn&#8217;t have to become more focused &#8212; the community does what it needs to do, what customers ask for, what is necessary to make a site compelling.  To be clear on what I&#8217;m proposing here: Plone should have a community-recommended way to build non-Plone applications.  This doesn&#8217;t mean you <em>have</em> to use those techniques, but it should be much more concrete than just &quot;there&#8217;s a bunch of cool things out there, and maybe you should look around and use one of those.&quot;  By having a community-recommended pattern of development you can maintain and build on the Plone community, which is at least as important an asset as the Plone software.</p>
<p>With this in mind I believe an extraction of Zope 2 and Plone ideas is the right path forward.  Extraction is the process of <em>isolating</em> code and ideas, and <em>localizing</em> the effect of that code.  These are some of the most important ways to actually increase the simplicity of a codebase.  In the Zope 2 (and even 3) codebase the thing that brings the most complexity is the non-locality of code, that parts of the system can effect each other in complex and unexpected ways.  Zope 3 formalizes these patterns of non-locality: the <a class="reference external" href="http://wiki.zope.org/zope3/ComponentArchitectureOverview">Component Architecture</a> is largely about introducing non-localized relationships between code.</p>
<p>Arguably this non-locality of effect is exactly what people want, it&#8217;s what enables pervasive customizations.  When a client asks you to change some little piece deep in the system, you don&#8217;t really want to modify the system&#8217;s code &#8212; you want to add a little code to the outside of the system that effects the change you desire.  The Component Architecture is a formalized way of making these kinds of changes, where Acquisition was a lower-level mechanism to do the same sort of thing.  I remain a <a class="reference external" href="http://www.openplans.org/projects/topp-engineering/blog/2008/10/20/what-bothers-me-about-the-component-architecture/">Component Architecture skeptic</a>, mostly because I think the mechanism is overused.  Still I think clearly Plone needs flexibility that a purely bespoke application would not require.  But there&#8217;s no way out of it: that flexibility has a high cost.  In this there is no clear solution.  In addition to Acquisition, the complexity of Zope 2 security, the many layers of skinning&#8230; is the Component Architecture what Plone needs?  From where I stand it seems like a step further in the wrong direction&#8230; and yes, it is a better placed step than any of the ones before, but if it&#8217;s still a step in the wrong direction does that matter?</p>
<p>I think Plone (at least the community) needs to be conservative in its enabling of these customizations.  Sure, the customizability is &quot;powerful,&quot; but I don&#8217;t hear people clamoring for power.  They want simple, predictable, fast, maintainable.  That&#8217;s not necessarily the same as &quot;easy&quot; &#8212; I think sometimes it&#8217;s worth making things a little longer and less automatic to make a system more explicit and make code more localized.  I think Repoze is a step in <em>this</em> direction, a big (maybe even an intimidatingly giant) step towards simplicity.  That&#8217;s the step I think Plone should make.</p>
<p>So, I offer this as my suggestion to Plone.  I think Plone-the-community has the opportunity to be more than Plone-the-software; I think it <em>must</em> do this to remain viable in the long term.  But to get there the community make some choices &#8212; you can&#8217;t add simplicity.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.ianbicking.org/2008/11/06/where-next-for-plone-development/feed/</wfw:commentRss>
		</item>
		<item>
		<title>pyinstall is dead, long live pip!</title>
		<link>http://blog.ianbicking.org/2008/10/28/pyinstall-is-dead-long-live-pip/</link>
		<comments>http://blog.ianbicking.org/2008/10/28/pyinstall-is-dead-long-live-pip/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 17:59:36 +0000</pubDate>
		<dc:creator>Ian Bicking</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.ianbicking.org/2008/10/28/pyinstall-is-dead-long-live-pip/</guid>
		<description><![CDATA[
I&#8217;ve finished renaming pyinstall to its new name: pip.  The name pip is a acronym and declaration: pip installs packages.
I&#8217;ve also added a small feature intended for Google App Engine users, allowing you to zip and unzip packages in an environment.  For instance:

$ pip zip --list
In ./lib/python2.5/site-packages:
  No zipped packages.
  Unzipped [...]]]></description>
			<content:encoded><![CDATA[<div class="document">
<p>I&#8217;ve finished renaming pyinstall to its new name: <strong>pip</strong>.  The name pip is a acronym and declaration: <em>pip installs packages</em>.</p>
<p>I&#8217;ve also added a small feature intended for Google App Engine users, allowing you to zip and unzip packages in an environment.  For instance:</p>
<pre class="literal-block">
$ pip zip --list
In ./lib/python2.5/site-packages:
  No zipped packages.
  Unzipped packages:
    paste  (98 files)
    pygments  (64 files)
    tempita  (7 files)
    weberror  (31 files)
    webob  (22 files)
    webtest  (9 files)
    nose  (43 files)
    setuptools-0.6c9-py2.5.egg  (43 files)
    simplejson  (28 files)
$ pip zip webob
Zip webob (in ./lib/python2.5/site-packages/webob)
</pre>
<p>Right now this doesn&#8217;t work well with egg directories (i.e., packages installed with <tt class="docutils literal"><span class="pre">easy_install</span></tt>), though that shouldn&#8217;t be too hard to resolve.  <tt class="docutils literal"><span class="pre">pip</span> <span class="pre">install</span></tt> itself does not install packages into egg directories (it <em>does</em> install eggs, which is to say it installs all the egg metadata and works fine with <a class="reference external" href="http://peak.telecommunity.com/DevCenter/PkgResources">pkg_resources</a>).</p>
<p>I don&#8217;t really use <a class="reference external" href="http://pypi.python.org/pypi/zc.buildout">buildout</a> myself, but I would like to throw it out there that I think someone should create a pip recipe as an alternative to <a class="reference external" href="http://pypi.python.org/pypi/zc.recipe.egg">zc.recipe.egg</a>.  There&#8217;s not really a stable programmatic API in pip at this point, but with no consumers of the API it feels like premature design to settle on something now &#8212; integrate with pip and we can figure out what that stable API should be.  If you integrate buildout, probably another useful feature would be an option have to <tt class="docutils literal"><span class="pre">pip</span> <span class="pre">freeze</span></tt> write the packages out to a setting in your <tt class="docutils literal"><span class="pre">buildout.cfg</span></tt>.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.ianbicking.org/2008/10/28/pyinstall-is-dead-long-live-pip/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hypertext-driven URLs</title>
		<link>http://blog.ianbicking.org/2008/10/24/hypertext-driven-urls/</link>
		<comments>http://blog.ianbicking.org/2008/10/24/hypertext-driven-urls/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 18:03:57 +0000</pubDate>
		<dc:creator>Ian Bicking</dc:creator>
		
		<category><![CDATA[Web]]></category>

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

		<guid isPermaLink="false">http://blog.ianbicking.org/2008/10/24/hypertext-driven-urls/</guid>
		<description><![CDATA[
Roy T. Fielding, author of the REST thesis wrote an article recently: REST APIs must be hypertext-driven.  I liked this article, it fit with an intuition I&#8217;ve had.  Then he wrote an article explaining that he wouldn&#8217;t really explain the other articles because, I guess, he wanted a conversation with the specialists, and [...]]]></description>
			<content:encoded><![CDATA[<div class="document">
<p>Roy T. Fielding, author of the <a class="reference external" href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm">REST thesis</a> wrote an article recently: <a class="reference external" href="http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven">REST APIs must be hypertext-driven</a>.  I liked this article, it fit with an intuition I&#8217;ve had.  Then he wrote an article <a class="reference external" href="http://roy.gbiv.com/untangled/2008/specialization">explaining that he wouldn&#8217;t really explain the other articles</a> because, I guess, he wanted a conversation with the specialists, and it seems like a kind of invitation to reinterpret his writing.  So <a class="reference external" href="http://www.25hoursaday.com/weblog/2008/10/24/RESTAPIDesignInventMediaTypesNotProtocolsAndUnderstandTheImportanceOfHyperlinks.aspx">since others</a> <a class="reference external" href="http://blog.whatfettle.com/2008/10/21/what-i-believe-roy-said/">are doing it</a> I figured I&#8217;d do it too.</p>
<p>I&#8217;d summarize his argument thus:</p>
<ul class="simple">
<li>Focus on media types, i.e., resource formats, i.e., document formats.  The protocol will flow from these if they are well specified.</li>
<li>URL structures are not a media type.  They are some kind of server layout.  You can&#8217;t hold them, you can&#8217;t pass them around, there is no notion of CRUD.  Media types have all sorts of advantages that URL structures do not.</li>
</ul>
<p>An example of a protocol based on a URL structure would be something like:</p>
<ul class="simple">
<li>Do <tt class="docutils literal"><span class="pre">GET</span> <span class="pre">/articles/</span></tt> to get a JSON list of all the article ids, with a response like <tt class="docutils literal"><span class="pre">[1,</span> <span class="pre">2,</span> <span class="pre">3]</span></tt></li>
<li>Do a <tt class="docutils literal"><span class="pre">GET</span> <span class="pre">/articles/{id}</span></tt> to get the representation of a specific article.</li>
</ul>
<p>JSON is a reasonable structure for a media type.  It is not <em>itself</em> a fully explained type, because it&#8217;s just a container for data, just like XML.  In this example you have a document, <tt class="docutils literal"><span class="pre">[1,</span> <span class="pre">2,</span> <span class="pre">3]</span></tt> which isn&#8217;t self-describing and just isn&#8217;t very useful.  A more appropriate protocol would be:</p>
<ul class="simple">
<li>You start with a container, in our example <tt class="docutils literal"><span class="pre">/articles/</span></tt>.  Do <tt class="docutils literal"><span class="pre">GET</span> <span class="pre">/articles/</span></tt> to get a JSON document listing the URLs of all the articles.  These URLs are relative to the container URL.  You&#8217;ll get a response like <tt class="docutils literal"><span class="pre">[&#8217;./1&#8242;,</span> <span class="pre">&#8216;./2&#8242;,</span> <span class="pre">&#8216;./3&#8242;]</span></tt> (actually <tt class="docutils literal"><span class="pre">[&#8217;1&#8242;,</span> <span class="pre">&#8216;2&#8242;,</span> <span class="pre">&#8216;3&#8242;]</span></tt> would be fine too).</li>
<li>Do <tt class="docutils literal"><span class="pre">GET</span> <span class="pre">{article-url}</span></tt> to get the article representation.</li>
</ul>
<p>It&#8217;s a small difference.  Heck, the communication could look identical in practice, but by putting <strong>URLs</strong> in the JSON document instead of this abstract &quot;id&quot; notion you&#8217;ve created a more flexible and self-describing system.  You could probably give a name to that list of URLs, and then just talk about that name.</p>
<p>An example in <a class="reference external" href="http://www.atompub.org/">Atompub</a> is <a class="reference external" href="http://bitworking.org/projects/atom/rfc5023.html#memuri">rel=&quot;edit&quot;</a>.  An Atom entry can look like:</p>
<pre class="literal-block">
&lt;entry&gt;...
  &lt;link rel=&quot;edit&quot; href=&quot;/post/15&quot; /&gt;
&lt;/entry&gt;
</pre>
<p>Instead of the client just somehow <em>knowing</em> where to go to edit an entry, it&#8217;s made explicit.  Thus you can move the entry around, while still pointing back to the canonical location to edit that entry.</p>
<p>There&#8217;s nothing really that complicated about this, the rule is really quite simple: link to other things, don&#8217;t just expect the client to know or guess where those other things are.</p>
<p>For a more concrete example of where this linking works well, OpenID uses <tt class="docutils literal"><span class="pre">&lt;link</span> <span class="pre">rel=&quot;openid.server&quot;</span> <span class="pre">href=&quot;&#8230;&quot;&gt;</span></tt> and <tt class="docutils literal"><span class="pre">&lt;link</span> <span class="pre">rel=&quot;openid.delegate&quot;</span> <span class="pre">href=&quot;&#8230;&quot;&gt;</span></tt>, which allows you to add a little information to any HTML homepage so that the login can happen at a third location.  If OpenID used something like looking at <tt class="docutils literal"><span class="pre">{homepage}/openid</span></tt> for a OpenID server then you couldn&#8217;t select whatever OpenID service you liked, or change services, or apply OpenID to hosted locations where you couldn&#8217;t install an OpenID server.</p>
<p>I&#8217;ll add my own little opinion in here: this is why the URL structure of applications doesn&#8217;t affect their RESTfulness, nor is URL structure all that important of a concern generally.  Pretty URL structures are a nice thing to do, like indenting your code in a pleasant way, but it has nothing to do with your API, and if you can&#8217;t use a crappy URL structure with that same API then probably something is wrong with that API.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.ianbicking.org/2008/10/24/hypertext-driven-urls/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Decorators and Descriptors</title>
		<link>http://blog.ianbicking.org/2008/10/24/decorators-and-descriptors/</link>
		<comments>http://blog.ianbicking.org/2008/10/24/decorators-and-descriptors/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 06:18:00 +0000</pubDate>
		<dc:creator>Ian Bicking</dc:creator>
		
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.ianbicking.org/2008/10/24/decorators-and-descriptors/</guid>
		<description><![CDATA[
So, decorators are neat (maybe check out a new tutorial on them).  Descriptors are neat but may seem hard (though they hardly take a long time to describe).  Sometimes these two things intersect, and this post describes how.
Here&#8217;s an example decorator where this comes up.  First, we want something that looks like [...]]]></description>
			<content:encoded><![CDATA[<div class="document">
<p>So, <a class="reference external" href="http://www.python.org/dev/peps/pep-0318/">decorators</a> are neat (maybe check out a <a class="reference external" href="http://www.artima.com/weblogs/viewpost.jsp?thread=240808">new tutorial on them</a>).  <a class="reference external" href="http://users.rcn.com/python/download/Descriptor.htm">Descriptors</a> are neat but may seem hard (though they hardly take a long time to describe).  Sometimes these two things intersect, and this post describes how.</p>
<p>Here&#8217;s an example decorator where this comes up.  First, we want something that looks like a WSGI application:</p>
<pre class="literal-block">
def application(environ, start_response):
    start_response('200 OK', [('content-type', 'text/html')])
    return ['hi!']
</pre>
<p>But we want to use WebOb, like:</p>
<pre class="literal-block">
from webob import Request, Response
def application(environ, start_response):
    req = Request(environ)
    resp = Response('hi!')
    return resp(environ, start_response)
</pre>
<p>(We don&#8217;t use <tt class="docutils literal"><span class="pre">req</span></tt> in this example, but of course you probably would in a real WSGI application)</p>
<p>Now <tt class="docutils literal"><span class="pre">req</span> <span class="pre">=</span> <span class="pre">Request(environ)</span></tt> is boilerplate, and it&#8217;d be nicer to just do <tt class="docutils literal"><span class="pre">return</span> <span class="pre">resp</span></tt> instead of <tt class="docutils literal"><span class="pre">return</span> <span class="pre">resp(environ,</span> <span class="pre">start_response)</span></tt>.  So let&#8217;s make a decorator to do that:</p>
<pre class="literal-block">
class wsgiapp(object):
    def __init__(self, func):
        self.func = func
    def __call__(self, environ, start_response):
        resp = self.func(Request(environ))
        return resp(environ, start_response)

&#64;wsgiapp
def application(req):
    return Response('hi!')
</pre>
<p>If you don&#8217;t understand what happened there, go read up on decorators.<br />
Now, what if you want to decorate a method?  For instance:</p>
<pre class="literal-block">
class Application(object):
    def __init__(self, text):
        self.text = text
    &#64;wsgiapp
    def __call__(self, req):
        return Response(self.text)
application = Application('hi!')
</pre>
<p>This won&#8217;t <em>quite</em> work, because <tt class="docutils literal"><span class="pre">&#64;wsgiapp</span></tt> will call <tt class="docutils literal"><span class="pre">Application.__call__(req)</span></tt> &#8212; with <em>no self argument</em>.  This is generally a problem with any decorator that changes the signature, because the signature for methods has this extra <tt class="docutils literal"><span class="pre">self</span></tt> argument.  Descriptors can handle this.  First we&#8217;ll have the same <tt class="docutils literal"><span class="pre">wsgiapp</span></tt> definition as we had before, but we&#8217;ll add the magic descriptor method <tt class="docutils literal"><span class="pre">__get__</span></tt>:</p>
<pre class="literal-block">
class wsgiapp(object):
    def __init__(self, func):
        self.func = func
    def __call__(self, environ, start_response):
        resp = self.func(Request(environ))
        return resp(environ, start_response)
    def __get__(self, obj, type=None):
        if obj is None:
            return self
        new_func = self.func.__get__(obj, type)
        return self.__class__(new_func)
</pre>
<p>So, to explain:</p>
<p>When you get an attribute from an instance, like <tt class="docutils literal"><span class="pre">Application().__call__</span></tt>, Python will check if the object that was fetched has a <tt class="docutils literal"><span class="pre">__get__</span></tt> method.  If it does, it will call that method and use the result of that method.</p>
<p>This part:</p>
<pre class="literal-block">
if obj is None:
    return self
</pre>
<p>is what happens when you do <tt class="docutils literal"><span class="pre">Application.__call__</span></tt> &#8212; in other words, when get a class attribute.  In that case <tt class="docutils literal"><span class="pre">obj</span></tt> (self) will be None, and it will just return the descriptor (it <em>could</em> do something else, like in <a class="reference external" href="http://svn.colorstudy.com/home/ianb/recipes/classinstance.py">this example</a>, but usually it doesn&#8217;t).</p>
<p>Functions already have a <tt class="docutils literal"><span class="pre">__get__</span></tt> method.  You can try it yourself:</p>
<pre class="literal-block">
&gt;&gt;&gt; def example(*args):
...     print 'got', args
&gt;&gt;&gt; example_bound = example.__get__(1)
&gt;&gt;&gt; example_bound('test')
got (1, 'test')
</pre>
<p>So in the example with <tt class="docutils literal"><span class="pre">wsgiapp</span></tt> we are just changing the decorator to wrap the new <em>bound</em> function instead of the old unbound function.  This allows <tt class="docutils literal"><span class="pre">wsgiapp</span></tt> to be compatible with both plain functions and methods.  In fact, it would probably be preferable to <em>always</em> call <tt class="docutils literal"><span class="pre">func.__get__(obj,</span> <span class="pre">type)</span></tt> (even if <tt class="docutils literal"><span class="pre">obj</span> <span class="pre">is</span> <span class="pre">None</span></tt>), as then we could also wrap class methods or other kinds of descriptors.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.ianbicking.org/2008/10/24/decorators-and-descriptors/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Philosophy of Deliverance</title>
		<link>http://blog.ianbicking.org/2008/10/06/the-philosophy-of-deliverance/</link>
		<comments>http://blog.ianbicking.org/2008/10/06/the-philosophy-of-deliverance/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 02:56:27 +0000</pubDate>
		<dc:creator>Ian Bicking</dc:creator>
		
		<category><![CDATA[HTML]]></category>

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

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

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

		<guid isPermaLink="false">http://blog.ianbicking.org/2008/10/06/the-philosophy-of-deliverance/</guid>
		<description><![CDATA[
I&#8217;ll be attending PloneConf this year again, giving a talk about Deliverance.  I&#8217;ve been working on Deliverance lately for work, but the hard part about it is that it&#8217;s not obviously useful.  To help explain it I wrote the philosophy of Deliverance, which I will copy here, to give you an idea of [...]]]></description>
			<content:encoded><![CDATA[<div class="document">
<p>I&#8217;ll be attending <a class="reference external" href="http://plone.org/events/conferences/2008-washington-dc">PloneConf</a> this year again, giving a <a class="reference external" href="http://plone.org/events/conferences/2008-washington-dc/agenda/using-deliverance-to-theme-a-website">talk about Deliverance</a>.  I&#8217;ve been working on <a class="reference external" href="http://deliverance.openplans.org">Deliverance</a> lately for work, but the hard part about it is that it&#8217;s not obviously useful.  To help explain it I wrote the <a class="reference external" href="http://deliverance.openplans.org/philosophy.html">philosophy of Deliverance</a>, which I will copy here, to give you an idea of what I&#8217;ve been doing:</p>
<p>Why is Deliverance?  Why was it made, what purpose does it serve, why should you use it, how can it change the way you do web development?</p>
<div class="section" id="on-the-subject-of-platforms">
<h2>On the Subject of Platforms</h2>
<p>Right now we live in an age of <em>platforms</em>.  Developers (or management or coincidence) decides on a platform, and that serves as the basis for all future development.  Usually there&#8217;s some old things from a previous platform (or a primordial pre-platform age: I&#8217;m looking at you <tt class="docutils literal"><span class="pre">formmail.pl</span></tt>!)  The goal is always to eliminate all of these old pieces, rewriting them for the new platform.  That goal is seldom attained in a timely manner, and even before it is accomplished you may be moving to the next platform.</p>
<p>Why do you have to port everything forward to the newest platform?  Well, presumably it is better engineered.  The newest platform is presumably what people are most familiar with.  But if those were the only reasons it would be hard to justify a rewrite of working software.  Often the real push comes because your systems don&#8217;t work together.  It&#8217;s hard to keep templates in sync across all the platforms.  Multiple logins may be required.  Navigation is inconsistent and incomplete.  Functionality that cross-cuts pages &#8212; comments, login status, shopping cart status, etc &#8212; isn&#8217;t universally available.</p>
<p>A similar conflict arises when you consider how to add new functionality to a site.  For example, you may want to add a blog.  Do you:</p>
<ol class="arabic simple">
<li>Use the best blogging software available?</li>
<li>Use something native to your platform?</li>
<li>Write something yourself?</li>
</ol>
<p>The answer is probably 2 or 3, because it would be too hard to integrate something foreign to your platform.  This form of choice means that every platform has some kind of &quot;blog&quot;, but the users of that blog are likely to only be a subset of the users of the parent platform.  This makes it difficult for winners to emerge, or for a well-developed piece of software to really be successful.  Platform-based software is limited by the adoption of the platform.</p>
<p>Not all software has a platform.  These tend to be the most successful web applications, things like <a class="reference external" href="http://trac.edgewall.org/">Trac</a>, <a class="reference external" href="http://wordpress.org">WordPress</a>, etc.</p>
<p>&quot;Aha!&quot; you think &quot;I&#8217;ll just use those best-of-breed applications!&quot;  But no!  Those applications themselves turn into platforms.  WordPress is practically a CMS.  Trac too.  Extensible applications, if successful, become their own platform.  This is not to place blame, they aren&#8217;t necessarily any worse than any other platform, just an acknowledgment that this move to platform can happen anywhere.</p>
</div>
<div class="section" id="beyond-platforms-or-a-better-platform">
<h2>Beyond Platforms, or A Better Platform</h2>
<p>One of the major goals of Deliverance is to move beyond platforms.  It is an <em>integration tool</em>, to allow applications from different frameworks or languages to be integrated gracefully.</p>
<p>There are only a few core reasons that people use platforms:</p>
<ol class="arabic simple">
<li>A common look-and-feel across the site.</li>
<li>Cohesive navigation.</li>
<li>Indexing of the entire site.</li>
<li>Shared authentication and user accounts.</li>
<li>Cross-cutting functionality (e.g., commenting).</li>
</ol>
<p>Deliverance specifically addresses 1, providing a common look-and-feel across a site.  It can provide some help with 2, by allowing navigation to be more centrally managed, without relying purely on per-application navigation (though per-application navigation is still essential to navigating the individual applications).  3, 4, and 5 are not addressed by Deliverance (at least not yet).</p>
<p>Deliverance applies a common theme across all the applications in your site.  It&#8217;s basic unit of abstraction is <strong>HTML</strong>.  It doesn&#8217;t use a particular templating language.  It doesn&#8217;t know what an object is.  HTML is something every web application produces.  Deliverance&#8217;s means of communication is <strong>HTTP</strong>.  It doesn&#8217;t call functions or create request objects <a class="footnote-reference" href="#id5" id="id1">[*]</a>.  Again, everything speaks HTTP.</p>
<p>Deliverance also allows you to include output from multiple locations.  In all cases there&#8217;s the <em>theme</em>, a plain HTML page, and the <em>content</em>, whatever the underlying application returns.  You can also include output from other parts of the site, most commonly navigation content that you can manage separately.  All of these pieces can be dynamic &#8212; again, Deliverance only cares about HTML and HTTP, it doesn&#8217;t worry about what produces the response.</p>
<p>This is all very similar to systems built on XSLT transforms, except without the XSLT <a class="footnote-reference" href="#id6" id="id2">[†]</a>, and without XML.  Strictly speaking you can apply XSLT to any parseable markup, even HTML, but the most common (or at least most talked about) way to apply XSLT is using &quot;semantic&quot; XML output that is transformed into HTML.  Deliverance does not try to understand the semantics of applications, and instead expects them to provide appropriate <em>presentation</em> of whatever semantics the underlying application possesses.  Presentation is more universal than semantics.</p>
<p>While Deliverance does its best to work with applications as-they-exist, without making particular demands on those applications, it is not perfect.  Conflicting CSS can be a serious problem.  Some applications don&#8217;t have very good structure to work with.  You can&#8217;t generate any content in Deliverance, you can only manipulate existing content, and often that means finding new ways to generate content, or making sure you have a place to store your content (as in the case of navigation).  This is why arguably Deliverance does not <em>remove</em> the need for a platform, but is just its own platform.  In so far as this is true, Deliverance tries to be a <em>better</em> platform, where &quot;better&quot; is &quot;more universal&quot; rather than &quot;more powerful&quot;.  Most templating systems are more powerful than Deliverance transformations.  It can be useful to have access to the underlying objects used to procude the markup.  But Deliverance doesn&#8217;t give you these things, because it only implements things that can be applied to any source of content.  Static files are entirely workable in Deliverance, just as any application written in Python, PHP, or even an application hosted on an entirely separate service is usable through Deliverance.</p>
</div>
<div class="section" id="the-missing-parts">
<h2>The Missing Parts</h2>
<p>As mentioned before, two important benefits of a platform are missing from Deliverance.  I&#8217;ll try to describe what I believe are the essential aspects.  I hope at some time that Deliverance or some complementary application will be able to satisfy these needs.  Also, I suggest some lines of development that might be easier than others.</p>
<div class="section" id="indexing-the-entire-site">
<h3>Indexing The Entire Site</h3>
<p>Typically each application has a notion of what all the interesting pages in that application are.  Most applications have a set of <em>uninteresting</em> pages, or transient pages.  A search result is transient, as an example.  An application also knows when new pages appear, and when other pages disappear.  A site-wide index of these pages would allow things like site maps, cross-application search, and cross-application reporting to be done.</p>
<p>An interesting exception to the knowledge an application has of itself: search results are generally boring.  But a search result based on a category might still be interesting.  The difference between a &quot;search&quot; and a &quot;report&quot; is largely in the eye of the beholder.  An important feature is that the application shouldn&#8217;t be the sole entity allowed to mark interesting pages.  Manually-managed lists of resources that may point to specific applications can allow people to usefully and easily tweak the site.  Ideally even fully external resources could be included, such as a resource on an entirely different site.</p>
<p>To do indexing you need both events (to signal the creation, update, or deletion of an entity/page), and a list of entities (so the index can be completely regenerated).  A simple way of giving a list of entities would be the <a class="reference external" href="https://www.google.com/webmasters/tools/docs/en/protocol.html#sitemapXMLFormat">Google Site Map XML resource</a>.  Signaling events is much more complex, so I won&#8217;t go into it in any greater depth here, but we&#8217;re working on a product called <a class="reference external" href="http://www.openplans.org/projects/cabochon/">Cabochon</a> to handle events.</p>
<p>One thing that indexing can provide is a way to use <a class="reference external" href="http://microformats.org/">microformats</a>.  Right now microformats are interesting, but for most sites they are largely useless.  You can mark up your content, but no one will do anything interesting with that markup.  If you could easily code up an indexer that could keep up-to-date on all the content on your site, you could produce interesting results like cross-application mapping.</p>
</div>
<div class="section" id="shared-authentication-and-user-accounts">
<h3>Shared Authentication And User Accounts</h3>
<p>Authentication is one of the most common and annoying integration tasks when crossing platform boundaries.  Systems like <a class="reference external" href="http://openid.net/">Open ID</a> offer the ability to unify <em>cross-site</em> authentication, but they don&#8217;t actually solve the problem of a single site with multiple applications.</p>
<p>There is a basic protocol in HTTP for authentication, one that is workable for a system like Deliverance, and there are already several existing products (like <a class="reference external" href="http://svn.repoze.org/repoze.who/trunk/">repoze.who</a>) that work this way.  It works like this:</p>
<ul class="simple">
<li>The logged-in username is sent in some header, e.g., <tt class="docutils literal"><span class="pre">X-Remote-User</span></tt>.  Some kind of signing is necessary to really trust this header (Deliverance could filter out that header in incoming requests, but if you removed Deliverance from the stack you&#8217;d have a security hole).</li>
<li>If the user isn&#8217;t logged in, and the application wants them to log in, the application response with a <tt class="docutils literal"><span class="pre">401</span> <span class="pre">Unauthorized</span></tt> response.  It is supposed to set the <tt class="docutils literal"><span class="pre">WWW-Authenticate</span></tt> header, probably to some value indicating that the intermediary should determine the authentication type.  In some cases a kind of HTTP authentication is required (typically <a class="reference external" href="http://en.wikipedia.org/wiki/Basic_access_authentication">Basic</a> or <a class="reference external" href="http://en.wikipedia.org/wiki/Digest_access_authentication">Digest</a>) because cookie-based logins are too stateful (e.g., in APIs, or for WebDAV access).</li>
<li>The intermediary catches the 401 and initiates the login process.  This might mean a redirect to a login page, and setting a cookie on successful login.  The login page and setting the cookie could potentially be done by an application outside of the intermediary; the intermediary only has to do the appropriate redirects and setting of headers.</li>
<li>In the case when a user is logged in but isn&#8217;t permitted, the application simply sends a <tt class="docutils literal"><span class="pre">403</span> <span class="pre">Forbidden</span></tt> response.  The intermediary shouldn&#8217;t actually do anything in this case (though maybe it could usefully add a logout link to that message).  I only mention this because some systems use <tt class="docutils literal"><span class="pre">401</span></tt> for Forbidden, which causes no end of problems.</li>
</ul>
<p>While some applications allow for this kind of authentication scheme, many do not.  However, the scheme is general enough that I think it is justifiable that applications could be patched to work like this.</p>
<p>This handles shared authentication, but the only information handed around is a username.  Information about the user &#8212; the real name, email, homepage, permission roles, etc &#8212; are not shared in this model.</p>
<p>You could add something like an internal location to the username.  E.g.: <tt class="docutils literal"><span class="pre">X-Remote-User:</span> <span class="pre">bob;</span> <span class="pre">info_url=http://mysite.com/users/bob.xml</span></tt>.  It would be the application&#8217;s responsibility to make a subrequest to fetch that information.  This can be somewhat inefficient, though with appropriate caching perhaps it would be fine.  But many applications want very much to have a complete record of all users.  Changing this is likely to be much harder than changing the authentication scheme.  A more feasible system might be something on the order of what is described in <a class="reference internal" href="#indexing-the-entire-site">Indexing the Entire Site</a>: provide a complete listing of the site as well as events when users are created, updated, or deleted, and allow applications to maintain their own private but synced databases of users.</p>
<p>A common permission system is another level of integration.  One way of handling this would be if applications had a published set of actions that could be performed, and the person integrating the application could map actions to roles/groups on the system.</p>
</div>
<div class="section" id="cross-cutting-functionality">
<h3>Cross-cutting Functionality</h3>
<p>This item requires a bit of explanation.  This is functionality that cuts across multiple parts of the site.  An example might be comments, where you want a commenting system to be applicable to a variety of entities (though probably not all entities).  Or you might want page-update notification, or to provide a feed of changes to the entity.</p>
<p>You might also want to include some request logger like <a class="reference external" href="http://www.google.com/analytics/">Google Analytics</a> to all pages, but this is already handled well by Deliverance theming.  Deliverance&#8217;s aggregation handles universal content well, but it doesn&#8217;t handle content (or subrequests) that should only be present in a portion of pages.</p>
<p>One possible way to address this is <a class="reference external" href="http://en.wikipedia.org/wiki/Transclusion">transclusion</a>, where a page can specifically request some other resource to be included in the page.  A simple subrequest could accomplish this, but many applications make it relatively easy to include some extra markup (e.g., by editing their templates) but not so easy to do something like a subrequest.  We&#8217;ve written a product <a class="reference external" href="http://www.openplans.org/projects/transcluder/">Transcluder</a> to use an HTML format to indicate transclusion.</p>
<p>It&#8217;s also possible using Deliverance that you could implement this functionality without any application modification, though it means added configuration &#8212; an application written to be inserted into a page via Deliverance, and a Deliverance rule that plugs everything together (but if written incorrectly would have to be debugged).</p>
</div>
<div class="section" id="other-conventions">
<h3>Other Conventions</h3>
<p>In addition to this, other platform-like conventions would make the life of the integrator much easier.</p>
<div class="section" id="template-customization">
<h4>Template Customization</h4>
<p>While Deliverance handles the look-and-feel of a page, it leaves the inner chunk of content to the application.  If you want to tweak something small you will still need to customize the template of the application.</p>
<p>It would be wonderful if applications could report on what files were used in the construction of a request, and used a common search path so you could easily override those files.</p>
</div>
<div class="section" id="backups-and-other-maintenance">
<h4>Backups and Other Maintenance</h4>
<p>Process management can be handled by something like <a class="reference external" href="http://supervisord.org/">Supervisor</a>, and maybe in the future Deliverance will even embed Supervisor.</p>
<p>But even then, regular backups of the system are important.  Typically each application has its own way of producing a backup.  Conventions for producing backups would be ideal.  Additional conventions for restoring backups would be even better.</p>
<p>Many systems also require periodic maintenance &#8212; compacting databases, checking for any integrity problems, etc.  Some unified cron-like system might be handy, though it&#8217;s also workable for applications to handle this internally in whatever ad hoc way seems appropriate.</p>
</div>
<div class="section" id="common-error-reporting">
<h4>Common Error Reporting</h4>
<p>With a system where one of many components can fail, it&#8217;s important to keep track of these problems.  If errors just end up in one of 10 log files, it&#8217;s unlikely anyone is closely tracking them.</p>
<p>One product we&#8217;re working on to help with this is <a class="reference external" href="https://svn.openplans.org/svn/ErrorEater/trunk/">ErrorEater</a>, which works along with <a class="reference external" href="http://supervisord.org/">Supervisor</a>.  Applications have to be modified to emit errors in a specific format that Supervisor understands, but this is generally not too difficult.</p>
</div>
<div class="section" id="farming">
<h4>Farming</h4>
<p>Application farming is when one instance of an application can support many &quot;sites&quot;.  These might be sites with their own domains, or just distinct projects.  Examples are <a class="reference external" href="http://trac.edgewall.org/">Trac</a>, which supports multiple projects in one instance, or <a class="reference external" href="http://mu.wordpress.org/">WordPress MU</a> which supports many WordPress instances running off a single database and code base.</p>
<p>It would be nice if you could add a simple header to a request, like <tt class="docutils literal"><span class="pre">X-Project-Name:</span> <span class="pre">foo</span></tt> and that would be used by all these products to select the site (or sub-site or project or any other organization unit).  Then mapping domain names, paths, or other aspects of a request to the project could be handled once and the applications could all consistently consume it.</p>
<p>(Internally for <a class="reference external" href="http://openplans.org">openplans.org</a> we&#8217;re using <tt class="docutils literal"><span class="pre">X-OpenPlans-Project</span></tt> and custom patches to several projects to support this, but it&#8217;s all ad hoc.)</p>
</div>
</div>
</div>
<div class="section" id="footnotes">
<h2>Footnotes</h2>
<table class="docutils footnote" frame="void" id="id5" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr>
<td class="label">[*]</td>
<td>This isn&#8217;t entirely true, Deliverance internally uses <a class="reference external" href="http://wsgi.org/wsgi/">WSGI</a> which is a Python-level abstraction of HTTP calls.</td>
</tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="id6" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr>
<td class="label">[†]</td>
<td>At different times in the past, in an experimental branch right now, and potentially integrated in the future, Deliverance has been compiled down to XSLT rules.  So Deliverance could be seen even as an simple transformation language that compiles down to XSLT.</td>
</tr>
</tbody>
</table>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.ianbicking.org/2008/10/06/the-philosophy-of-deliverance/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Poverty Of Our National Debate</title>
		<link>http://blog.ianbicking.org/2008/10/03/the-poverty-of-our-national-debate/</link>
		<comments>http://blog.ianbicking.org/2008/10/03/the-poverty-of-our-national-debate/#comments</comments>
		<pubDate>Fri, 03 Oct 2008 06:57:52 +0000</pubDate>
		<dc:creator>Ian Bicking</dc:creator>
		
		<category><![CDATA[Non-technical]]></category>

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

		<guid isPermaLink="false">http://blog.ianbicking.org/2008/10/03/the-poverty-of-our-national-debate/</guid>
		<description><![CDATA[
We had a debate party tonight for the Biden-Palin debate.  It&#8217;s nice to watch it in a group of like-minded people.  Taking the Democrat/Republican debate seriously is a bullshit game and I don&#8217;t have any desire to bring this farce into my normal life.
After the debate was over, I wanted to discuss the [...]]]></description>
			<content:encoded><![CDATA[<div class="document">
<p>We had a debate party tonight for the Biden-Palin debate.  It&#8217;s nice to watch it in a group of like-minded people.  Taking the Democrat/Republican debate seriously is a bullshit game and I don&#8217;t have any desire to bring this farce into my normal life.</p>
<p>After the debate was over, I wanted to discuss the debate.  After all, it&#8217;s weird to watch something for an hour and a half and then just ignore that we spent that time watching it.  The problem is that I <em>hate</em> the punditry.  No one actually said &quot;did Palin do what she had to do?&quot; (I probably would have screamed) but it&#8217;s just really <em>hard</em> not to talk about &quot;what will people think of this debate?&quot;  And part of that is because we all know what <em>we</em> think.  We saw through Palin deliberately ignoring the questions and reading her already-prepared speech.  We all had a basic understanding of what is fact and what is a lie or misrepresentation.  It&#8217;s nice to share little stories (like stories from the article about how <a class="reference external" href="http://thebruceblog.wordpress.com/2008/09/23/my-holiday-with-mccain-oh-lord-i-cant-wait-till-this-gets-verified/">McCain is a jerk</a>).  But it&#8217;s so damn hard not to fall into a discussion about the horserace, about what other people will think.  Why is it so hard to talk about what we think?  Not what we analyze, but what we actually believe?  Instead of predicting something that will come to pass regardless of our predictions, shouldn&#8217;t we be developing our own beliefs?  That seems far more relevant to our lives.</p>
<p>There&#8217;s probably a lot of reasons for that.  It&#8217;s intimidating to be entirely genuine, to speak without irony.  And all the news is about the horserace, so we are all well informed, it makes it easy to talk.</p>
<p>I think a large part of the problem is that the spectrum of opinions is so narrow (even if also bifurcated) that it&#8217;s hard to have an interesting discussion of political issues.  Lacking anything of real substance to discuss, we discuss the discussion, we make predictions instead of forming real opinions.  While I&#8217;m willing to blame many things on the Republicans, this is the product of both parties, of the narrow ignorance of &quot;conventional wisdom.&quot;  For instance, the debate about the economic bailout has been rich with rhetoric but starved of any real ideas.  I didn&#8217;t even realize how limited the debate was until I listened to <a class="reference external" href="http://www.npr.org/templates/story/story.php?storyId=95241895">this interview</a> where Steve Fraser kind of says, well, we can do whatever we want.  That is to say, we can actually make collective decisions about the direction of our economy, instead of the impotent position that is assumed in all current debates, where we can only poke lightly at the economy (and it&#8217;s implied anything more would destroy it).</p>
<p>We can&#8217;t really talk about what kind of healthcare system we&#8217;d like, because the system nearly everyone wants is not an acceptable part of conventional wisdom.  Socialized healthcare is the only reasonable option, but of course there&#8217;s lots of ways it could work, there&#8217;s lots of room for genuine and important discussion.  But instead we have a <a class="reference external" href="http://www.johnmccain.com/Informing/Issues/19ba2f1c-c03f-4ac2-8cd5-5cf2edb527cf.htm">staggeringly horrible</a> proposal, and a merely <a class="reference external" href="http://www.barackobama.com/issues/healthcare/">not quite as bad as the current situation</a> proposal.  Given this set of options you can&#8217;t have real discussion.</p>
<p>In the end our own happiness is mostly in our own hands.  The choices we make for ourselves are more significant than the choices made by the government (the choices we make collectively).  But our collective choices do matter.  We certainly haven&#8217;t figured out happiness.  And maybe government does best when it has the least effect on our lives, but while that&#8217;s one end of the bifurcated conventional wisdom, as an idea it remains largely uninspected.  When I consider many of the pleasant conveniences in my life, government is part of a lot of them.  It doesn&#8217;t do much to make me more spiritually fulfilled, but the idea that government is a hopeless place to look for our collective happiness is a truism that lacks real consideration.</p>
<p>Political discussion is stuck in a terrible intellectual rut.  Blame falls equally on both parties.  They hold on greedily to their monopoly of political thought.  It&#8217;s like religious doctrine, something to which politicians must submit before being allowed to progress, a sign of submission to a larger system of power.  I have this hope that Obama is going through the rites with discipline but without true belief, that he is being subversive, diving straight to the belly of the beast.  But this is only speculation, perhaps a naive dream, a desire to project my hopes onto a figure of vague and general hope.</p>
<p>I don&#8217;t really want to spend too much time discussing all the things that are wrong.  This is the depressing comfort zone of the left.  I want to talk about how things could be right, about how we can make a world that isn&#8217;t just less unjust but a world that is more beautiful, more wonderful, more full of life and freedom and passion.  I want to exult in the potential of the future.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.ianbicking.org/2008/10/03/the-poverty-of-our-national-debate/feed/</wfw:commentRss>
		</item>
		<item>
		<title>pyinstall pybundles</title>
		<link>http://blog.ianbicking.org/2008/10/01/pyinstall-pybundles/</link>
		<comments>http://blog.ianbicking.org/2008/10/01/pyinstall-pybundles/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 19:14:06 +0000</pubDate>
		<dc:creator>Ian Bicking</dc:creator>
		
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.ianbicking.org/2008/10/01/pyinstall-pybundles/</guid>
		<description><![CDATA[
Update: pyinstall has been renamed to pip (per the suggestions in the comments to this post)
I added pybundles to pyinstall very shortly before I announced pyinstall.  I hadn&#8217;t actually tried it out that much.  Since then I&#8217;ve made three more minor releases of pyinstall, and I think the bundle support is working pretty [...]]]></description>
			<content:encoded><![CDATA[<div class="document">
<p><strong>Update</strong>: pyinstall has been renamed to <a class="reference external" href="http://pip.openplans.org">pip</a> (per the suggestions in the comments to this post)</p>
<p>I added <a class="reference external" href="http://pyinstall.openplans.org/#bundles">pybundles</a> to <a class="reference external" href="http://pyinstall.openplans.org">pyinstall</a> very shortly before I <a class="reference external" href="http://www.openplans.org/projects/topp-engineering/blog/2008/09/24/pyinstall-a-new-hope/">announced pyinstall</a>.  I hadn&#8217;t actually tried it out that much.  Since then I&#8217;ve made three more minor releases of pyinstall, and I think the bundle support is working pretty decently.</p>
<p>A <tt class="docutils literal"><span class="pre">.pybundle</span></tt> file is just a bunch of source code, all the source code you need to install some package(s).  For instance, for <a class="reference external" href="http://deliverance.openplans.org">Deliverance</a> I&#8217;ve created a bundle file so you can do:</p>
<pre class="literal-block">
$ easy_install pyinstall virtualenv
$ pyinstall.py -E DeliveranceTest/ \
&gt;   http://deliverance.openplans.org/dist/Deliverance-snapshot-latest.pybundle
</pre>
<p>This creates a virtualenv environment in <tt class="docutils literal"><span class="pre">DeliveranceTest/</span></tt>, unpacks all the source from the bundle, and installs all of it.  It&#8217;s not magical &#8212; it still has to compile the source and move the files around &#8212; but it does mean just a single download, and the versions of everything that is installed aren&#8217;t going to change unless that bundle file is regenerated.</p>
<p>I&#8217;ve been thinking about some other features for pybundles, like post installation scripts.  All of this has raised a problem though: pyinstall needs to be a two-level command, with commands like:</p>
<p><tt class="docutils literal"><span class="pre">pyinstall.py</span> <span class="pre">install</span> <span class="pre">X</span></tt><br />
<tt class="docutils literal"><span class="pre">pyinstall.py</span> <span class="pre">bundle</span> <span class="pre">Y</span></tt><br />
<tt class="docutils literal"><span class="pre">pyinstall.py</span> <span class="pre">freeze</span> <span class="pre">req.txt</span></tt><br />
and of course the not-yet-implemented:<br />
<tt class="docutils literal"><span class="pre">pyinstall.py</span> <span class="pre">remove</span> <span class="pre">Z</span></tt></p>
<p>But <tt class="docutils literal"><span class="pre">pyinstall.py</span> <span class="pre">install</span></tt> does not read well.  It&#8217;s not too late to rename the package (yet again), or just rename the script.  Ideas?</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.ianbicking.org/2008/10/01/pyinstall-pybundles/feed/</wfw:commentRss>
		</item>
		<item>
		<title>pyinstall: A New Hope</title>
		<link>http://blog.ianbicking.org/2008/09/23/pyinstall-a-new-hope/</link>
		<comments>http://blog.ianbicking.org/2008/09/23/pyinstall-a-new-hope/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 05:21:58 +0000</pubDate>
		<dc:creator>Ian Bicking</dc:creator>
		
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.ianbicking.org/2008/09/23/pyinstall-a-new-hope/</guid>
		<description><![CDATA[
Note: pyinstall has been renamed to pip
Ever been frustrated with easy_install?  Interested in an alternative?  Then you should go over to my work blog and read pyinstall: A New Hope.

]]></description>
			<content:encoded><![CDATA[<div class="document">
<p><strong>Note</strong>: pyinstall has been renamed to <a class="reference external" href="http://pip.openplans.org">pip</a></p>
<p>Ever been frustrated with easy_install?  Interested in an alternative?  Then you should go over to my work blog and read <a class="reference external" href="http://www.openplans.org/projects/topp-engineering/blog/2008/09/24/pyinstall-a-new-hope/">pyinstall: A New Hope</a>.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.ianbicking.org/2008/09/23/pyinstall-a-new-hope/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Inverted Partials</title>
		<link>http://blog.ianbicking.org/2008/09/08/inverted-partials/</link>
		<comments>http://blog.ianbicking.org/2008/09/08/inverted-partials/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 03:12:44 +0000</pubDate>
		<dc:creator>Ian Bicking</dc:creator>
		
		<category><![CDATA[HTML]]></category>

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

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

		<guid isPermaLink="false">http://blog.ianbicking.org/2008/09/08/inverted-partials/</guid>
		<description><![CDATA[
I was talking with a coworker some time ago about his project, and he needed to update a piece of the page in-place when you go back to the page, and setting the page as uncacheable didn&#8217;t really work.  Which probably makes sense; I think at one time browsers did respect those cache controls, [...]]]></description>
			<content:encoded><![CDATA[<div class="document">
<p>I was talking with a coworker some time ago about <a class="reference external" href="http://melkjug.com/">his project</a>, and he needed to update a piece of the page in-place when you go back to the page, and setting the page as uncacheable didn&#8217;t really work.  Which probably makes sense; I think at one time browsers <em>did</em> respect those cache controls, but as a result going back in history <em>through</em> a page could cause some intermediate page to be refreshed and needlessly slow down your progress.</p>
<p>Anyway, Rails uses <a class="reference external" href="http://wiki.rubyonrails.org/rails/pages/UnderstandingPartials">partials</a> to facilitate this kind of stuff in a general way.  Bigger chunks of your page are defined in their own template, and instead of rendering the full page you can ask just for a chunk of the page.  Then you do something like <tt class="docutils literal"><span class="pre">document.getElementById(&#8217;some_block&#8217;).innerHTML</span> <span class="pre">=</span> <span class="pre">req.responseText</span></tt>.  Mike Bayer just <a class="reference external" href="http://techspot.zzzeek.org/?p=29">described how to do this in Mako too</a>, using template functions.</p>
<p>When asked, another technique also occurred to me, using just HTML.  Just add a general way of fetching an element by ID.  At any time you say &quot;refresh the element with id X&quot;, and it asks the server for the current version of that element (using a query string variable <tt class="docutils literal"><span class="pre">document_id=X</span></tt>) and replaces the content of that element in the browser.</p>
<p>The client side looks like this (it would be much simpler if you used a Javascript library):</p>
<pre class="literal-block">
function refreshId(id) {
    var el = document.getElementById(id);
    if (! el) {
        throw(&quot;No element by id '&quot; + id + &quot;'&quot;);
    }
    function handler(data) {
        if (this.readyState == 4) {
            if (this.status == 200) {
                el.innerHTML = this.responseText;
            } else {
                throw(&quot;Bad response getting &quot; + idURL + &quot;: &quot;
                      + this.status);
            }
        }
    }
    var req = new XMLHttpRequest();
    req.onreadystatechange = handler;
    var idURL = location.href + '';
    if (idURL.indexOf('?') == -1) {
        idURL += '?';
    } else {
        idURL += '&amp;#038;';
    }
    idURL += 'document_id='+escape(id);
    req.open(&quot;GET&quot;, idURL);
    req.send();
}
</pre>
<p>Then you need the server-side component.  Here&#8217;s something written for <a class="reference external" href="http://pylonshq.com/">Pylons</a> (using <a class="reference external" href="http://codespeak.net/lxml/lxmlhtml.html">lxml.html</a>, and Pylons 0.9.7 which is configured to use <a class="reference external" href="http://pythonpaste.org/webob/">WebOb</a>):</p>
<pre class="literal-block">
from pylons import request, response
from lxml import html

def get_id(response, id):
    if (response.content_type == 'text/html'
        and response.status_int == 200):
        doc = html.fromstring(response.body)
        try:
            el = doc.get_element_by_id(id)
        except KeyError:
            pass
        else:
            response.body = html.tostring(el)
    return response

class BaseController(WSGIController):
    def __after__(self):
        id = req.GET.get('document_id')
        if id:
            get_id(response, id)
</pre>
<p>Though I&#8217;m not sure this is appropriate for middleware, you could do it as middleware too:</p>
<pre class="literal-block">
from webob import Request
class DocumentIdMiddleware(object):
    def __init__(self, app):
        self.app = app
    def __call__(self, environ, start_response):
        req = Request(environ)
        id = req.GET.get('document_id')
        if not id:
            return self.app(environ, start_response)
        resp = req.get_response(self.app)
        resp = get_id(resp, id)
        return resp(environ, start_response)
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.ianbicking.org/2008/09/08/inverted-partials/feed/</wfw:commentRss>
		</item>
		<item>
		<title>On the RNC, Monica Bicking, Eryn Trimmer, and Protest</title>
		<link>http://blog.ianbicking.org/2008/09/02/on-the-rnc-monica-bicking-eryn-trimmer-and-protest/</link>
		<comments>http://blog.ianbicking.org/2008/09/02/on-the-rnc-monica-bicking-eryn-trimmer-and-protest/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 00:09:33 +0000</pubDate>
		<dc:creator>Ian Bicking</dc:creator>
		
		<category><![CDATA[Non-technical]]></category>

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

		<guid isPermaLink="false">http://blog.ianbicking.org/2008/09/02/on-the-rnc-monica-bicking-eryn-trimmer-and-protest/</guid>
		<description><![CDATA[
Saturday morning my sister, Monica Bicking, and her boyfriend, Eryn Trimmer, were arrested in Minneapolis.  Monica was released on Sunday, but Eryn and others are still in custody, and the police will try to keep them detained as long as possible.  update: the two of them and six others from the Welcoming Committee [...]]]></description>
			<content:encoded><![CDATA[<div class="document">
<p>Saturday morning my sister, Monica Bicking, and her boyfriend, Eryn Trimmer, were arrested in Minneapolis.  Monica was released on Sunday, but Eryn and others are still in custody, and the police will try to keep them detained as long as possible.  <strong>update</strong>: the two of them and six others from the Welcoming Committee are <a class="reference external" href="http://kaaltv.com/article/stories/S566219.shtml?cat=10151">charged with felonies</a>, including &quot;furtherance of terrorism&quot;.  A website has been set up in support of them, and to keep people informed about ongoing events in the case: <a class="reference external" href="http://rnc8.org">rnc8.org</a></p>
<p>They were arrested for &quot;conspiracy to incite a riot&quot;.  This is the same charge used against the <a class="reference external" href="http://en.wikipedia.org/wiki/Chicago_Seven">Chicago 8 (or 7)</a> at the 1968 Democratic Convention.  Perhaps the police have a sense of tradition?</p>
<p>But more directly she and Eryn were arrested in an attempt to preemptively suppress the protests at the Republican National Convention.  They were both very active with the <a class="reference external" href="http://www.nornc.org/">RNC Welcoming Committee</a>, which is a group coordinating and supporting some of the people coming to the Twin Cities for the convention.</p>
<p>Obviously I&#8217;m very concerned by the arrests and charges.  But there&#8217;s been a huge outpouring of support from the community &#8212; both from activist in the Twin Cities, and from their neighbors.  In Chicago I&#8217;m a little unsure about what to do.</p>
<p>Reading articles about the incidents (<a class="reference external" href="http://www.salon.com/opinion/greenwald/2008/08/30/police_raids/index.html">Glenn Greenwald&#8217;s post on Salon</a> is a good one) I find myself mostly avoiding the comment sections.  The comments fall into two categories: mean comments against the protesters, and reactionary comments with no real substance (&quot;this is proof this country is a police state!&quot;)  Activists generally understand what&#8217;s going on, and people of a right-wing/authoritarian bend are hardly going to be convinced of anything, but there&#8217;s a lot of progressive people out there who&#8217;ve never really been involved in any activism like this.  There&#8217;s very little explaining the protests, the role of activists like my sister, and the philosophies they hold.  Certainly the news makes no attempt, and unfortunately the activists themselves often speak from an unexplained perspective.</p>
<p>So I&#8217;d like to use this as an opportunity to explain my understanding of the role of protest, what&#8217;s going on at the RNC specifically, and what an &quot;anarchist&quot; really is.  At the moment I can&#8217;t do a lot to help Eryn and Monica directly, but at least I can talk about her personally instead of another story about a named but otherwise anonymous &quot;protester&quot;.</p>
<div class="section" id="the-role-of-protest">
<h2>The Role Of Protest</h2>
<p>It&#8217;s challenging to explain and justify protest, at least in this country and at this moment.  Probably the biggest blow for protest as a useful form of political expression was the <a class="reference external" href="http://www.infoshop.org/wiki/Global_protests_against_war_on_Iraq_(pre-war)#February_15.2C_2003_protests">February 15, 2003 protests against the Iraq War</a>.  I say this because those were the largest protests the world has ever seen, estimated around 10 million people, and yet they did so little to stop the war.</p>
<p>That war is still with us, and is still the most significant motivation for the RNC protests.  The war has gone through many phases since then &#8212; purported success, then clear failure by just about anyone&#8217;s definition, then ongoing failure labelled as success because of dramatically lowered expectations (the surge).  Public opinion has moved several times, but is constrained by what is considered the <em>reasonable</em> options.  These &quot;reasonable&quot; options are defined by the Democratic and Republican elite.  Balance in news means inviting participation from partisans from those two parties.  In this context the Democratic party had a practical landslide in 2006, driven primarily by anti-war sentiments, and then proceeded to do almost nothing to stop the war.  If protest has failed, then so has electoral politics.</p>
<p>I don&#8217;t have any third path to offer, but I just want to make it clear: none of us know what is best to do, none of us have figured out the way to effect change.  People complain protest doesn&#8217;t work.  Maybe it does, maybe it doesn&#8217;t, but frankly most things don&#8217;t work.  Doing nothing <em>definitely</em> doesn&#8217;t work, and frankly that&#8217;s what most of us are doing.  It&#8217;s hard to take criticisms seriously when they are made from a stance of inaction.</p>
<p>What might the RNC protests accomplish?</p>
<p>First, it is an attempt to break out of a politics restricted to two perspectives.  I believe, quite firmly, that &quot;radical left&quot; opinions are actually quite mainstream.  This was also the goal of the DNC protests.  This goal has become quite difficult to achieve.  News stations generally ignore protest, and when they do cover protest they seldom talk about the actual issues.</p>
<p>Second, protests can attempt to disrupt normal activity.  To be fair, this is probably better termed &quot;civil disobedience&quot;, and I&#8217;m sure there will be civil disobedience in response to the RNC.  One possible goal of civil disobedience is to make news &#8212; to be so disruptive that you simply can&#8217;t be ignored.  And even if the news won&#8217;t say <em>why</em> you won&#8217;t be ignored, at least one message that can be made clear: everything is not okay.  Another goals is simply to disrupt the RNC.  This is a bringing together of many of the architects and profiteers of war.  This is a convention that includes many people advocating <em>torture</em>.</p>
<p>It&#8217;s also a convention of people who buy the lines about the Republican party being &quot;conservative&quot; and supporting &quot;family values&quot; and whatever other bullshit.  One argument goes: oh, these poor dullards and simpletons!  Do not interrupt their harmless partying!  Do not interrupt their absurd views!  They deserve their delusions as much as anyone!  I say: this stuff is too important to defer to the bullshit of this political grandstanding.</p>
</div>
<div class="section" id="are-we-in-a-time-of-war">
<h2>Are We In A Time Of War?</h2>
<p>It is all too easy to fall into &quot;protesting for the right to protest&quot;.  Lest I fall into this, I want to make it clear: protest itself is not the goal.  <a class="reference external" href="http://en.wikipedia.org/wiki/Lancet_surveys_of_Iraq_War_casualties">600,000 Iraqis dead</a>.  And to what ends?  No ends at all?  Unlikely!  There is a purpose.  It is a purpose architected by people who would throw away hundreds of thousands of lives.  People may argue about whether war is valid.  I don&#8217;t believe it is, nor do Monica or Eryn, but whatever your feelings: this is not an abstract war.  This is a specific war.  And this specific war is a war made by liars, by people who treat human life lightly, by people whose primary ambition seems focused on power itself.</p>
<p>600,000 dead, and what&#8217;s so different in America?  Do you feel this war?  If you didn&#8217;t turn on the TV or listen to the news, what would remind you that we are at war?  What would remind you of all that&#8217;s happened?  We are a nation at war, and yet there is nothing to show us this, it has no presence.  Our nation is so large, our institutions so abstracted, our military so partitioned from most of society&#8230; we are numb to war.  Moving around while numbed is dangerous.  You can&#8217;t feel what you are doing.  A cut doesn&#8217;t hurt, a bruise is just a faint sensation.  We are a numbed nation and this is dangerous.</p>
<p>If I was to give one reason for civil disobedience, it would be this: to acknowledge this war is <em>real</em>.  This isn&#8217;t just a difference of opinion, this isn&#8217;t just a debate.  This is about how we exercise our collective power, the power that is exercised in the form of the state.  This is our war, whether we feel it or not.</p>
<p>One of the criticisms of civil disobedience is to say it deprives the Republicans of their free speech.  First, this is absurd.  No form of civil disobedience deprives them of free speech.  No one is taping their mouths shut.  No journalists are being detained by activists.  No debate is stifled.  The RNC&#8217;s request: we want to speak our lies without interruption, without distraction.  The Republicans have through decades of whining managed to frame the debate, to redefine &quot;common sense&quot; and &quot;conventional thinking&quot;, to move the <a class="reference external" href="http://en.wikipedia.org/wiki/Overton_window">Overton Window</a> far to the right.  Free speech does not mean they should not be challenged.  Protest challenges the content of their speech, it doesn&#8217;t deny them of the ability to speak.</p>
<p>This is an aside, but for all the effort put into limiting the bounds of debate I don&#8217;t think the Republicans, or Bush, have really changed the country as much as they are given credit for.  I don&#8217;t think people are as easily manipulated as that.  I think our core values are not so easily affected.  If we were not so numb I think it would all come rushing back.</p>
</div>
<div class="section" id="on-anarchism">
<h2>On &quot;Anarchism&quot;</h2>
<p>If you read the articles you will see Monica and Eryn called &quot;self-described anarchists&quot;.  This is true, they are anarchists.  I will attempt, briefly and probably inaccurately, to describe what anarchism is.</p>
<p>Anarchism is, at its core, a belief in the individual, and a belief that good flows uniquely from the individual.  Conversely, it believes that bad comes from institutions, from the abstractions we build between people.  Anarchism is a belief in the power of empathy instead of laws.  Instead of leading our lives according to principles that are passed down to us, anarchism says we should live our lives based on our personal reflections and decisions.  We should be <em>deliberate</em>, we should not be obedient.</p>
<p>The <a class="reference external" href="http://www.nornc.org/">RNC Welcoming Committee</a> (the name is ironic) is a &quot;anarchist/anti-authoritarian&quot; organization.  <em>Ha ha</em> you say, isn&#8217;t an anarchist organization an oxymoron?  If you meet an anarchist this is the most tedious joke you could possibly make.  Anarchism is, of course, a somewhat chaotic philosophy.  And any anarchist should be a human first, and an anarchist second &#8212; anything else would be contrary to the very principles of anarchism!  More practically, they form groups based on shared understandings and motivations, and there is nothing at all inconsistent about individuals working together &#8212; indeed it is interpersonal cooperation that is at the heart of anarchist traditions.</p>
<p>Do anarchists want to tear down all institutions?  I guess some flavors of anarchist rhetoric make this claim.  Looking in from the outside, it feels like some kind of phase adolescent male anarchists go through.  There is an underlying lack of respect for institutions and authority, and this is genuine.  But though they see nothing wrong with disrupting institutions, violence against people is not considered acceptable.  Some would like to categorize property damage as violence, but I find this rather disrespectful of genuine violence.  Things don&#8217;t feel pain or fear.</p>
<p>Discussions of anarchism tend to degrade very quickly because people are overly obsessed with self-consistency.  For instance: how could an entire society run without laws, governments, police, taxes?  There are answers and speculations, but we would all do better to make the world we want now and here.  This is what actual anarchists do &#8212; running whole societies might be fun to theorize about, but building a community is actually attainable, and among progressive groups anarchists are probably the most enthusiastic community builders.</p>
<p>Lastly: why the term &quot;anarchism&quot;?  It&#8217;s a scary term, though it&#8217;s derivation is simply from the term <a class="reference external" href="http://www.merriam-webster.com/dictionary/anarchy">&quot;without rulers&quot;</a>.  It&#8217;s been a term used to scare people for so long that it&#8217;s hard to separate the idea from the myth.  People at time suggest alternative terms.  But anarchism isn&#8217;t just a philosophy, it&#8217;s a tradition and culture and shared understanding, one that goes back over a hundred years.  And anarchists don&#8217;t want to disassociate themselves from that tradition.  And usually, what does it matter what other people think of the name?  It is however awkward when the police are trying to label you as a dangerous extremist.</p>
</div>
<div class="section" id="violence">
<h2>Violence?</h2>
<p>Reports have come out about violent protest.  <strong>Update</strong>: There <em>were</em> reports of &quot;violent protesters&quot;.  Now police report that <a class="reference external" href="http://www.minnpost.com/stories/2008/09/05/3402/despite_more_than_800_arrests_st_paul_police_and_mayor_call_convention_a_big_success">&quot;one or two windows were broken&quot;</a> during the entire RNC.  In other words, there was almost no violence at all by protesters, and almost no property damage.  Frankly I feel stupid for ever believing there were even small groups of &quot;violent protesters&quot;.  There was simply no violence (under any definition of &quot;violence&quot;) of any note by the protesters.  (I&#8217;m actually surprised there weren&#8217;t more windows broken by stray police munitions.)  Again police lack basic credibility in their statements. <strong>end update</strong></p>
<p>Actual incidents are often exaggerated or fabricated.  For instance, in the case of the home raids things like paint, bottles, and rags were labeled as &quot;the ingredients for making Molotov cocktails&quot;.  I&#8217;m sure every reader of this post has sufficient ingredients to make a Molotov cocktail.  Also, many people have hatchets, bricks, and other materials.  Buckets of urine were particularly attention-grabbing, but the only reason for these was that one of the houses had a broken toilet.  The police interpretation of the confiscated material is not credible.</p>
<p>There have also been reports of violence at the protests themselves.  First it should be noted that there are no reports of police or bystanders being injured.  I personally find it is hard to classify property damage as &quot;violence&quot;.  If you don&#8217;t include property damage then there doesn&#8217;t seem to be much evidence of violence.</p>
<p>Protest <em>is</em> confrontational.  Some will suggest that protesters should obey police in all situations.  They suggest that protesters should obey all laws and only protest where permitted.  They suggest protesters should not be disruptive of anyone else.  The result would not be protest.  In cases like the RNC, where extensive planning was in place to counter protest, non-confrontational protest means protesting according to someone else&#8217;s plans, someone who has no desire for the protest to succeed in any way.  Once you confront the police, there will be violence &#8212; usually by the police.  And sure, <a class="reference external" href="http://www.indybay.org/newsitems/2008/09/01/18531784.php">you can stand with a flower in your hand and get a face full of pepper spray</a>, and of course many people choose that course.  It&#8217;s a noble choice, but I can&#8217;t fault people for making other tactical decisions.</p>
<p>Another protesting tactic is the &quot;black bloq&quot;, typically a group of people who try to attract the attention of the police, often through property damage.  If the police have nothing better to do, then why not pin down the peaceful protesters and direct them where they can make the least impact?  People in the black bloq will try to keep this from happening.  It&#8217;s unlikely they were at all successful at the RNC as it was so <a class="reference external" href="http://www.salon.com/opinion/greenwald/2008/09/01/protests/index.html">thoroughly militarized</a>.  You could debate whether this is a good strategy (and there is lots of debate about this), but probably few people outside activists have any idea that there even is any underlying strategy.</p>
<p>Also, if you wonder why protesters, especially the anarchists, dress the way they do, it is primarily defensive.  If you are going to get teargassed and peppersprayed does wearing a handkerchief seem so odd?  And if they are tracking people to preemptively arrest, all the more reason to be as anonymous as possible.</p>
</div>
<div class="section" id="monica-and-eryn">
<h2>Monica and Eryn</h2>
<p><a href="http://blog.ianbicking.org/wp-content/uploads/images/Eryn-Trimmer-and-Monica-Bicking.jpg"><img style="float: right; margin: 1em" src="http://blog.ianbicking.org/wp-content/uploads/images/Eryn-Trimmer-and-Monica-Bicking-thumb.jpg" title="Monica Bicking and Eryn Trimmer"></a>
<p>I&#8217;d like to speak specifically of Monica and Eryn.  Talking to Monica about the RNC protests, she was never actually that excited.  The RNC isn&#8217;t what she wanted to focus on.  Why focus on the thing you dislike?  Why focus on a political process you don&#8217;t believe in?  Why focus on the workings of institutions you wish didn&#8217;t exist?  She would have preferred to work on the scale she felt was valid &#8212; to build a community of individuals.  But of course events are larger than us, and by whatever coincidence the RNC was coming to the Twin Cities.  This is not the sort of thing you can just ignore.  And of course it wasn&#8217;t up to her whether there would be protests.</p>
<p>Monica and Eryn are competent and diligent, so of course they would become important to the organizing process.  It seems that there were <a class="reference external" href="http://www.salon.com/opinion/greenwald/2008/08/31/raids/">infiltrators</a> in many of the organizations, so it&#8217;s unsurprising that the police knew who to find when they were getting ready to suppress the protests.  The two of them had expected informants from early on.  Monica herself worked for a year for the <a class="reference external" href="http://afsc.org">American Friends Service Committee</a> (a <a class="reference external" href="http://en.wikipedia.org/wiki/Religious_Society_of_Friends">Quaker</a> charity and peace advocacy organization) at a time when they were being spied on because of purported fears of violent protest.  If you are not aware of Quakerism, it is a quite strictly passivist faith, and the pretense for the spying was exceptionally absurd.  So Monica was not particularly shocked that there would be spying in the lead up to the RNC.</p>
<p>The RNC Welcoming Committee is itself a coordinating organization.  It was inevitable that many, many groups would want to protest at the RNC.  There&#8217;s no lack of people who are angry.  The Welcoming Committee served as a local resource for all those people &#8212; so visitors could find a place to stay in the city, so people could coordinate with each other, so people could perform their chosen form of protest in as well-informed a manner as possible.  That it is being painted as an organization with criminal intent is a complete misrepresentation; the Welcoming Committee specifically has <em>no intention of direct action</em>.</p>
<p>The preemptive arrest was surprising to everyone.  It is normal in the course of civil disobedience that some people expect to be arrested.  Civil disobedience is confrontational.  You have to go into it knowing that there will be certain consequences.  Those are the consequences of the <em>confrontation</em>.  They are not the consequences of <em>the possibility of future confrontation</em>.  As organizers I know Monica and Eryn weren&#8217;t planning on being arrested.</p>
<p>But I haven&#8217;t written this essay in anger over their arrest.  Protest is conflict.  The lines of conflict move, and I find this move to preemptive arrest quite troubling, but I&#8217;m also optimistic that they won&#8217;t ultimately be charged with anything.  I also don&#8217;t want to slip into the protest-to-protest mode, more obsessed with the form of protest than the function of <em>this</em> protest.  This is a frustrating turn of events, and I&#8217;m sure no one is more frustrated than the two of them &#8212; one sequestered in a jail, the other in legal limbo, at the culmination of all their work over the last year.  But I didn&#8217;t write this essay out of anger but because I wanted to recognize what they&#8217;ve been doing and do my best to explain it to other people, because I&#8217;m proud of them.  They are exactly the model of an engaged, ethically driven citizenry.</p>
<p>I see lots of comments like &quot;this country is a fascist state!&quot; and &quot;this is just like Nazi Germany!&quot;  But of course this country is not those things.  That&#8217;s what happens when the citizenry of a country stands down, when they look away from what&#8217;s happening right in front of them, when they ignore justice and discard empathy.  This country is not those things because of Monica and Eryn and the thousands of people who will be present and paying attention when the RNC lands from on high.</p>
<p>To support Monica, Eryn, and the other charged members of the RNC Welcoming Committee, and also to get updates on the case and news coverage of the case, please visit <a class="reference external" href="http://rnc8.org">rnc8.org</a></p>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.ianbicking.org/2008/09/02/on-the-rnc-monica-bicking-eryn-trimmer-and-protest/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
