<?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</title>
	<atom:link href="http://tadhg.com/wp/feed/" rel="self" type="application/rss+xml" />
	<link>http://tadhg.com/wp</link>
	<description>Wherein some things Tadhg are discussed</description>
	<lastBuildDate>Tue, 16 Mar 2010 20:50:12 +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>Height and Negotiation</title>
		<link>http://tadhg.com/wp/2010/03/16/height-and-negotiation/</link>
		<comments>http://tadhg.com/wp/2010/03/16/height-and-negotiation/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 20:41:07 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[consciousness]]></category>
		<category><![CDATA[economics]]></category>
		<category><![CDATA[prejudice]]></category>
		<category><![CDATA[psychology]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2767</guid>
		<description><![CDATA[Taller people seem to have a number of social advantages, from increased earnings to (for men) increased desirability. It’s also an advantage in negotiations.
Various explanations for this have been posited, for example the fairly plausible idea that height correlates greater physical development earlier in life and hence to greater self-esteem.
A study cited in The Body [...]]]></description>
			<content:encoded><![CDATA[<p>Taller people seem to have a number of social advantages, from <a href="http://www.cnn.com/2007/US/Careers/02/02/cb.tall.people/index.html" title="Why tall people make more money" >increased earnings</a> to (for men) <a href="http://en.wikipedia.org/wiki/Speed_dating#Age_and_height_preference" title="Speed dating: Age and height preference" >increased desirability</a>. It’s also an advantage in negotiations.</p>
<p>Various explanations for this have been posited, for example the fairly plausible idea that height correlates greater physical development earlier in life and hence to greater self-esteem.</p>
<p>A study cited in <cite>The Body has a Mind of its Own</cite>, however, suggests that we deal with height in a way that is both more ingrained and more shallow than that.<br />
<span id="more-2767"></span><br />
In summary, the Stanford study by <a class="reference external" href="http://communication.stanford.edu/faculty/bailenson/">Jeremy Bailenson</a> sets up a virtual reality world where participants have avatars of varying heights. Participants first see their avatars in a virtual mirror and are allowed to move around and get used to their avatars (and their virtual heights). They then interact with another participant (via their avatars) and take part in a negotiation.</p>
<p>The outcome of the negotiations is strongly correlated to the heights of the avatars. The taller avatars do far better in the negotiation game than the shorter avatars. This appears to be the case regardless of the actual height of the participants<a class="footnote-reference" href="#id4" id="id1">[1]</a>.</p>
<p>I was quite shocked to read that<a class="footnote-reference" href="#id5" id="id2">[2]</a>. Prior to reading the findings, I was pretty sure that a participant’s actual height, and their lifetime of interactions at that height, would be the determining factor and would override a few minutes of virtual play at some other height. Nope. At some level, we’re apparently wired deeply to respond to height in our interactions. So deeply that a change in height (even only virtually) will alter our responses rapidly.</p>
<p>This deeply ingrained heuristic is clearly rather problematic—for example, <a class="reference external" href="http://www.gladwell.com/blink/blink_excerpt2.html">Malcolm Gladwell points out</a> that 58% of Fortune 500 CEOs are over six feet tall, versus 14.5% of American men. While there are explanations for this that don’t rely on pervasive height bias<a class="footnote-reference" href="#id6" id="id3">[3]</a>, the extent of the bias and the evidence from the Bailenson study suggest that humans have a fundamental problem being rational about height. Culturally the fact that greater height leads to greater confidence, and our very wrong association of confidence with competence, means that we end up giving unfair breaks to the incompetent tall and punishing the competent-but-less-confident-or-shorter.</p>
<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="#id1">[1]</a></td>
<td>
<ol class="first last arabic" start="156">
<li><cite>The Body has a Mind of its Own</cite>. Sandra Blakeslee and Matthew Blakeslee. New York: Random House, 2007. ISBN-13: 9781400064694.
</li>
</ol>
</td>
</tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="id5" 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>So shocked, apparently, that it too me until now to recover sufficiently to write the post, having first noted it as a post idea 20 August 2008.</p>
</td>
</tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="id6" rules="none">
<colgroup>
<col class="label" />
<col /></colgroup>
<tbody valign="top">
<tr>
<td class="label"><a class="fn-backref" href="#id3">[3]</a></td>
<td>CEOs are generally from wealthier backgrounds, hence more likely to have had good access to nutrition going back several generations, and it’s therefore possible that some of the skew is from all the CEOs coming from a very small social class which happens to have a high percentage of tall people in it.</p>
</td>
</tr>
</tbody>
</table>
<p>Tags: <a href="http://tadhg.com/wp/tag/consciousness/" rel="tag">consciousness</a>, <a href="http://tadhg.com/wp/tag/economics/" rel="tag">economics</a>, <a href="http://tadhg.com/wp/tag/prejudice/" rel="tag">prejudice</a>, <a href="http://tadhg.com/wp/tag/psychology/" rel="tag">psychology</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/2008/03/09/cognitive-enhancement-drugs/">Cognitive Enhancement Drugs</a> <span class="related-post-date timestamp">Sun 09 Mar 2008</span></li><li class="related-post"><a href="http://tadhg.com/wp/2008/02/10/taleb-seminar/">Taleb Seminar</a> <span class="related-post-date timestamp">Sun 10 Feb 2008</span></li><li class="related-post"><a href="http://tadhg.com/wp/2006/12/14/fear-and-personal-radiation-detectors/">Fear and Personal Radiation Detectors</a> <span class="related-post-date timestamp">Thu 14 Dec 2006</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/02/05/easy-equals-true/">“Easy Equals True”</a> <span class="related-post-date timestamp">Fri 05 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/12/14/tiger-woods-and-his-sponsors/">Tiger Woods and His Sponsors</a> <span class="related-post-date timestamp">Mon 14 Dec 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/12/03/bullying-just-a-hunch/">Bullying: Just a Hunch</a> <span class="related-post-date timestamp">Thu 03 Dec 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/08/07/crows-are-smart%e2%80%94aesop-edition/">Crows Are Smart—Aesop Edition</a> <span class="related-post-date timestamp">Fri 07 Aug 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/27/crows-are-smart-and-hold-grudges/">Crows Are Smart—And Hold Grudges</a> <span class="related-post-date timestamp">Mon 27 Jul 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/23/some-tips-on-email-management/">Some Tips on Email Management</a> <span class="related-post-date timestamp">Thu 23 Jul 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/06/18/passwords-please/">Passwords Please</a> <span class="related-post-date timestamp">Thu 18 Jun 2009</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/03/16/height-and-negotiation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Geek Conversational Behavior</title>
		<link>http://tadhg.com/wp/2010/03/15/geek-conversational-behavior/</link>
		<comments>http://tadhg.com/wp/2010/03/15/geek-conversational-behavior/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 21:13:53 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[culture]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2763</guid>
		<description><![CDATA[While not a scientific study, this list of geek behaviors present during conversations strikes me as fairly useful both for “geeks” and “non-geeks”.

That being said, I favor the trend of moving the terms “geek” and “nerd” to be more generic, so that instead of referring just to gaming/computing/math, they refer to any consuming interest, e.g. [...]]]></description>
			<content:encoded><![CDATA[<p>While not a scientific study, <a class="reference external" href="http://www.stanford.edu/~pgbovine/geek-behaviors.htm">this list of geek behaviors present during conversations</a> strikes me as fairly useful both for “geeks” and “non-geeks”.<br />
<span id="more-2763"></span><br />
That being said, I favor the trend of moving the terms “geek” and “nerd” to be more generic, so that instead of referring just to gaming/computing/math, they refer to any consuming interest, e.g. “politics geek”, “knitting geek”<a class="footnote-reference" href="#id3" id="id1">[1]</a>, or “sports nerd”. Many of the behaviors in that article are exhibited by people who don’t fall into the traditional “geek” category—the classic example here is sports discussion, where individuals socially distant from geek stereotypes will go into great technical detail, using plenty of jargon, with a focus on completeness and accuracy.</p>
<p>So some of these behaviors are connected to a certain personality type<a class="footnote-reference" href="#id4" id="id2">[2]</a>, but others are connected to strong interest in any given complex subject (strong interest in complex subjects may itself be restricted to certain personality types, but not to the traditional geek ones).</p>
<p>I know I have a bunch of these, and so do friends, but certainly not all.</p>
<p>Since you’re probably dying to know, these are the “geek” conversational behaviors I think I exhibit with some frequency:</p>
<ul>
<li><strong>Obsessing over correctness and completeness.</strong> Yes, definitely. It’s a struggle for me to let factually wrong statements go by without any comment. I’m actually better at this when those statements are part of a political argument with which I disagree strongly—I can more easily file that away under “not worth it”. I also have a tough time with letting word misuse/poor spelling/etc. go by, and that’s due to a combination of altruistic desire to educate and a passionate desire to maintain the integrity of language (that subject is probably worth several posts in itself).
</li>
<li><strong>Preferring exact numerical responses.</strong> Yes, generally, although not usually with money, which I’ll normally round.
</li>
<li><strong>Using technical terms without checking for understanding.</strong> Sometimes. I think I’m actually fairly good at this. On the other hand, I think I occasionally use words that other people consider obscure without checking for understanding; that probably qualifies here.
</li>
<li><strong>Rapidly enumerating long lists of items.</strong> I think I do this sometimes, but not all that much.
</li>
<li><strong>Showing a lack of interest in outward appearances.</strong> Yes, definitely, but only in certain “modes”. I have some design geekery in me, and when the design geek switch is on I care a great deal about appearance and design. When that switch is off I care only about functionality. (In many things functionality and design are fundamentally intertwined, of course.)
</li>
<li><strong>Evangelizing their favorite technologies.</strong> Yes, absolutely. You should all be using open source browsers, Vim, and version control. And reStructuredText. I don’t generally push too hard on this one, but it’s there.
</li>
</ul>
<table class="docutils footnote" frame="void" id="id3" 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>I suspect that one stands out; of the three examples, it’s the one I’ve never actually heard—I came up with it while thinking about activities that could clearly be “geeky”. It’s quite likely to provoke the most dissonance, and I think there’s a whole pile of gender (and status) issues hiding under that dissonance. But knitting is clearly a technical realm that people get very into, and as such is entirely capable of sustaining geekery.</p>
</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>I’m not sure to what extent I believe in personality types, but that’s another discussion.</p>
</td>
</tr>
</tbody>
</table>
<p>Tags: <a href="http://tadhg.com/wp/tag/culture/" rel="tag">culture</a>, <a href="http://tadhg.com/wp/tag/language/" rel="tag">language</a>, <a href="http://tadhg.com/wp/tag/personal/" rel="tag">personal</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/2008/08/10/cultural-discontinuity-in-northern-england/">Cultural Discontinuity in Northern England</a> <span class="related-post-date timestamp">Sun 10 Aug 2008</span></li><li class="related-post"><a href="http://tadhg.com/wp/2008/02/24/that-pesky-apostrophe/">That Pesky Apostrophe</a> <span class="related-post-date timestamp">Sun 24 Feb 2008</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/10/08/noam-chomsky-at-the-paramount/">Noam Chomsky at the Paramount</a> <span class="related-post-date timestamp">Thu 08 Oct 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/02/09/the-afternoon-nap/">The Afternoon Nap</a> <span class="related-post-date timestamp">Mon 09 Feb 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2008/08/17/pedantor/">Pedantor</a> <span class="related-post-date timestamp">Sun 17 Aug 2008</span></li><li class="related-post"><a href="http://tadhg.com/wp/2008/04/17/the-future-of-english/">The Future of English</a> <span class="related-post-date timestamp">Thu 17 Apr 2008</span></li><li class="related-post"><a href="http://tadhg.com/wp/2008/02/25/an-80s-feminist-icon/">An 80s Feminist Icon</a> <span class="related-post-date timestamp">Mon 25 Feb 2008</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/10/18/blog-reading/">Blog Reading</a> <span class="related-post-date timestamp">Thu 18 Oct 2007</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/10/01/librarything-unread-book-meme/">LibraryThing Unread Book Meme</a> <span class="related-post-date timestamp">Mon 01 Oct 2007</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/08/17/the-power-of-focus/">The Power of Focus</a> <span class="related-post-date timestamp">Fri 17 Aug 2007</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/03/15/geek-conversational-behavior/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Women’s Tennis Should be Best-of-Five</title>
		<link>http://tadhg.com/wp/2010/03/14/womens-tennis-should-be-best-of-five/</link>
		<comments>http://tadhg.com/wp/2010/03/14/womens-tennis-should-be-best-of-five/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 06:09:37 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[feminism]]></category>
		<category><![CDATA[sports]]></category>
		<category><![CDATA[tennis]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2758</guid>
		<description><![CDATA[How long should tennis matches be? At the Grand Slam level, five sets. That’s the traditional answer, and all of the best matches I’ve seen have been five sets long. That’s long enough to be challenging, but not so long as to be ridiculous.

The “lesser” tournaments, e.g. not the Grand Slams or Davis Cup, are [...]]]></description>
			<content:encoded><![CDATA[<p>How long should tennis matches be? At the Grand Slam level, five sets. That’s the traditional answer, and all of the best matches I’ve seen have been five sets long. That’s long enough to be challenging, but not so long as to be ridiculous.<br />
<span id="more-2758"></span><br />
The “lesser” tournaments, e.g. not the Grand Slams or Davis Cup, are all best-of-three sets. Until recently the men’s year-end championships was best-of-five in its final match, but they changed that in 2008 (a bad move, in my opinion). A number of other tournaments also used to be best-of-three except for the final. It’s clear from this history that the longer format was and is considered appropriate for more important matches.</p>
<p>For Grand Slams, male tennis players switch over to best-of-five. But the female players do not, sticking with the best-of-three format. There’s really no reason for this apart from sexism.</p>
<p>Sexism, and the inconvenience of overturning the structures put in place by a history of sexism.</p>
<p>The tournaments don’t want to make such a shift because it would make scheduling much harder for them, since best-of-five matches take up more time. The female players don’t seem to be clamoring for it, which makes sense since it would be personally difficult for all of them.</p>
<p>It seems that basic fairness dictates that men and women should play the same format. I’m trying to think of other sports with similar gender splits. Women’s soccer doesn’t feature shorter halves—and if it did, I would be questioning that too.</p>
<p>There are some people who think that men’s matches should be best-of-three as well, but I think that would really be a terrible mistake, and suspect it of being driven by television advertising concerns—not by a desire to improve the sport.</p>
<p>Common arguments for sticking with best-of-three for women include:</p>
<ul>
<li><strong>Women don’t have the endurance for long matches.</strong> How could this be true? Women run marathons and compete in plenty of sports that demand endurance.
</li>
<li><strong>Longer women’s matches would be boring because most of them would just add an extra set of one-sidedness.</strong> Again, there’s no reason why this would be more true of women than men.
</li>
<li><strong>Longer women’s matches would reward the “wrong” players.</strong> Sort of the inverse of the previous argument, this is the claim that poor playes who worked on their endurance would prosper under a best-of-five system. Even if true, it’s something that would quickly change, as more female players would focus on fitness—just as the men do now.
</li>
<li><strong>Longer women’s matches would mean more injuries.</strong> This might be true, but again I think players would adjust. In any case, followed to its logical conclusion “injury reduction” would lead to one-set matches for both genders&#8230;
</li>
<li><strong>Longer women’s matches would mean more bad tennis because most women’s tennis is low quality.</strong> This is a surprisingly common argument. Its inherent sexism should be apparent—regardless of what you think of the current state of women’s tennis.
</li>
<li><strong>Longer women’s matches would wreak havoc with scheduling.</strong> This might be true, but so what? Lengthen the playing day, increase the number of courts, that’s just not an insurmountable problem.
</li>
</ul>
<p>All of the arguments against moving women’s Grand Slam matches to five sets are based on the idea that women are too “frail” to play that long, or that women‘s matches are somehow less worthy than men’s matches. Naked self-interest plays a part too (the tournaments don’t want to have to spend more money, and the female players currently against the idea don’t want to increase their workload.)</p>
<p>Making women’s matches best-of-five would promote the idea that their matches are on an equal footing as athletic endeavors with the men’s—<a href="http://tadhg.com/wp/2009/06/30/wimbledon-womens-tennis-and-sexism/" title="Wimbledon, Women’s Tennis, and Sexism" >an idea clearly in need of reinforcement</a>. It would help puncture the idea that either gender requires “special treatment”—right now the men get more of the limelight, but on the other hand the women earn the same prize money for shorter matches, and I consider both imbalances to be unhealthy.</p>
<p>The signs aren’t too hopeful right now, but I’m hoping that at some point women’s tennis being best-of-three at Grand Slams becomes just one more bygone relic of a sexist past.</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/feminism/" rel="tag">feminism</a>, <a href="http://tadhg.com/wp/tag/sports/" rel="tag">sports</a>, <a href="http://tadhg.com/wp/tag/tennis/" rel="tag">tennis</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/12/11/serena-williams-fine/">Serena Williams’ Fine</a> <span class="related-post-date timestamp">Fri 11 Dec 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/06/30/wimbledon-womens-tennis-and-sexism/">Wimbledon, Women's Tennis, and Sexism</a> <span class="related-post-date timestamp">Tue 30 Jun 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/02/12/salsa-the-serve-looks-like-salsa/">“Salsa, the serve looks like salsa”</a> <span class="related-post-date timestamp">Fri 12 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/31/sweet-sixteen-down-under/">Sweet Sixteen Down Under</a> <span class="related-post-date timestamp">Sun 31 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/28/federer-gs-sf-streak-23-and-counting/">Federer GS SF Streak: 23 and Counting</a> <span class="related-post-date timestamp">Thu 28 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/25/australian-open-2010-midpoint-notes/">Australian Open 2010 Midpoint Notes</a> <span class="related-post-date timestamp">Mon 25 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/11/30/davydenko-wins-2009-tennis-yec/">Davydenko Wins 2009 Tennis <abbr title='Year-End Championships' >YEC</abbr></a> <span class="related-post-date timestamp">Mon 30 Nov 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/11/27/tennis-yec-swiss-better-than-round-robin/">Tennis <abbr title='Year-End Championships' >YEC</abbr>: Swiss Better than Round-Robin?</a> <span class="related-post-date timestamp">Fri 27 Nov 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/09/14/del-potro-defeats-federer-for-2009-us-open-title/">Del Potro Defeats Federer for 2009 US Open Title</a> <span class="related-post-date timestamp">Mon 14 Sep 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/09/13/us-open-2009-del-potro-federer-clijsters/">US Open 2009: Del Potro, Federer, Clijsters</a> <span class="related-post-date timestamp">Sun 13 Sep 2009</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/03/14/womens-tennis-should-be-best-of-five/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using Vim with Thunderbird</title>
		<link>http://tadhg.com/wp/2010/03/12/using-vim-with-thunderbird/</link>
		<comments>http://tadhg.com/wp/2010/03/12/using-vim-with-thunderbird/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 20:24:25 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[text editing]]></category>
		<category><![CDATA[Thunderbird]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2750</guid>
		<description><![CDATA[It’s possible to get Thunderbird to use Vim as an external editor for email, and while it’s a little clunky, it works.


Get the External Editor add-on for Thunderbird:
Thunderbird 2: get Version 0.7.4 from this page.
Thunderbird 3: get Version 0.8.0 from this page.

Install it via the Tools &#62; Add-ons window.

Restart Thunderbird.

Edit the External Editor prefererences via [...]]]></description>
			<content:encoded><![CDATA[<p>It’s possible to get Thunderbird to use Vim as an external editor for email, and while it’s a little clunky, it works.<br />
<span id="more-2750"></span></p>
<ol class="arabic">
<li>Get the External Editor add-on for Thunderbird:
<p>Thunderbird 2: get Version 0.7.4 from <a class="reference external" href="http://globs.org/download.php?lng=en">this page</a>.</p>
<p>Thunderbird 3: get Version 0.8.0 from <a class="reference external" href="http://globs.org/download.php?lng=en">this page</a>.</p>
</li>
<li>Install it via the <strong>Tools &gt; Add-ons</strong> window.
</li>
<li>Restart Thunderbird.
</li>
<li>Edit the External Editor prefererences via the <strong>Tools &gt; Add-ons</strong> window.
</li>
<li>Enter Vim as the Text Editor (some trickiness for OS X; see below).
</li>
</ol>
<p>That should work—now, in any Compose window, you can hit Control-E (or Command-E for OS X) to invoke Vim as your editor, and it will run Vim editing your email. Saving and then quitting Vim will return you to Thunderbird with the edited message in the Compose menu.</p>
<p>For OS X, the right value for the path to Vim is <tt class="docutils literal"><span class="pre">/Applications/mvim</span></tt>. (<tt class="docutils literal"><span class="pre">mvim</span></tt> is a script for launching Vim that should have come with your MacVim installation.).</p>
<p>This can be improved further, however—if you wish, you can have a Vim instance that’s just for writing email, and you can avoid having to close it every time you’re finished editing. To do this, set the path to your Vim install as <tt class="docutils literal"><span class="pre">/Applications/mvim</span> <span class="pre">--servername</span> <span class="pre">email</span> <span class="pre">--remote-wait</span></tt>. Then open up Terminal and run <tt class="docutils literal"><span class="pre">/Applications/mvim</span> <span class="pre">--servername</span> <span class="pre">email</span></tt> from the commandline. You now have a Vim instance called “email”, and when you use External Editor in Thunderbird it will open the email in that instance, meaning you don’t have to move or resize the window. Also, instead of quitting Vim, you can save the file and then close it (e.g. <tt class="docutils literal"><span class="pre">:bd</span></tt>), and External Editor will place the contents of the message in your Thunderbird Compose window.</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/email/" rel="tag">email</a>, <a href="http://tadhg.com/wp/tag/software/" rel="tag">software</a>, <a href="http://tadhg.com/wp/tag/text-editing/" rel="tag">text editing</a>, <a href="http://tadhg.com/wp/tag/thunderbird/" rel="tag">Thunderbird</a>, <a href="http://tadhg.com/wp/tag/vim/" rel="tag">Vim</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/22/imap-jj-esc-and-bclose-in-vim/"><tt class="docutils literal"><span class="pre">:imap</span> <span class="pre">jj</span> <span class="pre">&lt;Esc&gt;</span></tt> and <tt class="docutils literal"><span class="pre">:Bclose</span></tt> in Vim</a> <span class="related-post-date timestamp">Mon 22 Feb 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/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/03/04/vim-the-killer-instinct-of-text-editors/">Vim: the <cite>Killer Instinct</cite> of Text Editors</a> <span class="related-post-date timestamp">Thu 04 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/08/09/time-to-try-vim/">Time to Try Vim</a> <span class="related-post-date timestamp">Sun 09 Aug 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/09/trying-d-cubed-for-task-management/">Trying d-cubed for Task Management</a> <span class="related-post-date timestamp">Tue 09 Mar 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/02/26/the-future-of-tabletop-games-dd-on-the-microsoft-surface/">The Future of Tabletop Games? <cite>D&amp;D</cite> on the Microsoft Surface</a> <span class="related-post-date timestamp">Fri 26 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/15/code-katas/">Code Katas</a> <span class="related-post-date timestamp">Fri 15 Jan 2010</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/03/12/using-vim-with-thunderbird/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This Trailer May Seem Familiar&#8230;</title>
		<link>http://tadhg.com/wp/2010/03/11/this-trailer-may-seem-familiar/</link>
		<comments>http://tadhg.com/wp/2010/03/11/this-trailer-may-seem-familiar/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 19:34:54 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[film]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2747</guid>
		<description><![CDATA[They might be aiming at an easy target, but they really nail it:


Tags: film, humor, videoRelated PostsThe Super Bowl by Auteurs Mon 08 Feb 2010If You Watch Just One Deliberately Too-Long Horror Movie Parody Trailer This Year... Tue 24 Mar 2009“Let’s Enhance” Sun 07 Mar 2010Evan Mather’s Films Fri 19 Feb 2010“Salsa, the serve looks [...]]]></description>
			<content:encoded><![CDATA[<p>They might be aiming at an easy target, but they really nail it:</p>
<p><object     type="application/x-shockwave-flash"     width="580"     height="340"     class="youtube-embed"     data="http://www.youtube.com/v/nFicqklGuB0&amp;fs=1"  ><param name="allowscriptaccess" value="always"></param><param name="allowfullscreen" value="true"></param><param name="wmode" value="transparent"></param>
</object></p>
<p>Tags: <a href="http://tadhg.com/wp/tag/film/" rel="tag">film</a>, <a href="http://tadhg.com/wp/tag/humor/" rel="tag">humor</a>, <a href="http://tadhg.com/wp/tag/video/" rel="tag">video</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/08/the-super-bowl-by-auteurs/">The Super Bowl by Auteurs</a> <span class="related-post-date timestamp">Mon 08 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/03/24/if-you-watch-just-one-deliberately-too-long-horror-movie-parody-trailer-this-year/">If You Watch Just One Deliberately Too-Long Horror Movie Parody Trailer This Year...</a> <span class="related-post-date timestamp">Tue 24 Mar 2009</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/02/19/evan-mathers-films/">Evan Mather’s Films</a> <span class="related-post-date timestamp">Fri 19 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/02/12/salsa-the-serve-looks-like-salsa/">“Salsa, the serve looks like salsa”</a> <span class="related-post-date timestamp">Fri 12 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/11/24/the-christian-side-hug/">The “Christian Side Hug”</a> <span class="related-post-date timestamp">Tue 24 Nov 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/11/20/friday-comedy-stewart-lee-on-political-correctness/">Friday Comedy: Stewart Lee on “Political Correctness”</a> <span class="related-post-date timestamp">Fri 20 Nov 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/11/06/the-adventures-of-lil-cthulhu/">The Adventures of Lil’ Cthulhu</a> <span class="related-post-date timestamp">Fri 06 Nov 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/03/some-remi-gaillard/">Some R&eacute;mi Gaillard</a> <span class="related-post-date timestamp">Fri 03 Jul 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/05/12/le-wrath-di-khan/">Le Wrath di Khan</a> <span class="related-post-date timestamp">Tue 12 May 2009</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/03/11/this-trailer-may-seem-familiar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trying d-cubed for Task Management</title>
		<link>http://tadhg.com/wp/2010/03/09/trying-d-cubed-for-task-management/</link>
		<comments>http://tadhg.com/wp/2010/03/09/trying-d-cubed-for-task-management/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 19:58:51 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[handedness]]></category>
		<category><![CDATA[organization]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[psychology]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2744</guid>
		<description><![CDATA[I’ve been falling behind somewhat in keeping track of my tasks. That’s not to say I haven’t been productive, it’s just that most of my productivity has been focused in things I’ve been working on obsessively, like preparation for the roleplaying campaign I started running last week, Vim customization, and Python workflow coding.
It would be [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been falling behind somewhat in keeping track of my tasks. That’s not to say I haven’t been productive, it’s just that most of my productivity has been focused in things I’ve been working on obsessively, like preparation for the roleplaying campaign I started running last week, Vim customization, and Python workflow coding.</p>
<p>It would be good to track other things better than how I’m doing it right now, but somehow returning to <a class="reference external" href="http://tiddlywiki.com/">TiddlyWiki</a> for my task management wasn’t appealing. I used it for quite a while, but a bare install of it doesn’t seem to quite work for task management, even though it’s still really good for keeping notes about things in general. I’m going to try <a class="reference external" href="http://dcubed.ca/Welcome_to_d-cubed.html">d-cubed</a>, a TiddlyWiki-based tool, instead.<br />
<span id="more-2744"></span><br />
One of the reasons for this is that I like a little organizational reward when I finish a task; I find that this kind of thing helps my motivation. This is partly due to my liking for lists (<a class="reference external" href="http://www.newscientist.com/article/dn15112-lefthanded-people-are-more-inhibited.html">which may be related to my left-handedness</a>) and partly due to the benefit of formally marking something as “done”. So a bare TiddlyWiki wasn’t quite structured enough for this, and I found that moving stuff around became too unwieldy. Instead of fixing the problem at the time, I gradually abandoned that list, and have managed mostly fine without it—but now occasionally forgetting an idea for a post is annoying me too much again.</p>
<p>Incidentally, this highlights my somewhat schizophrenic organizational state: various aspects of my life are either highly organized and usually stable that organized state, using some toolset that I’ve made work for me (like my blog, my subversion repository, tracking my CrossFit results, etc.); or are completely disorganized, with me getting by on them just by keeping stuff in my head and getting to it from time to time. The former is generally better than the latter, but finding the right tools for the right area isn’t always easy, especially when you’re as picky as I am (it took me a long time and quite a bit of research to settle on reStructuredText as my primary document format, for example).</p>
<p>In any case, I’ll see how d-cubed works; I might also try out <a class="reference external" href="http://getteamtasks.com/">Team Tasks</a>, another TiddlyWiki-based tool.</p>
<p>During these trial periods, I’ll do my best to ignore the fact that I really want an API (preferably Pyton-based) to interact with TiddlyWikis via the command line, and that while some tools are close none match this requirement; I’ll eventually tackle that project if nobody else does, but adding another dependency <em>in front of the task of keeping track of my tasks</em> just doesn’t seem like a good idea, even if it wouldn’t be entirely out of character.</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/handedness/" rel="tag">handedness</a>, <a href="http://tadhg.com/wp/tag/organization/" rel="tag">organization</a>, <a href="http://tadhg.com/wp/tag/personal/" rel="tag">personal</a>, <a href="http://tadhg.com/wp/tag/productivity/" rel="tag">productivity</a>, <a href="http://tadhg.com/wp/tag/psychology/" rel="tag">psychology</a>, <a href="http://tadhg.com/wp/tag/software/" rel="tag">software</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/07/23/some-tips-on-email-management/">Some Tips on Email Management</a> <span class="related-post-date timestamp">Thu 23 Jul 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/05/04/version-control-recovery/">Version Control Recovery</a> <span class="related-post-date timestamp">Mon 04 May 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/03/13/backups/">Backups</a> <span class="related-post-date timestamp">Tue 13 Mar 2007</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/03/05/subversionorganization/">Subversion/Organization</a> <span class="related-post-date timestamp">Mon 05 Mar 2007</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/01/09/organizational-state/">Organizational State</a> <span class="related-post-date timestamp">Tue 09 Jan 2007</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/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/11/26/open-source-thanks/">Open Source Thanks</a> <span class="related-post-date timestamp">Thu 26 Nov 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/30/2009-goals-status/">2009 Goals Status</a> <span class="related-post-date timestamp">Thu 30 Jul 2009</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/03/09/trying-d-cubed-for-task-management/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inkscape</title>
		<link>http://tadhg.com/wp/2010/03/08/inkscape/</link>
		<comments>http://tadhg.com/wp/2010/03/08/inkscape/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 20:09:10 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[roleplaying]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2741</guid>
		<description><![CDATA[I’ve been using the vector graphics editor Inkscape a fair bit over the last few days, and in the last few months have given it something of a workout. It’s been quite impressive. I was never a really heavy Illustrator user, but Inkscape seems to compare to it much more favorably than, say, GIMP compares [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been using the vector graphics editor <a class="reference external" href="http://www.inkscape.org/">Inkscape</a> a fair bit over the last few days, and in the last few months have given it something of a workout. It’s been quite impressive. I was never a really heavy Illustrator user, but Inkscape seems to compare to it much more favorably than, say, <a class="reference external" href="http://www.gimp.org/">GIMP</a> compares to Photoshop. It’s a later-generation product, so perhaps that’s not being fair, but regardless it just feels a lot better to use. Maybe there are killer features that Illustrator has that Inkscape doesn’t, but since I don’t know what they are, I don’t miss them&#8230;</p>
<p>I’ve mainly been using it for map-making (related to <a href="http://tadhg.com/wp/2009/03/09/fantasy-world-sketch/" title="Fantasy World Sketch" >this</a>), and for that it’s been really good, and I’m rather glad it exists, because doing the same kind of work in a bitmap editor would probably be incredibly frustrating. I haven’t read through the documentation, but whenever I’ve needed to find out how to do something I’ve been able to without much trouble, so it seems that they’re doing a good job on that as well.</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/design/" rel="tag">design</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/roleplaying/" rel="tag">roleplaying</a>, <a href="http://tadhg.com/wp/tag/software/" rel="tag">software</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/26/the-future-of-tabletop-games-dd-on-the-microsoft-surface/">The Future of Tabletop Games? <cite>D&amp;D</cite> on the Microsoft Surface</a> <span class="related-post-date timestamp">Fri 26 Feb 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/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/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/03/09/trying-d-cubed-for-task-management/">Trying d-cubed for Task Management</a> <span class="related-post-date timestamp">Tue 09 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/04/vim-the-killer-instinct-of-text-editors/">Vim: the <cite>Killer Instinct</cite> of Text Editors</a> <span class="related-post-date timestamp">Thu 04 Mar 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/11/26/open-source-thanks/">Open Source Thanks</a> <span class="related-post-date timestamp">Thu 26 Nov 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></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/03/08/inkscape/feed/</wfw:commentRss>
		<slash:comments>0</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/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><li class="related-post"><a href="http://tadhg.com/wp/2010/02/15/the-unfeasibly-tall-gbbmcsmb/">The Unfeasibly Tall GBBMCSMB</a> <span class="related-post-date timestamp">Mon 15 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/02/12/salsa-the-serve-looks-like-salsa/">“Salsa, the serve looks like salsa”</a> <span class="related-post-date timestamp">Fri 12 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/02/08/the-super-bowl-by-auteurs/">The Super Bowl by Auteurs</a> <span class="related-post-date timestamp">Mon 08 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/11/24/the-christian-side-hug/">The “Christian Side Hug”</a> <span class="related-post-date timestamp">Tue 24 Nov 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/11/20/friday-comedy-stewart-lee-on-political-correctness/">Friday Comedy: Stewart Lee on “Political Correctness”</a> <span class="related-post-date timestamp">Fri 20 Nov 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/11/06/the-adventures-of-lil-cthulhu/">The Adventures of Lil’ Cthulhu</a> <span class="related-post-date timestamp">Fri 06 Nov 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/10/02/pure-cheese-with-sunglasses/">Pure Cheese, with Sunglasses</a> <span class="related-post-date timestamp">Fri 02 Oct 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/07/03/some-remi-gaillard/">Some R&eacute;mi Gaillard</a> <span class="related-post-date timestamp">Fri 03 Jul 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/05/12/le-wrath-di-khan/">Le Wrath di Khan</a> <span class="related-post-date timestamp">Tue 12 May 2009</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/03/07/lets-enhance/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Doom and Modern First-Person Shooters</title>
		<link>http://tadhg.com/wp/2010/03/05/doom-and-modern-first-person-shooters/</link>
		<comments>http://tadhg.com/wp/2010/03/05/doom-and-modern-first-person-shooters/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 02:43:54 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[criticism]]></category>
		<category><![CDATA[games]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2735</guid>
		<description><![CDATA[Continuing with the vintage video games theme, here’s “Coelacanth: Lessons from Doom”, an analysis of Doom by J.P. Lebreton, one of the designers of BioShock. Great piece, and especially interesting to me was his focus on how much easier it was for people to create their own maps for Doom than it is for modern [...]]]></description>
			<content:encoded><![CDATA[<p>Continuing with the vintage video games theme, here’s <a class="reference external" href="http://vectorpoem.com/news/?p=74">“Coelacanth: Lessons from Doom”</a>, an analysis of <a class="reference external" href="http://en.wikipedia.org/wiki/Doom_(video_game)"><cite>Doom</cite></a> by J.P. Lebreton, one of the designers of <a class="reference external" href="http://en.wikipedia.org/wiki/BioShock"><cite>BioShock</cite></a>. Great piece, and especially interesting to me was his focus on how much easier it was for people to create their own maps for <cite>Doom</cite> than it is for modern <abbr title="First-Person Shooter" >FPS</abbr>es. He wrote the commentary partly to accompany his recreation of one of his <cite>BioShock</cite> levels as a <cite>Doom II</cite> level, <a class="reference external" href="http://vectorpoem.com/news/?p=68">Arcadia Demade</a>.</p>
<p>Incidentally, he’s also put work into an “abstract FPS” called <cite>purity</cite>, which makes me wonder what his take on <a class="reference external" href="http://en.wikipedia.org/wiki/CPMA"><cite>CPMA</cite></a> would be.</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/criticism/" rel="tag">criticism</a>, <a href="http://tadhg.com/wp/tag/games/" rel="tag">games</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/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/03/04/vim-the-killer-instinct-of-text-editors/">Vim: the <cite>Killer Instinct</cite> of Text Editors</a> <span class="related-post-date timestamp">Thu 04 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/02/nethack-in-all-its-glory/"><cite>Nethack</cite> in all its Glory</a> <span class="related-post-date timestamp">Tue 02 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/02/26/the-future-of-tabletop-games-dd-on-the-microsoft-surface/">The Future of Tabletop Games? <cite>D&amp;D</cite> on the Microsoft Surface</a> <span class="related-post-date timestamp">Fri 26 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/14/the-architecture-of-die-hard/">The Architecture of <cite>Die Hard</cite></a> <span class="related-post-date timestamp">Thu 14 Jan 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/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/22/the-perfect-is-the-enemy-of-the-good-duke-nukem-forever/">The Perfect is the Enemy of the Good: <cite>Duke Nukem Forever</cite></a> <span class="related-post-date timestamp">Tue 22 Dec 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/12/18/twilight-imperium-review/"><cite>Twilight Imperium</cite> Review</a> <span class="related-post-date timestamp">Fri 18 Dec 2009</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></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/03/05/doom-and-modern-first-person-shooters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim: the Killer Instinct of Text Editors</title>
		<link>http://tadhg.com/wp/2010/03/04/vim-the-killer-instinct-of-text-editors/</link>
		<comments>http://tadhg.com/wp/2010/03/04/vim-the-killer-instinct-of-text-editors/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 07:45:49 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[jEdit]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[text editing]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2731</guid>
		<description><![CDATA[I played Killer Instinct a lot in the mid-90s. It didn’t have the multiplayer depth of Super Street Fighter II Turbo, but I wasn’t playing it multiplayer much—rather, I was trying to get the longest combination move I could.
But what does this have to do with text editing?

I’ve always been inclined to try to get [...]]]></description>
			<content:encoded><![CDATA[<p>I played <a class="reference external" href="http://en.wikipedia.org/wiki/Killer_Instinct"><cite>Killer Instinct</cite></a> a lot in the mid-90s. It didn’t have the multiplayer depth of <a class="reference external" href="http://en.wikipedia.org/wiki/Super_Street_Fighter_II#Super_Street_Fighter_II_Turbo"><cite>Super Street Fighter II Turbo</cite></a>, but I wasn’t playing it multiplayer much—rather, I was trying to get the longest combination move I could.</p>
<p>But what does this have to do with text editing?<br />
<span id="more-2731"></span><br />
I’ve always been inclined to try to get things done quickly with computers. I generally try to find the keyboard shortcuts for operations and commit them to memory fast, feeling that doing otherwise will lead to a lot of wasted time, and also to there being too long a gap between my intention and its execution on the screen. This was probably most advanced (prior to now) when I was doing a lot of <a class="reference external" href="http://en.wikipedia.org/wiki/Photoshop"><cite>Photoshop</cite></a> work in the late 90s.</p>
<p>That work came after I’d been heavily into <a class="reference external" href="http://en.wikipedia.org/wiki/Fighting_game">fighting games</a> for a while. While not all fighting games do this, most of them have a concept of a “combination”, a series of moves that, if executed properly, all hit an opponent who gets hit by the first one—that is, once the combo starts, the opponent cannot block in between hits. This makes mistakes significantly more lethal, as if you leave an opening for someone who can reliably hit a powerful combo, you take a lot more damage than against someone who just knows how to hit you once or twice. Note: each “move” (sequence of inputs) can result in more than one hit; for example in <cite>Super Street Fighter II Turbo</cite> Ken’s heavy Dragon Punch (down, down/forward, forward, heavy punch) registers as three hits rather than one.</p>
<p><a href="http://tadhg.com/wp/2007/07/20/super-street-fighter-ii-turbo/" title="Super Street Fighter II Turbo" >I got into playing Ken</a> in <cite>Super Street Fighter II Turbo</cite> and focused on trying to finish opponents off with a five- or six-hit super combo (I think you could chain his super onto a heavy punch from the air), and this focus on combos made me a perfect customer for <cite>Killer Instinct</cite>, which took the combo approach and brought it to fairly ridiculous levels. Ken’s six-hit super combo in <cite>SSF2T</cite> (if you could indeed chain it onto a heavy punch) required this sequence:</p>
<pre class="literal-block">
Up/Forward, Heavy Punch, Forward, Down, Down/Forward, Forward, Down, Down/Forward, Heavy Punch
</pre>
<p>That’s reasonably manageable. It requires quickness and precision, because you have to do it pretty fast and the sequence has to be correct, but it’s not all that hard to remember or to execute. <cite>Killer Instinct</cite>, however, required somewhat more; here’s what Orchid’s 46-hit Ultra Combo was (if I recall correctly):</p>
<pre class="literal-block">
Back, Light Punch, Forward, Heavy Kick,
Back, Light Punch, Forward, Heavy Kick,
Light Punch, Back, Medium Kick,
Light Punch, Forward, Heavy Kick,
Back, Light Punch, Forward, Heavy Kick,
Forward, Medium Punch,
&lt;pause&gt;
Down, Down/Forward, Forward, Light Punch.
</pre>
<p>I broke it onto multiple lines for clarity. That wasn’t the toughest or longest combo in the game, and there are certainly tougher ones in other games, but I think that <cite>Killer Instinct</cite> represented a clear next step from earlier fighting games in terms of combo intricacy. There’s <a class="reference external" href="http://www.youtube.com/watch?v=rq22hvpti_Y">a YouTube clip of what that input sequence results in</a> (for reasons I won’t go into the combo in the clip results in 48 hits instead of 45, but it’s almost the same series of inputs.)</p>
<p>Part of the difficulty was execution and timing, but part of the difficulty was also remembering the right sequences and when they could be applied; in it and other fighting games just going for the big combo isn’t the right move every time, and you need to tailor your choice to the situation.</p>
<p>In that way, there’s a similarity to keyboard shortcuts in applications. This is much more significant on Windows and certain Unix systems than on OS X, because OS X doesn’t use the Alt key (plus whatever letter) to open application menus. This is one of the things I always hated about Mac OSes, and have only gotten past by figuring out other ways to get my applications to do what I want. However, where the Alt key approach is available, invoking certain actions becomes a matter of chaining together keystrokes—for example, in some versions of OpenOffice Writer, you get to the Zoom dialog by hitting Alt-V followed by Z. In applications where there are a ton of actions, remembering a sequence of Alt keypresses was often easier than memorizing the chord for each, assuming there was a chord for that particular option.</p>
<p>Certain other basic text handling shortcuts are similar, like (your UI’s meta key)+Left Arrow to jump back a word, or Shift+(your UI’s meta key)+Left Arrow to select all the text going back a word, but they reach a limit fairly quickly.</p>
<p>Your quick text manipulation capabilities rapidly reach a limit, that is, unless you’re using an editor that’s basically designed to work without a mouse, and to make text manipulation as easy as possible. Like <a class="reference external" href="http://www.vim.org/">Vim</a>.</p>
<p>Vim is a modal editor, and so the typical text editor (or word processor) approach where you immediately see on the screen what you type is just one mode (Insert mode). Vim basically assumes that Insert mode is pretty easy, and that real power comes from manipulating the text in ways other than typing what you want. Where other text editors effectively give you access to non-insert modes by letting you use the mouse, or use chording keyboard shortcuts (which are often somewhat awkward), <a class="reference external" href="http://www.noah.org/wiki/File:Vi-vim-cheat-sheet.gif">Vim gives you the whole keyboard</a>.</p>
<p><strong>h</strong> is move left, <strong>l</strong> is move right, <strong>j</strong> is move down, <strong>k</strong> is move up. So far so simple, and not better than the arrow keys. But&#8230; numbers in front of those commands make them repeat. <strong>30k</strong> jumps up 30 lines.</p>
<p>What if you want to delete? <strong>d</strong>(something) deletes something. So <strong>dl</strong> would delete the next character right.</p>
<p><strong>20dl</strong> deletes 20 characters right. Vim recognizes words in the sense of strings of letters broken by non-letter characters so instead of moving one cursor line or column you can move in chunks of words.</p>
<p>Delete the rest of the word your cursor is over? <strong>dw</strong>. Delete the next 20 words? <strong>20dw</strong>.</p>
<p>The same kind of thing applies to copying and changing text; when I decided halfway through this paragraph that I wanted to remove the commas I had inserted between the keystrokes that made up the Vim combos, I hit <a class="reference external" href="http://tadhg.com/wp/2010/02/22/imap-jj-esc-and-bclose-in-vim/"><strong>jj</strong></a> to exit Insert mode, <strong>^</strong> to go back to the start of the line, <strong>f,</strong> to reach the first comma, <strong>x</strong> to delete it; then I realized that the rest of my line only had comma in the commands, so I hit <strong>vg$</strong> to select to the end of the visual line, then <strong>:s/,//&lt;Return&gt;</strong> to replace the commas with nothing, and then <strong>A</strong> to return to Insert mode at the end of the line.</p>
<p>You might be looking at that wondering how the hell it’s useful to have to wade through all that crap in order to do something you could do with the mouse and a bunch of moves, clicks, and the delete key. The answer is that it’s faster this way once you know how, and that further the basic moves Vim gives you turn into combos quite naturally, and then longer ones as you learn to extend their power.</p>
<p>Unlike fighting game combos, in Vim you generally have as much time as you want to enter the next key for each one, but for me a lot of it is about speed. The narrower the gap between when I think of an edit and when I’ve made that edit, the better the chance of my keeping my train of thought, and more generally the more edits I can get done in a shorter time.</p>
<p>On top of this, I get a kick out of figuring out how to chain together the combo and execute it properly, just like I got a kick out of stringing together forty-plus hits with Orchid. It’s not exactly the same kick, but there’s enough similarity there that my brain responds positively. At the same time, it’s reinforcing the learning of skills that are extremely useful for many important tasks (such as writing and coding), and so doesn’t have the potentially unhealthy drawbacks I discussed when <a class="reference external" href="http://tadhg.com/wp/2007/07/20/super-street-fighter-ii-turbo/">going over my history with <cite>Super Street Fighter II Turbo</cite></a>.</p>
<p>And I get most of those kicks without having to move my hands from the home row.</p>
<p>So is Vim an editor for people who like video games with ridiculously intricate move sequences? Not exclusively, no. I’m sure I’m part of a rather small minority, and Vim can be compared many other things, including <a class="reference external" href="http://tadhg.com/wp/2010/03/02/nethack-in-all-its-glory/#comment-20032"><cite>Nethack</cite></a>, a game that’s rather far away from <cite>Killer Instinct</cite>.</p>
<p>If you work with text quite a lot, <strong>learning and using Vim is probably going to speed you up as much as learning to touch type</strong> (and possibly more). It’s definitely frustrating at first, but if you’re willing to put in the time to get the basics, it will prove a good investment later. I’m certainly very happy I’m using it, and (despite still having a lot of respect for <a class="reference external" href="http://jedit.org/">jEdit</a>) wish that I’d moved over to it earlier.</p>
<p>My adoption of it was slowed by my having become habituated to buffer management in other editors, and not so much by the concept of modes, or dealing with remembering what the keys did, so I don’t think my path for learning it was all that typical. Hence I don’t know if any of the tutorials I’m about to link to are any good, but hopefully you can find one that works for you.</p>
<p>The absolute first things you should know: <strong>i</strong> to enter Insert mode so that you can write the text you want to write; <strong>&lt;Esc&gt;</strong> to get back to normal mode so you can edit, and move around, and start learning what the other keys do.</p>
<p>In Normal mode (i.e. after you’ve hit <strong>&lt;Esc&gt;</strong>, or when you first open Vim), <strong>:help&lt;Return&gt;</strong> will give you help, and <strong>:vimtutor&lt;Return&gt;</strong> will start a tutorial.</p>
<p><a class="reference external" href="http://www.vim.org/">Vim</a> is free software and is available for more or less every platform.</p>
<p>Some tutorials:</p>
<ul>
<li><a class="reference external" href="http://tips.webdesign10.com/another-vim-tutorial">http://tips.webdesign10.com/another-vim-tutorial</a>
</li>
<li><a class="reference external" href="http://blog.interlinked.org/tutorials/vim_tutorial.html">http://blog.interlinked.org/tutorials/vim_tutorial.html</a>
</li>
<li><a class="reference external" href="http://www.vi-improved.org/tutorial.php">http://www.vi-improved.org/tutorial.php</a>
</li>
</ul>
<p>Tags: <a href="http://tadhg.com/wp/tag/games/" rel="tag">games</a>, <a href="http://tadhg.com/wp/tag/jedit/" rel="tag">jEdit</a>, <a href="http://tadhg.com/wp/tag/personal/" rel="tag">personal</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></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/08/09/time-to-try-vim/">Time to Try Vim</a> <span class="related-post-date timestamp">Sun 09 Aug 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/12/using-vim-with-thunderbird/">Using Vim with Thunderbird</a> <span class="related-post-date timestamp">Fri 12 Mar 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/02/22/imap-jj-esc-and-bclose-in-vim/"><tt class="docutils literal"><span class="pre">:imap</span> <span class="pre">jj</span> <span class="pre">&lt;Esc&gt;</span></tt> and <tt class="docutils literal"><span class="pre">:Bclose</span></tt> in Vim</a> <span class="related-post-date timestamp">Mon 22 Feb 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/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/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/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/15/rpgs-ive-played/">RPGs I’ve Played</a> <span class="related-post-date timestamp">Tue 15 Dec 2009</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/03/04/vim-the-killer-instinct-of-text-editors/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Nethack in all its Glory</title>
		<link>http://tadhg.com/wp/2010/03/02/nethack-in-all-its-glory/</link>
		<comments>http://tadhg.com/wp/2010/03/02/nethack-in-all-its-glory/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 07:37:43 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[games]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2728</guid>
		<description><![CDATA[I’ve only played Nethack a handful of times, but have been aware of its place in the gaming pantheon for quite some time. I love the fact that a game using only symbols and text can inspire such devotion even in 2010, and reading the ascension tale of Garote-Mon-Hum-Fem-Cha makes me both curious about and [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve only played <a class="reference external" href="http://en.wikipedia.org/wiki/NetHack"><cite>Nethack</cite></a> a handful of times, but have been aware of its place in the gaming pantheon for quite some time. I love the fact that a game using only symbols and text can inspire such devotion even in 2010, and reading <a href="http://garote.bdmonkeys.net/nethack/index.html" title="My Nethack YAAP" >the ascension tale of Garote-Mon-Hum-Fem-Cha</a> makes me both curious about and wary of trying it out again.</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/games/" rel="tag">games</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/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/03/05/doom-and-modern-first-person-shooters/"><cite>Doom</cite> and Modern First-Person Shooters</a> <span class="related-post-date timestamp">Fri 05 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/04/vim-the-killer-instinct-of-text-editors/">Vim: the <cite>Killer Instinct</cite> of Text Editors</a> <span class="related-post-date timestamp">Thu 04 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/02/26/the-future-of-tabletop-games-dd-on-the-microsoft-surface/">The Future of Tabletop Games? <cite>D&amp;D</cite> on the Microsoft Surface</a> <span class="related-post-date timestamp">Fri 26 Feb 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/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/22/the-perfect-is-the-enemy-of-the-good-duke-nukem-forever/">The Perfect is the Enemy of the Good: <cite>Duke Nukem Forever</cite></a> <span class="related-post-date timestamp">Tue 22 Dec 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/12/18/twilight-imperium-review/"><cite>Twilight Imperium</cite> Review</a> <span class="related-post-date timestamp">Fri 18 Dec 2009</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/2009/12/10/facebook-astroturfing/">Facebook Astroturfing</a> <span class="related-post-date timestamp">Thu 10 Dec 2009</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/03/02/nethack-in-all-its-glory/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A Good Work Ethic</title>
		<link>http://tadhg.com/wp/2010/03/01/a-good-work-ethic/</link>
		<comments>http://tadhg.com/wp/2010/03/01/a-good-work-ethic/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 05:00:54 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[comics]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[web-surfing]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2725</guid>
		<description><![CDATA[I was catching up on a softer world recently, and came across this comic, which I think is one of their best.
Tags: comics, humor, web-surfingRelated PostsA Softer World Wed 27 Jun 2007xkcd on Dreams Mon 16 Mar 2009Pedantor Sun 17 Aug 2008Who Needs Perspective? Sun 13 Jul 2008Powers is Addictive Tue 01 Apr 2008HuckChuckFacts Fri [...]]]></description>
			<content:encoded><![CDATA[<p>I was catching up on <a class="reference external" href="http://www.asofterworld.com/"><cite>a softer world</cite></a> recently, and came across <a href="http://www.asofterworld.com/index.php?id=517" title="A Softer World: 517" >this comic</a>, which I think is one of their best.</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/comics/" rel="tag">comics</a>, <a href="http://tadhg.com/wp/tag/humor/" rel="tag">humor</a>, <a href="http://tadhg.com/wp/tag/web-surfing/" rel="tag">web-surfing</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/2007/06/27/a-softer-world/">A Softer World</a> <span class="related-post-date timestamp">Wed 27 Jun 2007</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/03/16/xkcd-on-dreams/">xkcd on Dreams</a> <span class="related-post-date timestamp">Mon 16 Mar 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2008/08/17/pedantor/">Pedantor</a> <span class="related-post-date timestamp">Sun 17 Aug 2008</span></li><li class="related-post"><a href="http://tadhg.com/wp/2008/07/13/who-needs-perspective/">Who Needs Perspective?</a> <span class="related-post-date timestamp">Sun 13 Jul 2008</span></li><li class="related-post"><a href="http://tadhg.com/wp/2008/04/01/powers-is-addictive/"><em>Powers</em> is Addictive</a> <span class="related-post-date timestamp">Tue 01 Apr 2008</span></li><li class="related-post"><a href="http://tadhg.com/wp/2007/11/23/huckchuckfacts/">HuckChuckFacts</a> <span class="related-post-date timestamp">Fri 23 Nov 2007</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><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/02/15/the-unfeasibly-tall-gbbmcsmb/">The Unfeasibly Tall GBBMCSMB</a> <span class="related-post-date timestamp">Mon 15 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/02/12/salsa-the-serve-looks-like-salsa/">“Salsa, the serve looks like salsa”</a> <span class="related-post-date timestamp">Fri 12 Feb 2010</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/03/01/a-good-work-ethic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kate Harding Talks Sense on “Hook-up Culture”</title>
		<link>http://tadhg.com/wp/2010/02/28/kate-harding-talks-sense-on-hook-up-culture/</link>
		<comments>http://tadhg.com/wp/2010/02/28/kate-harding-talks-sense-on-hook-up-culture/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 07:55:30 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[culture]]></category>
		<category><![CDATA[feminism]]></category>
		<category><![CDATA[gender]]></category>
		<category><![CDATA[sex]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2721</guid>
		<description><![CDATA[Articles bewailing “these kids today” (or especially “these girls today”) seem disturbingly frequent at the moment, and it’s not clear to me whether there’s a real problem of some kind or it’s just pundits waxing wroth about the next generation Doing It All Wrong. I suspect it’s both: the sexual culture out there is problematic, [...]]]></description>
			<content:encoded><![CDATA[<p>Articles bewailing “these kids today” (or especially “these girls today”) seem disturbingly frequent at the moment, and it’s not clear to me whether there’s a real problem of some kind or it’s just pundits waxing wroth about the next generation Doing It All Wrong. I suspect it’s both: the sexual culture out there is problematic, although not necessarily for the reasons you hear about, and most of the pundits are really talking not to the next generation but to the next generation’s parents. <a href="http://www.rachelsimmons.com/2010/02/why-the-hook-up-culture-is-hurting-girls/" title="Is Hooking Up Good for Girls?" >This article by Rachel Simmons</a> is an earnest but fairly typical example; <a href="http://www.salon.com/mwt/broadsheet/feature/2010/02/26/hook_up_culture/index.html" title="“Hook-up culture’s” bad rap" >this response by Kate Harding</a> is worth reading. I don’t think Harding says anything revolutionary—she just says a lot of things that seem like common sense to me but which often get lost in the noise.</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/culture/" rel="tag">culture</a>, <a href="http://tadhg.com/wp/tag/feminism/" rel="tag">feminism</a>, <a href="http://tadhg.com/wp/tag/gender/" rel="tag">gender</a>, <a href="http://tadhg.com/wp/tag/sex/" rel="tag">sex</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/18/rape-and-compulsive-heterosexuality/">Rape and “Compulsive Heterosexuality”</a> <span class="related-post-date timestamp">Mon 18 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/12/03/bullying-just-a-hunch/">Bullying: Just a Hunch</a> <span class="related-post-date timestamp">Thu 03 Dec 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/02/01/confidence-status-and-women-undermining-women/">Confidence, Status, and Women Undermining Women</a> <span class="related-post-date timestamp">Mon 01 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/08/13/because-possessions-don%e2%80%99t-really-need-names/">Because Possessions Don’t Really Need Names</a> <span class="related-post-date timestamp">Thu 13 Aug 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2008/08/03/oh-thats-okay-then/">Oh, That's Okay Then</a> <span class="related-post-date timestamp">Sun 03 Aug 2008</span></li><li class="related-post"><a href="http://tadhg.com/wp/2008/04/18/female-cyclists-more-at-risk/">Female Cyclists More At Risk?</a> <span class="related-post-date timestamp">Fri 18 Apr 2008</span></li><li class="related-post"><a href="http://tadhg.com/wp/2008/02/25/an-80s-feminist-icon/">An 80s Feminist Icon</a> <span class="related-post-date timestamp">Mon 25 Feb 2008</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/15/geek-conversational-behavior/">Geek Conversational Behavior</a> <span class="related-post-date timestamp">Mon 15 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/14/womens-tennis-should-be-best-of-five/">Women’s Tennis Should be Best-of-Five</a> <span class="related-post-date timestamp">Sun 14 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/02/19/evan-mathers-films/">Evan Mather’s Films</a> <span class="related-post-date timestamp">Fri 19 Feb 2010</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/02/28/kate-harding-talks-sense-on-hook-up-culture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Future of Tabletop Games? D&amp;D on the Microsoft Surface</title>
		<link>http://tadhg.com/wp/2010/02/26/the-future-of-tabletop-games-dd-on-the-microsoft-surface/</link>
		<comments>http://tadhg.com/wp/2010/02/26/the-future-of-tabletop-games-dd-on-the-microsoft-surface/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 02:15:35 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[entertainment]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[roleplaying]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2717</guid>
		<description><![CDATA[Microsoft Surface is an advanced touchscreen display built into a table, backed by a fairly advanced suite of software for gesture recognition. I hadn’t seen many compelling uses for this technology&#8230; until SurfaceScapes, a group at the Carnegie-Mellon Entertainment Technology Center, released demos of Surfaces customized to hangle playing miniature-based D&#38;D on them.

I strongly recommend [...]]]></description>
			<content:encoded><![CDATA[<p><a class="reference external" href="http://en.wikipedia.org/wiki/Microsoft_Surface">Microsoft Surface</a> is an advanced touchscreen display built into a table, backed by a fairly advanced suite of software for gesture recognition. I hadn’t seen many compelling uses for this technology&#8230; until <a class="reference external" href="http://www.etc.cmu.edu/projects/surfacescapes/">SurfaceScapes</a>, a group at the <a class="reference external" href="http://en.wikipedia.org/wiki/Entertainment_Technology_Center">Carnegie-Mellon Entertainment Technology Center</a>, released demos of Surfaces customized to hangle playing miniature-based <cite>D&amp;D</cite> on them.<br />
<span id="more-2717"></span><br />
I strongly recommend watching the video of the demos, and reading the commentary and an interview with the project lead:</p>
<ul>
<li><a class="reference external" href="http://blogs.msdn.com/surface/archive/2009/10/19/dungeons-dragons-done-right-on-microsoft-surface.aspx">“Dungeons &amp; Dragons done right on Microsoft Surface”</a>.
</li>
<li><a class="reference external" href="http://blogs.msdn.com/surface/archive/2009/12/08/bringing-d-d-to-microsoft-surface.aspx">“SurfaceScapes Follow-up: Bringing D&amp;D to Microsoft Surface”</a>.
</li>
<li><a class="reference external" href="http://blogs.msdn.com/surface/archive/2009/12/16/new-gameplay-video-with-d-d-on-surface.aspx">“New gameplay video with D&amp;D on Surface”</a>.
</li>
</ul>
<p>Some of it is quite clumsy, but the potential is clearly there. And looks amazing. While this could definitely aid the playing of <cite>D&amp;D</cite>, there are many games that could benefit from this kind of treatment. Specifically, any games that benefit both from having people physically present and that would also benefit from computation and helpful interfaces (yes, I’m looking at you, <cite>Twilight Imperium</cite>) could get a huge boost from this technology.</p>
<p>It’s a long way away from being available or affordable, and probably a long way from being easily modifiable, too. But we don’t seem to be that far from having commonplace enhanced tabletop games. In the meantime, for roleplaying games there’s the <a class="reference external" href="http://www.rptools.net/">RPTools</a> suite—a suite which may well eventually be a big part of an open source tabletop gaming toolset.</p>
<p>Tags: <a href="http://tadhg.com/wp/tag/entertainment/" rel="tag">entertainment</a>, <a href="http://tadhg.com/wp/tag/games/" rel="tag">games</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/tech/" rel="tag">tech</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/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/2009/02/26/ai-and-games/">AI and Games</a> <span class="related-post-date timestamp">Thu 26 Feb 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><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/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/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/22/the-perfect-is-the-enemy-of-the-good-duke-nukem-forever/">The Perfect is the Enemy of the Good: <cite>Duke Nukem Forever</cite></a> <span class="related-post-date timestamp">Tue 22 Dec 2009</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/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/02/26/the-future-of-tabletop-games-dd-on-the-microsoft-surface/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A Little More Functional Programming</title>
		<link>http://tadhg.com/wp/2010/02/25/a-little-more-functional-programming/</link>
		<comments>http://tadhg.com/wp/2010/02/25/a-little-more-functional-programming/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 07:55:51 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2712</guid>
		<description><![CDATA[After reading Dhananjay Nene’s comment on my post about a functional style approach to the “find longest repeater” problem, I decided to follow the line from that comment and divide the program into functions for finding the longest contiguous block and then for comparing the blocks. Naturally, I wanted to do this without using any [...]]]></description>
			<content:encoded><![CDATA[<p>After reading <a class="reference external" href="http://tadhg.com/wp/2010/02/23/minor-foray-into-functional-programming/#comment-19788">Dhananjay Nene’s comment</a> on my <a class="reference external" href="http://tadhg.com/wp/2010/02/23/minor-foray-into-functional-programming/">post about a functional style approach to the “find longest repeater” problem</a>, I decided to follow the line from that comment and divide the program into functions for finding the longest contiguous block and then for comparing the blocks. Naturally, I wanted to do this without using any variables&#8230;<br />
<span id="more-2712"></span><br />
It wasn’t too hard to write a variable-free function to return a list of blocks of letters from a string, e.g. <tt class="docutils literal"><span class="pre">continuous_blocks(&quot;anna&quot;)</span></tt> produces <tt class="docutils literal"><span class="pre">[&quot;a&quot;,</span> <span class="pre">&quot;nn&quot;,</span> <span class="pre">&quot;a&quot;]</span></tt>:</p>
<pre class="python literal-block">
def contiguous_blocks(string):
    def listbuilder(blocks, char, rest):
        if not rest:
            return add_to_blocks(char, blocks)
        return listbuilder(add_to_blocks(char, blocks), rest[0], rest[1:])

    def add_to_blocks(char, blocks):
        if blocks and char in blocks[-1]:
            return blocks[:-1] + [&quot;&quot;.join([blocks[-1], char])]
        return blocks+[char]

    return listbuilder([], string[0], string[1:])
</pre>
<p>And then <tt class="docutils literal"><span class="pre">findlongestrepeater</span></tt> becomes:</p>
<pre class="python literal-block">
def findlongestrepeater(string):
    def compare_blocks(previous, current):
        return current if len(current)&gt;len(previous) else previous

    return reduce(compare_blocks, contiguous_blocks(string))
</pre>
<p>Note that this approach provides a clear use for <tt class="docutils literal"><span class="pre">reduce</span></tt>, which is <a href="http://www.artima.com/weblogs/viewpost.jsp?thread=98196" title="The fate of reduce() in Python 3000" >on the outs in Python these days</a>.</p>
<p>A crucial difference between <a class="reference external" href="http://tadhg.com/wp/2010/02/23/minor-foray-into-functional-programming/#comment-19788">Dhananjay Nene’s version</a> and mine, however, is that mine returns a list and not a generator. So I decided to write a variable-free generator version&#8230; and just couldn’t do it. I don’t know what it was, but I kept getting hung up on trying to track the previous, current, and next characters, and to do that without variables while trying to skip at the right times in the for loop just seemed impossible. While writing this blog post, however, I figured it out. I had intended to put it up as a puzzle for other people, so I guess I’ll put my solution at the end. If you plan to try it, don’t scroll beyond the warning below.</p>
<p>There’s an easier way, too, which is simply to do this:</p>
<pre class="python literal-block">
def contiguous_blocks(string):
    from itertools import groupby
    for k,g in groupby(string):
        yield u&quot;&quot;.join(list(g))
</pre>
<p>I found that last night after being unable to bend my mind in the right way, because I was sure that this problem couldn’t be so rare that itertools wouldn’t have something to handle it.</p>
<p>However, I felt like that was cheating&#8230; so I kept trying to build my own variable-free generator.</p>
<p>Because of the fact that <tt class="docutils literal"><span class="pre">reduce</span></tt> isn’t going to be in Python 3, I decided I’d write a version of it that would work as its replacement for this problem. It didn’t seem too hard to come up with this:</p>
<pre class="python literal-block">
def reducereplacement(func, generator):
    def runfunc(product, gen):
        try:
            return runfunc(func(product, gen.next()), gen)
        except StopIteration:
            return product

    return runfunc([], generator)
</pre>
<p>This only works with generators and not with lists, unlike the real <tt class="docutils literal"><span class="pre">reduce</span></tt>. There’s no reason to use this, either, given that <tt class="docutils literal"><span class="pre">reduce</span></tt> is in Python 2 and will be in the <tt class="docutils literal"><span class="pre">functools</span></tt> module for Python 3; I just wanted to try it as an experiment.</p>
<p>So, to restate the puzzle problem:</p>
<p>Write a version of <tt class="docutils literal"><span class="pre">contiguous_blocks</span></tt> that is functionally equivalent to the version above using <tt class="docutils literal"><span class="pre">itertools.groupby</span></tt>, without using the assignment operator anyhere, or anything from a module. This is a puzzle I found impossible last night but reasonably easy today. Like a lot of puzzles, looking at it in a slightly different way can make all the difference—advice which is often maddeningly useless while you’re trying to solve something.</p>
<p>The function, plus the version of <tt class="docutils literal"><span class="pre">findlongestrepeater</span></tt> I have above, should pass the following tests:</p>
<pre class="python literal-block">
def test_contiguous_blocks():
    testgen = contiguous_blocks(&quot;googlee&quot;)
    assert testgen.next() == &quot;g&quot;
    assert testgen.next() == &quot;oo&quot;
    assert testgen.next() == &quot;g&quot;
    assert testgen.next() == &quot;l&quot;
    assert testgen.next() == &quot;ee&quot;
    assert [c for c in contiguous_blocks(&quot;google&quot;)] == [&quot;g&quot;, &quot;oo&quot;, &quot;g&quot;, &quot;l&quot;, &quot;e&quot;]
    assert [c for c in contiguous_blocks(&quot;googlee&quot;)] == [
        &quot;g&quot;, &quot;oo&quot;, &quot;g&quot;, &quot;l&quot;, &quot;ee&quot;]

def test_findlongestrepeater():
    assert findlongestrepeater(&quot;google&quot;) == &quot;oo&quot;
    assert findlongestrepeater(&quot;gooooogle&quot;) == &quot;ooooo&quot;
    assert findlongestrepeater(&quot;eeffi&quot;) == &quot;ee&quot;
    assert findlongestrepeater(&quot;abcdef&quot;) == &quot;a&quot;
    assert findlongestrepeater(&quot;eeffeeeffeeeee&quot;) == &quot;eeeee&quot;
</pre>
<h4>WARNING, SOLUTION</h4>
<p>Don’t read past here if you want to solve it yourself, obviously.</p>
<hr class="docutils" />
The key insight that helped me get it (which seems utterly obvious now, of course) is that you’re not limited to the current and next (and/or previous) characters. I’d been approaching it with logic like this:</p>
<ul>
<li>Check the character to see if it’s different from the next character.
<ul>
<li>If it is, return it.
</li>
<li>If it isn’t, pass.
</li>
</ul>
</li>
<li>But also (somehow) store it so that you know what the current sequence of repeated characters is, and when you next return something, return that sequence instead of just the current character.
</li>
</ul>
<p>I couldn’t figure out how to make that work, and it may be impossible to get Python to do that without using variables (although maybe I just missed the trick).</p>
<p>However, that wasn’t the right way to look at it. With access to the index of the current character, you can get not only the next character, but also string up to that point. That was the realization: the logic should be as follows:</p>
<ul>
<li>Check the character to see if it’s different from the next character.
<ul>
<li>If it isn’t, pass.
</li>
<li>If it is, return all the characters in the string up to that point that are the same as the character.
</li>
</ul>
</li>
</ul>
<p>As I said, that seems awfully obvious now&#8230;</p>
<p>This is the solution I came up with:</p>
<pre class="python literal-block">
def contiguous_blocks(string):
    def inarow(row, string):
        if not string or row[0] != string[0]:
            return row
        return inarow(u&quot;&quot;.join([row, string[0]]), string[1:])

    for i,c in enumerate(string):
        if i &gt;= (len(string) -1) or c != string[i+1]:
            yield inarow(c, string[:i][::-1])
</pre>
<p>So, if the character is different from the next one, or you’ve run out of string, yield the result of passing the character and the (reversed) string up to that point to <tt class="docutils literal"><span class="pre">inarow</span></tt>. Otherwise, if the character is the same as the next character—do nothing.</p>
<p><tt class="docutils literal"><span class="pre">inarow</span></tt> doesn’t have to track anything but the characters until a different character shows up or you run out of string, so it returns what it has at that point if either of those happen, otherwise it calls itself with a new row of characters (the current one tacked onto the end) and the rest of the string.</p>
<p>The combination of <tt class="docutils literal"><span class="pre">find_longest_repeater</span></tt> and <tt class="docutils literal"><span class="pre">contiguous_blocks</span></tt> seems like a fairly elegant solution. Not only does it come in at two lines shorter than my version from Tuesday, but it also has the benefit of being more neatly divided in logical terms. (Which is something I wouldn’t have seen without the suggestion that the determination of contiguous blocks could be a discrete function.)</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></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/23/minor-foray-into-functional-programming/">Minor Foray into Functional Programming</a> <span class="related-post-date timestamp">Tue 23 Feb 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/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/02/04/the-python-challenge/">The Python Challenge</a> <span class="related-post-date timestamp">Thu 04 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/15/code-katas/">Code Katas</a> <span class="related-post-date timestamp">Fri 15 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/08/python-coding-exercise-nested-dictionaries/">Python Coding Exercise: Nested Dictionaries</a> <span class="related-post-date timestamp">Fri 08 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/05/python-optimization-tips/">Python Optimization Tips</a> <span class="related-post-date timestamp">Tue 05 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/12/21/some-python-tips-and-tricks/">Some Python Tips and Tricks</a> <span class="related-post-date timestamp">Mon 21 Dec 2009</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/02/25/a-little-more-functional-programming/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Minor Foray into Functional Programming</title>
		<link>http://tadhg.com/wp/2010/02/23/minor-foray-into-functional-programming/</link>
		<comments>http://tadhg.com/wp/2010/02/23/minor-foray-into-functional-programming/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 23:56:05 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2709</guid>
		<description><![CDATA[Last night a friend asked me what functional programming was, and as part of my answer I decided to rewrite a trivial program in the functional style to see what it was like. I did this in Python without using the functional module.

The program finds the longest sequence of repeated characters in a string; if [...]]]></description>
			<content:encoded><![CDATA[<p>Last night a friend asked me what <a class="reference external" href="http://en.wikipedia.org/wiki/Functional_programming">functional programming</a> was, and as part of my answer I decided to rewrite a trivial program in the functional style to see what it was like. I did this in Python without using the <tt class="docutils literal"><span class="pre">functional</span></tt> module.<br />
<span id="more-2709"></span><br />
The program finds the longest sequence of repeated characters in a string; if there’s a tie, it returns the first sequence of that length. My (<a class="reference external" href="http://en.wikipedia.org/wiki/Imperative_programming">imperative</a>) version was six lines of Python:</p>
<pre class="python literal-block">
def findlongestrepeater(string):
    longest, curr = &quot;&quot;, &quot;&quot;
    for c in string:
        curr = &quot;&quot;.join([curr, c]) if c in curr else c
        longest = curr if len(curr) &gt; len(longest) else longest
    return longest
</pre>
<p>There are doubtless better ways to do it, but this is relatively succinct and clear. I can’t say the same about the functional version I came up with.</p>
<p>With my attempt at this example, “functional programming” basically meant “not using the assignment operator”.</p>
<p>I couldn’t see any way to do it without recursion, and it came out looking like a recursive decision tree:</p>
<pre class="python literal-block">
def findlongestrepeater(string):
    def flr(lr, curseq, s):
        return lr if len(s) == 0 else character_match(lr, curseq, s)

    def character_match(lr, curseq, s):
        if s[0] == curseq[0]:
            return sequence_length(lr, u&quot;&quot;.join([s[0],curseq]), s)
        else:
            return flr(lr, s[0], s[1:])

    def sequence_length(lr, newseq, s):
        if len(newseq) &gt; len(lr):
            return flr(newseq, newseq, s[1:])
        else:
            return flr(lr, newseq, s[1:])

    return flr(string[0], string[0], string[1:])
</pre>
<p><tt class="docutils literal"><span class="pre">flr</span></tt> takes arguments of the longest repeating sequence found so far, the current sequence, and the rest of the string. We kick it off by passing it the first character as the first two arguments, and then the rest of the string after the first character.</p>
<p>If the rest of string has a length of zero, we’ve reached the end of the string and <tt class="docutils literal"><span class="pre">flr</span></tt> returns the longest repeating sequence it was passed.</p>
<p>Otherwise, it calls <tt class="docutils literal"><span class="pre">character_match</span></tt>, which checks whether or not the current sequence matches the first character in the string. If not, it goes back to <tt class="docutils literal"><span class="pre">flr</span></tt> passing in the next character and the rest of the string; if so, it goes on to <tt class="docutils literal"><span class="pre">sequence_length</span></tt> passing in the longest repeater, the new sequence (which is the first character in the string plus the current sequence), and the string. <tt class="docutils literal"><span class="pre">sequence_length</span></tt> will then call <tt class="docutils literal"><span class="pre">flr</span></tt> with either the new sequence as the longest repeater, or the current longest repeater as the longest repeater.</p>
<p>It was pretty hard for me to approach the problem this way. It took me about forty minutes to get a working version, and another fifteen to clean it up (the first version was big jumble of conditionals). It’s also much harder to troubleshoot than the imperative version, at least for me. Recursion isn’t that hard to handle, but I really wanted to use variables just to make things clearer—for example, in <tt class="docutils literal"><span class="pre">character_match</span></tt>, I really want to replace <tt class="docutils literal"><span class="pre">u&quot;&quot;.join([s[0],curseq])</span></tt> with <tt class="docutils literal"><span class="pre">newseq</span> <span class="pre">=</span> <span class="pre">u&quot;&quot;.join([s[0],curseq])</span></tt> and then call <tt class="docutils literal"><span class="pre">sequence_length</span></tt> with <tt class="docutils literal"><span class="pre">newseq</span></tt> as the second argument, purely to make what’s going on more explicit.</p>
<p>It was definitely an interesting experiment, and in future I might try some exercises where I have to take functions and rewrite them without using assignment. I’m sure there are cases where this makes sense; I’m also sure that the above script would be a lot easier to deal with in a proper functional language (or perhaps using the <tt class="docutils literal"><span class="pre">functional</span></tt> module).</p>
<p>After doing that last night, this morning I came across an <a href="http://blog.dhananjaynene.com/2010/02/functional-programming-with-python-part-1/" title="Functional Programming with Python – Part 1" >introduction to functional programming with Python</a>.</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></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/25/a-little-more-functional-programming/">A Little More Functional Programming</a> <span class="related-post-date timestamp">Thu 25 Feb 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/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/02/04/the-python-challenge/">The Python Challenge</a> <span class="related-post-date timestamp">Thu 04 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/15/code-katas/">Code Katas</a> <span class="related-post-date timestamp">Fri 15 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/08/python-coding-exercise-nested-dictionaries/">Python Coding Exercise: Nested Dictionaries</a> <span class="related-post-date timestamp">Fri 08 Jan 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/05/python-optimization-tips/">Python Optimization Tips</a> <span class="related-post-date timestamp">Tue 05 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/12/21/some-python-tips-and-tricks/">Some Python Tips and Tricks</a> <span class="related-post-date timestamp">Mon 21 Dec 2009</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/02/23/minor-foray-into-functional-programming/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>:imap jj &lt;Esc&gt; and :Bclose in Vim</title>
		<link>http://tadhg.com/wp/2010/02/22/imap-jj-esc-and-bclose-in-vim/</link>
		<comments>http://tadhg.com/wp/2010/02/22/imap-jj-esc-and-bclose-in-vim/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 21:24:12 +0000</pubDate>
		<dc:creator>Tadhg</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[text editing]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://tadhg.com/wp/?p=2706</guid>
		<description><![CDATA[I remain rather happy with Vim, and it’s already been worth the effort of switching over to it. I’ve encountered some annoyances along the way; here are a couple of them and some solutions.
The first is that I quickly found myself wanting to exit Insert mode very frequently and not liking the stretch from my [...]]]></description>
			<content:encoded><![CDATA[<p>I remain rather happy with Vim, and it’s already been worth the effort of switching over to it. I’ve encountered some annoyances along the way; here are a couple of them and some solutions.</p>
<p>The first is that I quickly found myself wanting to exit Insert mode very frequently and not liking the stretch from my typical hand position to the <tt class="docutils literal"><span class="pre">Esc</span></tt> key. I know that <a href="http://niallohiggins.com/" title="Niall’s Weblog" >some people</a> insist that the only way to deal with this is to remap <tt class="docutils literal"><span class="pre">CapsLock</span></tt> to <tt class="docutils literal"><span class="pre">Esc</span></tt>, while <a href="http://at.araxia.net/blog/seth/" title="Seth Milliken: Words, Thoughts, Tech" >others</a> remap <tt class="docutils literal"><span class="pre">CapsLock</span></tt> to <tt class="docutils literal"><span class="pre">Ctrl</span></tt> and use <tt class="docutils literal"><span class="pre">Ctrl-C</span></tt> instead of <tt class="docutils literal"><span class="pre">Esc</span></tt> to get to Normal mode. Neither of these approaches appealed to me. Seth reminded me about another approach, one I thought would be too awkward: mapping <tt class="docutils literal"><span class="pre">jj</span></tt> to <tt class="docutils literal"><span class="pre">Esc</span></tt> within Vim.<br />
<span id="more-2706"></span><br />
I’d originally rejected that because it simply seemed wrong to have normal characters screw around with modes while in Insert mode—that’s what modifier keys are for! On the other hand, I don’t type “jj” too often<a class="footnote-reference" href="#id2" id="id1">[1]</a> and so it seemed worth trying, especially since I wasn’t set into any of the other Vim habits yet.</p>
<p>It works extremely well. Being able to get out of Insert mode without moving my fingers off the home row is extremely smooth and fast, and I’ve found that after a very short period I was used to it and exiting Insert mode more fluently. Very occasionally I notice the delay when I’m typing something with a “j” in it, but that’s pretty minor, and sometimes I forget and still hit <tt class="docutils literal"><span class="pre">Esc</span></tt>, but I think that’ll go away. The only other problem I see is trying to use “jj” in other modes, like Ex mode, and expecting it to work as <tt class="docutils literal"><span class="pre">Esc</span></tt>, but I suspect that won’t be a major problem. So if you aren’t completely set in your Vim editing habits, or you’re having problems with your current setup for some reason, I highly recommend trying <tt class="docutils literal"><span class="pre">:imap</span> <span class="pre">jj</span> <span class="pre">&lt;Esc&gt;</span></tt> out despite its seeming wrongness.</p>
<p>Another annoyance I encountered was that closing a buffer would also close the window it was in, and I often want to keep the window setup (usually a split) that I have. I got around this first by using the <a class="reference external" href="http://www.vim.org/scripts/script.php?script_id=42">BufExplorer</a> plugin to close files, which is definitely useful, but then I discovered that someone wrote a script to do exactly what I wanted: <a class="reference external" href="http://vim.wikia.com/wiki/Deleting_a_buffer_without_closing_the_window">:Bclose</a>. It’s worked fine so far, and if you’ve also been annoyed by that behavior I recommend trying it out.</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>The only even vaguely plausible reason to do so I came up with was the MTG card <a class="reference external" href="http://gatherer.wizards.com/Pages/Card/Details.aspx?printed=true&amp;multiverseid=915">El-Hajjâj</a>.</p>
</td>
</tr>
</tbody>
</table>
<p>Tags: <a href="http://tadhg.com/wp/tag/software/" rel="tag">software</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></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/12/using-vim-with-thunderbird/">Using Vim with Thunderbird</a> <span class="related-post-date timestamp">Fri 12 Mar 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/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/03/04/vim-the-killer-instinct-of-text-editors/">Vim: the <cite>Killer Instinct</cite> of Text Editors</a> <span class="related-post-date timestamp">Thu 04 Mar 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2009/08/09/time-to-try-vim/">Time to Try Vim</a> <span class="related-post-date timestamp">Sun 09 Aug 2009</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/03/09/trying-d-cubed-for-task-management/">Trying d-cubed for Task Management</a> <span class="related-post-date timestamp">Tue 09 Mar 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/02/26/the-future-of-tabletop-games-dd-on-the-microsoft-surface/">The Future of Tabletop Games? <cite>D&amp;D</cite> on the Microsoft Surface</a> <span class="related-post-date timestamp">Fri 26 Feb 2010</span></li><li class="related-post"><a href="http://tadhg.com/wp/2010/01/15/code-katas/">Code Katas</a> <span class="related-post-date timestamp">Fri 15 Jan 2010</span></li></ul>]]></content:encoded>
			<wfw:commentRss>http://tadhg.com/wp/2010/02/22/imap-jj-esc-and-bclose-in-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
