<?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>Preston L. Bannister  { random memes }</title>
	<atom:link href="http://bannister.us/weblog/feed/" rel="self" type="application/rss+xml" />
	<link>http://bannister.us/weblog</link>
	<description>A personal viewpoint about software, the web, and anything else of note.</description>
	<lastBuildDate>Mon, 08 Mar 2010 09:44:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Magnetic propulsion?</title>
		<link>http://bannister.us/weblog/2010/03/08/magnetic-propulsion/</link>
		<comments>http://bannister.us/weblog/2010/03/08/magnetic-propulsion/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 09:44:16 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1749</guid>
		<description><![CDATA[Airplanes have always always been an interest, since I was a kid (though theoretic, not actual).
Simple basic facts about aeroplanes: long thin wings tend to more efficient (aerodynamically, not structurally) than wider/thicker/shorter wings. For much the same reason &#8211; propellers are more efficient than jets. Ducted fans are less efficient than propellers, but more efficient [...]]]></description>
			<content:encoded><![CDATA[<p>Airplanes have always always been an interest, since I was a kid (though theoretic, not actual).</p>
<p>Simple basic facts about aeroplanes: long thin wings tend to more efficient (aerodynamically, not structurally) than wider/thicker/shorter wings. For much the same reason &#8211; propellers are more efficient than jets. Ducted fans are less efficient than propellers, but more efficient than pure-jet engines. Turbofan engines are basically ducted fan turboprops. Gains in jet efficiency over than past few decades are in part due to higher bypass turbofans (basically moving from pure jets closer to propellers).  </p>
<p>Even propellers are not ideal. Swirling a couple curved sticks of metal through the airstream at high speeds is going to chew up energy without adding to propulsion. Many-bladed turbofans chewing through the airstream have got to be worse. Lots of energy wasted &#8211; could there be a more efficient way? Nothing especially obvious &#8230; or something better would be in practice.</p>
<p>Ideally we would like a way to throw back the bulk of an airstream without lots of extraneous physical churning. The only certain way we know is to use propellers &#8211; like oars in water. Could there be another way?</p>
<p>There is a well-known phenomena in Physics known as <a href="http://physics.kenyon.edu/EarlyApparatus/Static_Electricity/Electric_Wind/Electric_Wind.html">&#8220;electric wind&#8221;</a>, that moves air without physical contact, but is by no measure efficient. Is there any way this could be used?</p>
<p>Is there any way to efficiently push an airstream without physical contact?</p>
<p>The &#8220;electric wind&#8221; is a stream of charged particles. A magnetic field deflects an charged particle moving through. The deflection exerts a force on the magnet (assuming the force is not sufficient to capture the charge). Movement against that force consumes energy. That energy presumably could accelerate the charged particles. </p>
<p>The mean free path of a charged particle at normal atmospheric pressures is short. Any accelerated ion would give up about half it&#8217;s energy at each collision. Short mean free paths mean many collisions. The net result would be (presumably) to accelerate a bulk of the airstream. Maybe.</p>
<p>Magnetic fields deflect charged particles. Strong magnets rotating on opposite directions could deflect and accelerate, then re-deflect and further accelerate charged particles &#8211; maybe. Would the result be significant? Would the result be efficient? I have no idea.</p>
<p>This might be an approach only possible if the &#8220;controller&#8221; is sufficiently smart, and with quite intense magnets (superconducting?). Matching the acceleration and deflection of charged particles through alternating magnetic fields through changing atmospheric conditions may not be possible with simpler control.</p>
<p>Is a &#8220;magnetic propeller&#8221; is practical possibility?</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2010/03/08/magnetic-propulsion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using GMail for mailto: links in Ubuntu</title>
		<link>http://bannister.us/weblog/2010/03/04/using-gmail-for-mailto-links-in-ubuntu/</link>
		<comments>http://bannister.us/weblog/2010/03/04/using-gmail-for-mailto-links-in-ubuntu/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 02:02:49 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1745</guid>
		<description><![CDATA[Create the file $HOME/bin/mailto with the contents: 

#!/bin/sh
gnome-open "https://mail.google.com/mail?extsrc=mailto&#038;url=$*"

Make the file executable.
On Ubuntu Linux (using the Gnome desktop), go to:
System > Preferences > Preferred Applications
Under Internet / Mail Reader select &#8220;Custom&#8221; and enter the command:
/home/preston/bin/mailto %s
(Replace &#8220;/home/preston&#8221; with your $HOME.)
This should open GMail in your default web browser, composing a new message, with the recipient [...]]]></description>
			<content:encoded><![CDATA[<p>Create the file <b>$HOME/bin/mailto</b> with the contents: </p>
<pre>
#!/bin/sh
gnome-open "https://mail.google.com/mail?extsrc=mailto&#038;url=$*"
</pre>
<p>Make the file executable.</p>
<p>On Ubuntu Linux (using the Gnome desktop), go to:</p>
<pre>System > Preferences > Preferred Applications</pre>
<p>Under Internet / Mail Reader select &#8220;Custom&#8221; and enter the command:</p>
<pre>/home/preston/bin/mailto %s</pre>
<p>(Replace &#8220;/home/preston&#8221; with your $HOME.)</p>
<p>This should open GMail in your default web browser, composing a new message, with the recipient set.</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2010/03/04/using-gmail-for-mailto-links-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Between Marketing and Engineering</title>
		<link>http://bannister.us/weblog/2010/02/24/between-marketing-and-engineering/</link>
		<comments>http://bannister.us/weblog/2010/02/24/between-marketing-and-engineering/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 21:00:02 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Humor]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1740</guid>
		<description><![CDATA[Brought up a command window in Windows 7, and saw:

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

Yep. Windows 7 is in fact Windows version 6. Gotta love those Marketing folk.
]]></description>
			<content:encoded><![CDATA[<p>Brought up a command window in Windows 7, and saw:
<pre>
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
</pre>
<p>Yep. Windows 7 is in fact Windows version 6. Gotta love those Marketing folk.</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2010/02/24/between-marketing-and-engineering/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multiplexed FastCGI connections?</title>
		<link>http://bannister.us/weblog/2010/01/31/multiplexed-fastcgi-connections/</link>
		<comments>http://bannister.us/weblog/2010/01/31/multiplexed-fastcgi-connections/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 20:22:16 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1736</guid>
		<description><![CDATA[Does anyone use FastCGI with FCGI_MPXS_CONNS set to &#8220;1&#8243; (for multiplexed connections)?
Most FastCGI backends seems to be written for non-multiplexed connections. (Much simpler, so understandable.) The IIS FastCGI connector apparently does not support multiplexed connections. 
Writing a FastCGI backend that allows for multiplexed connections. Would be a waste of time  if not supported by [...]]]></description>
			<content:encoded><![CDATA[<p>Does anyone use FastCGI with <a href="http://www.fastcgi.com/devkit/doc/fcgi-spec.html#S4.1">FCGI_MPXS_CONNS</a> set to &#8220;1&#8243; (for multiplexed connections)?</p>
<p>Most FastCGI backends seems to be written for non-multiplexed connections. (Much simpler, so understandable.) The IIS FastCGI connector apparently <a href="https://forums.iis.net/p/1154348/1890231.aspx#1890231">does not support multiplexed connections</a>. </p>
<p>Writing a FastCGI backend that allows for multiplexed connections. Would be a waste of time  if not supported by a frontend, or if existing frontends are buggy.</p>
<p>(Not really expecting a response, but have to state the question.)</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2010/01/31/multiplexed-fastcgi-connections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Giving up HTML@W3C</title>
		<link>http://bannister.us/weblog/2010/01/17/giving-up-htmlw3c/</link>
		<comments>http://bannister.us/weblog/2010/01/17/giving-up-htmlw3c/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 06:00:46 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[html@w3c]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1729</guid>
		<description><![CDATA[Got the &#8220;status as Invited Expert in HTML Working Group&#8221; email. This I will let expire. Spent my time tilting at windmills, and do not see any point in continuing.
The HTML Working Group at W3C is &#8230; far too much noise. The HTML5 &#8220;standard&#8221; is going to be a bloated monster, and there is no [...]]]></description>
			<content:encoded><![CDATA[<p>Got the &#8220;status as Invited Expert in HTML Working Group&#8221; email. This I will let expire. Spent my time tilting at windmills, and do not see any point in continuing.</p>
<p>The HTML Working Group at W3C is &#8230; far too much noise. The HTML5 &#8220;standard&#8221; is going to be a bloated monster, and there is no chance I can change that. Time to stop the pretense of trying.</p>
<p>Not that all the work is bad, or that there is any shortage of well-intentioned folk. What the group lacks is any sense of minimalism, and enough strong voices able to say &#8220;no&#8221;. What we will get is going to be even harder to digest than HTML4. This is sad. Future developers are going to have an even harder time, for no good reason.</p>
<p>The wildcard here is that the mainstream browser implementations may not follow all the half-thought ideas thrown in by the HTML5 Working Group. No idea how this will work out.</p>
<p>At the core HTML is pretty damn simple &#8211; or could be. HTML4 got stuffed with a bunch of half-thought notions, most of which have since proved of no value, and were ignored by developers. Ideally we would learn from experience, omit the fuzzy disused bits, and trim HTML down to the useful core. There are well-known (though not universally known) means to achieve this aim. This is not going to happen.  </p>
<p>I cannot keep up with the herd of Energizer-bunnies eager to make their mark, and with too-limited experience.<br />
Time to stop pretending.</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2010/01/17/giving-up-htmlw3c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Efficient UTF-8 recoding and secure processing</title>
		<link>http://bannister.us/weblog/2010/01/16/efficient-utf-8-recoding-and-secure-processing/</link>
		<comments>http://bannister.us/weblog/2010/01/16/efficient-utf-8-recoding-and-secure-processing/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 21:20:20 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1717</guid>
		<description><![CDATA[An attempt to make a point&#8230;
The use of UTF-8 on the web is common and increasing. Lots of data comes in as UTF-8, and inefficiency in UTF-8 data handling is going to have pretty pervasive impact.
On the flip side, the creators of UTF-8 did a good job. There is nothing really complicated about the UTF-8 [...]]]></description>
			<content:encoded><![CDATA[<p>An attempt to make a point&#8230;</p>
<p>The use of <a href="http://en.wikipedia.org/wiki/UTF-8">UTF-8</a> on the web is common and increasing. Lots of data comes in as UTF-8, and inefficiency in UTF-8 data handling is going to have pretty pervasive impact.</p>
<p>On the flip side, the creators of UTF-8 did a good job. There is nothing really complicated about the UTF-8 format, and processing is simple. </p>
<p>So I was surprised (or rather shocked) to find <a href="http://bannister.us/weblog/2009/10/05/example-general-purpose-trie-in-java/">in an earlier experiment</a> that Java performed UTF-8 conversion slowly. In fact, I was able to write a faster UTF-8 decoder <b>in Java</b> than the stock decoder. This is just plain wrong. Conversion between encodings is a primitive/simple operation best written in C/C++ and run as native code (and this is the sort of processing where C/C++ is probably always going to be much faster than Java). </p>
<p>There is a problem in that malicious external parties can send oddly-encoded UTF-8, and bypass simple-minded malware detection software. Ordinary ASCII characters can coded as an alternate multi-byte sequences, and simple scanners miss the alternate encoding.</p>
<p>This is a problem. There is a simple solution. One of a set of <a href="http://bannister.us/weblog/2009/02/02/long-term-compatible-protocols/">principles</a> I adopted a long time ago is <a href="http://bannister.us/weblog/2008/03/21/convert-at-the-edges/">&#8220;convert at the edges&#8221;</a>. If you have data coming in from an untrusted source, then you perform conversion and validation at the &#8220;edge&#8221; where the data is first received.</p>
<p>In the case of UTF-8 coming from an untrusted source, to make all later processing simpler, you must <b>recode</b> to eliminate any alternate encodings. This is quite simple, as recoded UTF-8 will always be the same size or smaller, and so can be done in-place. The <a href="http://bannister.us/weblog/2010/01/12/utf8ucs-conversion-benchmark/">prior experiment</a> measured the cost of UTF-8 recoding. Looks like we can drive a 1-Gbit network link at full speed (with efficient code), while recoding the entire contents. Since UTF-8 data usually represents a smaller portion of traffic, and since other processing tends to take the larger part of the load, there is no reason to not perform recoding on any UTF-8 data coming from an untrusted source. </p>
<p>Combine &#8220;convert at the edges&#8221; with UTF-8 recoding, and we lose the basis for the requirement in <a href="http://www.apps.ietf.org/rfc/rfc3629.html">RFC 3629</a> for detection of &#8220;illegal&#8221; UTF-8 code sequences. In addition we allow all downstream processing to be simpler and more efficient &#8230; and we also can be tolerant of imperfect upstream software. (Yes, I am going to invoke <a href="http://bannister.us/weblog/2005/11/05/postel%e2%80%99s-law-liberal-in-what-you-accept-conservative-in-what-you-generate/">Postel</a>, again.)</p>
<p>The basis is good (secure processing with untrusted sources), but the requirement for detection of &#8220;illegal&#8221; sequences is not necessary and (most definitely!) not optimal. </p>
<p>Example of UTF-8 recoding (from <a href="http://svn.bannister.us/public//json-c/sources/String.cpp">String.cpp</a>).</p>
<pre>
void UTF8::String::recode() {
    // Iterate until all UTF8 characters are normalized.
    // UTF8 in canonical form can only be smaller, so work in-place.
    char* p1 = pBuffer;
    char* p2 = pBuffer;
    char* pEOS = pBuffer + nContent;
    while (p1 < pEOS) {
        int c = 255 &#038; *p1++;
        if (c < 0x80) {
            *p2++ = c;
            continue;
        }
        if (c < 0xE0) {
            c = (31 &#038; c) << 6;
            c |= 63 &#038; *p1++;
        } else if (c < 0xF0) {
            c = (15 &#038; c) << 12;
            c |= (63 &#038; *p1++) << 6;
            c |= 63 &#038; *p1++;
        } else if (c < 0xF8) {
            c = (7 &#038; c) << 18;
            c |= (63 &#038; *p1++) << 12;
            c |= (63 &#038; *p1++) << 6;
            c |= 63 &#038; *p1++;
        } else if (c < 0xFC) {
            c = (3 &#038; c) << 24;
            c |= (63 &#038; *p1++) << 18;
            c |= (63 &#038; *p1++) << 12;
            c |= (63 &#038; *p1++) << 6;
            c |= 63 &#038; *p1++;
        } else {
            c = (1 &#038; c) << 30;
            c |= (63 &#038; *p1++) << 24;
            c |= (63 &#038; *p1++) << 18;
            c |= (63 &#038; *p1++) << 12;
            c |= (63 &#038; *p1++) << 6;
            c |= 63 &#038; *p1++;
        }
        if (c < 0x80) {
            *p2++ = c;
        } else if (c < 0x800) {
            *p2++ = 0xC0 | (c >> 6);
            *p2++ = 0x80 | (63 &#038; c);
        } else if (c < 0x10000) {
            *p2++ = 0xE0 | (c >> 12);
            *p2++ = 0x80 | (63 &#038; (c >> 6));
            *p2++ = 0x80 | (63 &#038; c);
        } else if (c < 0x200000) {
            *p2++ = 0xF0 | (c >> 18);
            *p2++ = 0x80 | (63 &#038; (c >> 12));
            *p2++ = 0x80 | (63 &#038; (c >> 6));
            *p2++ = 0x80 | (63 &#038; c);
        } else if (c < 0x4000000) {
            *p2++ = 0xF8 | (c >> 24);
            *p2++ = 0x80 | (63 &#038; (c >> 18));
            *p2++ = 0x80 | (63 &#038; (c >> 12));
            *p2++ = 0x80 | (63 &#038; (c >> 6));
            *p2++ = 0x80 | (63 &#038; c);
        } else {
            *p2++ = 0xFC | (1 &#038; (c >> 30));
            *p2++ = 0x80 | (63 &#038; (c >> 24));
            *p2++ = 0x80 | (63 &#038; (c >> 18));
            *p2++ = 0x80 | (63 &#038; (c >> 12));
            *p2++ = 0x80 | (63 &#038; (c >> 6));
            *p2++ = 0x80 | (63 &#038; c);
        }
    }
    nContent = (int) (p2 - pBuffer);
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2010/01/16/efficient-utf-8-recoding-and-secure-processing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UTF8/UCS conversion benchmark</title>
		<link>http://bannister.us/weblog/2010/01/12/utf8ucs-conversion-benchmark/</link>
		<comments>http://bannister.us/weblog/2010/01/12/utf8ucs-conversion-benchmark/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 05:12:39 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1709</guid>
		<description><![CDATA[Point of reference&#8230;
UCS (Unicode) to UTF8 conversion, and the reverse, when efficiently coded in C++ clocks in well above 100MB/s on current generation CPUs. If you are getting something much less &#8211; enough to be a problem &#8211; then there are questions you should ask. The following run spans 1 to 6 byte UTF8 encodings.
Recoding [...]]]></description>
			<content:encoded><![CDATA[<p>Point of reference&#8230;</p>
<p>UCS (Unicode) to UTF8 conversion, and the reverse, when efficiently coded in C++ clocks in <b>well above</b> 100MB/s on current generation CPUs. If you are getting something much less &#8211; enough to be a problem &#8211; then there are questions you should ask. The following run spans 1 to 6 byte UTF8 encodings.</p>
<p>Recoding a UTF8 string to a normalized form is a bit slower at 122-87 MB/s.</p>
<pre>
preston@athena:~/workspace/json-c$ time Release/json
base 00000010 :  <b>229.9 MB/s UCS to UTF8 conversion</b>
base 00000010 :  <b>253.7 MB/s UTF8 to UCS conversion</b>
base 00000010 :  <b>122.0 MB/s UTF8 recode</b>
base 02000010 :  196.8 MB/s UCS to UTF8 conversion
base 02000010 :  177.1 MB/s UTF8 to UCS conversion
base 02000010 :  100.6 MB/s UTF8 recode
base 04000010 :  173.8 MB/s UCS to UTF8 conversion
base 04000010 :  157.1 MB/s UTF8 to UCS conversion
base 04000010 :   89.2 MB/s UTF8 recode
base 06000010 :  174.0 MB/s UCS to UTF8 conversion
base 06000010 :  158.5 MB/s UTF8 to UCS conversion
base 06000010 :   89.2 MB/s UTF8 recode
base 08000010 :  174.0 MB/s UCS to UTF8 conversion
base 08000010 :  154.5 MB/s UTF8 to UCS conversion
base 08000010 :   89.6 MB/s UTF8 recode
base 0a000010 :  174.1 MB/s UCS to UTF8 conversion
base 0a000010 :  156.5 MB/s UTF8 to UCS conversion
base 0a000010 :   89.8 MB/s UTF8 recode
base 0c000010 :  174.0 MB/s UCS to UTF8 conversion
base 0c000010 :  155.1 MB/s UTF8 to UCS conversion
base 0c000010 :   89.6 MB/s UTF8 recode
base 0e000010 :  174.0 MB/s UCS to UTF8 conversion
base 0e000010 :  158.8 MB/s UTF8 to UCS conversion
base 0e000010 :   87.4 MB/s UTF8 recode
base 10000010 :  170.8 MB/s UCS to UTF8 conversion
base 10000010 :  158.2 MB/s UTF8 to UCS conversion
base 10000010 :   89.7 MB/s UTF8 recode
base 12000010 :  174.0 MB/s UCS to UTF8 conversion
base 12000010 :  158.8 MB/s UTF8 to UCS conversion
base 12000010 :   86.5 MB/s UTF8 recode
base 14000010 :  171.5 MB/s UCS to UTF8 conversion
base 14000010 :  153.9 MB/s UTF8 to UCS conversion
base 14000010 :   87.1 MB/s UTF8 recode
base 16000010 :  172.1 MB/s UCS to UTF8 conversion
base 16000010 :  158.1 MB/s UTF8 to UCS conversion
base 16000010 :   87.5 MB/s UTF8 recode
base 18000010 :  172.1 MB/s UCS to UTF8 conversion
base 18000010 :  158.2 MB/s UTF8 to UCS conversion
base 18000010 :   86.9 MB/s UTF8 recode
base 1a000010 :  171.3 MB/s UCS to UTF8 conversion
base 1a000010 :  158.2 MB/s UTF8 to UCS conversion
base 1a000010 :   86.5 MB/s UTF8 recode
base 1c000010 :  169.5 MB/s UCS to UTF8 conversion
base 1c000010 :  158.5 MB/s UTF8 to UCS conversion
base 1c000010 :   86.5 MB/s UTF8 recode
base 1e000010 :  173.0 MB/s UCS to UTF8 conversion
base 1e000010 :  157.8 MB/s UTF8 to UCS conversion
base 1e000010 :   86.1 MB/s UTF8 recode
base 20000010 :  173.1 MB/s UCS to UTF8 conversion
base 20000010 :  158.4 MB/s UTF8 to UCS conversion
base 20000010 :   87.2 MB/s UTF8 recode
base 22000010 :  173.1 MB/s UCS to UTF8 conversion
base 22000010 :  158.2 MB/s UTF8 to UCS conversion
base 22000010 :   88.2 MB/s UTF8 recode
base 24000010 :  173.3 MB/s UCS to UTF8 conversion
base 24000010 :  158.8 MB/s UTF8 to UCS conversion
base 24000010 :   87.6 MB/s UTF8 recode
base 26000010 :  173.8 MB/s UCS to UTF8 conversion
base 26000010 :  158.1 MB/s UTF8 to UCS conversion
base 26000010 :   87.9 MB/s UTF8 recode
base 28000010 :  172.0 MB/s UCS to UTF8 conversion
base 28000010 :  158.7 MB/s UTF8 to UCS conversion
base 28000010 :   87.6 MB/s UTF8 recode
base 2a000010 :  172.0 MB/s UCS to UTF8 conversion
base 2a000010 :  158.1 MB/s UTF8 to UCS conversion
base 2a000010 :   86.1 MB/s UTF8 recode
base 2c000010 :  172.1 MB/s UCS to UTF8 conversion
base 2c000010 :  158.5 MB/s UTF8 to UCS conversion
base 2c000010 :   86.3 MB/s UTF8 recode
base 2e000010 :  173.8 MB/s UCS to UTF8 conversion
base 2e000010 :  158.2 MB/s UTF8 to UCS conversion
base 2e000010 :   89.3 MB/s UTF8 recode
base 30000010 :  170.0 MB/s UCS to UTF8 conversion
base 30000010 :  158.7 MB/s UTF8 to UCS conversion
base 30000010 :   87.2 MB/s UTF8 recode
base 32000010 :  173.8 MB/s UCS to UTF8 conversion
base 32000010 :  158.4 MB/s UTF8 to UCS conversion
base 32000010 :   87.8 MB/s UTF8 recode
base 34000010 :  173.5 MB/s UCS to UTF8 conversion
base 34000010 :  158.5 MB/s UTF8 to UCS conversion
base 34000010 :   88.0 MB/s UTF8 recode
base 36000010 :  173.1 MB/s UCS to UTF8 conversion
base 36000010 :  158.4 MB/s UTF8 to UCS conversion
base 36000010 :   88.4 MB/s UTF8 recode
base 38000010 :  172.5 MB/s UCS to UTF8 conversion
base 38000010 :  158.5 MB/s UTF8 to UCS conversion
base 38000010 :   88.7 MB/s UTF8 recode
base 3a000010 :  170.5 MB/s UCS to UTF8 conversion
base 3a000010 :  158.4 MB/s UTF8 to UCS conversion
base 3a000010 :   87.4 MB/s UTF8 recode
base 3c000010 :  169.3 MB/s UCS to UTF8 conversion
base 3c000010 :  154.7 MB/s UTF8 to UCS conversion
base 3c000010 :   86.3 MB/s UTF8 recode
base 3e000010 :  172.0 MB/s UCS to UTF8 conversion
base 3e000010 :  156.9 MB/s UTF8 to UCS conversion
base 3e000010 :   87.9 MB/s UTF8 recode
base 40000010 :  171.8 MB/s UCS to UTF8 conversion
base 40000010 :  148.9 MB/s UTF8 to UCS conversion
base 40000010 :   83.7 MB/s UTF8 recode
base 42000010 :  173.1 MB/s UCS to UTF8 conversion
base 42000010 :  149.3 MB/s UTF8 to UCS conversion
base 42000010 :   88.1 MB/s UTF8 recode
base 44000010 :  173.7 MB/s UCS to UTF8 conversion
base 44000010 :  157.7 MB/s UTF8 to UCS conversion
base 44000010 :   87.4 MB/s UTF8 recode
base 46000010 :  172.1 MB/s UCS to UTF8 conversion
base 46000010 :  152.2 MB/s UTF8 to UCS conversion
base 46000010 :   87.3 MB/s UTF8 recode
base 48000010 :  174.0 MB/s UCS to UTF8 conversion
base 48000010 :  142.7 MB/s UTF8 to UCS conversion
base 48000010 :   87.8 MB/s UTF8 recode
base 4a000010 :  173.5 MB/s UCS to UTF8 conversion
base 4a000010 :  150.2 MB/s UTF8 to UCS conversion
base 4a000010 :   87.7 MB/s UTF8 recode
base 4c000010 :  174.0 MB/s UCS to UTF8 conversion
base 4c000010 :  158.4 MB/s UTF8 to UCS conversion
base 4c000010 :   88.4 MB/s UTF8 recode
base 4e000010 :  174.0 MB/s UCS to UTF8 conversion
base 4e000010 :  156.9 MB/s UTF8 to UCS conversion
base 4e000010 :   88.4 MB/s UTF8 recode

real	2m0.751s
user	2m0.540s
sys	0m0.190s
</pre>
<p>The above run is on a <b>AMD Phenom(tm) II X4 955 Processor</b> running at the stock clock rate. </p>
<p>Code is in: <a href="http://svn.bannister.us/public/json-c/">http://svn.bannister.us/public/json-c/</a><br />
(A start on an experiment in fastest-possible JSON conversion.)</p>
<p>Note that I intentionally allow proper conversion of &#8220;invalid&#8221; UTF8 code strings. I completely understand the reason for the disallowed conversions, and I disagree.</p>
<p><b>Update:</b> Converted to use pointer arithmetic, rather than array and index. Was not sure pointer math was still a win on current CPUs and compilers. Got a big boost in throughput, so it is!</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2010/01/12/utf8ucs-conversion-benchmark/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Musing about cumulative impact</title>
		<link>http://bannister.us/weblog/2010/01/08/musing-about-cumulative-impact/</link>
		<comments>http://bannister.us/weblog/2010/01/08/musing-about-cumulative-impact/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 20:52:45 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1705</guid>
		<description><![CDATA[About 15 years back I was working on a C++ GUI application with a cyclic workload and a lot of string manipulation. For both performance and reliability I came up with a lightweight string class that did allocations off a free list. The class benchmarked well, and performed very well in practice. About 10 years [...]]]></description>
			<content:encoded><![CDATA[<p>About 15 years back I was working on a C++ GUI application with a cyclic workload and a lot of string manipulation. For both performance and reliability I came up with a lightweight string class that did allocations off a free list. The class benchmarked well, and performed very well in practice. About 10 years back I started writing a C++ back-end bulk processing application with <b>massive</b> string manipulation, and re-used the same lightweight string (with excellent results). Five years back I again ran benchmarks (with good results) and <a href="http://bannister.us/weblog/2005/01/17/how-to-build-a-better-string-class-and-a-surprise/">wrote up the results</a>.</p>
<p>The lightweight string class is simple enough to be reproduced from memory (nothing over-complicated), but can make quite a difference in performance. I had hoped to make a point.</p>
<p>Since posting, after the initial burst, the articles have collected what looks like a few new hits, <b>every</b> day, for the past five years. Counting hits is a pretty foggy indicator, but it seems possible quite a few folk have read the article (though a relatively small fraction of the programming community). Some may have copied the C++ string class in their code. (What I hoped!) </p>
<p>But there is no sure way of knowing. What is the cumulative impact of this steady trickle of readers?</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2010/01/08/musing-about-cumulative-impact/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8230;  status as Invited Expert in HTML Working Group</title>
		<link>http://bannister.us/weblog/2009/12/31/status-as-invited-expert-in-html-working-group/</link>
		<comments>http://bannister.us/weblog/2009/12/31/status-as-invited-expert-in-html-working-group/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 07:23:29 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[html@w3c]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1703</guid>
		<description><![CDATA[At one time I had hoped there was a small chance I might be able to nudge the HTML working group in a constructive direction. Over time, what I found is that there are a small number of individuals that are able to invest an inordinate amount of time to this same working group, and [...]]]></description>
			<content:encoded><![CDATA[<p>At one time I had hoped there was a small chance I might be able to nudge the HTML working group in a constructive direction. Over time, what I found is that there are a small number of individuals that are able to invest an inordinate amount of time to this same working group, and I cannot possibly invest the time to construct thoughtful responses to the flood ill-considered notions.</p>
<p>There is almost no chance I can move the working group is a useful direction. Time to disconnect.</p>
<p>This is all rather discouraging. The HTML working group will proceed. Some of the work is worthwhile. Much (measured by volume of email list traffic) is not. What mix will make it into the generated proposed &#8220;standard&#8221; is sure to be a mess. Not sure how to change any of this.</p>
<p>My status as an &#8220;Invited Expert&#8221; is up for renewal. With extreme reluctance &#8230; my judgement is that I cannot make a useful contribution, and should disassociate from the HTML working group. Of course, they will continue on the present course, in my absence. My withdrawal makes no difference of significance. There is a fair chance the body of work from this working group will be adopted, imperfect as it is. The existing body of work is &#8230; badly skewed by an imperfect process.</p>
<p>Nothing meaningful I can do. The result will be a mess, and will create a mess for years after. Time to disengage.</p>
<p>Funny bit &#8211; I do not see a way to force a disconnect.</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/12/31/status-as-invited-expert-in-html-working-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Almost but not quite &#8230; server-side JavaScript</title>
		<link>http://bannister.us/weblog/2009/12/30/almost-but-not-quite-server-side-javascript/</link>
		<comments>http://bannister.us/weblog/2009/12/30/almost-but-not-quite-server-side-javascript/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 04:05:14 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1678</guid>
		<description><![CDATA[Bit over three years back I looked at server-side Javascript, and was not enthused with the available choices. 
Three distinct usages I&#8217;d like to cover: optimal performance,Windows web server (IIS) interoperable, and webhosting.
In addition, there are three interesting aspects of optimal performance: throughput, scalability, and stability.
For serving static content, I really like the model of [...]]]></description>
			<content:encoded><![CDATA[<p>Bit over three years back I looked at <a href="http://bannister.us/weblog/2006/12/19/revisiting-server-side-javascript/">server-side Javascript</a>, and was not enthused with the available choices. </p>
<p>Three distinct usages I&#8217;d like to cover: optimal performance,Windows web server (IIS) interoperable, and webhosting.</p>
<p>In addition, there are three interesting aspects of optimal performance: throughput, scalability, and stability.</p>
<p>For serving static content, I really like the model of a single-threaded non-blocking web server, of which <a href="http://www.acme.com/software/thttpd/">thttpd</a> was an early example, and for which the <a href="http://www.kegel.com/c10k.html">C10K</a> question clarified the need. A small/simple web server has a much better chance to being very reliable. With the single-threaded non-blocking model, massive scalability is possible.</p>
<p>For serving dynamic content, I really like the isolation and load distribution possible with the <a href="http://en.wikipedia.org/wiki/FastCGI">FastCGI</a> model (or the like). Dynamic code tends to be complex. Javascript interpreters are complex. Complex code tends to fail more often. Complex code can use more compute throughput than possible on a single box. For intranet applications, a single front-end web server is often preferable, and load distribution via FastCGI offers more headroom. All of which tends to argue for the FastCGI model, with isolation from the front-end web service, and potential distribution of load across more than one machine.</p>
<p>For the widest possible usage, in additional to optimal deployments (when there is no restriction on the front-end web server), the engine on which the application runs should be deployable behind IIS (for Windows-only organizations), and at common web-hosting services (like <a href="http://dreamhost.com/">Dreamhost</a>). Microsoft&#8217;s recent support of <a href="http://www.iis.net/expand/FastCGI">FastCGI with IIS</a> is a big help.</p>
<p>At that time (three years back), none of the solutions were really optimal &#8211; and in fact were pretty far from optimal. The Java-based <a href="http://www.mozilla.org/rhino/">Rhino</a>Javascript interpreter was easiest to embed, but failed the webhosting case. The C++ based JavaScript interpreters were a pain to embed, and offered good (but not great) performance. </p>
<p>Fast forward to the present, and Google offers the <a href="http://code.google.com/p/v8/">V8 JavaScript Engine</a> that offers <b>great</b> performance, and is easy to embed. (Google as the good guys, riding to the rescue once again &#8230; you&#8217;d think they have white hats superglued to their brains.) Suddenly we have lots of <a href="http://code.google.com/hosting/search?q=label:v8">projects embedding the V8 engine</a>. In addition, seems most all the single-threaded non-blocking web servers have picked up support for FastCGI.</p>
<p>Oh &#8230; and I am pretty much fed up with the <a href="http://en.wikipedia.org/wiki/Java_Servlet">Java Servlet</a> model. After considerable time with the problem, I am of the opinion that the servlet model chose the wrong abstractions, and this makes for awkward solutions. (Of course, the servlet model appeared very early in the history of web applications, so the mistake is easy to understand.)</p>
<p>Which means the model offered by <a href="">node.js</a> makes a lot of sense. I <i>like</i> the notion of a naked node (running JavaScript on the V8 engine) performing request dispatch without any extra layers or abstractions. The main lack with <b>node.js</b> is the ability to work via FastCGI (and thus no means to be deployed behind IIS on Windows).</p>
<p>But there are as yet items unresolved and/or unclear.</p>
<ul>
<li>Projects like <a href="http://code.google.com/p/v8cgi/">v8cgi</a> offer the V8 JavaScript Engine connected via FastCGI.</li>
<li>The <b>node.js</b> project offers a single-threaded non-blocking web server &#8230; but can it work behind FastCGI?</li>
<li>Is the environment for server-side JavaScript the same (or sufficiently similar) between <b>node.js</b> and <b>v8cgi</b>?</li>
<li><a href="http://en.wikipedia.org/wiki/Comet_(programming)">Comet</a> is still a question. Can FastCGI work well with long-outstanding requests from applications?</li>
</ul>
<p>The good news is that we seem a lot closer to attractive and well-supported server-side JavaScript for web applications &#8230; but it seems we are not quite fully there, as yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/12/30/almost-but-not-quite-server-side-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wireless network and Linux</title>
		<link>http://bannister.us/weblog/2009/12/24/wireless-network-and-linux/</link>
		<comments>http://bannister.us/weblog/2009/12/24/wireless-network-and-linux/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 03:40:33 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1672</guid>
		<description><![CDATA[A signpost of sort &#8211; wireless network support on Linux, at least for the Intel 4965AGN adaptor &#8211; sucks.
Went with the Intel adaptor when I ordered this notebook, in part as Intel seems to be actively supporting the development of Linux drivers. In practice, my laptop wireless connection is mostly unreliable, and often near-useless.
I used [...]]]></description>
			<content:encoded><![CDATA[<p>A signpost of sort &#8211; wireless network support on Linux, at least for the <a href="http://www.intel.com/network/connectivity/products/wireless/wireless_n/overview.htm">Intel 4965AGN adaptor</a> &#8211; sucks.</p>
<p>Went with the Intel adaptor when I ordered this notebook, in part as Intel seems to be actively supporting the <a href="http://intellinuxwireless.org/">development of Linux drivers</a>. In practice, my laptop wireless connection is mostly unreliable, and often near-useless.</p>
<p>I used to think the problem was interference from other nearby wireless routers, but my daughter&#8217;s laptop seems to work well when mine does not. I have a simple <a href="http://bannister.us/examples/json/bounce.html">&#8220;bounce&#8221;</a> test for network performance. My daughter&#8217;s cheap Toshiba, on the same &#8220;bounce&#8221; page, gets steady/fast performance when side-by-side to my laptop &#8230; which gets slower/unsteady/unreliable performance.</p>
<p>Not specific to the wireless router or crowded neighborhood either &#8211; I get similar poor performance when at my father&#8217;s place in Colorado (different brand and generation of router, and fewer/further neighbors).</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/12/24/wireless-network-and-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trie in Java &#8211; revisited</title>
		<link>http://bannister.us/weblog/2009/12/23/trie-in-java-revisited/</link>
		<comments>http://bannister.us/weblog/2009/12/23/trie-in-java-revisited/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 01:12:51 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1666</guid>
		<description><![CDATA[An earlier attempt at writing a fast general purpose Trie in Java gave huge memory use, and disappointing results. Seems a Trie implementation that is both fast and general purpose is not possible. (Translation: For most use a Trie cannot replace a hash table.)
After the prior results, I wanted to see if a less general-purpose [...]]]></description>
			<content:encoded><![CDATA[<p>An earlier attempt at writing a fast <a href="http://bannister.us/weblog/2009/10/05/example-general-purpose-trie-in-java/">general purpose Trie in Java</a> gave <b>huge</b> memory use, and disappointing results. Seems a Trie implementation that is both fast and general purpose is not possible. (Translation: For most use a Trie cannot replace a hash table.)</p>
<p>After the prior results, I wanted to see if a less general-purpose implementation would perform better. Given enough advantages, could a Trie out-perform a hash table? (Again, this visits to some extent the question asked in a <a href="http://www.daniel-lemire.com/blog/archives/2009/10/02/sensible-hashing-of-variable-length-strings-is-impossible/">prior discussion</a>.)</p>
<p>For the current exercise I built two Trie implementations. The <a href="http://svn.bannister.us/public/Trie/sources/us/bannister/structures/trie2/LinkedTrie.java">LinkedTrie</a> is cheap to build, minimal in use of memory, but not especially fast to access. The <a href="http://svn.bannister.us/public/Trie/sources/us/bannister/structures/trie2/FixedTrie.java">FixedTrie</a> implementation should be pretty close to optimal in access time (for a Trie), but expensive to build (in fact the <a href="http://svn.bannister.us/public/Trie/sources/us/bannister/structures/trie2/FixedTrieBuilder.java">FixedTrieBuilder</a> transforms a LinkedTrie into an optimized FixedTrie).</p>
<p>As before, the sources are in (as an Eclipse project): <a href="http://svn.bannister.us/public/Trie/">http://svn.bannister.us/public/Trie/</a>.</p>
<p>The performance numbers make sense. The older <b>TallTrie</b> and <b>WideTrie</b> implementations (that traded increased memory use for speed) are indeed faster, though the <b>LinkedTrie</b> uses much(!) less memory. The new <b>FixedTrie</b> is fastest (hurrah!) and uses the least memory (a shade less than <b>LinkedTrie</b>). </p>
<p>But even the <b>FixedTrie</b> is slower than a generic hash table, with read-only access about 3 times as expensive.</p>
<p>Sample measurements&#8230;
<pre>
=== words
21 ms - 98569 words loaded

=== hash
3935/second - hash map loaded {4007 ms, 15771040 operations = 254 ns/op}
8554/second - hash map re-loaded {4010 ms, 34302012 operations = 116 ns/op}
<b>10768/second</b> - access each item in hash map {4000 ms, 43074653 operations = 92 ns/op}

=== trie (linked)
870/second - loaded trie (linked) {4078 ms, 3548484 operations = 1149 ns/op}
1204/second - re-loaded trie (linked) {4010 ms, 4829881 operations = 830 ns/op}
<b>1431/second</b> - access each item in trie (linked) {4063 ms, 5815571 operations = 698 ns/op}
98569 slots of trie (linked)
225791 nodes of trie (linked)

=== build fixed trie

=== trie (fixed)
85779/second - loaded trie (fixed) {4000 ms, 343118689 operations = 11 ns/op}
87652/second - re-loaded trie (fixed) {4000 ms, 350609933 operations = 11 ns/op}
<b>3438/second</b> - access each item in trie (fixed) {4013 ms, 13799660 operations = 290 ns/op}
98569 slots of trie (fixed)
225791 nodes of trie (fixed)

=== trie (wide)
65/second - loaded trie (wide) {4502 ms, 295707 operations = 15224 ns/op}
1659/second - re-loaded trie (wide) {4040 ms, 6702692 operations = 602 ns/op}
<b>1672/second</b> - access each item in trie (wide) {4007 ms, 6702692 operations = 597 ns/op}
41533124 slots of trie (wide)
225890 nodes of trie (wide)

=== trie (tall)
682/second - loaded trie (tall) {4043 ms, 2759932 operations = 1464 ns/op}
1733/second - re-loaded trie (tall) {4036 ms, 6998399 operations = 576 ns/op}
<b>1913/second</b> - access each item in trie (tall) {4019 ms, 7688382 operations = 522 ns/op}
6982694 slots of trie (tall)
446075 nodes of trie (tall)

=== string to UTF8 conversion
1393/second - word to UTF8 (stock) {4033 ms, 5618433 operations = 717 ns/op}
9585/second - word to UTF8 (fast) {4000 ms, 38343341 operations = 104 ns/op}
</pre>
<p>(Note that the <b>FixedTrie</b> ignores re-load, so the times for load and re-load are bogus.)</p>
<p>I suspect a C++ Trie implementation could do a bit better &#8230; but not necessarily outperform &#8230; compared to hash tables.</p>
<p>Looks very much like even a specialized read-only Trie cannot match the performance of a generic hash table (at least in Java).</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/12/23/trie-in-java-revisited/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Identifying and documenting bugs in Sun Java Printing</title>
		<link>http://bannister.us/weblog/2009/11/30/identifying-and-documenting-bugs-in-sun-java-printing/</link>
		<comments>http://bannister.us/weblog/2009/11/30/identifying-and-documenting-bugs-in-sun-java-printing/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 21:26:57 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1645</guid>
		<description><![CDATA[I have had a fair amount of trouble with odd behaviors and bugs in printing with Java. The time I have had to spend at work to eliminate troublesome behavior in a heavily used Java application (both before customers see the problem, and after customers report problems) &#8230; is embarrassing.
After getting stuck on the latest [...]]]></description>
			<content:encoded><![CDATA[<p>I have had a fair amount of trouble with odd behaviors and bugs in printing with Java. The time I have had to spend at work to eliminate troublesome behavior in a heavily used Java application (both before customers see the problem, and after customers report problems) &#8230; is embarrassing.</p>
<p>After getting stuck on the latest problem, I finally built a &#8220;PrintExplorer&#8221; test program. The sources are up on <a href="http://kenai.com/projects/print-explorer">Kenai</a>, and on <a href="http://hg.bannister.us/public/PrintExplorer/">my website</a>. In both cases the sources are in a Mercurial repository, and I &#8220;push&#8221; changes to both (one of the nice features of Mercurial). The project was built using NetBeans 6.7, and you can download the built <a href="http://hg.bannister.us/public/PrintExplorer/file/d5468266772f/dist/PrintExplorer.jar">PrintExplorer.jar</a> file. </p>
<p>Run as usual:
<pre>
java -jar PrintExplorer.jar
</pre>
<p>(On Windows you can just double-click the JAR file.)</p>
<p>I filed two reports (so far, with review ids: 1660182 and 1660234) with <a href="http://bugs.sun.com/">bugs.sun.com</a>, though for all I know that may be a black hole (or not &#8230; I have no idea). With the <a href="http://openjdk.java.net/">OpenJDK</a> and <a href="https://jdk7.dev.java.net/">JDK7</a> work there may be better places to report/record this &#8230; I do not know. (If you know a better path, please <a href="mailto:preston@bannister.us">let me know</a>.)</p>
<p>Found so far:
<ul>
<li>PrinterJob.getPageDialog() makes invalid change to page size. <a href='http://bannister.us/weblog/wp-content/uploads/2009/11/print-test-log.html'>(log)</a></li>
<li>Toolkit.getPrintJob() changes JobAttributes.getPrinter() to default(?) printer. <a href='http://bannister.us/weblog/wp-content/uploads/2009/11/print-test-log1.html'>(log)</a></li>
<li>Quarter-sized pages sometimes printed on an HP DeskJet 5550 on Windows 7. <a href='http://bannister.us/weblog/wp-content/uploads/2009/11/print-test-log2.html'>(log)</a></li>
</ul>
<p>I am sure there are more. :/</p>
<p>Note that PrintExplorer always generates a log file. The log file contains the parameter values and print operations performed. (You need to be acquainted with Java Printing, otherwise the test program will be entirely obscure.) If you can reproduce a problem, then you can see in the log file <b>exactly</b> what you did, and what was returned. (Useful when you lost track of the exact sequence of steps.) When you send a log file, anyone can verify the exact sequence of steps you followed (a mistake in the problem description can be caught).</p>
<p>At this point the <b>DocPrinterJob</b> works for an empty Doc and a Pageable Doc, but not for a Reader Doc. (Unclear if the last is my bug, or a Java bug.)</p>
<p><b>Update &#8211; 2010.02.01</b><br />
Today the filed reports became public-visible bugs <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6921596">6921596</a> and <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6921597">6921597</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/11/30/identifying-and-documenting-bugs-in-sun-java-printing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tilting at windmills</title>
		<link>http://bannister.us/weblog/2009/11/23/tilting-at-windmills/</link>
		<comments>http://bannister.us/weblog/2009/11/23/tilting-at-windmills/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 07:10:13 +0000</pubDate>
		<dc:creator>Preston</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1635</guid>
		<description><![CDATA[Bought a Canon MX860. Did my research beforehand, and was able to force-install the 32-bit Canon drivers (for printing) on my 64-bit Ubuntu desktop. Getting scanning to work is another exercise as yet not done. The fact that Canon has published sources that (with the exception of a missing library) could be compiled as 64-bit [...]]]></description>
			<content:encoded><![CDATA[<p>Bought a Canon MX860. Did my research beforehand, and was able to force-install the 32-bit Canon drivers (for printing) on my 64-bit Ubuntu desktop. Getting scanning to work is another exercise as yet not done. The fact that Canon has published sources that (with the exception of a missing library) could be compiled as 64-bit native, lead me to poke Canon USA support.</p>
<p>My original query as represented in Canon&#8217;s support system (and trimmed):</p>
<blockquote><p>
Original Message Follows:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Email Support Form Message<br />
Product Type: PIXMA MX860<br />
Product Serial Number: absx22394<br />
Date of Purchase: 11/18/2009<br />
First Name: Preston<br />
Last Name: Bannister<br />
Address: 14 Vallecito<br />
City: Foothill Ranch<br />
State: CA<br />
Zip: 92610<br />
Phone Number: 9495880872<br />
Email Address: preston@bannister.us<br />
INQUIRY: Need drivers for 64-bit Ubuntu (Debian Linux).<br />
Found the 32-bit drivers and sources on the Canon European site, but the sources are incomplete, so I cannot compile a 64-bit version.<br />
Either compiled 64-bit drivers, or a complete set of sources would be acceptable.
</p></blockquote>
<p>The response was pretty predictable, if not exactly addressing the question as posed.</p>
<blockquote><p>
On Fri, Nov 20, 2009 at 5:09 AM, Canon Support &#8211; MFP &lt;mfp @cits.canon.com&gt; wrote:</p>
<p>Dear Preston Bannister:</p>
<p>Thank you for contacting Canon product support.  We value you as a Canon customer and appreciate the opportunity to assist you.  We regret the issues experienced with locating Linux drivers for the MX860.</p>
<p>Canon USA does not support Linux with its consumer products.  The only recommendation I can offer would be to check the various Linux enthusiast websites to see if anyone has successfully attempted writing a third party driver.</p>
<p>We apologize for any inconvenience.  Please let us know if we can be of any further assistance with your MX860.</p>
<p>Sincerely,</p>
<p>James<br />
Technical Support Representative
</p></blockquote>
<p>Since there is always a chance (if small) of a constructive outcome, I tried again.</p>
<blockquote><p>
What I did was find that the Canon Europe and Canon Australia sites distribute Canon-developed Linux drivers for the MX860 (and other printers).</p>
<p>The software is pretty well done, has an active documented development history that goes at least to the year 2000, and is distributed as both binaries and source.</p>
<p>Odd that Canon USA does not distribute Canon-developed drivers (in which Canon has made a significant investment).</p>
<p>This is a case of so-close-but-not-quite there. The effort required for Canon to have a complete offering is pretty small, if someone can find the right branch of the company hierarchy to nudge.</p>
<p>Any chance of finding who within Canon sponsored development of the existing drivers for Linux?
</p></blockquote>
<p>The last response, which sounds dangerously close to &#8220;Fuck you. Go away.&#8221; (Though I would gladly be proven wrong.)</p>
<blockquote><p>
Dear Preston Bannister:</p>
<p>We appreciate your continued correspondence regarding Linux drivers for your PIXMA MX860.</p>
<p>I have forwarded your comments to Canon USA through our Customer Feedback process.  This process allows us to capture important feedback from our valued customers.  As we constantly strive to improve our products and services, your comments are vital to our continued success.</p>
<p>We hope this information is helpful to you.  Please let us know if we can be of any further assistance with your PIXMA MX860.</p>
<p>Thank you for choosing Canon.</p>
<p>Sincerely,</p>
<p>George<br />
Technical Support Representative
</p></blockquote>
<p>Had to try&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/11/23/tilting-at-windmills/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apples iTunes store hacked?</title>
		<link>http://bannister.us/weblog/2009/11/20/apples-itunes-store-hacked/</link>
		<comments>http://bannister.us/weblog/2009/11/20/apples-itunes-store-hacked/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 08:00:05 +0000</pubDate>
		<dc:creator>Preston</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1626</guid>
		<description><![CDATA[Just arrived in email.

Billed To:
          preston@bannister.us
          Preston&#160;Bannister
          14 Vallecito
          Foothill Ranch, CA 92610
Order Number: MGLN2G836G
     [...]]]></description>
			<content:encoded><![CDATA[<p>Just arrived in email.</p>
<blockquote><p>
<b>Billed To:</b><br />
          <a href="mailto:preston@bannister.us" target="_blank">preston@bannister.us</a><br />
          Preston&nbsp;Bannister<br />
          14 Vallecito<br />
          Foothill Ranch, CA 92610</p>
<p><b>Order Number:</b> MGLN2G836G<br />
          <b>Receipt Date:</b> 11/19/09<br />
          <b>Order Total:</b> $4.99<br />
          <b>Billed To:</b> MasterCard&nbsp;&#8230;.&nbsp;1234</p>
<p><b>Item Number</b><br />
1</p>
<p><b>Description</b><br />
변환기, v1.0, Seller:  Wang Xi|299225365 (4+)</p>
<p><b>Unit Price</b><br />
              $4.99</p>
<p><a href="https://userpub.itunes.apple.com/WebObjects/MZUserPublishing.woa/wa/addUserReview?type=Purple+Software&amp;id=337689079&amp;o=i" target="_blank">Write a Review</a><br />
<a href="https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/reportAProblem?p=36000004208556&amp;o=i" target="_blank">Report a Problem</a></p>
<p>Subtotal: $4.99<br />
Tax: $0.00<br />
Order Total: $4.99</p>
<p><b>Please retain for your records.</b><br />
Please See Below For Terms And Conditions Pertaining To This Order.</p>
<p><b>Apple Inc.</b><br />
             You can find the iTunes Store Terms of Sale and Sales Policies by launching your iTunes application and clicking on <a href="http://www.apple.com/legal/itunes/us/sales.html" target="_blank">Terms of Sale or Sales Policies</a></p>
<p>             Answers to frequently asked questions regarding the iTunes Store can be found at <a href="http://www.apple.com/support/itunes/store/" target="_blank">http://www.apple.com/support/<wbr>itunes/store/</wbr></a>
</p></blockquote>
<p>I do not have iTunes installed. Both my desktop and laptop are running Ubuntu Linux. Also I cannot read <s>Chinese</s> Korean, so I do not know what was ordered. The &#8220;Report a Problem&#8221; link asks me to install iTunes.</p>
<p>I am guessing the iTunes store has a (big!) problem.</p>
<p><b>Update:</b><br />
No charges have appeared on my credit card (so far). </p>
<p>I eventually found a &#8220;support&#8221; link for the iTunes site where you fill out a form to send email. Had to lie a bit as you cannot complete the form without indicating the OS on which you are running iTunes. Linux is not offered as a choice. The first email from Apple was not useful (&#8220;run iTunes to check on your account&#8221;, grrr). I replied with a copy of the receipt, and they did &#8230; something.</p>
<p>If no credit card charge appears, my guess is the Apple caught the problem part-way through.</p>
<p>Got an email from another iTunes customer who also got a receipt with the exact same mysterious item. Interesting.</p>
<p><b>Update (2):</b><br />
The charge just appeared on my credit card, so it is not clear the exchange with iTunes Support addressed the problem.</p>
<p><b>Update (3):</b><br />
Shortly after <i>my</i> last email (where I again described the problem, and added the other guy&#8217;s receipt), Apple Support sent an unexpected email refunding the charge <i>to the other guy!</i> Right. Half-successful?</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/11/20/apples-itunes-store-hacked/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shallow or deep?</title>
		<link>http://bannister.us/weblog/2009/11/10/shallow-or-deep/</link>
		<comments>http://bannister.us/weblog/2009/11/10/shallow-or-deep/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 13:59:48 +0000</pubDate>
		<dc:creator>Preston</dc:creator>
				<category><![CDATA[Politics]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1619</guid>
		<description><![CDATA[The current trade dispute between China and the US &#8211; on the surface &#8211; really makes no sense.

China to investigate U.S. car subsidies
China is preparing to launch a trade investigation into whether US carmakers are being unfairly subsidised by the US government, according to people familiar with the matter.
The move comes at a time of [...]]]></description>
			<content:encoded><![CDATA[<p>The current trade dispute between China and the US &#8211; on the surface &#8211; really makes no sense.</p>
<blockquote><p>
<a href="http://edition.cnn.com/2009/BUSINESS/10/29/china.us.car.trade.ft/index.html">China to investigate U.S. car subsidies</a><br />
China is preparing to launch a trade investigation into whether US carmakers are being unfairly subsidised by the US government, according to people familiar with the matter.</p>
<p>The move comes at a time of heightened trade tensions between the two countries after the US imposed duties on Chinese tyres last month. Many warned this would prompt Beijing to retaliate.
</p></blockquote>
<p>Interesting. Is this shallow, or deep?</p>
<p>China is using extraordinary measures to keep the dollar high and the yuan low. This has huge effect on trade. Words from the US to China have no leverage, at least compared to China&#8217;s near-term benefit from continued exports.</p>
<p>What has leverage? An import duty on tires &#8230; <i>really</i> &#8230; why tires? Is there some shallow US domestic political motivation? Or is this an opening move with enough lead time prior to Obama visiting China?</p>
<p>The Chinese government used to subsidize all sorts of industries, and they probably still do to some degree. At least some of that goes into exports. Tagging the US for subsidizing an industry &#8211; one that likely does more imports from China than exports to China &#8211; is odd. If the yuan rises relative to the dollar, then US exports to China become more competitive. Bit of a doubled impact on the Chinese economy (less exports and more imports). Discouraging imports from the US through import duties could lessen that impact. Is this a pretext for the logical counter-move (but not a strong move). Again, is this shallow or deep?</p>
<p>In this game, China is on the wrong end of the lever. Less trade between the US and China is likely to hurt China far more than the US. There may be some point in the future when they can absorb the loss of exports to the US. Is China at that point now? Or more relevant, do the Chinese leadership believe China is at that point?</p>
<p>My bet is that the Chinese leadership is too conservative, too cautious to want to risk too much change. China is a country of &#8220;rule by men&#8221;, not &#8220;rule by law&#8221;. Obama meeting with the Chinese leaders would be the point where &#8211; privately &#8211; the game is made plain &#8230; if this the deeper game. If China allows the yuan to rise after the meeting &#8211; that would be a <b>big</b> clue. (Likely China will keep buying dollars, but at a lesser rate &#8211; a sort of compromise.)</p>
<p>Is this shallow, or deep?</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/11/10/shallow-or-deep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GTK bug in Ubuntu 9.10</title>
		<link>http://bannister.us/weblog/2009/11/08/gtk-bug-in-ubuntu-9-10/</link>
		<comments>http://bannister.us/weblog/2009/11/08/gtk-bug-in-ubuntu-9-10/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 20:35:59 +0000</pubDate>
		<dc:creator>Preston</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1615</guid>
		<description><![CDATA[Upgraded my desktop from Ubuntu 9.04 to 9.10. That was a mistake. I could really use an &#8220;undo&#8221; button right about now (as ZFS users have for large scale file system changes).
The problem is buttons. A change in GTK+ 2.18 broke Eclipse, and anything based on Eclipse.
There are a number of bug reports tracking this [...]]]></description>
			<content:encoded><![CDATA[<p>Upgraded my desktop from Ubuntu 9.04 to 9.10. That was a mistake. I could really use an &#8220;undo&#8221; button right about now (as ZFS users have for large scale file system changes).</p>
<p>The problem is buttons. A change in GTK+ 2.18 broke Eclipse, and anything based on Eclipse.</p>
<p>There are a number of bug reports tracking this problem. On the Eclipse site look at:<br />
<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291257">Bug 291257</a> &#8211;  [Widgets] Buttons functionality problem with GTK+ 2.18  </p>
<p>There is a work-around offered on the above ticket (setting the GTK_NATIVE_WINDOWS environment variable). It seems to work for some. For others &#8211; myself included &#8211; it causes another severe problem (for which there are other bug reports).
<pre>
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f30eb1e7f7a, pid=4766, tid=139848919398672
#
# JRE version: 6.0_16-b01
# Java VM: Java HotSpot(TM) 64-Bit Server VM (14.2-b01 mixed mode linux-amd64 )
# Problematic frame:
# C  [libpango-1.0.so.0+0x24f7a]  pango_layout_new+0x2a
#
</pre>
<p>Strictly speaking, this is a bug in GTK. A new version of GTK shipped that was meant to be compatible, but instead broke existing applications (at the very least those based on Eclipse). The application use of GTK might (or might not) be considered in some way improper, but practical considerations should be dominant.</p>
<p>Fixing this in GTK will in one step remove the problem in <b>all</b> currently impacted applications. Fixing this in Eclipse will only help new and newly updated Eclipse installations. Existing Eclipse-based applications will continue to be impacted until (and if) updated by their respective developers.</p>
<p>Other related/duplicate bug reports:<br />
<a href="https://bugs.launchpad.net/gtk/+bug/442078 ">Buttons in Eclipse not working correctly with GTK+ 2.18.1-1</a><br />
<a href="https://bugs.launchpad.net/ubuntu/+source/swt-gtk/+bug/463086">Eclipse loses button events with swt-gtk in karmic</a><br />
<a href="https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/458703">GDK_NATIVE_WINDOWS=1 still required for some dialogs</a><br />
<a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=550183">Breaks Default button in some eclipse dialogs (and rcp apps)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/11/08/gtk-bug-in-ubuntu-9-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s Wrong with the Culture of Wall Street? &#8211; TIME</title>
		<link>http://bannister.us/weblog/2009/10/30/whats-wrong-with-the-culture-of-wall-street-time/</link>
		<comments>http://bannister.us/weblog/2009/10/30/whats-wrong-with-the-culture-of-wall-street-time/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 19:26:56 +0000</pubDate>
		<dc:creator>Preston</dc:creator>
				<category><![CDATA[Society]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1611</guid>
		<description><![CDATA[Reflections of an Anthropologist on the Wall Street mindset.

What&#8217;s Wrong with the Culture of Wall Street? &#8211; TIME
Before this crazy crash of 2008, bankers always landed on their feet, almost always. Job insecurity isn&apos;t the same thing for the average American worker. They often experience downward mobility or don&apos;t land on their feet.

]]></description>
			<content:encoded><![CDATA[<p>Reflections of an Anthropologist on the Wall Street mindset.</p>
<blockquote><p>
<a href='http://www.time.com/time/business/article/0,8599,1912085,00.html'>What&#8217;s Wrong with the Culture of Wall Street? &#8211; TIME</a><br />
Before this crazy crash of 2008, bankers always landed on their feet, almost always. Job insecurity isn&apos;t the same thing for the average American worker. They often experience downward mobility or don&apos;t land on their feet.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/10/30/whats-wrong-with-the-culture-of-wall-street-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moon rocks and a bit of math</title>
		<link>http://bannister.us/weblog/2009/10/28/moon-rocks-and-a-bit-of-math/</link>
		<comments>http://bannister.us/weblog/2009/10/28/moon-rocks-and-a-bit-of-math/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 02:43:20 +0000</pubDate>
		<dc:creator>Preston</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1605</guid>
		<description><![CDATA[Ran across a copy/article on extracting oxygen from moon rocks. The interesting bit:

New Device Extracts Oxygen from Moon Rocks &#124; Universe Today
Fray anticipates that three reactors, each a meter high, would be enough to generate a ton of oxygen per year on the Moon. Three tons of rock are needed to produce a ton of [...]]]></description>
			<content:encoded><![CDATA[<p>Ran across a copy/article on extracting oxygen from moon rocks. The interesting bit:</p>
<blockquote><p>
<a href='http://www.universetoday.com/2009/08/11/new-device-extracts-oxygen-from-moon-rocks/'>New Device Extracts Oxygen from Moon Rocks | Universe Today</a><br />
Fray anticipates that three reactors, each a meter high, would be enough to generate a ton of oxygen per year on the Moon. Three tons of rock are needed to produce a ton of oxygen, and in tests the team saw almost 100% recovery of oxygen, he says.
</p></blockquote>
<p>The comments got the math badly wrong. Poking around the web I got some rough numbers:
<ul>
<li>~0.25 liters / minute &#8211; oxygen consumed for human at rest.</li>
<li>~5 liters / minute &#8211; oxygen consumed for athlete / heavy exercise.</li>
<li>~1.43 grams / liter &#8211; oxygen gas at Earth sea level pressure.</li>
</ul>
<p>Barring any dumb math errors on my part, that translates to&#8230;.</p>
<ul>
<li>~636,000 liters / year &#8211; the ton of oxygen produced by the above-mentioned generator.</li>
<li>~131,500 liters / year &#8211; oxygen consumed by a person at rest.</li>
<li>~4.8 person-at-rest-years of oxygen generated every year.</li>
</ul>
<p>Assuming that a &#8220;real&#8221; space habitat would also have the means to recycle oxygen from exhaled CO<sup>2</sup>, that is a lot of oxygen!</p>
<p>What is the real need for that much oxygen? Outside use as rocket fuel (or other manufacturing process), the main need would be to supply air for expanded living space. Assuming ~3 meter ceilings, we need ~3000 liters air for each square meter of living space. So one generator would allow expanding the living space by ~2000 square meters / year. </p>
<p>Not bad. And that is just one reactor (and essentially a prototype, at that). </p>
<p>Only one part of the equation (for habitat supply needs), of course. For practical purpose, would be nice to also have some nitrogen in the air. Not sure where that would come from. Do any moon rocks contain nitrogen? Water is also needed. Barring any fortunate discovery of water on the moon, we could synthesize water given a source of hydrogen. Do any moon rocks contain hydrogen?</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/10/28/moon-rocks-and-a-bit-of-math/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First impressions &#8211; Google Wave</title>
		<link>http://bannister.us/weblog/2009/10/24/first-impressions-google-wave/</link>
		<comments>http://bannister.us/weblog/2009/10/24/first-impressions-google-wave/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 19:09:03 +0000</pubDate>
		<dc:creator>Preston</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1584</guid>
		<description><![CDATA[Basically, Google Wave is a full and natural merger of messaging, on the web. Before you say &#8220;oh, only that&#8221;, think this through. This is a pretty big deal. Put differently, this is messaging where:

Conversations are a first-class concept, and each message is a part of a conversation.
Each message can be presented by a different [...]]]></description>
			<content:encoded><![CDATA[<p>Basically, Google Wave is a full and natural merger of messaging, on the web. Before you say &#8220;oh, only that&#8221;, think this through. This is a pretty big deal. Put differently, this is messaging where:</p>
<ul>
<li>Conversations are a first-class concept, and each message is a part of a conversation.</li>
<li>Each message can be presented by a different application.</li>
</ul>
<p>Because Wave is on the web, the set of applications is come from <i>all applications in the world</i> (on the web).</p>
<p>E-mail clients can present &#8220;threads&#8221; that are something like conversations, but this requires a bit of guessing and fakery on the part of the client, and is easily confused. IM clients can present a log of messages &#8211; that looks something like a conversation &#8211; but does not work when you switch between devices. Given that email and IM servers know nothing about conversations, the clients do pretty much the best they can. If you know about conversations on the server, you can do a better job on the client.</p>
<p>When conversations are a first-class concept, there are lots of new possible functions. </p>
<p>On the flip side, the Google Wave folk have made some (common) missteps. </p>
<ul>
<li>Using new names for existing notions is sometimes useful, but more often not. Calling a conversation a &#8220;wave&#8221;, calling items (messages) within a conversation &#8220;blits&#8221; &#8230; I find this more confusing than useful. This reminds me more of talk from marketing folk than engineers.</li>
<li>It&#8217;s <a href="http://en.wikipedia.org/wiki/Talk_(software)">Talk</a>, on the web. As a programmer, I get it &#8211; this is <i>kewl!</i> Writing a web application that allows all participants to see each character typed &#8211; is tricky. As a demo of tricky programming, this is sure to impress. As a useful feature in a general use application &#8211; not so much. Character-at-a-time message traffic is a huge load increase on the server, and a disservice to the users. Think about:
<ul>
<li><b>Locus of attention</b> &#8211; the on-screen activity from updates to other users&#8217; incomplete messages is sure to distract.</li>
<li><b>Quality of expression</b> &#8211; how often have you started writing a message, then revised what you said and how you said it, before sending? Do you really want everyone to see your missteps &#8230; always?</li>
</ul>
<p>Note that both are a disservice to <b>all</b> participants &#8211; cool in a programming demo, not cool in a deployed application.
</li>
</ul>
<p>Other bits&#8230;.</p>
<ul>
<li>It looks like Outlook. This was new and cool in 1997, but not so much now.  Not at all sure this layout is efficient, especially given the changes in most-common screen layouts. In 1997 you would target 640&#215;480, 800&#215;600, and 1024&#215;768 on 14&#8243; to 17&#8243; as most common screen sizes. Today you are looking 1280&#215;800 on 14&#8243; or 15&#8243; as your minimum size, and 1920&#215;1080 at 20&#8243; or bigger as common. Present and future screens have not so much new height, with lots of new width &#8211; in fact too much new width for text content. Seems a different presentation is in order.
</li>
<li>Mixed applications in one web page is cool and exciting as <a href="http://en.wikipedia.org/wiki/ActiveX">ActiveX</a> was in the web browser in 1996. Viewed in terms of the good things it can do, ActiveX allows an open-ended mix of applications to present within a web page &#8211; very cool. The Microsoft folk were blindsided (as constructive, well-intentioned folk) as they did not consider all the bad things that could be done (and with ActiveX, <i>very</i> bad things are possible). The Google folk have lots of history to make them wary, and the scope for harm is much smaller, so likely little bad stuff get through. Still &#8211; do not underestimate the black hats. There are bound to be some exploits (though likely few and quickly suppressed).</li>
</ul>
<p>In sum, a decent start on a great idea. I&#8217;d want to be pretty ruthless about overhead that takes height away from the conversation view. I&#8217;d drop the per-character updates. I&#8217;d drop the use of funky names for existing ideas. None are fundamental problems, and all are easy to address.</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/10/24/first-impressions-google-wave/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PrinterJob.pageDialog() in Java is broken?</title>
		<link>http://bannister.us/weblog/2009/10/16/printerjob-pagedialog-in-java-is-broken/</link>
		<comments>http://bannister.us/weblog/2009/10/16/printerjob-pagedialog-in-java-is-broken/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 06:05:33 +0000</pubDate>
		<dc:creator>Preston</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1579</guid>
		<description><![CDATA[More specifically, the handling of margins, PageFormat, and the PrinterJob.pageDialog(PageFormat) seems to be broken.
Fixing up an old Java desktop application for viewing old &#8220;green-bar&#8221; reports. Should be pretty simple &#8211; the reports are all fixed pitch text. Given I like to do things that &#8220;just work&#8221; (from the users perspective), I&#8217;d added live &#8220;smart&#8221; definition [...]]]></description>
			<content:encoded><![CDATA[<p>More specifically, the handling of margins, PageFormat, and the PrinterJob.pageDialog(PageFormat) seems to be broken.</p>
<p>Fixing up an old Java desktop application for viewing old &#8220;green-bar&#8221; reports. Should be pretty simple &#8211; the reports are all fixed pitch text. Given I like to do things that &#8220;just work&#8221; (from the users perspective), I&#8217;d added live &#8220;smart&#8221; definition of controllable font-auto-sizing, empty page suppression, and margins. Given that old printed reports may be formatted for paper sizes different than in your desktop (or network) printer, this was slightly tricky, but only that. </p>
<p>Of course, many of those old reports &#8211; meant for old line-printer green-bar paper &#8211; are best printed in landscape orientation. To my surprise, I find when in landscape orientation, the return from PrinterJob.pageDialog(PageFormat) consistently alters the margins, even when no changes were made, and the error is cumulative.</p>
<p>Um, what?</p>
<p>At first I assumed the error was in my code, but this bit of logged output caught the problem:
<pre>
PageFormat validate::
	paper dx: 792.0 dy: 612.0
	margins top: 72 left: 72 bottom: 72 right: 72
	orientation : LANDSCAPE
PageFormat after pageDialog::
	paper dx: 794.0 dy: 613.0
	margins top: 72 left: 74 bottom: 73 right: 72
	orientation : LANDSCAPE
</pre>
<p>The first is the contents of the PageFormat before calling PrinterJob.pageDialog(PageFormat), and the second is the new PageFormat returned. Note the +1 dy bump and +2 dx bump to the page extents (and the matching errors introduced to the left/bottom margins).</p>
<p>The code I used to remove the error:
<pre>
            controller.pageFormat = job.pageDialog(controller.pageFormat);

            // Work around an interesting(?) bug in PrinterJob.pageDialog().
            // For some reason the returned Paper is over-sized. (Why? Dunno.)
            // Use the Paper returned from PrinterJob.defaultPage() to get a proper size.
            // If the Java folk remove the bug, this code should change nothing.
            PageFormat pf = job.defaultPage();
            Paper paper1 = controller.pageFormat.getPaper();
            Paper paper2 = pf.getPaper();
            double x = paper1.getImageableX();
            double y = paper1.getImageableY();
            double dx = paper1.getImageableWidth();
            double dy = paper1.getImageableHeight();
            paper2.setImageableArea(x,y,dx,dy);
            controller.pageFormat.setPaper(paper2);
</pre>
<p>The bug was encountered using Java 1.6.0_15 (64-bit) on Ubuntu (Linux 2.6.28-15-generic #52-Ubuntu SMP Wed Sep 9 10:48:52 UTC 2009 x86_64 GNU/Linux).</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/10/16/printerjob-pagedialog-in-java-is-broken/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Example &#8211; general purpose Trie in Java</title>
		<link>http://bannister.us/weblog/2009/10/05/example-general-purpose-trie-in-java/</link>
		<comments>http://bannister.us/weblog/2009/10/05/example-general-purpose-trie-in-java/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 16:14:25 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1569</guid>
		<description><![CDATA[Run across mention of the Trie data structure in a slightly random discussion. Had no notion of how performance of a Trie compares with the usual hash table, so wrote a general-purpose Trie implementation in Java (sources in an Eclipse project) with a bias toward performance.
The results are not encouraging. From a test run:

=== words
14 [...]]]></description>
			<content:encoded><![CDATA[<p>Run across mention of the <a href="http://en.wikipedia.org/wiki/Trie">Trie</a> data structure in a <a href="http://www.daniel-lemire.com/blog/archives/2009/10/02/sensible-hashing-of-variable-length-strings-is-impossible/">slightly random discussion</a>. Had no notion of how performance of a Trie compares with the usual hash table, so wrote a general-purpose Trie implementation in Java (<a href="http://svn.bannister.us/public/Trie/">sources in an Eclipse project</a>) with a bias toward performance.</p>
<p>The results are not encouraging. From a test run:
<pre>
=== words
14 ms - 98569 words loaded

=== hash
3837/second - hash map loaded {4007 ms, 15376764 operations = 260 ns/op}
7953/second - hash map re-loaded {4003 ms, 31837787 operations = 125 ns/op}
<b>12958/second - access each item in hash map {4001 ms, 51847294 operations = 77 ns/op}</b>

=== trie (wide)
343/second - loaded trie (wide) {4022 ms, 1379966 operations = 2914 ns/op}
2089/second - re-loaded trie (wide) {4010 ms, 8378365 operations = 478 ns/op}
<b>2165/second - access each item in trie (wide) {4005 ms, 8674072 operations = 461 ns/op}</b>
41533124 slots of trie (wide)
225890 nodes of trie (wide)

=== trie (tall)
2254/second - loaded trie (tall) {4022 ms, 9068348 operations = 443 ns/op}
2446/second - re-loaded trie (tall) {4029 ms, 9856900 operations = 408 ns/op}
<b>2429/second - access each item in trie (tall) {4017 ms, 9758331 operations = 411 ns/op}</b>
6982694 slots of trie (tall)
446075 nodes of trie (tall)

=== string to UTF8 conversion
4708/second - word to UTF8 (stock) {4019 ms, 18925248 operations = 212 ns/op}
10503/second - word to UTF8 (fast) {4007 ms, 42088963 operations = 95 ns/op}
</pre>
<p>The test data is a file of 98569 words found in Linux installation. The words are read from a file, and loaded into an array of strings. The words are loaded into a HashMap (a library class) for comparison, and loaded into both a &#8220;tall&#8221; and &#8220;wide&#8221; Trie (differing space/time trade-offs).</p>
<p>The notion used to generate a &#8220;fast&#8221; Trie is for each node in the Trie to index off a byte in the UTF8 encoding of key String. Along the way, found that the stock String to UTF8 conversion to be a bit slow, so wrote a <a href="http://svn.bannister.us/public/Trie/sources/us/bannister/encoders/EncoderUTF8.java">faster version</a>. Even with the faster encoding, measured Trie performance is not good. </p>
<p>(Bit of a shock to find the stock String-to-UTF8 conversion slow in Java, as this is used a lot &#8211; especially in web applications &#8211; and may be significant enough to effect benchmarks. Java has been around long enough, so that I expected better. In fact, I expected UTF8 to be in native code in the JVM. Byte-bashing code is better suited to C/C++.)</p>
<p>If strings were already in UTF8 (or ASCII) format &#8211; as in C/C++ code &#8211; a similar Trie implementation would perform somewhat better, but still use too much memory. Whether a Trie in C++ could more closely approach the performance of a hash table is a bit of an open question.</p>
<p>Not sure why the <a href="http://svn.bannister.us/public/Trie/sources/us/bannister/structures/WideTrie.java">&#8220;wide&#8221; Trie</a> (using one node to index one UTF8 byte) is slightly slower than the <a href="http://svn.bannister.us/public/Trie/sources/us/bannister/structures/TallTrie.java">&#8220;tall&#8221; Trie</a> (using two nodes to index 4-bits each from one UTF8 byte). Expected the &#8220;wide&#8221; version to be faster. Suspect the larger memory use is enough to bust the CPU cache, and on smaller data the &#8220;wide&#8221; variant may be faster. Also saw a lot of jitter in the times &#8211; presumably due to Java GC activity (garbage collection) &#8211; though the relative results were consistent.</p>
<p>Clearly this &#8220;fast, general-purpose&#8221; Trie implementation is not overly useful &#8211; at ~5 times slower than a hash table, and huge use of memory. Alternate forms can be more space-efficient, but are likely to be slower. </p>
<p>As a guess, a Trie is not going to find much use in my code. <img src='http://bannister.us/weblog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/10/05/example-general-purpose-trie-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Concurrency and threading is the new thing, again.</title>
		<link>http://bannister.us/weblog/2009/10/02/concurrency-and-threading-is-the-new-thing-again/</link>
		<comments>http://bannister.us/weblog/2009/10/02/concurrency-and-threading-is-the-new-thing-again/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 20:56:49 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1555</guid>
		<description><![CDATA[Tim Bray is writing a series of posts, taking a run at the concurrent programming problem, with a focus on languages. I think Tim is aiming in the right direction, but has his focus set at the wrong distance.
There are good reasons to take a run at the problem. Physics is changing what we can [...]]]></description>
			<content:encoded><![CDATA[<p>Tim Bray is writing <a href="http://www.tbray.org/ongoing/When/200x/2009/09/27/Concur-dot-next">a series of posts</a>, taking a run at the concurrent programming problem, with a focus on languages. I think Tim is aiming in the right direction, but has his focus set at the wrong distance.</p>
<p>There are good reasons to take a run at the problem. Physics is changing what we can expect from future computers. Starting a few years back, and barring any unexpected shifts in technology, the rate at which a CPU can process a single instruction stream will increase only slowly. The economics of chip fabrication allow us to build a CPU with multiple cores. The physics of power consumption tell us that we can get more computing done per watt with slimmer cores at slightly lower clock rates. All of which argues for fabricating CPU chips with a slowly increasing number of cores, and slowly increasing clock rates.</p>
<p>All of which means that to make full use of present and future CPUs, there has to be a lot of concurrent computing.</p>
<p>Concurrency in programming is tricky, and often got wrong. This is nothing new. My first job out of college (so many years ago) was to work of an <a href="http://en.wikipedia.org/wiki/Ada_(programming_language)">Ada</a> compiler (a computer language with direct support for multi-threaded interaction) on a product (the <a href="http://en.wikipedia.org/wiki/Pascal_MicroEngine">Pascal Microengine</a>) that had thread support built into the CPU&#8217;s microcode. There was then much talk of how to do concurrent programming.</p>
<p>What we learned then and in the time since is that fine-grained multi-threaded concurrent programming is tricky, and very easy to get wrong. For the bulk of programs and programmers, there is very limited need for this sort of concurrency. All things considered, this is probably a good thing.</p>
<p>Tim Bray &#8211; and the folk responding to his post &#8211; are mainly focusing on a programming language for concurrent programs. I suspect this is a mistake. Maybe some new (or newish) programming language will make bug-free concurrent programs easy, but I do not think this is likely. </p>
<p>I think we already have the bulk solution. Web-scale applications (at least those that work well) make use of large numbers of CPUs, with a huge amount of concurrent execution. Web-scale programming is mostly about swarms of small-scale execution single-threaded programs (not necessarily small), well isolated from other threads. Many of the attributes Tim lists are true &#8211; or mostly-true, or should-be-true &#8211; of web scale applications.</p>
<p>Clearly the web-scale application approach does not work for all applications &#8211; though it may work for more than you expect. There are always going to be some applications that need fine-grained threading &#8230; but I suspect this group is very small. For the bulk of programming we want to allow for massive concurrency, but well-isolated and coarse-grained.</p>
<p>Why the focus on programming languages that support fine-grained concurrent programs? What problem &#8211; in the application space &#8211; does that solve? Are more than a tiny fraction of applications in that space?</p>
<p>My answer to Tim&#8217;s question is to point at the concerns of web-scale applications and cloud-computing. The problem does not drive an interest in new programming languages. The answer to large-scale concurrent execution is &#8211; for most applications &#8211; large numbers of single-threaded programs, responding to requests. Tim&#8217;s list of characteristics &#8211; in part &#8211; is useful for that sort of programming. Editing down the list:</p>
<ul>
<li><a href="http://www.tbray.org/ongoing/When/200x/2009/09/30/C-dot-next-laundry-list#p-4">Message passing</a><br />
and <a href="http://www.tbray.org/ongoing/When/200x/2009/09/30/C-dot-next-laundry-list#p-11">Dataflow</a></li>
<li><a href="http://www.tbray.org/ongoing/When/200x/2009/09/30/C-dot-next-laundry-list#p-2">Immutable data</a>,<br />
and <a href="http://www.tbray.org/ongoing/When/200x/2009/09/30/C-dot-next-laundry-list#p-7">Transactional memory</a>,<br />
and <a href="http://www.tbray.org/ongoing/When/200x/2009/09/30/C-dot-next-laundry-list#p-8">Tuple space</a></li>
</ul>
<p>(Have to admit, I am not sure the above grouped notions are distinct, when viewed at this level.)</p>
<p>For the bulk of programmers and applications, the main needed change is finding the simplest possible adaptation to the needs of web-scale programming. Once done, concurrency and threading are solved problem. We do not want or need fine-scale single-name/address space multi-threading &#8211; that way lies madness. We do need well-isolated single threads, in mass numbers, cooperating across web-scale process, machine, and network boundaries.</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/10/02/concurrency-and-threading-is-the-new-thing-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BusinessWeek Online</title>
		<link>http://bannister.us/weblog/2009/09/23/businessweek-online/</link>
		<comments>http://bannister.us/weblog/2009/09/23/businessweek-online/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 01:41:27 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Humor]]></category>
		<category><![CDATA[Politics]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1548</guid>
		<description><![CDATA[Left the videos from the BusinessWeek Online site running in background. 
In contrast to the MSNBC and WSJ sites, the videos came across as politically neutral, and not so much into the financial orthodoxy. Seemed aimed roughly at the interests of middle management.
Not getting a lot of insight, but also not as much propaganda.
]]></description>
			<content:encoded><![CDATA[<p>Left the videos from the BusinessWeek Online site running in background. </p>
<p>In contrast to the <a href="http://bannister.us/weblog/2009/09/13/msnbc/">MSNBC</a> and <a href="http://bannister.us/weblog/2009/09/23/wall-street-journal-online/">WSJ</a> sites, the videos came across as politically neutral, and not so much into the financial orthodoxy. Seemed aimed roughly at the interests of middle management.</p>
<p>Not getting a lot of insight, but also not as much propaganda.</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/09/23/businessweek-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wall Street Journal Online</title>
		<link>http://bannister.us/weblog/2009/09/23/wall-street-journal-online/</link>
		<comments>http://bannister.us/weblog/2009/09/23/wall-street-journal-online/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 01:31:35 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Humor]]></category>
		<category><![CDATA[Politics]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1546</guid>
		<description><![CDATA[After a news item took me to the Wall Street Journal site, I left the site up as it cycled through recent videos (while I was working on something else). I have not spent a lot of time listening to videos from Wall Street Journal, so had no overall opinion of the site.
In comparison to [...]]]></description>
			<content:encoded><![CDATA[<p>After a news item took me to the Wall Street Journal site, I left the site up as it cycled through recent videos (while I was working on something else). I have not spent a lot of time listening to videos from Wall Street Journal, so had no overall opinion of the site.</p>
<p>In comparison to <a href="http://bannister.us/weblog/2009/09/13/msnbc/">MSNBC</a>, the voices were at a normal level, and the sound effects hinted at &#8220;we are tasteful and sophisticated&#8221;. </p>
<p>Recurring memes I could identify &#8230;
<ul>
<li>Republicans are good, Democrats are bad.</li>
<li>Government is always less efficient than business.</li>
<li>Government &#8211; not business &#8211; is somehow responsible to the current economic face-plant.</li>
<li>Not sure how to describe &#8230; the Wall Street variant of the New England mentality?</li>
</ul>
<p>Not sure that the videos are representative of the written/print edition of the WSJ. </p>
<p>Has the WSJ changed since it was sold?</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/09/23/wall-street-journal-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MSNBC</title>
		<link>http://bannister.us/weblog/2009/09/13/msnbc/</link>
		<comments>http://bannister.us/weblog/2009/09/13/msnbc/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 20:44:18 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Humor]]></category>
		<category><![CDATA[Politics]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1537</guid>
		<description><![CDATA[Went looking for video of the latest Apple product announcements, and ended up on the MSNBC site. After the Apple-related video played, I left the site up as it cycled through recent videos (I was working on some code while it ran). I quit watching TV news many years ago, never had much interest in [...]]]></description>
			<content:encoded><![CDATA[<p>Went looking for video of the latest Apple product announcements, and ended up on the MSNBC site. After the Apple-related video played, I left the site up as it cycled through recent videos (I was working on some code while it ran). I quit watching TV news many years ago, never had much interest in the web equivalent, so had no particular opinion of MSNBC.</p>
<p>First impression: Why all the shouting? Kind of the equivalent of TYPING IN CAPITAL LETTERS ALL THE TIME!! Add the dramatic special effects noise. <b>WITH BOLD <u>AND UNDERLINE!!</u></b> Did someone conclude that SHOUTING the news made it more believable? Noisy. Should change the name to the Shouting News Network (SNN). </p>
<p>Second: They sure do a <b>lot</b> of product placements disguised as news reports.</p>
<p>Third: How do they pick their &#8220;outside-expert&#8221; guys to supplement the usual talking-heads? Watching, I often could not figure out what criteria lead to their choices.</p>
<p>Fourth: There must be some company edict to use the words &#8220;monetize&#8221; and &#8220;free market&#8221; a lot. Did not seem to matter so much whether it made sense in context. Caused the &#8220;outside-experts&#8221; some grief, as they tried to come up with sensible responses to not-quite meaningful questions.</p>
<p>Kind of funny, in a really odd way. Don&#8217;t think I&#8217;ll be watching MSNBC regularly. </p>
<p>Should try the same experiment with the other news networks.</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/09/13/msnbc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When hardware guys write about software</title>
		<link>http://bannister.us/weblog/2009/09/03/when-hardware-guys-write-about-software/</link>
		<comments>http://bannister.us/weblog/2009/09/03/when-hardware-guys-write-about-software/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 02:23:27 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Humor]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1527</guid>
		<description><![CDATA[My father sent a link to an article in a hardware-oriented magazine &#8211; EDN (Electronic Design News) &#8211; about the upcoming Power7 CPU from IBM.

This is out of our fields, but interesting.
http://www.edn.com/article/CA6686259.html?nid=2435&#038;rid=8150303
I liked the one comment: &#8220;the generally horrible code from the Microsoft world&#8221;.

My characteristically reserved response:

Yes, it is usually cute when hardware guys talk [...]]]></description>
			<content:encoded><![CDATA[<p>My father sent a link to an article in a hardware-oriented magazine &#8211; EDN (Electronic Design News) &#8211; about the upcoming Power7 CPU from IBM.<br />
<blockquote>
This is out of our fields, but interesting.</p>
<p><a href="http://www.edn.com/article/CA6686259.html?nid=2435&#038;rid=8150303">http://www.edn.com/article/CA6686259.html?nid=2435&#038;rid=8150303</a></p>
<p>I liked the one comment: &#8220;the generally horrible code from the Microsoft world&#8221;.
</p></blockquote>
<p>My characteristically reserved response:<br />
<blockquote>
Yes, it is usually cute when hardware guys talk about software.</p>
<p>As I remember, the result came from the large number of branches found in &#8220;the generally horrible code from the Microsoft world that dominated tasks in those days&#8221;. Except this characteristic is common to most modern code, not just in &#8220;Microsoft world&#8221; code. It comes from complex behaviors &#8211; an increasing and increasingly common characteristic in contemporary code. Outside a small set of niche applications (with large number crunching), you <b>are</b> going to have a lot of branches. Branching limits the value of concurrent instruction dispatch, and speculative execution (as we might guess). Results pointed at more than ~3-way dispatch as on the wrong side of the &#8220;knee&#8221; of the curve.</p>
<p>I think the chip design offers a hint as to their expected application domain:</p>
<blockquote><p>Each of the Power7&#8217;s cores has 12 execution units, including two each load/store and fixed-point, four double-precision floating-point, and a decimal floating-point unit. The core can dispatch six instructions per cycle.</p></blockquote>
<p>With <b>four</b> floating-point execution units, my guess is that they are aiming at niche mass number-crunching applications, not general purpose applications. Combined with the large shared-cache, these should do well on problems that allow highly concurrent bulk number crunching. Might see a lot of these to run weather simulations (to predict Global Warming), and some sorts of large engineering design calculations/simulations.</p>
<p>As a general purpose CPU, my guess is that benchmarks (when and if they appear) will be unimpressive.</p>
<p>Add to this the fact that most big new web applications are moving (have moved, in fact) to a no-shared-memory model &#8211; lots of single-board nodes with 1 to 8 CPU sockets, no shared memory between processes, connected via ethernet to large-scale high-performance redundant datastores (specialized database/filesystems).</p>
<p>Which makes the really cool design aspects of the Power7 pretty much useless. This is not the sort of CPU that would ever see large-scale deployment in a web-service datacenter.</p>
<p>Too bad the writer of the article does not have a clue about software, but no surprise from a hardware magazine.</p>
<p><i>Oh wait! I take it all back! This CPU could be terrific at the more compute-intense computer games! Perhaps Microsoft will pick this up for the next XBox? Super high frame rates in MegaBlaster2010! &#8230; except highly concurrent shared memory applications are a real bitch to write, even worse to debug, so better make that MegaBlaster2012, or 2013, or 2015, or &#8230; (hey! they never did ship!?!).</i></p>
<p>&#8230; maybe not. <img src='http://bannister.us/weblog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/09/03/when-hardware-guys-write-about-software/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building things</title>
		<link>http://bannister.us/weblog/2009/08/26/building-things/</link>
		<comments>http://bannister.us/weblog/2009/08/26/building-things/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 22:45:29 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1509</guid>
		<description><![CDATA[Took off this week and last with no specific plans. Might have gone driving (might still), but I made several trips in the last year, so &#8230; (shrug). Guess I have been on a bit of a home improvement kick. Imagining a new bit, and &#8211; much work later &#8211; seeing an entirely satisfactory end [...]]]></description>
			<content:encoded><![CDATA[<p>Took off this week and last with no specific plans. Might have gone driving (might still), but I made several trips in the last year, so &#8230; (shrug). Guess I have been on a bit of a home improvement kick. Imagining a new bit, and &#8211; much work later &#8211; seeing an entirely satisfactory end result, is nice. </p>
<p>Was out in the garage last night, planning the next bit, when my daughter popped out of the house. &#8220;Oh, you&#8217;re thinking again, aren&#8217;t you?&#8221; She was not surprised to find me sitting and staring for an hour, before starting on the next bit.</p>
<p>Seems I use roughly the same approach whether cooking, building things out of wood and metal, or writing software. When cooking I never use recipes, I am always changing <i>something</i>, and usually get good results. When building I never use plans (other than occasional rough sketches), will think through the problem and build the next bit in my mind, before starting manufacture &#8211; and usually get good results. When writing software I do not have much use for design documents or formal processes, but cannot start until I have thought through the problem, and usually get good results.</p>
<p>In each case I can visualize the end result before I start. In each case I am working without plans (written plans or plans from others), yet &#8230; I <b>always</b> have a plan.</p>
<p>As I learned back in school, this pattern of work does not work at all for some of my peers. My upper-division Physics lab class was the first clear example. The lab was &#8211; at base &#8211; one student alone in a room with a pile of equipment, and a set experiment to complete in a couple weeks. The lab had a new instructor when I took the class, and he was not familiar with the equipment. Also, for some reason, none of the equipment worked. So with little or no instructions, I had to figure out what the equipment did, how it <i>should</i> work, and what needed to be fixed.</p>
<p>Getting the experiments to work was both frustrating, and fun!</p>
<p>Midway through the course, the instructor assigned another student to work with me, as this guy was not doing well by himself. I knew the guy, counted him as a bit of a friend, and thought he was at least as good as I at the theory classes. But in the lab, he drove me nuts. I needed silence so I could visualize how things should work. For the parts I did not understand well enough to visualize, I would disassemble and play with the equipment, until I better understood how it worked. </p>
<p>I suppose it looked to the other guy like I did things in no particular order, while ignoring anything he said. After an indeterminate period of seemingly aimless activity, he&#8217;d suddenly hear &#8220;Ah &#8230; I get it!&#8221;, followed by an ordered, logical explanation, and a burst of activity &#8211; after which the equipment would (usually) work.</p>
<p>Bet I drove him a bit nuts, as he did to me.</p>
<p>Also, up to that point in the lab class, I thought I was doing poorly. Most times &#8211; when the instructor dropped by &#8211; the equipment was not working, and I had no coherent explanation (or so I felt) of what to do next. Once the equipment was working, I could &#8211; in short order &#8211; perform the experiment, and move to the next lab.</p>
<p>Bet also my more present co-workers see something similar &#8211; an indeterminate period of seemingly aimless activity, followed suddenly by a burst of activity and plans. Probably drives some folk &#8211; of differing nature &#8211; slightly nuts.</p>
<p>So my daughter caught me planning, again &#8230; <img src='http://bannister.us/weblog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/08/26/building-things/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How improve both oil production and the economy</title>
		<link>http://bannister.us/weblog/2009/08/22/how-improve-both-oil-production-and-the-economy/</link>
		<comments>http://bannister.us/weblog/2009/08/22/how-improve-both-oil-production-and-the-economy/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 23:24:16 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Society]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1507</guid>
		<description><![CDATA[Part of our economic mess starts with the huge flow of dollars sent outside the country to buy oil. We could produce oil from domestic sources, but the base cost is higher than pumping oil out of the ground and shipping halfway around the planet. If the market price is high enough, investing in production [...]]]></description>
			<content:encoded><![CDATA[<p>Part of our economic mess starts with the huge flow of dollars sent outside the country to buy oil. We could produce oil from domestic sources, but the base cost is higher than pumping oil out of the ground and shipping halfway around the planet. If the market price is high enough, investing in production from domestic sources looks like a good idea. If the price of oil on the global market drops &#8211; as it did in the 1980&#8217;s, then domestic production cannot compete.</p>
<p>If you visit towns in western Colorado and south-eastern Utah, you can see a boom-and-bust pattern of development for the 1970&#8217;s and 80&#8217;s. In the 1970&#8217;s the notion of extracting <a href="http://en.wikipedia.org/wiki/Shale_oil">shale-oil</a> got a lot of investment, and caused a modest boom in development. The low oil prices of the 1980&#8217;s killed investment in (then uneconomic) shale oil extraction, and development slowed. Investment in shale-oil production since that time has proved a bit slow, as investors are not entirely confident the world oil prices will stay high enough for profitable production.</p>
<p>Keeping dollars in America means more productive economic activity within the country. Domestic oil production should help stabilize consumer prices. How can we fix the cost of imported oil high enough so that domestic production stays profitable?</p>
<p>We could place a tax on imported oil, but this seems likely to become a mess. How would we tax different grades of oil? What about refined products? Is politics likely to grant different rates to different nations and oil companies? We would need a new bureaucracy to set tax rates, would most likely get things slightly wrong, and create new nonconstructive opportunities for politics and corruption. </p>
<p>Better to not create new opportunities for bad behavior.</p>
<p>A far simpler approach would be to place a large retail tax on gasoline, and offer an equally large tax credit for domestic oil production. The idea is to have no net effect on the retail cost of gasoline produced from domestic sources, but make non-domestic sources more expensive &#8211; enough so that domestic production is profitable, and investment in domestic production is safe. </p>
<p>I once heard that shale-oil production is profitable when the world oil price is above $70 per barrel. The low point in world oil prices (that killed development of shale-oil production) was around $30 per barrel. A tax of about $40 per barrel (or $1 per gallon of gasoline) should be enough to insure that domestic production is assured profitable. Given assured profits, <b>all</b> feasible forms of oil production (including sustainable production from biologic sources) should be able to attract the level of investment that they need.</p>
<p>Put differently, by making one simplest-possible change in the ground rules, we can let the market solve the production problem, without more-complicated government intervention.</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/08/22/how-improve-both-oil-production-and-the-economy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extending the Pearson hash function to larger values</title>
		<link>http://bannister.us/weblog/2009/08/18/extending-the-pearson-hash-function-to-larger-values/</link>
		<comments>http://bannister.us/weblog/2009/08/18/extending-the-pearson-hash-function-to-larger-values/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 01:09:04 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1501</guid>
		<description><![CDATA[My favorite hash function is without doubt the Pearson hash. In my measurements, for my usage, custom hash tables built using a Pearson hash to index into a power-of-two-sized table, have always performed better than the best alternatives. (For not-small tables each table slot is the root of a binary tree.) Certainly this result is [...]]]></description>
			<content:encoded><![CDATA[<p>My favorite hash function is without doubt the <a href="http://en.wikipedia.org/wiki/Pearson_hashing">Pearson hash</a>. In my measurements, for <a href="http://bannister.us/weblog/2005/01/18/a-diversion-into-hash-tables-and-binary-searches/">my usage</a>, custom hash tables built using a Pearson hash to index into a power-of-two-sized table, have always performed better than the best alternatives. (For not-small tables each table slot is the root of a binary tree.) Certainly this result is going to be somewhat specific to the use-case and current CPU architecture, but each time performance was important, my solution &#8211; using binary trees in 256 hash buckets, using the Pearson hash &#8211; won the benchmarks.</p>
<p>The main limitation of the Pearson hash is that it only computes an 8-bit value (i.e. the range 0..255). For some problems a bigger range of values would be good. The means offered in Pearson&#8217;s original paper (as I recall &#8211; threw out the old magazine long ago, and the paper is not on the web) was to run the algorithm more than once to add additional 8-bit chunks to the hash.</p>
<p>Just now I&#8217;m feeling like a bit of an idiot, as it seems the Pearson hash could be easily extended up to 16-bits (or a bit beyond) with a ridiculously small change.</p>
<p>The original Pearson algorithm:
<pre>
static unsigned char T[] = {
    // The values 0..255 shuffled into random order.
};

static inline unsigned hashOf(unsigned h,const char* s) {
    for (int c = *s++; c; c = *s++) {
        h = T[h ^ (255 &#038; c)];
    }
    return h;
}
</pre>
<p>The algorithm modified to generate a 16-bit hash:
<pre>
static unsigned short T[] = {
    // The values 0..65535 shuffled into random order.
};

static inline unsigned hashOf(unsigned h,const char* s) {
    for (int c = *s++; c; c = *s++) {
        h = T[h ^ (255 &#038; c)];
    }
    return h;
}
</pre>
<p>Note that only the type and size of the table <b>T</b> changed! </p>
<p>With the large cache sizes of current CPUs, the 128KB table will fit nicely into cache, and perform very well. On CPUs with smaller caches, you might want to use a smaller table. Also clearly the table size for a 32-bit hash would be huge. You might want some sort of test for degenerate patterns in <b>T[]</b> (though I&#8217;d guess the probability of getting a bad table is very small).</p>
<p>This notion is so simple, I am a bit surprised that no one (so far as I can tell) suggested this approach before.</p>
<p>For large numbers of keys, each bit added to the hash value saves the equivalent of a key comparison. Adding 8-bits to the key saves 8 key comparisons. If the expense added to the hash function is less than the cost of one key comparison (certainly true of string compares), then you are ahead from the first bit added.</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/08/18/extending-the-pearson-hash-function-to-larger-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Pidgin with support for Microsoft IM</title>
		<link>http://bannister.us/weblog/2009/08/05/installing-pidgin-with-support-for-microsoft-im/</link>
		<comments>http://bannister.us/weblog/2009/08/05/installing-pidgin-with-support-for-microsoft-im/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 17:40:56 +0000</pubDate>
		<dc:creator>Preston L. Bannister</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1495</guid>
		<description><![CDATA[Needed to get IM working from my Ubuntu Linux boxes to my employer&#8217;s Microsoft Office Communicator (2007?) service. Was using the Microsoft Messenger 4.7 client in a VM hosting Windows, but of late this seems to not work well enough for some of my coworkers (since I am often not actively using that VM).
I had [...]]]></description>
			<content:encoded><![CDATA[<p>Needed to get IM working from my Ubuntu Linux boxes to my employer&#8217;s Microsoft Office Communicator (2007?) service. Was using the Microsoft Messenger 4.7 client in a VM hosting Windows, but of late this seems to not work well enough for some of my coworkers (since I am often not actively using that VM).</p>
<p>I had looked at this over a year ago, but the SIPE support for Pidgin did not support the options needed for the IM service as configured by the company. On checking again, it seemed possible that the current version might work, but I needed the most recent version of Pidgin and the SIPE plugin.</p>
<p>So &#8230; for future reference. <img src='http://bannister.us/weblog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Building Pidgin and the SIPE plugin from sources on Ubuntu</h3>
<ol>
<li>Install the dependencies needed to build from sources.
<pre>
sudo apt-get build-dep pidgin pidgin-sipe
</pre>
</li>
<li>Remove any existing installation.
<pre>
sudo apt-get remove pidgin pidgin-sipe libpurple-dev
</pre>
</li>
<li>Download <a href="http://www.pidgin.im/download/source/">Pidgin sources</a>.</li>
<li>Change to the directory in which you unpacked the Pidgin sources, and build.
<pre>
./configure
make
sudo make install
</pre>
</li>
<li>Download <a href="http://sourceforge.net/projects/sipe/files/">Pidgin SIPE plugin</a>.</li>
<li>Change to the directory in which you unpacked the SIPE plugin sources, and build.
<pre>
./configure
make
sudo make install
</pre>
</li>
<li>Now run Pidgin. It should appear in the usual Gnome menu, or can be run from the command line. Given that figuring out the right options for you company&#8217;s setup can be tricky (it was for me), you might want to do the initial connection setup with debug output from the command line.
<pre>
pidgin -d
</pre>
<p>Not strictly necessary, as the &#8220;Debug Window&#8221; (got to via the &#8220;Help&#8221; menu) offers the same(?) information.</p>
<p>You might also want to (temporarily) disable any other IM accounts you have configured.
</li>
</ol>
<p>Figuring out the right options to use with your company IM service &#8230; you are on your own. <img src='http://bannister.us/weblog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/08/05/installing-pidgin-with-support-for-microsoft-im/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why so much from Nigeria?</title>
		<link>http://bannister.us/weblog/2009/06/21/why-so-much-from-nigeria/</link>
		<comments>http://bannister.us/weblog/2009/06/21/why-so-much-from-nigeria/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 16:26:01 +0000</pubDate>
		<dc:creator>Preston</dc:creator>
				<category><![CDATA[Humor]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1487</guid>
		<description><![CDATA[
On a related note, why are all scammers in Nigeria? Has anyone received the scam emails from ANY other country? I&apos;m frankly dissapointed with the criminals in other countries. Where are they and why aren&apos;t they trying to scam us too?
via Consumerist &#8211; It&#8217;s Now Completely Impossible To Sell A Laptop On Ebay &#8211; eBay.

]]></description>
			<content:encoded><![CDATA[<blockquote><p>
On a related note, why are all scammers in Nigeria? Has anyone received the scam emails from ANY other country? I&apos;m frankly dissapointed with the criminals in other countries. Where are they and why aren&apos;t they trying to scam us too?</p>
<p>via <a href='http://consumerist.com/5007790/its-now-completely-impossible-to-sell-a-laptop-on-ebay'>Consumerist &#8211; It&#8217;s Now Completely Impossible To Sell A Laptop On Ebay &#8211; eBay</a>.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/06/21/why-so-much-from-nigeria/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tigers of Granularity</title>
		<link>http://bannister.us/weblog/2009/06/18/tigers-of-granularity/</link>
		<comments>http://bannister.us/weblog/2009/06/18/tigers-of-granularity/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 03:36:39 +0000</pubDate>
		<dc:creator>Preston</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1478</guid>
		<description><![CDATA[Several months back, I wrote up a speculation about the granularity of what we call &#8220;reality&#8221;. Since then I have tended notice more those instances of a perceptual gap &#8211; where my mental record departs from the smoothly deductive model of reality. 
(An odd trap, when deductions &#8211; of a sort &#8211; lead to speculation [...]]]></description>
			<content:encoded><![CDATA[<p>Several months back, I <a href="http://bannister.us/weblog/2008/12/06/the-other-tiger/">wrote up</a> a speculation about the granularity of what we call &#8220;reality&#8221;. Since then I have tended notice <i>more</i> those instances of a perceptual gap &#8211; where my mental record departs from the smoothly deductive model of reality. </p>
<p>(An odd trap, when deductions &#8211; of a sort &#8211; lead to speculation that perceived reality may not follow a deductive model.)</p>
<p>What do I mean by a &#8220;deductive model of reality&#8221;? </p>
<p>If I cannot find object, search repeatedly in all the locations I expect, and eventually find the object in plain sight in a place I looked many times before &#8211; I assume by deduction that the object was in fact there all along, and I somehow missed it. By somewhat-conscious choice the episode is recorded in my memory as &#8220;the object was always there, and I somehow failed to see it&#8221;. By choice I reject from recall an instance of &#8220;the object appeared where I had looked before&#8221; &#8211; as impossible. </p>
<p>Along the same lines &#8211; if you and I have different memories of an event, I assume that one (or both) of us were mis-remembering, and there was &#8211; by deduction &#8211; a single true objective reality of the event.</p>
<p>A good practice in science is to occasionally question (and re-verify) your assumptions. What could I expect if my speculation about a &#8220;granularity&#8221; of reality might be somewhat true? With that question in mind I now more often tend to mark the mismatch between memory and &#8220;objective reality&#8221;. </p>
<p><i>An aside</i> &#8211; At one point I wondered if the deductive the model of reality was a learned behavior &#8211; and that question suddenly invoked a faint memory of adopting a <i>choice</i> of interpretation, as a child. Is the memory real? I do not know. </p>
<p> Again, without any sort of test, there is no reason to treat this <i>speculation</i> as anything more. To be clear, I most firmly <i>believe</i> in the deterministic model, and not the speculation. But I also now have this persistent ghost of a question&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/06/18/tigers-of-granularity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion, CVS, and tags</title>
		<link>http://bannister.us/weblog/2009/06/17/subversion-cvs-and-tags/</link>
		<comments>http://bannister.us/weblog/2009/06/17/subversion-cvs-and-tags/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 21:53:30 +0000</pubDate>
		<dc:creator>Preston</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1470</guid>
		<description><![CDATA[In the process of converting a group of programmers to Subversion, I ran across a surprisingly awkward bit.
As a regular practice, before generating a build to go to customers, I always carefully review all the changes to the program sources since the last customer release. Using CVS the command line is simple (run from the [...]]]></description>
			<content:encoded><![CDATA[<p>In the process of converting a group of programmers to Subversion, I ran across a surprisingly awkward bit.</p>
<p>As a regular practice, before generating a build to go to customers, I always carefully review all the changes to the program sources since the last customer release. Using CVS the command line is simple (run from the root directory for the component):</p>
<pre>cvs diff -t WIDGET_v301</pre>
<p>Reviewing the differences helps both to write up a customer-oriented list of changes, and also helps insure that nothing unintended (say, left over experiments or debug code) makes it into the customer release.</p>
<p>With Subversion under Eclipse the equivalent comparison is easy &#8211; just select the <b>trunk</b> and <b>tags/v301</b> and a compare gets the same result as CVS.</p>
<p>With Subversion on the command line, the equivalent comparison is ridiculously tedious.</p>
<pre>svn diff http://hostname/path/widget/tags/v301</pre>
<p>Um, hello? Subversion knows the <b>http://hostname/path/</b> part. If I followed the conventional layout, Subversion can deduce that the current directory is <b>trunk</b> and from that the path to <b>tags</b>. Yes, I know the repository layout (in terms of branches and tags) under Subversion can be arbitrary (and this is all very cool), but optimizing for the most-common case is always good. </p>
<p>Figuring that I must have missed something, I went digging, and came up with this gem:</p>
<blockquote><p>
<a href="http://gcc.gnu.org/ml/gcc/2005-11/msg00136.html">Branko Äibej &#8211; Re: svn diff branch woprking copy against mainline?</a><br />
This seems to be a common misconception. The important thing to remember here is that there is no separate namespace for labels and branches in SVN, and that the layout of the repository is arbitrary. IOW, the fact that you have branches in /branches is a convention, not something imposed by the SVN server.
</p></blockquote>
<p>The writer is almost exactly wrong. There <b>are</b> a separate namespaces in the Subversion repository. The namespaces are established by convention. The recommended PROJECT/{trunk,tags,branches} can be recognized by default, and any local variant specified by user-set properties in Subversion. This is easy.</p>
<p>I expected Subversion to be a nearly uniform improvement over CVS, not stuck for years on how to cover simple usage.</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/06/17/subversion-cvs-and-tags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What makes for &#8220;Global Competitiveness&#8221;?</title>
		<link>http://bannister.us/weblog/2009/06/16/what-makes-for-global-competitiveness/</link>
		<comments>http://bannister.us/weblog/2009/06/16/what-makes-for-global-competitiveness/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 17:28:31 +0000</pubDate>
		<dc:creator>Preston</dc:creator>
				<category><![CDATA[Politics]]></category>
		<category><![CDATA[Society]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1463</guid>
		<description><![CDATA[Top Countries in Global Competitiveness: article, slideshow
An observation &#8211; a number of the small countries with outsize rankings are noted as having high taxes. So high taxes need not harm &#8211; and when the tax revenues are used effectively, may benefit &#8211; competitiveness (at least as measured by this group).
On a more speculative note, Britain [...]]]></description>
			<content:encoded><![CDATA[<p>Top Countries in Global Competitiveness: <a href="http://www.businessweek.com/globalbiz/content/oct2008/gb20081022_377709.htm">article</a>, <a href="http://images.businessweek.com/ss/08/10/1022_competitive_countries/index.htm">slideshow</a></p>
<p>An observation &#8211; a number of the small countries with outsize rankings are noted as having high taxes. So high taxes need not harm &#8211; and when the tax revenues are used effectively, may benefit &#8211; competitiveness (at least as measured by this group).</p>
<p>On a more speculative note, Britain is noted for &#8220;sophisticated financial markets&#8221;, and also as no longer in the top ten &#8230; and falling. Is there a correlation?</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/06/16/what-makes-for-global-competitiveness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Video from our local Registrar of Voters</title>
		<link>http://bannister.us/weblog/2009/05/22/video-from-our-local-registrar-of-voters/</link>
		<comments>http://bannister.us/weblog/2009/05/22/video-from-our-local-registrar-of-voters/#comments</comments>
		<pubDate>Fri, 22 May 2009 22:45:07 +0000</pubDate>
		<dc:creator>Preston</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Politics]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1456</guid>
		<description><![CDATA[In Orange County (California) the process of collecting the vote is managed by the Orange County Registrar of Voters. Only after this latest election (last Tuesday) did I find that the OCROV has a channel on YouTube

While the above video is only slightly interesting, of note is the guy in the suit &#8211; Neal Kelley [...]]]></description>
			<content:encoded><![CDATA[<p>In Orange County (California) the process of collecting the vote is managed by the <a href="http://www.ocvote.com/">Orange County Registrar of Voters</a>. Only after this latest election (last Tuesday) did I find that the OCROV has <a href="http://www.youtube.com/user/ocrov">a channel on YouTube</a></p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/bkTxs8XnpH8&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/bkTxs8XnpH8&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>While the above video is only slightly interesting, of note is the guy in the suit &#8211; <a href="http://www.ocvote.com/nealkelleyenglish.htm">Neal Kelley</a> &#8211; as after he was appointed Registrar, his department did a noticeably better job. The organization of supplies and instructions from the OCROV to the polling sites have improved every year. I give the guy a lot of credit for a job well done.</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/05/22/video-from-our-local-registrar-of-voters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another take on the class system</title>
		<link>http://bannister.us/weblog/2009/05/20/another-take-on-the-class-system/</link>
		<comments>http://bannister.us/weblog/2009/05/20/another-take-on-the-class-system/#comments</comments>
		<pubDate>Thu, 21 May 2009 00:51:25 +0000</pubDate>
		<dc:creator>Preston</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Politics]]></category>
		<category><![CDATA[Society]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1449</guid>
		<description><![CDATA[Reading about the British class system, was surprised at one aspect. Pretty much anyone who reaches a notable level of achievement can get knighted. The class system in Britain &#8211; across generations &#8211; is not static.
We have an unresolved problem. At the start of life and career, we want rough equality of opportunity. But ability [...]]]></description>
			<content:encoded><![CDATA[<p>Reading about the British class system, was surprised at one aspect. Pretty much anyone who reaches a notable level of achievement can get knighted. The class system in Britain &#8211; across generations &#8211; is not static.</p>
<p>We have an unresolved problem. At the start of life and career, we want rough equality of opportunity. But ability is not equal. What each citizen could achieve, and will achieve &#8230; differs. If great achievement brings great wealth &#8230; I think that is right. For each guy who added much to society&#8217;s real wealth, given wealth, the odds are good that guy will do interesting things with that wealth.</p>
<p>On the other hand, some acquire great wealth without doing anything particularly constructive. Great wealth acquired but not productively invested leads to leads to huge instabilities in the economy &#8211; as in our present trouble. There is some sense in having a recognized &#8220;class&#8221; system &#8211; but only if the averaged result rewards real productivity (in any various sense). </p>
<p>For a long-term stable and productive society, we do not want vast unearned wealth passing between generations. There is only a slight chance the next generations will be as productive the first wealth-acquiring individual. This suggests that &#8211; as a society, and in the case of great wealth &#8211; we must limit the amount of owned wealth that can be passed between generations.</p>
<p>(Yes, a &#8220;death tax&#8221; &#8211; so colorfully named &#8211; makes sense for massive wealth.)</p>
<p>On the flip side, I do not especially trust government &#8211; or any large organization &#8211; to control or direct the economy. Central planning does not often work. The intelligence of a committee tends to sum up to an average of the individual participants<br />
&#8230; or worse.</p>
<p>So how do you reward those of a different &#8220;class&#8221; (in terms of real achievement), tax those of great wealth (and no achievement), while using the least amount of &#8220;government&#8221;?</p>
<p>Perhaps the British approach to creating new &#8220;peerage&#8221; is a clue.</p>
<p>In the usual case, and as our society and economy is currently organized, we want great tax on great wealth. As currently organized, only a very small proportion is able to acquire great wealth. Of that portion that gathers great wealth, only a small portion can put that wealth to good use.</p>
<p>We need another filter &#8211; something that separates passive-rich from the worthy-rich.</p>
<p>Could we use something like the British peerage system? Those publicly recognized as exceptional <i>should</i> get a lower (or no) tax rate. Recognition could come from the government, or from a small number of entitled organizations. The number of entitlements should be limited, and some measure put on the organization (<i>including and especially</i> government agencies) allowed to grant entitlements.</p>
<p>An interesting exercise would be to express this notion in terms of a series of empirical measures. A healthy sum would include both individual or group judgment in granting economic privilege.</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/05/20/another-take-on-the-class-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I am not a Scientist</title>
		<link>http://bannister.us/weblog/2009/04/22/i-am-not-a-scientist/</link>
		<comments>http://bannister.us/weblog/2009/04/22/i-am-not-a-scientist/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 01:13:30 +0000</pubDate>
		<dc:creator>Preston</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1443</guid>
		<description><![CDATA[What is a Scientist?
I have a clear notion. There are two parts. The first part is a pattern of thought. The second is depth of training in a particular area of expertise. My college degree is in Physics, but only a four-year degree. In Physics a four-year degree is only a fraction of the way [...]]]></description>
			<content:encoded><![CDATA[<p>What is a Scientist?</p>
<p>I have a clear notion. There are two parts. The first part is a pattern of thought. The second is depth of training in a particular area of expertise. My college degree is in Physics, but only a four-year degree. In Physics a four-year degree is only a fraction of the way to competence, so I am not a Physicist. </p>
<p>There is a pattern of thought essential to a good scientist (or a really good engineer). Of this I am quite certain. You need to be a good observer. You need to be a good skeptic. You need to be thoroughly analytical. This part is easy for me. My father was a good engineer. I read quite a lot, and before college had learned to be a good, skeptical, and analytical observer. The aim in college is to teach you this new mode of thought, and beyond this to transfer some of the wisdom acquired through experience by your instructors. </p>
<p>Of course, following the usual human tendency, I assumed my peers were at least as good at this mode of thought as was I. </p>
<p>In college, I did not need to learn a new mode of thought. The time in college I very much valued, as it seems that the hints from experience offered by my instructors fully sunk home. Those same lessons became so deeply embedded in my way of thought that I could not imagine a true &#8220;scientist&#8221; applying anything less. </p>
<p>What later I found is that &#8220;scientists&#8221; very often miss the obvious &#8211; or what I thought should be obvious. The lessons from my college professors (in Physics &#8211; admittedly the &#8220;hardest&#8221; science), suggest an analytical path that many scientists do not fully follow. This I have the hardest time understanding. Could it be that not having to acquire a new mode of thought meant I absorbed more from my instructors?</p>
<p>I do not know. By my standards, I am not a scientist. But &#8230; I very often come up with (what seems to me) obvious questions, on reading about the works of some scientists. Even more surprising &#8211; it seems very often to turn out that my (distinctly amateur) questions lead to interesting answers. How can that be so often true?  </p>
<p>I am not a scientist, but perhaps I am a bit more than an intelligent layman. Maybe that long-ago acquired mode of thought made more of a difference than I expect. </p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/04/22/i-am-not-a-scientist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>kitchen tips</title>
		<link>http://bannister.us/weblog/2009/04/18/kitchen-tips/</link>
		<comments>http://bannister.us/weblog/2009/04/18/kitchen-tips/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 03:50:26 +0000</pubDate>
		<dc:creator>Preston</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1441</guid>
		<description><![CDATA[If you have no idea (like me) what size KitchenAid mixer is sufficient, and what size is excessive &#8211; I can tell you with certainty that a 300 watt mixer will struggle with a kilogram of wheat flour in pizza dough. 
I can also tell you that there is something on the underside of the [...]]]></description>
			<content:encoded><![CDATA[<p>If you have no idea (like me) what size KitchenAid mixer is sufficient, and what size is excessive &#8211; I can tell you with certainty that a 300 watt mixer will struggle with a kilogram of wheat flour in pizza dough. </p>
<p>I can also tell you that there is something on the underside of the mixer that can lacerate your finger, when you wash off the bits of dough left on the mixer (if mixing a bit too much dough, perhaps).</p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/04/18/kitchen-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maybe Bill Gates was smarter than I thought?</title>
		<link>http://bannister.us/weblog/2009/04/13/maybe-bill-gates-was-smarter-than-i-thought/</link>
		<comments>http://bannister.us/weblog/2009/04/13/maybe-bill-gates-was-smarter-than-i-thought/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 10:12:22 +0000</pubDate>
		<dc:creator>Preston</dc:creator>
				<category><![CDATA[Humor]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://bannister.us/weblog/?p=1433</guid>
		<description><![CDATA[My second job out of college was at Burroughs &#8211; then the second largest computer company in the world, and still growing strongly. Interviewing at Burroughs was fun! I went in at about 9am, and did not emerge until 8pm. In between I got to talk to smart people in many different areas. Later I [...]]]></description>
			<content:encoded><![CDATA[<p>My second job out of college was at Burroughs &#8211; then the second largest computer company in the world, and still growing strongly. Interviewing at Burroughs was fun! I went in at about 9am, and did not emerge until 8pm. In between I got to talk to smart people in many different areas. Later I heard that I might have set a record for the longest set of interviews. After talking to so many smart folk, I was completely convinced that Burroughs was a great choice.</p>
<p>The reality of working at Burroughs in the early 1980&#8217;s was a bit more of a mixed bag. There were a lot of smart folk working at Burroughs, in that time. The company had all the potential needed to do great things. Yet &#8230; there was something wrong. The company was &#8211; for the most part &#8211; not doing great things. The Burroughs of that time had inherited a lot of loyal customers, and customers were loyal to Burroughs because of some brilliant work and products done in the past. Somewhere between the 1960&#8217;s and the 1980&#8217;s &#8230; something had gone badly wrong with management.</p>
<p>At the time, I did not have enough experience to know what was wrong, or even to be certain that anything was wrong (though I did eventually have suspicions).</p>
<p>I guess the interviews did me some good. I later learned that I&#8217;d landed a position that many folk within Burroughs very much wanted (and this was my second job out of college!).</p>
<p>Burroughs was a very early OEM partner for Microsoft Windows. I got sent by Burroughs to a Windows Developer conference in Seattle in 1984. During a lunch break, Bill Gates sat at our table, and suggested that we send in resumes to Microsoft. I was rather surprised at this. My employer had spent money to send me to the developer conference. For me to jump ship afterward seemed &#8211; rather rude. (I was <i>very</i> tempted, but my then-fiancée did not want to leave southern California. Turns out that was a very bad judgment on my part &#8211; both in the choice of wife, and in ignoring the opportunity.)</p>
<p>I may have underestimated Bill Gates. I thought his sitting at our table during lunch &#8211; and the offer &#8211; was essentially random. On reflection &#8230; of the tens of thousands of programmers at Burroughs, I was the representative they sent &#8211; a kid just out of college. If I were Bill Gates and looking for a useful filter &#8211; a guy just out of college who ended up at the Windows Developer conference through the second largest computer company in the world &#8211; that would be about as good as anyone could get.</p>
<p>The other way of reading this is that when given the perfect opportunity, you should not trust my judgment. <img src='http://bannister.us/weblog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://bannister.us/weblog/2009/04/13/maybe-bill-gates-was-smarter-than-i-thought/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
