<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>tadhg.com &#187; writing</title>
	<atom:link href="http://tadhg.com/wp/tag/writing/feed/" rel="self" type="application/rss+xml" />
	<link>http://tadhg.com/wp</link>
	<description>Wherein some things Tadhg are discussed</description>
	<lastBuildDate>Fri, 03 Sep 2010 06:52:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Perfectionism is Hard</title>
		<link>http://tadhg.com/wp/2010/08/30/perfectionism-is-hard/</link>
		<comments>http://tadhg.com/wp/2010/08/30/perfectionism-is-hard/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 06:50:46 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=3210</guid>
		<description><![CDATA[I haven’t been that happy with my blog posts recently. It’s not that I think all of them are terrible, or that the quality suddenly dropped off a cliff, but I feel as if there’s been a decline. It’s tough to measure this, of course, with no clear criteria. But that I feel this way [...]]]></description>
			<content:encoded><![CDATA[<p>I haven’t been that happy with my blog posts recently. It’s not that I think all of them are terrible, or that the quality suddenly dropped off a cliff, but I feel as if there’s been a decline. It’s tough to measure this, of course, with no clear criteria. But that I feel this way is indicative of some problem.</p>
<p>At the same time, I feel as if I haven’t been writing what I want to write, mainly because I’ve shied away from a lot of topics that I’ve wanted to write about.<br />
<span id="more-3210"></span><br />
The general pattern is that I think of something I want to write about, something I usually either feel strongly about, or want to work out my thoughts on, or both. Then I think it over for a little while and come up with some ideas on how I’ll approach it as a post. Then it comes time to write the post, and I resist writing about that topic. Usually because I feel that it will require too much time, or too much effort, or both, to do it justice. So then I try to write about something else instead, something less demanding.</p>
<p>The subsequent search for the less demanding thing often takes more time than writing the original post would have. Occasionally I end up writing about something else equally demanding, which is fine, but usually I find something brief and light instead.</p>
<p>There’s nothing wrong with brief and/or light posts. But there is something wrong with writing them because I’m avoiding writing about something else. Even more so when that something else is actually a topic I want to write about.</p>
<p>I want to write about it, but somehow this desire moves into the realm of theory, and instead of being a motivating force becomes a heavy weight, having undergone the deadening transformation from “want to write” to “should write” to “should already have written”.</p>
<p>That description skips a step, the critical one where the desire to write dissipates but the loyalty to the topic remains. I suspect that this step has much to do with placing high expectations on the finished product.</p>
<p>Originally I was going to title this post “Writing is Hard”, but while that may certainly be true, the current title is more germane. It’s not writing per se that I’m having trouble with, it’s writing in the shadow of my expectations. It’s grappling with the fact that some part of my mind has already calculated (using unknowable metrics) how “good” the post “should” be, and some other part of my mind then blanches at having to meet this standard.</p>
<p>This is perfectionism, hiding in plain sight, masquerading, as it often does, as a heartfelt and genuine concern for quality—not just quality in terms of what the output is like, but of course also the quality of my writing experience, for it feels that it would be terrible if I inadvertently got into the habit of not giving my all to topics I write about. That, it says, would be tragic. That would be a terrible waste, as I would then have not just shitty output but a shitty process as well, the worst of all worlds.</p>
<p>By some remarkable coincidence, the presence of this perfectionism has helped me to my current point, where I’m concerned about&#8230; shitty output and a shitty process.</p>
<p>Even after more than four years of regular public writing, a practice I took up in large part to try to get past the perfectionism that I felt was holding back my writing, I still appear to have a lot of difficulty trusting myself enough to just let go and write about whatever interests me. Perhaps the most insidious thing is that this perfectionism creeps in partly by way of my pride in the pieces that I regard highly. After all, if I’ve written them, it’s clear I can achieve a high standard, so less would be a failure.</p>
<p>One of the reasons I write this blog is for practice. Practice so that I can be a better writer. It’s definitely helped, but practice, mere activity, isn’t enough—to really improve, one needs “directed practice”, which I haven’t seen clearly defined anywhere but which I think I understand. It takes a certain focus, a focus that is not always easy to summon. In the time I’ve been blogging, I think I’ve done that for concentrated periods, but I (clearly) haven’t managed to make it properly habitual.</p>
<p>In terms that will sound awfully self-helpy, I think that almost any conscious concern with the quality of the product of the endeavor is counterproductive. At the same time, concern with the quality of the process is quite important. On top of that, though, this concern with the quality of the process cannot be allowed to silence the writing voice. The writing voice must be heard, and respected, but with a recognition that when it drifts away, or goes silent, the conscious mind will do its best to take over and will respect the intent of what that voice was trying to achieve.</p>
<p>If this sounds like vague and unverifiable crap to you, well, it sounds that way to me too, but with an additional maddening conviction that it’s extremely important. There is a balance that must be struck here, and describing it may be even harder than striking it. For me, I tilt so far to the side of inner editorial control that some of that will always be present even when I try to just “write free”, and so my worries about somehow disengaging too much are unrealistic to say the least. Furthermore, I need to keep in mind that even if ninety, or ninety-five, or even ninety-nine, percent of what I write here is crap, that will still result in a few good posts per year, which is infinitely better than none. This is not a new thought, but it is one that I need to remind myself of, and to explicitly write out.</p>
<p>It’s not as simple as just writing what I want to write about. But writing about the things that I’ve recently wanted to write about would be fine, far better than my current approach of letting the ideas die, their dead weight immediately landing on top of new ideas, gradually making creativity in general much more laborious. This is how perfectionism makes things hard—not just in an exacting and demanding and up-front way, associated with much editing and rewriting until things are just so, but also in subtly making creativity and self-expression far less appealing, far less fun.</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/blog/" rel="tag">Blog</a>, <a href="http://tadhg.com/wp/tag/personal/" rel="tag">personal</a>, <a href="http://tadhg.com/wp/tag/writing/" rel="tag">writing</a></p><h4 class='related-posts-header'>Related Posts</h4><ul class="related-posts-list"><li class="related-post"><a href="http://tadhg.com/wp/2010/08/02/three-routines/">Three Routines</a> <span class="related-post-date timestamp">Mon 02 Aug 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/12/29/2009-goals-review/">2009 Goals Review</a> <span class="related-post-date timestamp">Tue 29 Dec 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/30/2009-goals-status/">2009 Goals Status</a> <span class="related-post-date timestamp">Thu 30 Jul 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/05/26/1000th-post/">1000th Post</a> <span class="related-post-date timestamp">Tue 26 May 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/01/01/2009-goals/">2009 Goals</a> <span class="related-post-date timestamp">Thu 01 Jan 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/12/11/some-medium-term-plans/">Some Medium-Term Plans</a> <span class="related-post-date timestamp">Tue 11 Dec 2007</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/08/05/musings-on-blogging/">Musings on Blogging</a> <span class="related-post-date timestamp">Sun 05 Aug 2007</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/08/01/august-2007-blogging-year-in-review/">August 2007: Blogging Year in Review</a> <span class="related-post-date timestamp">Wed 01 Aug 2007</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/05/01/thematic-consideration/">Thematic Consideration</a> <span class="related-post-date timestamp">Tue 01 May 2007</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/03/02/februarymarch-blogging/">February/March Blogging</a> <span class="related-post-date timestamp">Fri 02 Mar 2007</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/08/30/perfectionism-is-hard/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Three Routines</title>
		<link>http://tadhg.com/wp/2010/08/02/three-routines/</link>
		<comments>http://tadhg.com/wp/2010/08/02/three-routines/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 17:22:10 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[CrossFit]]></category>
		<category><![CDATA[exercise]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[psychology]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=3140</guid>
		<description><![CDATA[I don’t tend to think of myself as a particularly disciplined or organized person, a view often at odds with how others perceive me, but I will admit to liking to organize and order things in specific ways. This may be related to my left-handedness, and/or to my attraction to precision (which attraction falls short [...]]]></description>
			<content:encoded><![CDATA[<p>I don’t tend to think of myself as a particularly disciplined or organized person, a view often at odds with how others perceive me, but I will admit to liking to organize and order things in specific ways. This <a href="http://www.newscientist.com/article/dn15112-lefthanded-people-are-more-inhibited.html" title="Left-handed people are more inhibited" >may be related to my left-handedness</a>, and/or to my attraction to precision (which attraction falls short of achieving precision, although I hope that in language I occasionally come close).<br />
<span id="more-3140"></span><br />
I still struggle, as do most people, with trying to focus on the right things, to not become wrapped up in getting perfectly right things that just don’t matter. Without getting into what matters and what doesn’t, it seems to me that the last twelve years of my life have involved a significant amount of progress in this struggle, and that I’ve learned to route some of what might loosely be termed “<a href="http://en.wikipedia.org/wiki/Obsessive–compulsive_disorder" title="Obsessive–compulsive disorder" >OCD</a>” (or <a href="http://en.wikipedia.org/wiki/Obsessive–compulsive_personality_disorder" title="Obsessive–compulsive personality disorder" >OCPD</a>, although in truth I don’t have either of those disorders) into fairly productive channels.</p>
<p>Before the age of twenty-four, I was never able to stick to a routine that wasn’t forced upon me. I’d tried and failed many times to follow daily routines, especially with exercise. Doing something regularly every day, or even a few times a week, seemed impossible.</p>
<p>That’s changed. I continue to struggle with being productive—two novels in various stages of incompletion, and a considerable pile of other unfinished projects, make this abundantly clear. But aside from working (which, no matter how much I enjoy it, is a routine pushed upon me by outside forces), I now have three things I do almost daily that are quite important to me:</p>
<ul>
<li>Morning pages. It’s more than twelve years, now, that I’ve been doing these every day. They’re simply part of daily life, and will continue to be so.
</li>
<li>This blog. I’ve been blogging either daily or five times per week for just over four years. It’s not part of daily life in the same way my pages are. Writing my blog posts still feels like an imposition some of the time, and it’s often a struggle. I sometimes feel it as a real strain, the requirement of coming up with five things to write about every week, and experience my two days off as almost like vacations due to the relief of not having to deal with that. I occasionally have to remind myself that I have opportunity to express myself in any way I choose, on any topic, in a public way unavailable to anyone who lived in the pre-Internet age, and that this makes me incredibly lucky. Of the three near-daily things, this is the one that feels most fragile, most susceptible to my (likely mistakenly) deciding at some point that I don’t need to keep it up.
</li>
<li>CrossFit. I’ve been doing it for more than a year, and it hit a critical level quite some time ago, so I’m quite sure I’ll keep going with it. This is pretty clear from the fact that last week I did a ton of travelling, lost a lot of sleep, and was generally all over the place, but still managed to do CrossFit workouts five days out of the seven (five is my target every week).
</li>
</ul>
<p>While I don’t think I ever really exhibited a lot of compulsive behaviors, those I did have largely been refocused into this triumvirate. I still perceive the setup I’ve created for the latter two: I’m consciously pushing the idea that sticking to those routines is an achievement, and that there’s a kind of invisible checkbox for each of them in my mind, with a psychological payoff every time the tick mark is entered. The latter two have a public aspect, also, in that posts are public and that I log (and broadcast) my workouts, and this public aspect is a further motivator.</p>
<p>It’s a powerful trio of habits. My morning pages are (obviously) introspective outlets, a kind of dialogue with myself that has a dedicated place in my life every day. My blog posts are public self-expression, writing that has some degree of polish and with which I (hopefully) hone my ability to make myself understood. I’m very used to the rhythm of it, Sunday/Monday/Tuesday/break/Thursday/Friday/break, and while I sometimes worry about complacency and conservatism in my posts, I’m nevertheless convinced that it’s incomparably better than not doing it. CrossFit is the first regular exercise I’ve managed to stick to in my life, and has done me tremendous good. Its rhythm isn’t as set, as my target is to fit in five workout days per week any way I can, and by its nature it’s more susceptible to disruption (by wisdom tooth extraction, for example); I’m more willing to accede to lapses in the routine.</p>
<p>Introspection, self-expression, and intense exercise. Not a bad three things to have running smoothly. That’s not self-satisfaction speaking—in many ways those three things barely constitute a viable starting point for what my adult life should be—but rather recognition that I’ve managed to work out some of the things that seemed insurmountable in my early twenties.</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/blog/" rel="tag">Blog</a>, <a href="http://tadhg.com/wp/tag/crossfit/" rel="tag">CrossFit</a>, <a href="http://tadhg.com/wp/tag/exercise/" rel="tag">exercise</a>, <a href="http://tadhg.com/wp/tag/personal/" rel="tag">personal</a>, <a href="http://tadhg.com/wp/tag/psychology/" rel="tag">psychology</a>, <a href="http://tadhg.com/wp/tag/writing/" rel="tag">writing</a></p><h4 class='related-posts-header'>Related Posts</h4><ul class="related-posts-list"><li class="related-post"><a href="http://tadhg.com/wp/2010/05/16/sabbatical-close/">sabbatical.close()</a> <span class="related-post-date timestamp">Sun 16 May 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/30/2010-goals-first-quarter-review/">2010 Goals: First Quarter Review</a> <span class="related-post-date timestamp">Tue 30 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/01/2010-goals/">2010 Goals</a> <span class="related-post-date timestamp">Fri 01 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/08/30/perfectionism-is-hard/">Perfectionism is Hard</a> <span class="related-post-date timestamp">Mon 30 Aug 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/08/24/sf-heat/">SF Heat</a> <span class="related-post-date timestamp">Tue 24 Aug 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/08/15/ending-a-long-span-of-no-soccer/">Ending a Long Span of No Soccer</a> <span class="related-post-date timestamp">Sun 15 Aug 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/07/27/jet-lag-and-exercise/">Jet Lag and Exercise</a> <span class="related-post-date timestamp">Tue 27 Jul 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/07/18/tough-mudding/">Tough Mudding</a> <span class="related-post-date timestamp">Sun 18 Jul 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/06/01/a-year-of-crossfit/">A Year of CrossFit</a> <span class="related-post-date timestamp">Tue 01 Jun 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/29/crossfit-games-2010-norcal-sectionals-gripes/">CrossFit Games 2010 NorCal Sectionals: Gripes</a> <span class="related-post-date timestamp">Mon 29 Mar 2010</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/08/02/three-routines/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to Cheat in the Leaving Certificate on YouTube</title>
		<link>http://tadhg.com/wp/2010/07/05/how-to-cheat-in-the-leaving-certificate-on-youtube/</link>
		<comments>http://tadhg.com/wp/2010/07/05/how-to-cheat-in-the-leaving-certificate-on-youtube/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 04:03:46 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[film]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=3072</guid>
		<description><![CDATA[Some time ago I wrote a feature film with Graham Jones: How to Cheat in the Leaving Certificate, a heist movie about the Irish education system. It is now available on YouTube.
I’m leery of YouTube as a venue for feature films, since it’s geared much more towards short clips. On the other hand, if the [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago I wrote a feature film with <a class="reference external" href="http://en.wikipedia.org/wiki/Graham_Jones_(director)">Graham Jones</a>: <a class="reference external" href="http://en.wikipedia.org/wiki/How_to_Cheat_in_the_Leaving_Certificate"><cite>How to Cheat in the Leaving Certificate</cite></a>, a heist movie about the Irish education system. It is now <a href="http://www.youtube.com/watch?v=1z_WHOnHjA4" title="How to Cheat in the Leaving Certificate" >available on YouTube</a>.</p>
<p>I’m leery of YouTube as a venue for feature films, since it’s geared much more towards short clips. On the other hand, if the film is insufficiently gripping, that’s down to mistakes we made.</p>
<p>The film has been in the news again recently, mentioned in stories concerning allegedly <a href="http://www.independent.ie/national-news/she-wrote-her-notes-on-her-thigh-the-invigilator-wouldnt-have-dared-look-there-2227329.html" title="She wrote her notes on her thigh . . . (the invigilator wouldn’t have dared look there)" >widespread</a> <a href="http://www.irishtimes.com/newspaper/frontpage/2010/0615/1224272522104.html" title="‘Potentially serious’ case of exam cheating under inquiry" >cheating</a>.</p>
<p>I’m amused that one of the primary funding sources for the film was the now-nationalized <a class="reference external" href="http://en.wikipedia.org/wiki/Anglo_Irish_Bank">Anglo Irish Bank</a>.</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/education/" rel="tag">education</a>, <a href="http://tadhg.com/wp/tag/film/" rel="tag">film</a>, <a href="http://tadhg.com/wp/tag/personal/" rel="tag">personal</a>, <a href="http://tadhg.com/wp/tag/writing/" rel="tag">writing</a></p><h4 class='related-posts-header'>Related Posts</h4><ul class="related-posts-list"><li class="related-post"><a href="http://tadhg.com/wp/1998/06/28/how-to-cheat-in-the-leaving-certificate/"><em>How to Cheat in the Leaving Certificate</em></a> <span class="related-post-date timestamp">Sun 28 Jun 1998</span></li><li class="related-post"><a href="http://tadhg.com/wp/1998/03/17/how-to-cheat-and-i/"><em>How to Cheat</em> and I</a> <span class="related-post-date timestamp">Tue 17 Mar 1998</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/08/30/perfectionism-is-hard/">Perfectionism is Hard</a> <span class="related-post-date timestamp">Mon 30 Aug 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/08/02/three-routines/">Three Routines</a> <span class="related-post-date timestamp">Mon 02 Aug 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/05/31/original-draft-of-the-empire-strikes-back/">Original Draft of <cite>The Empire Strikes Back</cite></a> <span class="related-post-date timestamp">Mon 31 May 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/05/16/sabbatical-close/">sabbatical.close()</a> <span class="related-post-date timestamp">Sun 16 May 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/04/01/anaqrest/">Anaq’rest</a> <span class="related-post-date timestamp">Thu 01 Apr 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/30/2010-goals-first-quarter-review/">2010 Goals: First Quarter Review</a> <span class="related-post-date timestamp">Tue 30 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/21/an-introduction-to-roleplaying-games/">An Introduction to Roleplaying Games</a> <span class="related-post-date timestamp">Sun 21 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/01/2010-goals/">2010 Goals</a> <span class="related-post-date timestamp">Fri 01 Jan 2010</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/07/05/how-to-cheat-in-the-leaving-certificate-on-youtube/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Original Draft of The Empire Strikes Back</title>
		<link>http://tadhg.com/wp/2010/05/31/original-draft-of-the-empire-strikes-back/</link>
		<comments>http://tadhg.com/wp/2010/05/31/original-draft-of-the-empire-strikes-back/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 06:27:47 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[film]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2984</guid>
		<description><![CDATA[Here’s a review of the original draft. It’s my favorite of the films, and finding out it was the least successful one made me sad. The original is interesting, although probably inferior to the final film—for example, giving Han a father (or any family) would have weakened his character.
Tags: film, writingRelated PostsHow to Cheat in [...]]]></description>
			<content:encoded><![CDATA[<p>Here’s a <a class="reference external" href="http://scriptshadow.blogspot.com/2010/03/alternative-draft-week-original-empire.html">review</a> of the <a class="reference external" href="http://www.mypdfscripts.com/screenplays/star-wars-episode-v-%E2%80%93-the-empire-strikes-back-leigh-brackett-draft">original draft</a>. It’s my favorite of the films, and finding out it was the least successful one made me sad. The original is interesting, although probably inferior to the final film—for example, giving Han a father (or any family) would have weakened his character.</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/film/" rel="tag">film</a>, <a href="http://tadhg.com/wp/tag/writing/" rel="tag">writing</a></p><h4 class='related-posts-header'>Related Posts</h4><ul class="related-posts-list"><li class="related-post"><a href="http://tadhg.com/wp/2010/07/05/how-to-cheat-in-the-leaving-certificate-on-youtube/"><cite>How to Cheat in the Leaving Certificate</cite> on YouTube</a> <span class="related-post-date timestamp">Mon 05 Jul 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/05/26/what-star-wars-episodes-ii-and-iii-should-have-been-episode-iii/">What <em>Star Wars</em> Episodes II and III Should Have Been: Episode III</a> <span class="related-post-date timestamp">Sat 26 May 2007</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/05/25/what-star-wars-episodes-ii-and-iii-should-have-been-episode-ii/">What <em>Star Wars</em> Episodes II and III Should Have Been: Episode II</a> <span class="related-post-date timestamp">Fri 25 May 2007</span></li><li class="related-post"><a href="http://tadhg.com/wp/2006/12/03/interrogation-scenes/">Interrogation Scenes</a> <span class="related-post-date timestamp">Sun 03 Dec 2006</span></li><li class="related-post"><a href="http://tadhg.com/wp/2002/03/08/a-review-of-haiku-tunnel/">A Review of <em>Haiku Tunnel</em></a> <span class="related-post-date timestamp">Fri 08 Mar 2002</span></li><li class="related-post"><a href="http://tadhg.com/wp/2000/11/19/a-review-of-the-sixth-day/">A Review of <em>The Sixth Day</em></a> <span class="related-post-date timestamp">Sun 19 Nov 2000</span></li><li class="related-post"><a href="http://tadhg.com/wp/2000/11/12/a-review-of-requiem-for-a-dream/">A Review of <em>Requiem for a Dream</em></a> <span class="related-post-date timestamp">Sun 12 Nov 2000</span></li><li class="related-post"><a href="http://tadhg.com/wp/1998/06/28/how-to-cheat-in-the-leaving-certificate/"><em>How to Cheat in the Leaving Certificate</em></a> <span class="related-post-date timestamp">Sun 28 Jun 1998</span></li><li class="related-post"><a href="http://tadhg.com/wp/1998/03/17/how-to-cheat-and-i/"><em>How to Cheat</em> and I</a> <span class="related-post-date timestamp">Tue 17 Mar 1998</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/08/30/perfectionism-is-hard/">Perfectionism is Hard</a> <span class="related-post-date timestamp">Mon 30 Aug 2010</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/05/31/original-draft-of-the-empire-strikes-back/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sabbatical.close()</title>
		<link>http://tadhg.com/wp/2010/05/16/sabbatical-close/</link>
		<comments>http://tadhg.com/wp/2010/05/16/sabbatical-close/#comments</comments>
		<pubDate>Mon, 17 May 2010 06:36:56 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[CrossFit]]></category>
		<category><![CDATA[diet]]></category>
		<category><![CDATA[document formats]]></category>
		<category><![CDATA[exercise]]></category>
		<category><![CDATA[food]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[goals]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[reStructuredText]]></category>
		<category><![CDATA[roleplaying]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[sports]]></category>
		<category><![CDATA[T]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[tennis]]></category>
		<category><![CDATA[text editing]]></category>
		<category><![CDATA[version-control]]></category>
		<category><![CDATA[Vim]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2942</guid>
		<description><![CDATA[After a highly enjoyable, productive, and extended period, it’s time for me to return to the world of paid work.
I’m quite happy with the things I’ve done during my time off. Many of them are important only to me, but then, it’s been my time off.

Here are some of the things I’ve done since leaving [...]]]></description>
			<content:encoded><![CDATA[<p>After a highly enjoyable, productive, and extended period, it’s time for me to return to the world of paid work.</p>
<p>I’m quite happy with the things I’ve done during my time off. Many of them are important only to me, but then, it’s been my time off.<br />
<span id="more-2942"></span><br />
Here are some of the things I’ve done since leaving Metaweb that I consider significant:</p>
<ul>
<li><strong>CrossFit</strong>. I’m approaching the one year mark, and it’s hard to overstate the importance of that for me. This is the first time in my life I’ve managed to keep an exercise routine of any kind going for that long. Not coincidentally, I’m also in the best shape of my life. I now feel that some kind of regular, intense, exercise has a similar place in my life to my morning pages—that is, something I I regard as mandatory and more or less permanent.
</li>
<li><strong>Diet</strong>. Not just <a href="http://tadhg.com/wp/2009/07/20/considering-carnivorism/" title="Considering Carnivorism" >switching back to eating meat</a>, but also radically cutting down on sugar and processed foods. This also has a lot to do with my being in good shape.
</li>
<li><strong>Document format</strong>. Until this year, I hadn’t found a text-based document format I liked, but I have now finally settled on <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a>. One of the effects of this is that I shifted to doing all of my writing in a text editor rather than doing some of it in word processors. Another effect is that all of my writing is now much more amenable to programmatic manipulation.
</li>
<li><strong>Programming my own environment</strong>. Following from the previous item, I spent quite a bit of time working on solutions to various small niggles in my workflows, so that far less of my time is consumed by setup for writing. Some examples of this include scripts to insert the template for blog posts into my editor, scripts to publish to my blog directly from my editor, scripts to do word counting precisely as I wish it to be done, and many other small utilities that remove minor annoyances that I previously encountered almost every day. In many respects this kind of thing is precisely what programming and computers are for: to make it easier to create, and to lessen the gap between a thought and expression of that thought.
</li>
<li><strong>Digital organization</strong>. This includes <a href="http://tadhg.com/wp/2009/05/04/version-control-recovery/" title="Version Control Recovery" >recovering my subversion repository</a>, restoring my blog to proper working order, and various other steps that have made my digital domain much more manageable. This is bound up with the previous item too.
</li>
<li><strong>Switching to Vim</strong>. This was probably a long time coming, but nevertheless required a fair amount of work, not least in porting all my scripts for jEdit over to it. I’ve been extremely happy with Vim. I think that to most people this might sound trivial; how many people would regard switching word processors as an “achievement”? But a text editor is different from a word processor, and switching to Vim isn’t like switching between non-modal text editors. This, combined with moving all my writing to text editors and thus to Vim, is a profound change for me, and one that I’m very happy I took the time to get through.
</li>
<li><strong>WordPress plugins</strong>. <a href="http://tadhg.com/wp/wordpress-plugins/" title="WordPress Plugins" >I wrote some of these</a> to improve my blog after I got it working again.
</li>
<li><strong>PyWordCount</strong>. My word counting script/Vim plugin is done, but I have to finish the documentation for it and make it public. It’s significant to me because it’ll be my first self-contained public Python project, and also because it’s an outgrowth of the document format switch, the Vim switch, and the focus on programming my own environment to a much greater degree.
</li>
<li><strong>Q’Rith</strong>. I ran my first roleplaying sessions in 15 years, and am currently running my first roleplaying campaign in 15 years, in a world that I’ve created and am quite happy with so far.
</li>
<li><strong>Tennis</strong>. I started playing it again, and don’t know why I ever stopped.
</li>
</ul>
<p>Those are the main highlights. Many of them are internal, or are things that only I notice, but I think the effect they’ve had on me is actually quite major, and in positive ways.</p>
<p>As for what’s next, I’ll write about that tomorrow.</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/coding/" rel="tag">coding</a>, <a href="http://tadhg.com/wp/tag/crossfit/" rel="tag">CrossFit</a>, <a href="http://tadhg.com/wp/tag/diet/" rel="tag">diet</a>, <a href="http://tadhg.com/wp/tag/document-formats/" rel="tag">document formats</a>, <a href="http://tadhg.com/wp/tag/exercise/" rel="tag">exercise</a>, <a href="http://tadhg.com/wp/tag/food/" rel="tag">food</a>, <a href="http://tadhg.com/wp/tag/games/" rel="tag">games</a>, <a href="http://tadhg.com/wp/tag/goals/" rel="tag">goals</a>, <a href="http://tadhg.com/wp/tag/personal/" rel="tag">personal</a>, <a href="http://tadhg.com/wp/tag/python/" rel="tag">python</a>, <a href="http://tadhg.com/wp/tag/restructuredtext/" rel="tag">reStructuredText</a>, <a href="http://tadhg.com/wp/tag/roleplaying/" rel="tag">roleplaying</a>, <a href="http://tadhg.com/wp/tag/software/" rel="tag">software</a>, <a href="http://tadhg.com/wp/tag/sports/" rel="tag">sports</a>, <a href="http://tadhg.com/wp/tag/t/" rel="tag">T</a>, <a href="http://tadhg.com/wp/tag/tech/" rel="tag">tech</a>, <a href="http://tadhg.com/wp/tag/tennis/" rel="tag">tennis</a>, <a href="http://tadhg.com/wp/tag/text-editing/" rel="tag">text editing</a>, <a href="http://tadhg.com/wp/tag/version-control/" rel="tag">version-control</a>, <a href="http://tadhg.com/wp/tag/vim/" rel="tag">Vim</a>, <a href="http://tadhg.com/wp/tag/wordpress/" rel="tag">WordPress</a>, <a href="http://tadhg.com/wp/tag/writing/" rel="tag">writing</a></p><h4 class='related-posts-header'>Related Posts</h4><ul class="related-posts-list"><li class="related-post"><a href="http://tadhg.com/wp/2010/03/30/2010-goals-first-quarter-review/">2010 Goals: First Quarter Review</a> <span class="related-post-date timestamp">Tue 30 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/01/2010-goals/">2010 Goals</a> <span class="related-post-date timestamp">Fri 01 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/04/29/improving-a-python-word-counting-function/">Improving a Python Word Counting Function</a> <span class="related-post-date timestamp">Thu 29 Apr 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/02/14/first-post-with-vim/">First Post With Vim</a> <span class="related-post-date timestamp">Sun 14 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/17/better-word-count-in-vim/">Better Word Count in Vim</a> <span class="related-post-date timestamp">Sun 17 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/12/31/crossfit-and-coding-and-meat/">CrossFit and Coding (and Meat)</a> <span class="related-post-date timestamp">Thu 31 Dec 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/09/24/rtf_word_restructuredtext-toolchain/">RTF/Word–reStructuredText Toolchain</a> <span class="related-post-date timestamp">Thu 24 Sep 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/28/better-rest-wordpress-pipeline/">Better reST–WordPress Pipeline</a> <span class="related-post-date timestamp">Tue 28 Jul 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/14/blog-workflow-with-restructuredtext/">Blog Workflow with reStructuredText</a> <span class="related-post-date timestamp">Tue 14 Jul 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/02/16/some-vim-script-implementation-testing-and-hackery/">Some Vim Script Implementation, Testing, and Hackery</a> <span class="related-post-date timestamp">Tue 16 Feb 2010</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/05/16/sabbatical-close/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Improving a Python Word Counting Function</title>
		<link>http://tadhg.com/wp/2010/04/29/improving-a-python-word-counting-function/</link>
		<comments>http://tadhg.com/wp/2010/04/29/improving-a-python-word-counting-function/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 20:33:36 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[text editing]]></category>
		<category><![CDATA[Vim]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2892</guid>
		<description><![CDATA[This post could be summarized as “regular expressions are a lot faster than naive for loops”.
I’ve been working on improving the script I use for live wordcount in Vim, partly for performance and partly so that I can package it up as a plugin and share it with other people. Along the way I’ve improved [...]]]></description>
			<content:encoded><![CDATA[<p>This post could be summarized as “regular expressions are a lot faster than naive for loops”.</p>
<p>I’ve been working on improving the script I use for live wordcount in Vim, partly for performance and partly so that I can package it up as a plugin and share it with other people. Along the way I’ve improved the speed of the script rather significantly, and will go through the key part of that change here.<br />
<span id="more-2892"></span><br />
The core part of the script, unsurprisingly, is the <tt class="docutils literal"><span class="pre">count_words()</span></tt> function. As is common, it treats groups of letters surrounded by spaces as “words”. New lines also mark the end of a word. So do a variety of other characters, such as em dashes—in fact, one of the motivations for writing my own wordcount was because I wanted em dashes to be recognized as word separators.</p>
<p>In the following code, <tt class="docutils literal"><span class="pre">self.WORD_SEPS</span></tt> and <tt class="docutils literal"><span class="pre">self.LINE_SEPS</span></tt> are lists containing characters that separate words and lines. <tt class="docutils literal"><span class="pre">self.REPEATER_SEPS</span></tt> contains characters like “-”, which in my opinion does not separate words when used singly (e.g. “twenty-three” is one word) but does when used consecutively; “&#8211;” is a simple way to write an em dash when you’re restricted to ASCII. <tt class="docutils literal"><span class="pre">self.IGNORE</span></tt> is a list of characters that cannot form words on their own but aren’t necessarily separators, either.</p>
<p>The code is quite naive in its approach. It goes through the text letter by letter, checks the letter to see whether or not it’s in one of those lists, adjusts the count accordingly, and also stores <tt class="docutils literal"><span class="pre">previous_char</span></tt> in order to be able to handle the repeater separators.</p>
<pre class="python literal-block">
def count_words(self, text):
    words, lines = 0, 1
    word, previous_char = 0, None
    lineword_separators = self.LINE_SEPS + self.WORD_SEPS
    repeater_test = lambda c, pc: bool(
        c in self.REPEATER_SEPS and pc in self.REPEATER_SEPS)
    separator_test = lambda c, pc: bool(
        char in lineword_separators or repeater_test(c, pc))
    for char in text:
        if separator_test(char, previous_char):
            word = 0
            if char in (self.LINE_SEPS):
                lines = lines + 1
        elif char in (self.IGNORE):
            pass
        else:
            #it’s part of a word.
            if not word:
                words = words + 1
                word = 1
        previous_char = char

    return (words, lines)
</pre>
<p>With that code as the central function, the script takes about three seconds to process a text file that’s approximately 400K/68,000 words.</p>
<p>The new version eliminates the need for a separate list of repeater separators, is fewer lines of code, and is faster:</p>
<pre class="python literal-block">
def count_words(self, text):

    def ors(l): return r&quot;|&quot;.join([re.escape(c) for c in l])
    def retext(text, chars, sub):
        return re.compile(ors(chars)).sub(sub, text)

    lines = text and len(re.compile(ors(self.LINE_SEPS)).split(text)) or 0

    text = retext(text, self.WORD_SEPS + self.LINE_SEPS, u&quot; &quot;)
    text = retext(text.strip(), self.IGNORE, u&quot;&quot;)
    words = text and len(re.compile(r&quot;[ ]+&quot;).split(text)) or 0

    return (words, lines)
</pre>
<p>The basic approach here is different. Rather than going through the text and evaluating it character by character, instead it replaces all of the characters in the separator lists with spaces, removes all the characters in the ignore list, uses <tt class="docutils literal"><span class="pre">split()</span></tt> to get a list of all the words in the text, and then counts the length of that list.</p>
<p>The most awkward part of it is having to construct the regular expressions out of the lists of characters, which is what the <tt class="docutils literal"><span class="pre">ors()</span></tt> function does. I could have replaced the lists with regular expressions, but I want it to be easy for users to alter the lists to suit their own preferences, and so left them as plain lists.</p>
<p>(Note that I’m restricted to Python 2.3 here since this needs to run in MacVim; hence the old-style <tt class="docutils literal"><span class="pre">and</span></tt> and <tt class="docutils literal"><span class="pre">or</span></tt> instead of new-style ternary expressions.)</p>
<p>Using that code instead of the previous version, and operating on the same 400K/68,000-word file, the script takes about 0.12 seconds—a 25-fold speed increase. Since this is a “live” wordcount, one that has to recount the entire file whenever you do something other than typing or adding a single new line, that’s an important difference, and it makes it much more usable when working with large files.</p>
<p>I had no illusions that my original version was anything close to optimal when I first wrote it, but I didn’t realize that the speed gains from doing it better would be so significant. Python’s regular expression handling is done by a C module, and I suspect that C module is quite highly optimized indeed. So, if speed is important, let highly-optimized C do the work, instead of doing it in your own code.</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/coding/" rel="tag">coding</a>, <a href="http://tadhg.com/wp/tag/python/" rel="tag">python</a>, <a href="http://tadhg.com/wp/tag/software/" rel="tag">software</a>, <a href="http://tadhg.com/wp/tag/tech/" rel="tag">tech</a>, <a href="http://tadhg.com/wp/tag/text-editing/" rel="tag">text editing</a>, <a href="http://tadhg.com/wp/tag/vim/" rel="tag">Vim</a>, <a href="http://tadhg.com/wp/tag/writing/" rel="tag">writing</a></p><h4 class='related-posts-header'>Related Posts</h4><ul class="related-posts-list"><li class="related-post"><a href="http://tadhg.com/wp/2010/05/16/sabbatical-close/">sabbatical.close()</a> <span class="related-post-date timestamp">Sun 16 May 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/02/14/first-post-with-vim/">First Post With Vim</a> <span class="related-post-date timestamp">Sun 14 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/17/better-word-count-in-vim/">Better Word Count in Vim</a> <span class="related-post-date timestamp">Sun 17 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/02/16/some-vim-script-implementation-testing-and-hackery/">Some Vim Script Implementation, Testing, and Hackery</a> <span class="related-post-date timestamp">Tue 16 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/09/24/rtf_word_restructuredtext-toolchain/">RTF/Word–reStructuredText Toolchain</a> <span class="related-post-date timestamp">Thu 24 Sep 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/19/better-word-count-in-jedit/">Better Word Count in jEdit</a> <span class="related-post-date timestamp">Sun 19 Jul 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/05/28/some-futurist-speculation-on-screen-interfaces/">Some Futurist Speculation on Screen Interfaces</a> <span class="related-post-date timestamp">Fri 28 May 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/08/02/python-script-for-subversion-status/">Python Script for Subversion Status</a> <span class="related-post-date timestamp">Sun 02 Aug 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/28/better-rest-wordpress-pipeline/">Better reST–WordPress Pipeline</a> <span class="related-post-date timestamp">Tue 28 Jul 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/14/blog-workflow-with-restructuredtext/">Blog Workflow with reStructuredText</a> <span class="related-post-date timestamp">Tue 14 Jul 2009</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/04/29/improving-a-python-word-counting-function/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>“Wandering Mind”</title>
		<link>http://tadhg.com/wp/2010/04/18/wandering-mind/</link>
		<comments>http://tadhg.com/wp/2010/04/18/wandering-mind/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 06:57:55 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[fiction]]></category>
		<category><![CDATA[microfiction]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2859</guid>
		<description><![CDATA[The mind wanders around and around. It might be in a maze, for often the spaces look eerily familiar. The paths seem different, the distinction between path and destination murky.

The quest is for something new. Something that seems perfect for a brief bright glowing moment. Something that looks fascinatingly full of potential, potential shaped enough [...]]]></description>
			<content:encoded><![CDATA[<p>The mind wanders around and around. It might be in a maze, for often the spaces look eerily familiar. The paths seem different, the distinction between path and destination murky.<br />
<span id="more-2859"></span><br />
The quest is for something new. Something that seems perfect for a brief bright glowing moment. Something that looks fascinatingly full of potential, potential shaped enough to snare but not so shaped as to dismay with specifics.</p>
<p>The mind yearns for such an encounter, for the bliss of absorption, challenge, and distraction all rolled into one. For the absence, or at least recession, of worry and stress and anxiety during consumption. For the fleeting brush with the possibility of fulfillment.</p>
<p>Which branch to take? They begin to seem well-worn, uncomfortably familiar, and the things on them re-treads of old concepts. Where is the new thing, the exciting thing? Where is the alluring fruit of others’ creativity—creativity attuned enough but not too closely with the mind’s own?</p>
<p>If it’s not there, what about there? Or perhaps within. Within, but not too far down. Again, the mind seeks a balance: not something on its own surface, for its own surface is too well known to it, but not something deep inside, for the muddle there is daunting. Between these must be something shiny and shining, something with at least the appearance of profundity.</p>
<p>Profundity, and novelty. Novelty, and cleverness. A sufficient challenge to mine and shape without making either of those things arduous.</p>
<p>There. A half-formed idea, one that can be brought into a pleasingly new form, near the surface. Both its formation and its output will be superficially challenging, enough to briefly satisfy. The mind digs, prods, shapes, has its moments of forgetting itself in the process.</p>
<p>Something new, briefly brightly aglow with potential.</p>
<p>The mind wanders around and around.</p>
<p>[300 words]</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/fiction/" rel="tag">fiction</a>, <a href="http://tadhg.com/wp/tag/microfiction/" rel="tag">microfiction</a>, <a href="http://tadhg.com/wp/tag/writing/" rel="tag">writing</a></p><h4 class='related-posts-header'>Related Posts</h4><ul class="related-posts-list"><li class="related-post"><a href="http://tadhg.com/wp/2009/05/22/pafib-6/">pafib #6</a> <span class="related-post-date timestamp">Fri 22 May 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/02/16/pafib-5/">pafib #5</a> <span class="related-post-date timestamp">Mon 16 Feb 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/07/31/stretching-out/">'Stretching Out'</a> <span class="related-post-date timestamp">Tue 31 Jul 2007</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/07/27/stillness/">'Stillness'</a> <span class="related-post-date timestamp">Fri 27 Jul 2007</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/07/25/estranged/">'Estranged'</a> <span class="related-post-date timestamp">Wed 25 Jul 2007</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/07/23/guard-detail/">'Guard Detail'</a> <span class="related-post-date timestamp">Mon 23 Jul 2007</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/07/21/one-day/">'One Day'</a> <span class="related-post-date timestamp">Sat 21 Jul 2007</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/07/19/guidance/">'Guidance'</a> <span class="related-post-date timestamp">Thu 19 Jul 2007</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/07/15/saeka-and-the-pillars/">'Saeka and the Pillars'</a> <span class="related-post-date timestamp">Sun 15 Jul 2007</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/07/13/a-sale/">'A Sale'</a> <span class="related-post-date timestamp">Fri 13 Jul 2007</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/04/18/wandering-mind/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Refactoring, Geeky Enjoyment, and Readability</title>
		<link>http://tadhg.com/wp/2010/04/05/refactoring-geeky-enjoyment-and-readability/</link>
		<comments>http://tadhg.com/wp/2010/04/05/refactoring-geeky-enjoyment-and-readability/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 20:16:55 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2820</guid>
		<description><![CDATA[Refactoring is rewriting source code while preserving the functionality of that code. I’m currently refactoring my Python script for Subversion status, because I want to experiment with sharing code on bitbucket and it seemed like a reasonable first project to put up there.
Some people hate refactoring, but I often enjoy it. I get a kick [...]]]></description>
			<content:encoded><![CDATA[<p><a class="reference external" href="http://en.wikipedia.org/wiki/Code_refactoring">Refactoring</a> is rewriting source code while preserving the functionality of that code. I’m currently refactoring my <a class="reference external" href="http://tadhg.com/wp/2009/08/02/python-script-for-subversion-status/">Python script for Subversion status</a>, because I want to experiment with sharing code on <a class="reference external" href="http://bitbucket.org/">bitbucket</a> and it seemed like a reasonable first project to put up there.</p>
<p>Some people hate refactoring, but I often enjoy it. I get a kick out of figuring out how to make code “better”, although that’s often a subjective judgment. In this case, when I opened up the script to have a look at it, I immediately saw a function that I knew I wanted to refactor. I’m amused by the enjoyment I derived from making the fairly simple change.<br />
<span id="more-2820"></span><br />
The function gets the length of the longest filename in a list<a class="footnote-reference" href="#id2" id="id1">[1]</a>, returning <tt class="docutils literal"><span class="pre">0</span></tt> if for some reason there aren’t any filenames in that list. This was the original version:</p>
<pre class="python literal-block">
def get_filename_width(self, files):
    width = 0
    lines = files.split(&quot;\n&quot;)
    for line in lines:
        if len(line) &gt; width:
            width = len(line)
    return width
</pre>
<p>It expects the <tt class="docutils literal"><span class="pre">files</span></tt> variable to be a multiline string. So it assigns a value to <tt class="docutils literal"><span class="pre">width</span></tt>, then splits the string into individual lines, and goes through each line, testing its length against the value of <tt class="docutils literal"><span class="pre">width</span></tt> and making <tt class="docutils literal"><span class="pre">width</span></tt> into that value if it’s greater. After going through all the lines, it returns <tt class="docutils literal"><span class="pre">width</span></tt>.</p>
<p>It’s fine as a first pass, but looking at it now, it just seems clunky and too long. I rewrote it into this:</p>
<pre class="python literal-block">
def get_filename_width(self, files):
    return max([len(line) for line in files.split(u&quot;\n&quot;)]) if files else 0
</pre>
<p>Six lines into one. But is this too opaque?</p>
<p>If I’m the intended reader, clearly not, as I’m quite familiar with reading list comprehensions, and I also consider the <a class="reference external" href="http://www.python.org/dev/peps/pep-0308/">Python 2.5+ ternary expression</a> to be entirely legible.</p>
<p>If someone else is the reader? The ease with which they can break the line into chunks is the main issue, as first they have to see that the line returns the result of <tt class="docutils literal"><span class="pre">max()</span></tt> if <tt class="docutils literal"><span class="pre">files</span></tt> has some value and <tt class="docutils literal"><span class="pre">0</span></tt> otherwise. The next bit is seeing that <tt class="docutils literal"><span class="pre">max()</span></tt> operates on a list comprehension, and finally they have to see that the list comprehension creates a list of the lengths of the lines in <tt class="docutils literal"><span class="pre">files</span></tt>.</p>
<p>I can see the argument that the six-line version is clearer, but the fact that it’s six lines as opposed to one needs to be taken into account as well—more lines mean more cognitive overhead for the reader, something that is often underestimated in judging the readability of code.</p>
<p>I think that a reader familiar with Python would grasp the one-liner faster than the six-liner. The use of <tt class="docutils literal"><span class="pre">max</span></tt> is helpful here (whereas it might hinder a reader who doesn’t know it)—rather than having to discern what the <tt class="docutils literal"><span class="pre">for</span></tt> loop in the six-liner is doing, it’s clear that the one-liner is interested in getting the highest value. I personally think that the lack of variable assignment in the one-liner makes it easier as well, despite the familiarity that almost all readers would have with variables.</p>
<p>Clearly, this is a rather trivial example<a class="footnote-reference" href="#id4" id="id2">[2]</a>. But the issues are relevant to writing shared code, and “shared” often applies even to personal code if you’re ever going to revisit it. While I definitely want to get something working quickly, it’s important to balance that with writing readable software. Readability requires finding the line between elegance and impenetrability, between concision and obscurity—just like writing more generally.</p>
<table class="docutils footnote" frame="void" id="id2" rules="none">
<colgroup>
<col class="label" />
<col /></colgroup>
<tbody valign="top">
<tr>
<td class="label"><a class="fn-backref" href="#id1">[1]</a></td>
<td>Yet it’s called <tt class="docutils literal"><span class="pre">get_filename_width</span></tt>—because it’s concerned with the width (in columns) that the longest filename will take up in a terminal window. The purpose of the function in the larger context is related to the concept of width, while in the function itself it’s dealing with the length of individual filenames. You could argue for changing the name to <tt class="docutils literal"><span class="pre">get_filename_length</span></tt>, but I think the overall purpose of the function is more important to its name than what it’s doing internally.
</td>
</tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="id4" rules="none">
<colgroup>
<col class="label" />
<col /></colgroup>
<tbody valign="top">
<tr>
<td class="label"><a class="fn-backref" href="#id2">[2]</a></td>
<td>It took me less than 3 minutes to write the new version of the function, whereas this post discussing it has taken rather a lot longer than that&#8230;</td>
</tr>
</tbody>
</table>
<p>Tags: <a href="http://tadhg.com/wp/tag/coding/" rel="tag">coding</a>, <a href="http://tadhg.com/wp/tag/python/" rel="tag">python</a>, <a href="http://tadhg.com/wp/tag/writing/" rel="tag">writing</a></p><h4 class='related-posts-header'>Related Posts</h4><ul class="related-posts-list"><li class="related-post"><a href="http://tadhg.com/wp/2010/05/16/sabbatical-close/">sabbatical.close()</a> <span class="related-post-date timestamp">Sun 16 May 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/04/29/improving-a-python-word-counting-function/">Improving a Python Word Counting Function</a> <span class="related-post-date timestamp">Thu 29 Apr 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/02/14/first-post-with-vim/">First Post With Vim</a> <span class="related-post-date timestamp">Sun 14 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/17/better-word-count-in-vim/">Better Word Count in Vim</a> <span class="related-post-date timestamp">Sun 17 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/09/24/rtf_word_restructuredtext-toolchain/">RTF/Word–reStructuredText Toolchain</a> <span class="related-post-date timestamp">Thu 24 Sep 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/19/better-word-count-in-jedit/">Better Word Count in jEdit</a> <span class="related-post-date timestamp">Sun 19 Jul 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/07/16/metaweb-acquired-by-google/">Metaweb Acquired by Google</a> <span class="related-post-date timestamp">Fri 16 Jul 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/07/15/unit-testing-as-game/">Unit Testing as Game</a> <span class="related-post-date timestamp">Thu 15 Jul 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/04/09/python-flattenconcantenate-comparisons/">Python Flatten/Concantenate Comparisons</a> <span class="related-post-date timestamp">Fri 09 Apr 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/04/06/public-projects-finishing-things-and-bitbucket/">Public Projects, Finishing Things, and bitbucket</a> <span class="related-post-date timestamp">Tue 06 Apr 2010</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/04/05/refactoring-geeky-enjoyment-and-readability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Anaq’rest</title>
		<link>http://tadhg.com/wp/2010/04/01/anaqrest/</link>
		<comments>http://tadhg.com/wp/2010/04/01/anaqrest/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 19:56:45 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[creativity]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[Q’Rith]]></category>
		<category><![CDATA[roleplaying]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2811</guid>
		<description><![CDATA[At the beginning of March I kicked off a roleplaying campaign, the first I’ve run since early 1995. The setting is essentially the one I laid out last year in my fantasy world sketch, which now as the name “Q’Rith”.

Technically the first game set there was the one-shot I ran in December, but in certain [...]]]></description>
			<content:encoded><![CDATA[<p>At the beginning of March I kicked off a roleplaying campaign, the first I’ve run since early 1995. The setting is essentially the one I laid out last year in my <a class="reference external" href="http://tadhg.com/wp/2009/03/09/fantasy-world-sketch/">fantasy world sketch</a>, which now as the name “Q’Rith”.<br />
<span id="more-2811"></span><br />
Technically the first game set there was the <a href="http://tadhg.com/wp/2010/01/03/comments-on-gming-after-a-15-year-hiatus/" title="Comments on GMing After a 15-Year Hiatus" >one-shot I ran in December</a>, but in certain ways it could have been set anywhere. The campaign is more tied into the politics and history of the game world.</p>
<p>I’ve been really enjoying running the campaign, and also the two times I’ve run that same one-shot. Thanks to all the people who have played or are playing!</p>
<p>Running the campaign is significantly more challenging than the one-shot. There’s a lot of preparation involved, and the improvisation required is trickier because player actions are more tightly connected to the setting (and plot). The one-shot is almost a wilderness adventure, while currently the players in the campaign are in a rather large city, and are dealing with a variety of people there, each interaction potentially setting off chains of events that I need to track in my head. That’s a huge part of the fun for me, trying to make the world an intricate one that reacts realistically to actions the players take while also having the world roll along without regard to player action just as the “real world” pays little heed to much of what we do in it.</p>
<p>I think that this setting, and this plot, are both the most detailed I’ve ever run. I put plenty of time and effort into campaigns when I was younger, but I think a lot more of that was spent on rules issues. Now I’m more focused on the less technical aspects—that, and the tools available to me for creating the world are far more advanced (as is my ability to use them). Back then I was using computers for as much of it as I could, but still spent plenty of time with pencil and paper. Now my key tools are Vim, TiddlyWiki, and Inkscape (not to mention reStructuredText, my web server, my Subversion repository, and my laptop, all of which are critical), and they really make the whole process far smoother.</p>
<p>For example, I’ve made maps for this campaign. That isn’t new. What is new is that these maps are simply far better than they ever were in the past (largely because I can’t draw, but can get around that limitation now). Not only are they better, however, but their digital nature makes it really easy to alter them as needed, so incremental progress is a lot easier to do. In addition, dealing with scale is far easier, and with Inkscape I get access to vector rather than bitmap graphics, and that makes adapting content far less hassle.</p>
<p>The city the players are in is Anaq’rest, and my map for that is quite large in its source form: 20,000 pixels high and 20,000 pixels wide. The scale is one pixel to one meter. I can go from street-level detail to district-level detail in the same file, a luxury I’m very happy to have. In the 1990s I might have conceived of a 400-square-kilometer city map, but I very much doubt I would have done anything but gotten discouraged by my attempts to make it. Now I have one I’m happy with, that I can develop incrementally, and that also serves as a street-level map when I need it.</p>
<p>Both creating and having a map are extremely helpful creatively when dealing with a city setting, too. I’m certain that this applies to any kind of creative endeavor, not just roleplaying. It makes it feel like a lot of things are already “there”, waiting to be discovered rather than made up, and in addition the creation of the map brought with it ideas about the city’s history and nature that simply wouldn’t have occurred to me otherwise.</p>
<p>The current state of the map, looking at the whole thing (20km x 20km):</p>
<p><a href="/images/diagrams/maps/anaqrest_1k_20100401.png" title="Anaq’rest" class="thickbox" rel="gallery"><img src="/images/diagrams/maps/tn_anaqrest_1k_20100401.png" alt="Anaq’rest" /></a><br />
The players are currently based in the district of Dockside, and this is a zoomed-in (5.5km x 5.5km) view of Dockside:</p>
<p><a href="/images/diagrams/maps/dockside_1k_20100401.png" title="Dockside" class="thickbox" rel="gallery"><img src="/images/diagrams/maps/tn_dockside_1k_20100401.png" alt="Dockside" /></a><br />
All of its streets are on the map, although I haven’t filled in all their names yet. Only specific buildings are there so far, too, as marking out every single building on the map seemed like a bit much. But eventually it might get close to that.</p>
<p>When it’s a little more polished/detailed, I’ll release it under a Creative Commons license, as I suspect that plenty of games might have a use for a map like this (particularly with its source files, which I would release also).</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/creativity/" rel="tag">creativity</a>, <a href="http://tadhg.com/wp/tag/games/" rel="tag">games</a>, <a href="http://tadhg.com/wp/tag/personal/" rel="tag">personal</a>, <a href="http://tadhg.com/wp/tag/q%e2%80%99rith/" rel="tag">Q’Rith</a>, <a href="http://tadhg.com/wp/tag/roleplaying/" rel="tag">roleplaying</a>, <a href="http://tadhg.com/wp/tag/writing/" rel="tag">writing</a></p><h4 class='related-posts-header'>Related Posts</h4><ul class="related-posts-list"><li class="related-post"><a href="http://tadhg.com/wp/2010/05/16/sabbatical-close/">sabbatical.close()</a> <span class="related-post-date timestamp">Sun 16 May 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/30/2010-goals-first-quarter-review/">2010 Goals: First Quarter Review</a> <span class="related-post-date timestamp">Tue 30 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/21/an-introduction-to-roleplaying-games/">An Introduction to Roleplaying Games</a> <span class="related-post-date timestamp">Sun 21 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/01/2010-goals/">2010 Goals</a> <span class="related-post-date timestamp">Fri 01 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/08/inkscape/">Inkscape</a> <span class="related-post-date timestamp">Mon 08 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/03/comments-on-gming-after-a-15-year-hiatus/">Comments on GMing After a 15-Year Hiatus</a> <span class="related-post-date timestamp">Sun 03 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/12/15/rpgs-ive-played/">RPGs I’ve Played</a> <span class="related-post-date timestamp">Tue 15 Dec 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/05/30/some-old-school-add/">Some Old-School <abbr title='Advanced Dungeons &amp; Dragons'>AD&amp;D</abbr></a> <span class="related-post-date timestamp">Wed 30 May 2007</span></li><li class="related-post"><a href="http://tadhg.com/wp/2006/12/28/creativity-steps-overview/">Creativity Steps Overview</a> <span class="related-post-date timestamp">Thu 28 Dec 2006</span></li><li class="related-post"><a href="http://tadhg.com/wp/2006/12/04/inspiration/">Inspiration</a> <span class="related-post-date timestamp">Mon 04 Dec 2006</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/04/01/anaqrest/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>2010 Goals: First Quarter Review</title>
		<link>http://tadhg.com/wp/2010/03/30/2010-goals-first-quarter-review/</link>
		<comments>http://tadhg.com/wp/2010/03/30/2010-goals-first-quarter-review/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 19:12:33 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[CrossFit]]></category>
		<category><![CDATA[exercise]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[goals]]></category>
		<category><![CDATA[MTG]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[roleplaying]]></category>
		<category><![CDATA[web-development]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2808</guid>
		<description><![CDATA[Yes, clearly my progress (or lack thereof) needs quarterly reports. And here’s the first one for this year.

I laid out the full list at the start of the year. I’ve accomplished some of them:

Celebrate my birthday. This still seems like a strange goal to have—but putting it on here helped me get it done, and [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, clearly my progress (or lack thereof) needs quarterly reports. And here’s the first one for this year.<br />
<span id="more-2808"></span><br />
I laid out the <a href="http://tadhg.com/wp/2010/01/01/2010-goals/" title="2010 Goals" >full list</a> at the start of the year. I’ve accomplished some of them:</p>
<ul>
<li>Celebrate my birthday. This still seems like a strange goal to have—but putting it on here helped me get it done, and I had a great time and don’t get why I didn’t do this for years. I’ll do it again next year!
</li>
<li>Participate in the CrossFit Sectionals. <a href="http://tadhg.com/wp/2010/03/28/crossfit-games-2010-norcal-sectionals-how-i-did/" title="CrossFit Games 2010 NorCal Sectionals: How I Did" >Done</a>!
</li>
<li>Ten dead-hang pullups. Done; currently my best is 11, and I’m now aiming for 20 before going back to kipping.
</li>
</ul>
<p>I’ve made some progress on these:</p>
<ul>
<li>Revive sfmagic.org. “Some progress” here means I’ve tried to get the code running again and have run into incompatibilities between Pylons versions. So, slightly closer, but not a lot of movement.
</li>
<li>Run a roleplaying campaign. I’ve started it, and two sessions in it’s going well.
</li>
<li>I’m presumably closer to my other fitness-related goals of a 300-pound deadlift, a sub-23:00 5K, and <a class="reference external" href="http://www.crossfit.com/mt-archive2/001129.html">“Murph”</a> in under 50:00.
</li>
<li>It’s hard to judge progress on an amorphous goal like “building a sense of community”, but I think there’s been some.
</li>
</ul>
<p>I’ve made no progress on these:</p>
<ul>
<li>Write at least one draft of the fantasy novel. I feel fine about this, and haven’t really tried to work on it. I know that at some point the desire to do so will resurface, and the key to getting it done is focusing on it when that happens.
</li>
<li>Finish <a class="reference external" href="http://tadhg.com/afbh/"><cite>The Annotated Fantasy Bedtime Hour</cite></a>. Still something I just need to get down to doing&#8230;
</li>
</ul>
<p>Tags: <a href="http://tadhg.com/wp/tag/coding/" rel="tag">coding</a>, <a href="http://tadhg.com/wp/tag/community/" rel="tag">community</a>, <a href="http://tadhg.com/wp/tag/crossfit/" rel="tag">CrossFit</a>, <a href="http://tadhg.com/wp/tag/exercise/" rel="tag">exercise</a>, <a href="http://tadhg.com/wp/tag/games/" rel="tag">games</a>, <a href="http://tadhg.com/wp/tag/goals/" rel="tag">goals</a>, <a href="http://tadhg.com/wp/tag/mtg/" rel="tag">MTG</a>, <a href="http://tadhg.com/wp/tag/personal/" rel="tag">personal</a>, <a href="http://tadhg.com/wp/tag/roleplaying/" rel="tag">roleplaying</a>, <a href="http://tadhg.com/wp/tag/web-development/" rel="tag">web-development</a>, <a href="http://tadhg.com/wp/tag/writing/" rel="tag">writing</a></p><h4 class='related-posts-header'>Related Posts</h4><ul class="related-posts-list"><li class="related-post"><a href="http://tadhg.com/wp/2010/01/01/2010-goals/">2010 Goals</a> <span class="related-post-date timestamp">Fri 01 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/05/16/sabbatical-close/">sabbatical.close()</a> <span class="related-post-date timestamp">Sun 16 May 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/08/02/three-routines/">Three Routines</a> <span class="related-post-date timestamp">Mon 02 Aug 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/04/01/anaqrest/">Anaq’rest</a> <span class="related-post-date timestamp">Thu 01 Apr 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/21/an-introduction-to-roleplaying-games/">An Introduction to Roleplaying Games</a> <span class="related-post-date timestamp">Sun 21 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/12/31/crossfit-and-coding-and-meat/">CrossFit and Coding (and Meat)</a> <span class="related-post-date timestamp">Thu 31 Dec 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/12/29/2009-goals-review/">2009 Goals Review</a> <span class="related-post-date timestamp">Tue 29 Dec 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/30/2009-goals-status/">2009 Goals Status</a> <span class="related-post-date timestamp">Thu 30 Jul 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/01/01/2009-goals/">2009 Goals</a> <span class="related-post-date timestamp">Thu 01 Jan 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/05/11/sfmagicorg-database-structure/">sfmagic.org Database Structure</a> <span class="related-post-date timestamp">Fri 11 May 2007</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/03/30/2010-goals-first-quarter-review/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Giles Bowkett on Finding New Programming Jobs</title>
		<link>http://tadhg.com/wp/2010/03/23/giles-bowkett-on-finding-new-programming-jobs/</link>
		<comments>http://tadhg.com/wp/2010/03/23/giles-bowkett-on-finding-new-programming-jobs/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 23:52:45 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[advertising]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2786</guid>
		<description><![CDATA[It’s too long, it’s full of self-promotion, and really it’s an ad for a video he’s selling, but it’s entertaining and contains some good advice: “Programmers: What to do if You Get Fired”.
This might be the best line:

If you’re looking for a better job, writing an amazing resume is a good place to start. I [...]]]></description>
			<content:encoded><![CDATA[<p>It’s too long, it’s full of self-promotion, and really it’s an ad for a video he’s selling, but it’s entertaining and contains some good advice: <a class="reference external" href="http://gilesbowkett.blogspot.com/2010/03/programmers-what-to-do-if-you-get-fired.html">“Programmers: What to do if You Get Fired”</a>.</p>
<p>This might be the best line:</p>
<blockquote><p>
If you’re looking for a better job, writing an amazing resume is a good place to start. I don’t mean just a <em>better</em> resume; I mean <span class="bolditalic">a resume that makes people stop asking if they should hire you and start asking if they can afford you.</span> </p>
<div class="block-cite">—Giles Bowkett. <a href="http://gilesbowkett.blogspot.com/2010/03/programmers-what-to-do-if-you-get-fired.html">“Programmers: What to do if You Get Fired”</a>. <a href="http://gilesbowkett.blogspot.com/"><em>Giles Bowkett’s blog</em></a>, 8 Mar 2010.</div>
</blockquote>
<p>Annoyingly, I find myself tempted to buy that video after reading his post&#8230;</p>
<p>So far, his <a class="reference external" href="http://www.infoq.com/presentations/archaeopteryx-bowkett">2008 presentation at RubyFringe seems pretty entertaining too.</a> Maybe you should watch it after you’ve updated your résumé.</p>
<p>Update: at the end of that presentation, he says “build something because you believe it should exist”, which I agree with 100%.</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/advertising/" rel="tag">advertising</a>, <a href="http://tadhg.com/wp/tag/coding/" rel="tag">coding</a>, <a href="http://tadhg.com/wp/tag/work/" rel="tag">work</a>, <a href="http://tadhg.com/wp/tag/writing/" rel="tag">writing</a></p><h4 class='related-posts-header'>Related Posts</h4><ul class="related-posts-list"><li class="related-post"><a href="http://tadhg.com/wp/2010/05/13/rather-better-than-a-cover-letter/">Rather Better Than a Cover Letter</a> <span class="related-post-date timestamp">Thu 13 May 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/07/16/metaweb-acquired-by-google/">Metaweb Acquired by Google</a> <span class="related-post-date timestamp">Fri 16 Jul 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/05/16/sabbatical-close/">sabbatical.close()</a> <span class="related-post-date timestamp">Sun 16 May 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/04/29/improving-a-python-word-counting-function/">Improving a Python Word Counting Function</a> <span class="related-post-date timestamp">Thu 29 Apr 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/04/05/refactoring-geeky-enjoyment-and-readability/">Refactoring, Geeky Enjoyment, and Readability</a> <span class="related-post-date timestamp">Mon 05 Apr 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/30/2010-goals-first-quarter-review/">2010 Goals: First Quarter Review</a> <span class="related-post-date timestamp">Tue 30 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/02/14/first-post-with-vim/">First Post With Vim</a> <span class="related-post-date timestamp">Sun 14 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/17/better-word-count-in-vim/">Better Word Count in Vim</a> <span class="related-post-date timestamp">Sun 17 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/01/2010-goals/">2010 Goals</a> <span class="related-post-date timestamp">Fri 01 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/09/24/rtf_word_restructuredtext-toolchain/">RTF/Word–reStructuredText Toolchain</a> <span class="related-post-date timestamp">Thu 24 Sep 2009</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/03/23/giles-bowkett-on-finding-new-programming-jobs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&#64;: A Triumph of Design</title>
		<link>http://tadhg.com/wp/2010/03/22/a-triumph-of-design/</link>
		<comments>http://tadhg.com/wp/2010/03/22/a-triumph-of-design/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 04:50:26 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[reStructuredText]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2782</guid>
		<description><![CDATA[The New York Museum of Modern Art has added the &#64; symbol to its architecture and design collection. Originating perhaps as a Latin abbreviation for “toward”, it showed up on one of the early Underwood typewriters (possibly the Underwood 1; it was definitely on the Underwood No. 5) and was used for “at the rate [...]]]></description>
			<content:encoded><![CDATA[<p>The New York Museum of Modern Art has <a class="reference external" href="http://www.nytimes.com/2010/03/22/arts/design/22iht-design22.html">added the &#64; symbol to its architecture and design collection</a>. Originating perhaps as a Latin abbreviation for “toward”, it showed up on one of the early <a class="reference external" href="http://en.wikipedia.org/wiki/Underwood_Typewriter_Company">Underwood</a> typewriters (possibly the Underwood 1; it was definitely on the Underwood No. 5) and was used for “at the rate of”, which usage still survives.<br />
<span id="more-2782"></span><br />
But it’s really being recognized as a landmark of design because of its use as the separator between username and hostname—specifically, in email addresses, chosen by <a class="reference external" href="http://en.wikipedia.org/wiki/Ray_Tomlinson">Ray Tomlinson</a> in <a href="http://news.bbc.co.uk/2/hi/in_depth/sci_tech/2000/dot_life/1586229.stm" title="H@ppy birthday to you" >1971</a>.</p>
<p>It has <a href="http://en.wikipedia.org/wiki/@" title="@" >plenty of other uses</a>, and while we’re here I’ll note that I use it as an imformal extension to reStructuredText: I surround links that have titles with &#64; symbols and have a script run through the text to insert the actual reST necessary to support that (which, sadly, does require a custom directive).</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/design/" rel="tag">design</a>, <a href="http://tadhg.com/wp/tag/language/" rel="tag">language</a>, <a href="http://tadhg.com/wp/tag/restructuredtext/" rel="tag">reStructuredText</a>, <a href="http://tadhg.com/wp/tag/software/" rel="tag">software</a>, <a href="http://tadhg.com/wp/tag/tech/" rel="tag">tech</a>, <a href="http://tadhg.com/wp/tag/writing/" rel="tag">writing</a></p><h4 class='related-posts-header'>Related Posts</h4><ul class="related-posts-list"><li class="related-post"><a href="http://tadhg.com/wp/2010/05/16/sabbatical-close/">sabbatical.close()</a> <span class="related-post-date timestamp">Sun 16 May 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/09/24/rtf_word_restructuredtext-toolchain/">RTF/Word–reStructuredText Toolchain</a> <span class="related-post-date timestamp">Thu 24 Sep 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/12/moving-from-word-processors-to-restructuredtext/">Moving From Word Processors to reStructuredText</a> <span class="related-post-date timestamp">Sun 12 Jul 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/04/29/improving-a-python-word-counting-function/">Improving a Python Word Counting Function</a> <span class="related-post-date timestamp">Thu 29 Apr 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/02/14/first-post-with-vim/">First Post With Vim</a> <span class="related-post-date timestamp">Sun 14 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/17/better-word-count-in-vim/">Better Word Count in Vim</a> <span class="related-post-date timestamp">Sun 17 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/12/29/2009-goals-review/">2009 Goals Review</a> <span class="related-post-date timestamp">Tue 29 Dec 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/28/better-rest-wordpress-pipeline/">Better reST–WordPress Pipeline</a> <span class="related-post-date timestamp">Tue 28 Jul 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/19/better-word-count-in-jedit/">Better Word Count in jEdit</a> <span class="related-post-date timestamp">Sun 19 Jul 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/14/blog-workflow-with-restructuredtext/">Blog Workflow with reStructuredText</a> <span class="related-post-date timestamp">Tue 14 Jul 2009</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/03/22/a-triumph-of-design/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>An Introduction to Roleplaying Games</title>
		<link>http://tadhg.com/wp/2010/03/21/an-introduction-to-roleplaying-games/</link>
		<comments>http://tadhg.com/wp/2010/03/21/an-introduction-to-roleplaying-games/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 07:56:51 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[roleplaying]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2779</guid>
		<description><![CDATA[Today I ran for the second time the roleplaying one-shot I did in December, with a completely different group of players. Last time the new:experienced ratio among the players was 1:4, while this time it was 3:1 (also, last time the female:male ratio among the players was 2:3, while this time it was 3:1).
Because of [...]]]></description>
			<content:encoded><![CDATA[<p>Today I ran for the second time the roleplaying <a href="http://tadhg.com/wp/2010/01/03/comments-on-gming-after-a-15-year-hiatus/" title="Comments on GMing After a 15-Year Hiatus" >one-shot</a> I did in December, with a completely different group of players. Last time the new:experienced ratio among the players was 1:4, while this time it was 3:1 (also, last time the female:male ratio among the players was 2:3, while this time it was 3:1).</p>
<p>Because of the number of new players, I prepared a little introduction to roleplaying to give before starting play, and I thought that it was worth sharing more widely.<br />
<span id="more-2779"></span><br />
(This clearly applies to <a class="reference external" href="http://en.wikipedia.org/wiki/Role-playing_game_(pen_and_paper)">“pen-and-paper” roleplaying games</a> and not other kinds; my personal preference for naming this style is “sit around the table”, SATT.)</p>
<h4>What is Roleplaying?</h4>
<p>At its core, roleleplaying is a mixture of three things: <strong>acting</strong>, <strong>storytelling</strong>, and <strong>problem-solving</strong>. All of these aspects are wrapped up in a game, and the fundamental mechanic of this game is the <strong>communication</strong> between you, the players, and me, the gamemaster. I <strong>describe to you the world</strong> as your characters experience it, and you tell me what <strong>choices your characters make</strong>.</p>
<p>Broadly speaking, the world, and your characters, could be anything and anyone. Today, the genre of roleplaying game we’re playing is fantasy, in particular a gritty style of “swords and sorcery”. Your characters are all part of a seasoned ex-mercenary band trying to find a quicker route to riches, “adventurers” in the senses of both “a seeker of fortune in daring enterprises” and “a seeker after power and wealth by unscrupulous means”.</p>
<p>Returning to the three core elements, let’s start with acting. You literally act the part when you speak in-character. In addition, you seek to <strong>inhabit your character in the sense of trying to understand what they would do</strong>, how they would react to their circumstances. Today, concentrate on that, on trying to figure out what choices they would make.</p>
<p>By determining their choices, you are in effect telling their story: overall the <strong>narrative of tonight’s story is jointly woven</strong> by all of us.</p>
<p>In the course of that narrative, you will naturally encounter obstacles for your characters to overcome. This the is the problem-solving part of the experience. You will need to act collectively as both players and characters to succeed.</p>
<p>You will also need some luck. <strong>Luck resides in the gap between player choice and character action</strong>: whether or not your characters succeed in executing the actions you have chosen for them. Although I’m always the final arbiter of any outcome, the game just isn’t as much fun if I simply decide what happens at every juncture. Instead, the bulk of the rules of this game—a variant of the venerable <cite>Dungeons &amp; Dragons</cite>—and the bulk of the stuff on your character sheets is concerned with defining the capabilities of your characters and judging the likelihood of their successes at various specific endeavors. Rather than spend much time going through all that now, I’m going to try to shield you from most of the rules matter and take care of as much of it as possible myself.</p>
<p>The largest area where these rules are applied is combat. You’re in a violent realm, in a violent occupation, and it’s a violent game. Combat is like a subgame, with some similarities to boardgaming but a lot more possibilities—rather than the rules supplying all your possible options, you decide what you want your character to do and we try to come up with the closest fit in the rules to judge its effectiveness.</p>
<p>Which is also what we do outside of combat.</p>
<hr class="docutils" />
The preceding “What is Roleplaying?” section of this post is licensed under the <a class="reference external" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike License, cc by-nc-sa</a>. Please attribute using my name (Tadhg O’Higgins) and a link to this post.</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/games/" rel="tag">games</a>, <a href="http://tadhg.com/wp/tag/personal/" rel="tag">personal</a>, <a href="http://tadhg.com/wp/tag/roleplaying/" rel="tag">roleplaying</a>, <a href="http://tadhg.com/wp/tag/writing/" rel="tag">writing</a></p><h4 class='related-posts-header'>Related Posts</h4><ul class="related-posts-list"><li class="related-post"><a href="http://tadhg.com/wp/2010/05/16/sabbatical-close/">sabbatical.close()</a> <span class="related-post-date timestamp">Sun 16 May 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/04/01/anaqrest/">Anaq’rest</a> <span class="related-post-date timestamp">Thu 01 Apr 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/30/2010-goals-first-quarter-review/">2010 Goals: First Quarter Review</a> <span class="related-post-date timestamp">Tue 30 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/01/2010-goals/">2010 Goals</a> <span class="related-post-date timestamp">Fri 01 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/08/inkscape/">Inkscape</a> <span class="related-post-date timestamp">Mon 08 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/03/comments-on-gming-after-a-15-year-hiatus/">Comments on GMing After a 15-Year Hiatus</a> <span class="related-post-date timestamp">Sun 03 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/12/15/rpgs-ive-played/">RPGs I’ve Played</a> <span class="related-post-date timestamp">Tue 15 Dec 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/05/30/some-old-school-add/">Some Old-School <abbr title='Advanced Dungeons &amp; Dragons'>AD&amp;D</abbr></a> <span class="related-post-date timestamp">Wed 30 May 2007</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/08/30/perfectionism-is-hard/">Perfectionism is Hard</a> <span class="related-post-date timestamp">Mon 30 Aug 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/08/02/three-routines/">Three Routines</a> <span class="related-post-date timestamp">Mon 02 Aug 2010</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/03/21/an-introduction-to-roleplaying-games/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>“Let’s Enhance”</title>
		<link>http://tadhg.com/wp/2010/03/07/lets-enhance/</link>
		<comments>http://tadhg.com/wp/2010/03/07/lets-enhance/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 00:29:16 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[science-fiction]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[television]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2738</guid>
		<description><![CDATA[A particularly inane trope:


In case the point isn’t crystal clear: you can’t do that. There are no image enhancement programs that let you know what the data missing at the point of capture is.

There appear to be plenty of people who think this kind of thing isn’t just possible but trivial (people who have “chosen [...]]]></description>
			<content:encoded><![CDATA[<p>A particularly inane trope:</p>
<p><object type="application/x-shockwave-flash"    width="560"    height="340"    class="youtube-embed"    data="http://www.youtube.com/v/Vxq9yj2pVWk&amp;fs=1"><param name="allowscriptaccess" value="always"></param><param name="allowfullscreen" value="true"></param><param name="wmode" value="transparent"></param>
</object></p>
<p>In case the point isn’t crystal clear: you can’t do that. There are no image enhancement programs that let you know what the data <em>missing at the point of capture</em> is.<br />
<span id="more-2738"></span><br />
There appear to be plenty of people who think this kind of thing isn’t just possible but trivial (<a href="http://tadhg.com/wp/2010/02/11/internet-illiteracy/" title="Internet Illiteracy" >people who have “chosen to be smart at other things”, perhaps</a>), at least judging by the amount of times it comes up on <a class="reference external" href="http://clientsfromhell.tumblr.com/">Clients From Hell</a>.</p>
<p>I’m prepared to cut <cite>Star Trek</cite> and <cite>Blade Runner</cite>, and to a lesser extent <cite>Battlestar Galactica</cite>, some slack given that they’re science fiction, and we don’t actually know what the software capabilities or the capture format was. In <cite>Blade Runner</cite>, my interpretation of that scene is that what Deckard has his computer system analyze isn’t a simple photo, but rather some kind of hologram with a much larger amount of stored information than is apparent.</p>
<p>The other clips, however, deserve nothing but scorn and have no excuse. The fact that it’s doing the impossible is one thing, and then there’s also the fact that it’s a completely tired idea that exemplifies bad, lazy writing.</p>
<p>Put aside the first consideration for a moment and assume that this kind of technology is commonplace—you wouldn’t have characters reacting the way they do in these scenes. Either the person responsible for the analysis would simply do it themselves, or, nobody would be impressed at all by the fact that it’s possible. Instead, here you get a mixture, as if the technology exists but somehow the character is a total genius for thinking of using it.</p>
<p>Note that <em>some</em> forms of enhancement are possible; if you get a blurry shot of a license plate, it’s theoretically possible to use probabilistic analysis to get the letters or numbers, because you know in advance what the possible answers are. But that’s very different from what’s shown in those clips.</p>
<p>Also note: this post is not meant to imply that any other aspects of the shows referenced above are necessarily more realistic in any way.</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/humor/" rel="tag">humor</a>, <a href="http://tadhg.com/wp/tag/science-fiction/" rel="tag">science-fiction</a>, <a href="http://tadhg.com/wp/tag/technology/" rel="tag">technology</a>, <a href="http://tadhg.com/wp/tag/television/" rel="tag">television</a>, <a href="http://tadhg.com/wp/tag/video/" rel="tag">video</a>, <a href="http://tadhg.com/wp/tag/writing/" rel="tag">writing</a></p><h4 class='related-posts-header'>Related Posts</h4><ul class="related-posts-list"><li class="related-post"><a href="http://tadhg.com/wp/2010/08/27/scott-pilgrim-vs-the-matrix/">Scott Pilgrim vs. the Matrix</a> <span class="related-post-date timestamp">Fri 27 Aug 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/08/16/this-might-make-the-other-writers-jealous/">This Might Make the Other Writers Jealous</a> <span class="related-post-date timestamp">Mon 16 Aug 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/07/09/friday-silliness-at-at-day-afternoon/">Friday Silliness: “AT-AT Day Afternoon”</a> <span class="related-post-date timestamp">Fri 09 Jul 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/06/29/consumerist-dialectics/">Consumerist Dialectics</a> <span class="related-post-date timestamp">Tue 29 Jun 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/06/15/tweets-on-film/">Tweets on Film</a> <span class="related-post-date timestamp">Tue 15 Jun 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/06/10/ralph-macchiokarate-kid-couplet/">Ralph Macchio/Karate Kid Couplet</a> <span class="related-post-date timestamp">Thu 10 Jun 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/05/11/the-wires-greatest-lines/"><cite>The Wire</cite>’s Greatest Lines</a> <span class="related-post-date timestamp">Tue 11 May 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/05/03/death-wish-deaths/"><cite>Death Wish</cite> Deaths</a> <span class="related-post-date timestamp">Mon 03 May 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/04/19/choose-your-own-2forttube/">Choose Your Own 2fortTube</a> <span class="related-post-date timestamp">Mon 19 Apr 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/11/this-trailer-may-seem-familiar/">This Trailer May Seem Familiar...</a> <span class="related-post-date timestamp">Thu 11 Mar 2010</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/03/07/lets-enhance/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Unfeasibly Tall GBBMCSMB</title>
		<link>http://tadhg.com/wp/2010/02/15/the-unfeasibly-tall-gbbmcsmb/</link>
		<comments>http://tadhg.com/wp/2010/02/15/the-unfeasibly-tall-gbbmcsmb/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 19:50:02 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[genre]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[parody]]></category>
		<category><![CDATA[reading]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2687</guid>
		<description><![CDATA[I’ve always had a soft spot for good genre parody, regardless of genre, and The Unfeasibly Tall Greek Billionaire’s Blackmailed Martyr-Complex Secretary Mistress Bride is pretty damn hilarious. You can read the first chapter in HTML, or the whole thing at Scribd.
Tags: genre, humor, parody, reading, writingRelated PostsRetitling for the SEO Age Mon 14 Jun [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve always had a soft spot for good genre parody, regardless of genre, and <cite>The Unfeasibly Tall Greek Billionaire’s Blackmailed Martyr-Complex Secretary Mistress Bride</cite> is pretty damn hilarious. You can read the <a href="http://tumperkin.blogspot.com/2008/04/unfeasibly-tall-greek-billionaires.html" title="The Unfeasibly Tall Greek Billionaire’s Blackmailed Martyr-Complex Secretary Mistress Bride: chapter 1" >first chapter in HTML</a>, or <a href="http://www.scribd.com/doc/5322451/The-Unfeasibly-Tall-Greek-Billionaire" title="The Unfeasibly Tall Greek Billionaire’s Blackmailed Martyr-Complex Secretary Mistress Bride" >the whole thing at Scribd</a>.</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/genre/" rel="tag">genre</a>, <a href="http://tadhg.com/wp/tag/humor/" rel="tag">humor</a>, <a href="http://tadhg.com/wp/tag/parody/" rel="tag">parody</a>, <a href="http://tadhg.com/wp/tag/reading/" rel="tag">reading</a>, <a href="http://tadhg.com/wp/tag/writing/" rel="tag">writing</a></p><h4 class='related-posts-header'>Related Posts</h4><ul class="related-posts-list"><li class="related-post"><a href="http://tadhg.com/wp/2010/06/14/retitling-for-the-seo-age/">Retitling for the SEO Age</a> <span class="related-post-date timestamp">Mon 14 Jun 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/07/lets-enhance/">“Let’s Enhance”</a> <span class="related-post-date timestamp">Sun 07 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/01/2010-goals/">2010 Goals</a> <span class="related-post-date timestamp">Fri 01 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/12/29/2009-goals-review/">2009 Goals Review</a> <span class="related-post-date timestamp">Tue 29 Dec 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/09/04/friday-fast-game/">Friday Fast Game</a> <span class="related-post-date timestamp">Fri 04 Sep 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/30/2009-goals-status/">2009 Goals Status</a> <span class="related-post-date timestamp">Thu 30 Jul 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/05/05/deception-and-the-rapture/">Deception and the Rapture</a> <span class="related-post-date timestamp">Tue 05 May 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/03/13/some-thoughts-on-racism-and-science-fictionfantasy/">Some Thoughts on Racism and Science Fiction/Fantasy</a> <span class="related-post-date timestamp">Fri 13 Mar 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/01/18/unforced-error-by-the-onion-on-federer/">Unforced Error by The Onion on Federer</a> <span class="related-post-date timestamp">Sun 18 Jan 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/01/01/2009-goals/">2009 Goals</a> <span class="related-post-date timestamp">Thu 01 Jan 2009</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/02/15/the-unfeasibly-tall-gbbmcsmb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First Post With Vim</title>
		<link>http://tadhg.com/wp/2010/02/14/first-post-with-vim/</link>
		<comments>http://tadhg.com/wp/2010/02/14/first-post-with-vim/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 04:05:48 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[Jython]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[text editing]]></category>
		<category><![CDATA[Vim]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2682</guid>
		<description><![CDATA[Over the last couple of weeks I’ve been hacking away on scripts to customize Vim, replicating the scripts I made for jEdit. I’m more or less done, and this blog post is being written in MacVim. This hopefully means that when I’m done with it I’ll be able to publish it from within Vim, the [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last couple of weeks I’ve been hacking away on scripts to customize Vim, replicating the scripts I made for jEdit. I’m more or less done, and this blog post is being written in <a class="reference external" href="http://code.google.com/p/macvim/">MacVim</a>. This hopefully means that when I’m done with it I’ll be able to publish it from within Vim, the same as with <a class="reference external" href="http://jedit.org/">jEdit</a>.<br />
<span id="more-2682"></span><br />
Writing scripts for Vim has been rather different from writing them for jEdit. jEdit is an editor with a robust API; Vim is an editor that kind of gives the user access to the API all the time, via keyboard commands, and scripting for it often consists of simply passing keystrokes. As an example, this is the Jython code for getting the current selection in a jEdit macro:</p>
<pre class="python literal-block">
text = init.textArea.getSelectedText()
</pre>
<p>This is the Python for getting the current visual selection in Vim:</p>
<pre class="python literal-block">self.vim.command('normal gv&quot;wygv')
self.vim.command(&quot;let tvar = getreg(’t’)&quot;)
text = unicode(self.vim.eval(&quot;tvar&quot;), &quot;utf-8&quot;)
</pre>
<p>From a programming perspective, jEdit is clearly a lot nicer to deal with.</p>
<p>I have two primary reasons for making the switch:</p>
<ul>
<li>Future proofing: I couldn’t switch to the various pre-release versions of jEdit 4.3 because I couldn’t get my Jython scripts to work with them, and that made me worry that there simply weren’t enough people scripting jEdit in Python to make it likely that the plugin allowing Jython macros would be supported. Given how useful my scripts are, that would have trapped me with jEdit 4.2, or some future version, if support for JythonInterpreter flagged. Vim, on the other hand, seems to have a lot of people scripting for it in Python, and I don’t see Python support simply disappearing anytime soon with a new release.
</li>
<li>Power/speed: I’m someone who’s quite inclined towards keyboard shortcuts in all applications, and this means Vim should be a highly efficient environment.
</li>
<li>Mentality: Related to the previous point, I think that being able to manipulate text more powerfully will reinforce the approach of scripting as many steps as possible, rather than doing them (no matter how efficiently) manually. Even over the last couple of weeks, I’ve noticed that I’m more inclined to write scripts than to put up with various manual steps in my daily workflow.
</li>
</ul>
<p>So far I’ve mainly worked to replicate my jEdit setup in Vim, with a few small improvements here and there; the largest one is probably the live word count, which means that I can glance at the status line to see the current word count instead of having to select the text to be counted and then invoke the word counter. I’ve also tweaked it so it only counts the relevant parts of the document—for example, in this blog post, it doesn’t count the title or the datestamp.</p>
<p>I don’t intend to abandon jEdit, and have a feeling that I’ll use it for various things here and there, but I’ve switched over the Vim for the majority of my writing and programming.</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/coding/" rel="tag">coding</a>, <a href="http://tadhg.com/wp/tag/jython/" rel="tag">Jython</a>, <a href="http://tadhg.com/wp/tag/python/" rel="tag">python</a>, <a href="http://tadhg.com/wp/tag/software/" rel="tag">software</a>, <a href="http://tadhg.com/wp/tag/tech/" rel="tag">tech</a>, <a href="http://tadhg.com/wp/tag/text-editing/" rel="tag">text editing</a>, <a href="http://tadhg.com/wp/tag/vim/" rel="tag">Vim</a>, <a href="http://tadhg.com/wp/tag/writing/" rel="tag">writing</a></p><h4 class='related-posts-header'>Related Posts</h4><ul class="related-posts-list"><li class="related-post"><a href="http://tadhg.com/wp/2010/01/17/better-word-count-in-vim/">Better Word Count in Vim</a> <span class="related-post-date timestamp">Sun 17 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/05/16/sabbatical-close/">sabbatical.close()</a> <span class="related-post-date timestamp">Sun 16 May 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/04/29/improving-a-python-word-counting-function/">Improving a Python Word Counting Function</a> <span class="related-post-date timestamp">Thu 29 Apr 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/02/16/some-vim-script-implementation-testing-and-hackery/">Some Vim Script Implementation, Testing, and Hackery</a> <span class="related-post-date timestamp">Tue 16 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/19/better-word-count-in-jedit/">Better Word Count in jEdit</a> <span class="related-post-date timestamp">Sun 19 Jul 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/09/24/rtf_word_restructuredtext-toolchain/">RTF/Word–reStructuredText Toolchain</a> <span class="related-post-date timestamp">Thu 24 Sep 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/05/28/some-futurist-speculation-on-screen-interfaces/">Some Futurist Speculation on Screen Interfaces</a> <span class="related-post-date timestamp">Fri 28 May 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/08/02/python-script-for-subversion-status/">Python Script for Subversion Status</a> <span class="related-post-date timestamp">Sun 02 Aug 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/28/better-rest-wordpress-pipeline/">Better reST–WordPress Pipeline</a> <span class="related-post-date timestamp">Tue 28 Jul 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/17/jedit-macros-in-python/">jEdit Macros in Python</a> <span class="related-post-date timestamp">Fri 17 Jul 2009</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/02/14/first-post-with-vim/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Better Word Count in Vim</title>
		<link>http://tadhg.com/wp/2010/01/17/better-word-count-in-vim/</link>
		<comments>http://tadhg.com/wp/2010/01/17/better-word-count-in-vim/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 07:40:14 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[Jython]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[text editing]]></category>
		<category><![CDATA[Vim]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2596</guid>
		<description><![CDATA[I’m currently trying out Vim (again), and have made more progress this time, mainly due to Seth’s help. The key things that have made it better:

:set hidden. Absolutely critical, this. Stops Vim from complaining when you try to switch buffers and your current buffer has unsaved changes.

bufexplorer. Makes switching buffers a lot easier.

A better Python [...]]]></description>
			<content:encoded><![CDATA[<p>I’m currently trying out Vim (<a href="http://tadhg.com/wp/2009/08/09/time-to-try-vim/" title="Time to Try Vim" >again</a>), and have made more progress this time, mainly due to <a class="reference external" href="http://araxia.net/blog/seth">Seth</a>’s help. The key things that have made it better:</p>
<ul>
<li><tt class="docutils literal"><span class="pre">:set</span> <span class="pre">hidden</span></tt>. Absolutely critical, this. Stops Vim from complaining when you try to switch buffers and your current buffer has unsaved changes.
</li>
<li><a class="reference external" href="http://www.vim.org/scripts/script.php?script_id=42">bufexplorer</a>. Makes switching buffers a lot easier.
</li>
<li><a href="http://hlabs.spb.ru/vim/python3.0.vim" title="Python 3.0" >A better Python syntax file</a>. I didn’t like the defaults.
</li>
<li>My own indentation and syntax files for reStructuredText.
</li>
</ul>
<p>Really, though, the key first one was <tt class="docutils literal"><span class="pre">:set</span> <span class="pre">hidden</span></tt>. Before that I felt that I had completely misunderstood Vim’s file management model.<br />
<span id="more-2596"></span><br />
Once I got the syntax highlighting to a reasonable state, I ported my <a href="http://tadhg.com/wp/2009/07/19/better-word-count-in-jedit/" title="Better Word Count in jEdit" >word count macro</a> over to Vim. This wasn’t too hard after the inevitable character encoding problems. For working within Vim scripts, I strongly suggest using the following:</p>
<pre class="python literal-block">
ulines = [unicode(line, &quot;utf-8&quot;) for line in vim.current.buffer]
</pre>
<p>(Assuming your Vim encoding is set to UTF-8, of course.)</p>
<p>The Vim version of my script isn’t as versatile yet as the jEdit version, because I don’t know how to make it work with only selected lines (something that’s easy in jEdit). Apart from that, though, it seems to work quite well; the next version of it might do “live” word count in the status bar.</p>
<p>I’m currently writing this in Vim, or kind of: the actual writing is in Vim, but the creation of the file and the template, the automated expansion of various reStructuredText entities, output to reStructuredText, and the publication, are in jEdit as I haven’t ported those over yet.</p>
<p>The script:</p>
<pre class="python literal-block">
function! WordCount()
python &lt;&lt; EOF
import re
import vim

class WordCounter(object):
    &quot;&quot;&quot;
    Vim script for better word count.
    &quot;&quot;&quot;

    LINE_SEPARATORS = (
        &quot;\r&quot;,
        &quot;\n&quot;
    )

    WORD_SEPARATORS = (
        &quot; &quot;,        # space
        &quot;\t&quot;,       # tab
        &quot;/&quot;,        # slash
        &quot;&amp;&quot;,        # ampersand
        ’&quot;’,        # double quotation mark, straight
        u&quot;\u201C&quot;,  # double quotation mark, left
        u&quot;\u201D&quot;,  # double quotation mark, right
        u&quot;\u2018&quot;,  # single quotation mark, left
        u&quot;\u2013&quot;,  # en dash
        u&quot;\u2014&quot;,  # em dash
        &quot;&gt;&quot;,        # greater than symbol
        &quot;&lt;&quot;,        # less than symbol
        &quot;+&quot;,        # plus
        &quot;=&quot;,        # equals
    )

    REPEATER_SEPARATORS = (
    #These are only separators if they’re present consecutively, e.g. -- or ..
        &quot;-&quot;,
        &quot;.&quot;
    )

    IGNORE = (
    #Not separators per se, but should not be treated as word content
        &quot;’&quot;,        # single quotation mark, straight
        u&quot;\u2019&quot;,  # single quotation mark, right
        &quot;(&quot;,        # left parenthesis
        &quot;)&quot;,        # right parenthesis
        &quot;[&quot;,        # left bracket
        &quot;]&quot;,        # right bracket
        &quot;{&quot;,        # left curly bracket
        &quot;}&quot;,        # right curly bracket
        &quot;|&quot;,        # bar
        &quot;-&quot;,        # hyphen
        &quot;#&quot;,        # hash mark
        &quot;.&quot;,        # period
        &quot;_&quot;,        # underscore
        &quot;`&quot;,        # backtick
        &quot;\\&quot;,        # backslash
    )

    def word_count(self):

        ulines = [unicode(line, &quot;utf-8&quot;) for line in vim.current.buffer]
        text = u&quot;\n&quot;.join(ulines)

        chars = len(text) #Pretty sure I want the actual char count, not the adjusted char count.

        text = self.remove_directives(text)
        text = self.adjust_for_rest(text)
        words, lines = self.count_words(text)

        print &quot;chars: %s, words: %s, lines: %s&quot; % (chars, words, lines)

    def remove_directives(self, text):
        textlines = text.split(&quot;\n&quot;)
        newlines = []
        comment = re.compile(r&quot;[ ]*\.\. [a-zA-Z0-9_\|]&quot;)
        argument = re.compile(r&quot;    :[^\:]*:&quot;)
        for line in textlines:
            if not comment.match(line) and not argument.match(line):
                newlines.append(line)
        return &quot;\n&quot;.join(newlines)

    def adjust_for_rest(self, text):
        &quot;&quot;&quot;
            Go through each of the special cases for reST.
        &quot;&quot;&quot;
        text = self.rest_adjust_pipe_space(text)

        return text

    def rest_adjust_pipe_space(self, text):
        &quot;&quot;&quot;
            Special-case &quot;|\ &quot; to make sure e.g. &quot;|Hypnotic Specter|\ s&quot;
            doesn’t get counted as three words.

            |Incinerate|\ s |Hypnotic Specter|\ —|Hypnotic Specter|\ s
            The above line should be counted as five words.
        &quot;&quot;&quot;
        spacere = re.compile(r&quot;\|\\ ([^ ]{1})&quot;)
        finds = spacere.findall(text)
        text = spacere.sub(&quot;|\g&lt;1&gt;&quot;, text)
        return text

    def count_words(self, text):
        words, lines = 0, 1
        #go through the text character by character:
        word, previous_character = 0, None
        for character in text:
            if character in (self.LINE_SEPARATORS + self.WORD_SEPARATORS) or (character in self.REPEATER_SEPARATORS and previous_character in self.REPEATER_SEPARATORS):
                #it’s a separator
                word = 0
                if character in (self.LINE_SEPARATORS):
                    lines = lines + 1
            elif character in (self.IGNORE):
                pass
            else:
                #it’s part of a word.
                if not word:
                    words = words + 1
                    word = 1
            previous_character = character

        return (words, lines)

WordCounter().word_count()
EOF
endfunction

if !exists(&quot;:WW&quot;)
  command! WW  :call WordCount()
endif
</pre>
<p>Tags: <a href="http://tadhg.com/wp/tag/coding/" rel="tag">coding</a>, <a href="http://tadhg.com/wp/tag/jython/" rel="tag">Jython</a>, <a href="http://tadhg.com/wp/tag/python/" rel="tag">python</a>, <a href="http://tadhg.com/wp/tag/software/" rel="tag">software</a>, <a href="http://tadhg.com/wp/tag/tech/" rel="tag">tech</a>, <a href="http://tadhg.com/wp/tag/text-editing/" rel="tag">text editing</a>, <a href="http://tadhg.com/wp/tag/vim/" rel="tag">Vim</a>, <a href="http://tadhg.com/wp/tag/writing/" rel="tag">writing</a></p><h4 class='related-posts-header'>Related Posts</h4><ul class="related-posts-list"><li class="related-post"><a href="http://tadhg.com/wp/2010/02/14/first-post-with-vim/">First Post With Vim</a> <span class="related-post-date timestamp">Sun 14 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/05/16/sabbatical-close/">sabbatical.close()</a> <span class="related-post-date timestamp">Sun 16 May 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/04/29/improving-a-python-word-counting-function/">Improving a Python Word Counting Function</a> <span class="related-post-date timestamp">Thu 29 Apr 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/02/16/some-vim-script-implementation-testing-and-hackery/">Some Vim Script Implementation, Testing, and Hackery</a> <span class="related-post-date timestamp">Tue 16 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/19/better-word-count-in-jedit/">Better Word Count in jEdit</a> <span class="related-post-date timestamp">Sun 19 Jul 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/09/24/rtf_word_restructuredtext-toolchain/">RTF/Word–reStructuredText Toolchain</a> <span class="related-post-date timestamp">Thu 24 Sep 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/05/28/some-futurist-speculation-on-screen-interfaces/">Some Futurist Speculation on Screen Interfaces</a> <span class="related-post-date timestamp">Fri 28 May 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/08/02/python-script-for-subversion-status/">Python Script for Subversion Status</a> <span class="related-post-date timestamp">Sun 02 Aug 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/28/better-rest-wordpress-pipeline/">Better reST–WordPress Pipeline</a> <span class="related-post-date timestamp">Tue 28 Jul 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/17/jedit-macros-in-python/">jEdit Macros in Python</a> <span class="related-post-date timestamp">Fri 17 Jul 2009</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/01/17/better-word-count-in-vim/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
