<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>Subakva</title>
	
	<link>http://subakva.com</link>
	<description>Submerged in Esperanto</description>
	<lastBuildDate>Mon, 15 Sep 2008 04:33:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/subakva" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="subakva" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Only in Python…</title>
		<link>http://subakva.com/2008/09/14/only-in-python/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=only-in-python</link>
		<comments>http://subakva.com/2008/09/14/only-in-python/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 04:33:41 +0000</pubDate>
		<dc:creator>Jason Wadsworth</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://subakva.com/?p=22</guid>
		<description><![CDATA[
I just imported code from the future. That famous XKCD comic is a lot closer to reality than you might have thought.

from __future__ import with_statement
]]></description>
			<content:encoded><![CDATA[<p>
I just <a href='http://docs.python.org/lib/bltin-file-objects.html' title='Python File Objects'>imported code from the <strong>future</strong></a>. That <a href='http://xkcd.com/353/' title='XKCD Python Comic'>famous XKCD comic</a> is a lot closer to reality than you might have thought.
</p>
<p><code>from __future__ import with_statement</code></p>
]]></content:encoded>
			<wfw:commentRss>http://subakva.com/2008/09/14/only-in-python/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>More Drafts Than Posts</title>
		<link>http://subakva.com/2008/06/02/more-drafts-than-posts/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=more-drafts-than-posts</link>
		<comments>http://subakva.com/2008/06/02/more-drafts-than-posts/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 05:29:55 +0000</pubDate>
		<dc:creator>Jason Wadsworth</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[meta]]></category>

		<guid isPermaLink="false">http://subakva.com/?p=18</guid>
		<description><![CDATA[
As I write this, this blog system contains 3 published posts and 8 drafts. If you were to try to infer my level of engagement with technology from the activity on this blog, you might think I&#8217;ve given up and started selling used cars. For better or worse, that&#8217;s not the case.

Here are some things [...]]]></description>
			<content:encoded><![CDATA[<p>
As I write this, this blog system contains 3 published posts and 8 drafts. If you were to try to infer my level of engagement with technology from the activity on this blog, you might think I&#8217;ve given up and started selling used cars. For better or worse, that&#8217;s not the case.
</p>
<p>Here are some things that I coulda/shoulda blogged about since I last posted in January:</p>
<ul>
<li>Tagging Dreams with Django</li>
<li>Plotting the Future of Crosscheck</li>
<li>New Gig: Second Rotation</li>
<li>From Django to Rails (and Back)</li>
<li>Encapsulating a Django Project</li>
<li>Auditable Django Models</li>
<li>Simplify Wordpress Upgrades With Subversion</li>
<li>The AppEngine Experience</li>
<li>Building Web Apps on the T</li>
<li>A Brief History of Freestyle</li>
<li>Building Your Own Blog: Awesome or Chumpy?</li>
<li>Boston BarCamp 2008</li>
</ul>
<p>
I&#8217;m a bad, bad blogger. This list doesn&#8217;t include any of the drafts that I actually began to write. But, as I look at this list, there&#8217;s a lot of interesting stuff here. I suspect that if I actually make myself write about the things that I&#8217;m thinking and working on, it will help motivate me to finish some of my projects. If I&#8217;m lucky, a few people might even read it, which will motivate me even more. Is this how life works for extroverts?</p>
]]></content:encoded>
			<wfw:commentRss>http://subakva.com/2008/06/02/more-drafts-than-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clone My Fields, Please</title>
		<link>http://subakva.com/2008/02/26/clone-my-fields-please/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=clone-my-fields-please</link>
		<comments>http://subakva.com/2008/02/26/clone-my-fields-please/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 04:50:59 +0000</pubDate>
		<dc:creator>Jason Wadsworth</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[django search]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://subakva.com/2008/02/26/clone-my-fields-please/</guid>
		<description><![CDATA[The Introduction

I recently started using the SearchManager from the Mercury Tide white paper on using MySQL full-text search with Django. It&#39;s been helpful, but I ran into a bug recently while trying to add a default filter to a SearchManager subclass.

The Boring Context

Rather than deleting objects from the database, my application sets a boolean flag [...]]]></description>
			<content:encoded><![CDATA[<h3>The Introduction</h3>
<p>
I recently started using the SearchManager from <a href='http://www.mercurytide.co.uk/whitepapers/django-full-text-search/' title='Extending Djangos database API to include full-text search'>the Mercury Tide white paper</a> on using <a href='http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html' title='MySQL Full-Text Search'>MySQL full-text search</a> with <a href='http://www.djangoproject.com/' title='The Web framework for perfectionists with deadlines'>Django</a>. It&#39;s been helpful, but I ran into a bug recently while trying to add a default filter to a SearchManager subclass.
</p>
<h3>The Boring Context</h3>
<p>
Rather than deleting objects from the database, my application sets a boolean flag to indicate that the content is not longer relevant. I wanted my manager to apply a filter to every query set to include only items that are not disabled. Here&#39;s what the manager class looks like:
</p>
<pre>
class SearchableItemManager(SearchMangager):
    def __init__(self):
        zuper = super(SearchableItemManager, self)
        zuper.__init__(('name','description',))

    def get_query_set(self):
        query = super(SearchableItemManager, self).get_query_set()
        return query.filter(is_enabled=True)
</pre>
<h3>The Ugly Crash</h3>
<p>
When I made the change, I found that calling the <code>search()</code> method raised a TypeError: &quot;&#39;NoneType&#39; object is not iterable.&quot; The error occurred when the SearchQuerySet tried to construct the SQL for the MATCH&#8230;AGAINST clause. Somehow, the <code>_search_fields</code> tuple on the SearchQuerySet was None.
</p>
<h3>The Mystery Solved</h3>
<p>
This had me baffled until I had a look at the _QuerySet code in Django. It seems obvious now, but adding an additional filter to a query set returns a clone of the original with the new filter added. The _QuerySet object contains a <code>_clone</code> method that copies a hard-coded list of fields from the old <abbr title='Query Set'>QS</abbr> to the new one. Naturally, that hard-coded list doesn&#39;t know anything about my <code>_search_fields</code>, so the property has no value on the clone.
</p>
<h3>The Fix</h3>
<p>
Now, depending on how much of a zealot you are about modifying &#8220;private&#8221; functions, there are two ways to fix this. The easiest method is to simply override the <code>_clone</code> method and add the <code>_search_fields</code> tuple to the clone. The alternative is to override every method that depends on the _clone method, and copy over the <code>_search_fields</code> tuple for each one. I think that would be stupid, and will speak of it no further. Here&#39;s the code I added to generate happiness:
</p>
<pre>
class SearchQuerySet(models.query.QuerySet):
    # ... code from the original Mercury Tide class
    def _clone(self, klass=None, **kwargs):
        zuper = super(SearchQuerySet, self)
        clone = zuper._clone(klass, **kwargs)
        clone._search_fields = self._search_fields
        return clone
</pre>
]]></content:encoded>
			<wfw:commentRss>http://subakva.com/2008/02/26/clone-my-fields-please/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Hobnobbing in Boston</title>
		<link>http://subakva.com/2008/01/11/hobnobbing-in-boston/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=hobnobbing-in-boston</link>
		<comments>http://subakva.com/2008/01/11/hobnobbing-in-boston/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 22:33:56 +0000</pubDate>
		<dc:creator>Jason Wadsworth</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[boston]]></category>
		<category><![CDATA[meet-ups]]></category>

		<guid isPermaLink="false">http://subakva.com/2008/01/11/hobnobbing-in-boston/</guid>
		<description><![CDATA[

	One of the things that I&#8217;m most looking forward to about my ongoing transition to Boston is getting involved in the development community. I have no doubt that New Bedford has a few developers around, but the meet-up community is completely dead, and the chances of me making 3 hour round-trip to Boston on a [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://subakva.com/wp-content/uploads/2008/01/meetup.gif' alt='Meet-Up Logo' class='right'/></p>
<p>
	One of the things that I&#8217;m most looking forward to about my ongoing transition to Boston is getting involved in the development community. I have no doubt that New Bedford has a few developers around, but the <a href="http://www.meetup.com/" title="Meet-Up">meet-up community</a> is completely dead, and the chances of me making <a href="http://www.allposters.com/-sp/Gilligan-s-Island-Posters_i1617189_.htm" title="A 3 Hour Tour">3 hour</a> round-trip to Boston on a week night just to talk shop are slim. But, now that I&#8217;m up there every day for work, you can expect to see me out on the town, <a href="http://www.etymonline.com/index.php?search=hobnob&#038;searchmode=none" title="From whence, hobnob?">hobnobbing</a> with the <a href="http://www.etymonline.com/index.php?search=geek&#038;searchmode=none" title="The Geekiest">geekiest of the geeks</a>.
</p>
<p>
	I went to my first meet-up last week: <a href="http://xtcboston.blogspot.com/" title="XTC Meet-Up">The eXtreme Tuesday Club</a>. It sounds like it might involve <a href="http://www.halfbakery.com/idea/MtDew" title="Do the Dew, Dude.">jumping from a plane with a snowboard strapped to my feet while drinking Mountain Dew</a>, but it&#8217;s actually a group for <a href="http://www.extremeprogramming.org/" title="Extreme Programming">Extreme Programming</a> (XP) zealots. I&#8217;m not actually a zealot about it, but I&#8217;ve seen it work brilliantly in the past and it&#8217;s an experience that I&#8217;d like to repeat. That single, trancendental experience doing full XP with a great team was probably the most stress-free, fun, and productive project that I&#8217;ve ever been involved with.
</p>
<p>
	I had a great time at the meet-up. It wasn&#8217;t heavily attended, but it was great talking to the few people that were there about <a href="http://martinfowler.com/articles/continuousIntegration.html" title="Continuous Integration">continuous integration</a>, <a href="http://www.artima.com/intv/handcuffs.html" title="Checked Exceptions Suck">checked exceptions</a>, and <a href="http://www.channel4.com/entertainment/tv/microsites/I/itcrowd/" title="The IT Crowd">other geekery</a>. There were a couple of guys from <a href="http://cyrusinnovation.com/website/" title="Cyrus Innovation">a local Agile shop</a>, a woman from &#8220;a very large company&#8221;, and a sales guy from an IT services company. The sales guy was a bit out of his element, but he did manage to sit through my explanation of <abbr title='Extreme Programming'>XP</abbr>. I love trying to explain technical concepts to non-technical people, so I think I may have gotten more out of the experience than he did.
</p>
<p>
	I&#8217;ll be back again next month, and in the meantime, there are meet-ups for (in order of eagerness) <a href="http://javascript.meetup.com/2/" title="The Boston JavaScript Meetup Group">JavaScript</a>, <a href="http://python.meetup.com/181/" title="The Cambridge Python Meetup Group">Python</a>, <a href="http://webdesign.meetup.com/83/" title="The Boston Web Design Meetup Group">Web Design</a>, <a href="http://ruby.meetup.com/87/" title="The Metrowest Ruby Users Group">Ruby</a> and <a href="http://java.meetup.com/10/" title="The Boston Java Meetup Group">Java</a>. If you see me out hobnobbing, be sure to say &#8220;hello&#8221; and hand me the nickel that you owe me for reading this.</p>
]]></content:encoded>
			<wfw:commentRss>http://subakva.com/2008/01/11/hobnobbing-in-boston/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>“I am seated in an office, surrounded by heads and bodies,” and Other Great Beginnings</title>
		<link>http://subakva.com/2007/12/21/beginnings/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=beginnings</link>
		<comments>http://subakva.com/2007/12/21/beginnings/#comments</comments>
		<pubDate>Fri, 21 Dec 2007 22:28:16 +0000</pubDate>
		<dc:creator>Jason Wadsworth</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[introduction]]></category>
		<category><![CDATA[me]]></category>

		<guid isPermaLink="false">http://subakva.com/2007/12/21/beginnings/</guid>
		<description><![CDATA[
There&#8217;s a trick to blogging.
I don&#8217;t know what that trick is, but I intend to figure it out. I&#8217;ve had quite a few blogs in the past with sparse to middling success at maintaining them with new content. Maybe I ought to just throw in the towel and admit that I&#8217;m either too much of [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://subakva.com/wp-content/uploads/2007/12/finite-jest.jpg' class='right-img' alt='Finite Jest' /><br />
There&#8217;s a trick to blogging.</p>
<p>I don&#8217;t know what that trick is, but I intend to figure it out. I&#8217;ve had quite a few blogs in the past with sparse to middling success at maintaining them with new content. Maybe I ought to just throw in the towel and admit that I&#8217;m either too much of a perfectionist or too disorganized to maintain a blog successfully, but I can&#8217;t shake the feeling that I really ought to be doing this, and doing it well.</p>
<p>So, this is my latest attempt at staking out some digital territory in the crowded, geek-o-sphere. It&#8217;s <a href="http://subakva.com" title="Submerged Blogging">Subakva</a>, which means, for those of us who don&#8217;t speak <a href="http://lernu.net" title="Lernu Esperanto">esperanto</a>,  &#8220;underwater&#8221; (Prepare yourself for my upcoming blog entry on how to find an squatter-free domain name by learning obscure, artificial languages.)</p>
<p>If you&#8217;re interested in web technology, interface design, and all that Geek 2.0 jazz, I predict that there will be something worthwhile for you to read here in the future. If you&#8217;re not interested in any of that, then there&#8217;s nothing for you here but heartache and disappointment. Go now, with your spirit still intact.</p>
<p><strong>Excelsior!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://subakva.com/2007/12/21/beginnings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
