<?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>glyphobet • глыфобет • γλυφοβετ &#187; essay</title>
	<atom:link href="http://glyphobet.net/blog/category/essay/feed" rel="self" type="application/rss+xml" />
	<link>http://glyphobet.net/blog</link>
	<description>musings over a tuna fish sandwich</description>
	<lastBuildDate>Wed, 21 Jul 2010 23:53:29 +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>Grasping the nuclear fourth rail of Python syntax with both hands and holding on for dear life</title>
		<link>http://glyphobet.net/blog/essay/1581</link>
		<comments>http://glyphobet.net/blog/essay/1581#comments</comments>
		<pubDate>Sun, 13 Jun 2010 19:34:51 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[essay]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[syntax]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=1581</guid>
		<description><![CDATA[In Python vs. Ruby: A Battle to The Death, Gary Bernhardt wishes for Ruby-style blocks in Python. 

The BDFL has already weighed in on anonymous blocks in Python:
If you want anonymous blocks, by all means use Ruby. Python has first-class callables,1 Ruby has anonymous blocks. Pick your favorite, but don&#8217;t whine that neither language has [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://blog.extracheese.org/2010/02/python-vs-ruby-a-battle-to-the-death.html">Python vs. Ruby: A Battle to The Death</a>, <a href="http://blog.extracheese.org/">Gary Bernhardt</a> wishes for Ruby-style blocks in Python. </p>
<p><object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9471538&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9471538&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object></p>
<p>The BDFL has already <a href="http://mail.python.org/pipermail/python-3000/2006-November/004430.html">weighed in on anonymous blocks in Python</a>:</p>
<blockquote><p>If you want anonymous blocks, by all means use Ruby. Python has first-class callables,<sup>1</sup> Ruby has anonymous blocks. Pick your favorite, but don&#8217;t whine that neither language has both. It ain&#8217;t gonna happen.</p></blockquote>
<p>This seems to imply that first-class callables and anonymous blocks are mutually exclusive language features, but that&#8217;s wrong: JavaScript has the ability to pass callables around like anything else, and it has anonymous functions, which can be used just like Ruby&#8217;s anonymous blocks. Does that mean JavaScript is better than Python <em>or</em> Ruby? My feelings about Ruby are <a href="http://glyphobet.net/blog/essay/228">indifferent with a chance of rain</a>, but I love Python, so I&#8217;ve got to ask: are you going to take this lying down, Python?</p>
<p>I&#8217;m not sure Python needs full-blown, Ruby-style <em>anonymous</em> blocks. But it might be good enough to be able to use function definitions as <a href="http://en.wikipedia.org/wiki/Value_%28computer_science%29">r-values</a>, like JavaScript can. (If you&#8217;re not already wearing your tinfoil hat, now might be a good time to put it on.)</p>
<p>This would allow asynchronous code to be written in conceptual order (just like in JavaScript):</p>
<pre>
<code class="python">do_something_asynchronous(param1, param2, (def callback(result):
    do_something_with_result(result)
))
</code>
</pre>
<p>And it would allow encapsulation of lexical scope inside specific iterations of a loop to be used later when an asynchronous call returns (just like in JavaScript):</p>
<pre>
<code class="python">for item in results:
    (def single_iteration():
        do_something_asynchronous(param1, item, (def callback(result):
            do_something_with_result_and_item(item, result)
        ))
    )(item)
</code>
</pre>
<p>I&#8217;ve even had occasion to want that other Python namespace, <code>class</code>, to operate as an r-value:</p>
<pre>
<code class="python">class MyConverterClass(BaseConverterClass):
    my_converter_type = (class MyConverterType(float):
        def __str__(self): # a custom __str__ method
            return '%0.2f' % self
    )
</code>
</pre>
<p>In these examples I&#8217;ve wrapped their inline definitions in Python&#8217;s great syntactical equalizer, the parenthesis. It would be even nicer to be able to leave them off, but I&#8217;m sure that this syntax would run headlong into Python&#8217;s whitespace-based block definitions, and it would be even more of a train-wreck without parentheses.</p>
<p>I&#8217;ve also named the <code>def</code>s and <code>class</code>es. It would also be nice to be able to omit the function or class names if they were unneeded (just like in JavaScript). But anonymous functions, a.k.a. <code>lambda</code>s, are the electric third rail of Python syntax, so anonymous classes would be&#8230; I dunno, the nuclear fourth rail?</p>
<ol class="footnotes"><li id="footnote_0_1581" class="footnote">Thanks to <a href="http://twitter.com/sahazel">Steve</a> for explaining that by &#8220;first-class callable,&#8221; GvR means functions that can be passed around and assigned to other variables without being executed. He also pointed out that the reason Ruby&#8217;s callables aren&#8217;t first-class is because optional parentheses in function calls leave no way to refer to a function without calling it, not because of the existence of anonymous blocks.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/essay/1581/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Seen any good tables lately?</title>
		<link>http://glyphobet.net/blog/essay/1501</link>
		<comments>http://glyphobet.net/blog/essay/1501#comments</comments>
		<pubDate>Thu, 01 Apr 2010 20:01:43 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[essay]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[parody]]></category>
		<category><![CDATA[periodic table]]></category>
		<category><![CDATA[science]]></category>
		<category><![CDATA[travel]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=1501</guid>
		<description><![CDATA[The periodic table fad has gone meta, not only with The Periodic Table Table at (Wake Forest University, in North Carolina): 

But also with this periodic table of periodic tables1 by keaggy.com:

Before the Periodic Table of the Elements, elements were a chaotic collection of substances with seemingly random and unpredictable masses, melting and boiling points, [...]]]></description>
			<content:encoded><![CDATA[<p>The periodic table fad has gone meta, not only with <a href="http://madscientistnz.wordpress.com/2009/11/13/periodic-table-table/">The Periodic Table Table</a> at (Wake Forest University, in North Carolina): </p>
<p><a href="http://madscientistnz.wordpress.com/2009/11/13/periodic-table-table/"><img src="http://glyphobet.net/blog/wp-content/uploads/2010/04/periodic-table-table-300x200.jpg" alt="" title="Periodic Table Table" width="300" height="200" class="alignnone size-medium wp-image-1503" /></a></p>
<p>But also with <a href="http://www.flickr.com/photos/bk/4455590301/">this periodic table of periodic tables</a><sup>1</sup> by keaggy.com:</p>
<p><a href="http://www.flickr.com/photos/bk/4455590301/"><img src="http://glyphobet.net/blog/wp-content/uploads/2010/04/periodic-table-of-periodic-tables.jpg" alt="" title="Periodic Tabe of Perodic Tables" width="500" height="296" class="alignnone size-full wp-image-1502" /></a></p>
<p>Before the Periodic Table of the Elements, elements were a chaotic collection of substances with seemingly random and unpredictable masses, melting and boiling points, electrical, chemical, and material properties, and so on. Not only did the periodic table organize the known elements in a way that explained these properties, but it correctly predicted the existence and the properties of undiscovered elements.</p>
<p>All these parodies of periodic tables<sup>2</sup> are only funny because this tendency towards scientific organization has totally permeated popular culture. And that&#8217;s pretty encouraging.</p>
<ol class="footnotes"><li id="footnote_0_1501" class="footnote">For those of you who hate your web browser and want it to crash, there&#8217;s also <a href="http://keaggy.com/periodictable/">a version of the Periodic Table of Periodic Tables that uses an off-the-shelf Flash app</a> and 217% of your CPU to make a zoomable interface that could be done in about ten lines of CSS &#038; JavaScript, and 0% of your CPU.</li><li id="footnote_1_1501" class="footnote">My very own <a href="http://glyphobet.net/ptoe/">Periodic Table of the Europeans</a> is at &#8220;Eu,&#8221; (number 63), smack dab in the middle of the &#8220;Awesomeoids&#8221; (the green row). Thanks, keaggy.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/essay/1501/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Announcing FlakeNot</title>
		<link>http://glyphobet.net/blog/essay/1474</link>
		<comments>http://glyphobet.net/blog/essay/1474#comments</comments>
		<pubDate>Wed, 31 Mar 2010 19:56:15 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[essay]]></category>
		<category><![CDATA[FlakeNot]]></category>
		<category><![CDATA[Mosuki]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=1474</guid>
		<description><![CDATA[For the last few months, Ross and I have been working on FlakeNot. 
FlakeNot keeps track of all your invitations in a single place. To sign up, forward pretty much any email with a date and a time in it to new-event@flakenot.com. FlakeNot will create an account for you and remember all the events you [...]]]></description>
			<content:encoded><![CDATA[<p>For the last few months, <a href="http://snurgle.org/~rcohen/">Ross</a> and I have been working on <a href="http://flakenot.com/">FlakeNot</a>. </p>
<p><a href="http://flakenot.com/">FlakeNot</a> keeps track of all your invitations in a single place. To sign up, forward pretty much any email with a date and a time in it to <tt><a href="mailto:new-event@flakenot.com">new-event@flakenot.com</a></tt>. <a href="http://flakenot.com/">FlakeNot</a> will create an account for you and remember all the events you send it. </p>
<p>Once you&#8217;ve forwarded some events, send email to <tt>calendar@flakenot.com</tt> and you&#8217;ll get an email with your upcoming events. And visit <tt><a href="http://flakenot.com/">flakenot.com</a></tt> to see your calendar on the web. </p>
<p>That’s it. No fancy logo. No social network, no profile photo. No Flash applet. No Google Maps mash-up. No video chatting with random strangers. Just a quick, simple way to keep track of all your invitations, so you can get out there in the real world and spend time with your real friends.</p>
<p>Yes, it works with Evites and Facebook invites. Yes, there&#8217;s a version of the site optimized for your Android/iPhone/Palm Pre. Yes, we plan to support Google calendar, write a Facebook application, and integrate with iCal. Yes, yes, yes.</p>
]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/essay/1474/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A surprising interface</title>
		<link>http://glyphobet.net/blog/essay/1230</link>
		<comments>http://glyphobet.net/blog/essay/1230#comments</comments>
		<pubDate>Sun, 03 Jan 2010 03:02:04 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[essay]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=1230</guid>
		<description><![CDATA[This quote from an ex-Apple employee about the rumored Apple tablet has got me thinking:
You will be very surprised how you interact with the new tablet.
What could this mean? There are not many interfaces that would be &#8220;very surprising.&#8221;
A virtual laser keyboard would be surprising. But like a real keyboard, those keyboards aren&#8217;t very mobile; [...]]]></description>
			<content:encoded><![CDATA[<p>This quote <a href="http://bits.blogs.nytimes.com/2009/12/23/2010-the-year-of-the-tablet/">from an ex-Apple employee</a> about the rumored Apple tablet has got me thinking:</p>
<blockquote><p>You will be very surprised how you interact with the new tablet.</p></blockquote>
<p>What could this mean? There are not many interfaces that would be &#8220;very surprising.&#8221;</p>
<p>A virtual laser keyboard would be surprising. But like a real keyboard, those keyboards aren&#8217;t very mobile; they require a flat surface, which you normally don&#8217;t have on the move. And a virtual keyboard doesn&#8217;t really seem like Apple&#8217;s style.</p>
<p>Voice control, or at least good speech recognition to complement keyboard input, is also a serious possibility. It&#8217;s something Apple <a href="http://www.youtube.com/watch?v=3WdS4TscWH8">has been interested in for a long time</a> <i>(via <a href="http://daringfireball.net/linked/2010/01/01/knowledge-navigator">DF</a>)</i>. A world where airports, subways and coffee shops are filled with people dictating emails and blog posts to their mobile devices is a little terrifying, but then again we already live in a world where people are have intimate personal conversations on their mobile phones in public. </p>
<p>A significantly expanded set of multi-touch gestures is the most likely. Taking advantage of the larger surface of a tablet screen to allow two-handed gestures seems like a natural choice. And handwriting detection would actually not be that much of a surprise from the company that brought us the Newton. Both of these are <a href="http://www.techradar.com/news/world-of-tech/future-tech/apple-plans-minority-report-style-user-interface-249081">hinted at in recent patent filings</a>.</p>
<p>While the article I link to in the previous paragraph compares Apple&#8217;s patent to the interface in Minority Report, the interface that article talks about requires the user&#8217;s fingers to be touching a surface, not in the air. A true <a href="http://oblong.com/">Minority Report-style interface</a>, where you gesture <em>in the air</em> to control the device, would be quite surprising. Being able to control a device without actually touching the screen (and getting finger marks on it) would make the tablet more attractive for full-screen uses like watching movies and playing games. This interface is a ways off still, though. </p>
]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/essay/1230/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New font, code named Xenonsequitor</title>
		<link>http://glyphobet.net/blog/essay/1198</link>
		<comments>http://glyphobet.net/blog/essay/1198#comments</comments>
		<pubDate>Thu, 10 Dec 2009 21:46:21 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[essay]]></category>
		<category><![CDATA[Hungary]]></category>
		<category><![CDATA[Turkey]]></category>
		<category><![CDATA[typography]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=1198</guid>
		<description><![CDATA[This design started out from imagining that the dotless ı was the primitive i, and the dots on i and j were diacritics. I was traveling in Turkey and Hungary at the time, and the other diacritics flowed naturally.
Feel free to let me know what you think, good or bad. I’m also looking for a [...]]]></description>
			<content:encoded><![CDATA[<p>This design started out from imagining that the dotless <em>ı</em> was the primitive <em>i</em>, and the dots on <em>i</em> and <em>j</em> were diacritics. I was traveling in Turkey and Hungary at the time, and the other diacritics flowed naturally.</p>
<p><a href="http://typophile.com/node/65264">Feel free to let me know what you think</a>, good or bad. I’m also looking for a name, if anyone has any suggestions.</p>
<p><a href="http://glyphobet.net/blog/wp-content/uploads/2009/12/xenonsequitor-sample-1024.png" title="Click to zoom in"><img src="http://glyphobet.net/blog/wp-content/uploads/2009/12/xenonsequitor-sample-590.png"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/essay/1198/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ten ways to build an unmaintainable web application</title>
		<link>http://glyphobet.net/blog/essay/954</link>
		<comments>http://glyphobet.net/blog/essay/954#comments</comments>
		<pubDate>Wed, 30 Sep 2009 15:54:53 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[essay]]></category>
		<category><![CDATA[CRUD]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[DRY]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[KISS]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[user interface]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[web programming]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=954</guid>
		<description><![CDATA[Old-school hackers had a long tradition of ensuring job security by building applications so unmaintainable that only the original authors could work on them. But in these days of web applications, unmaintainability has fallen by the wayside. Instead, design fads like CRUD, REST, MVC, DRY, and KISS, have eliminated the average programmer&#8217;s job security.
Here are [...]]]></description>
			<content:encoded><![CDATA[<p>Old-school hackers had a long tradition of ensuring job security by building applications so unmaintainable that only the original authors could work on them. But in these days of web applications, unmaintainability has fallen by the wayside. Instead, design fads like <a title="They should have called it TURD" href="http://en.wikipedia.org/wiki/Create,_read,_update_and_delete">CRUD</a>, <a title="It's good enough for the best" href="http://en.wikipedia.org/wiki/Representational_State_Transfer">REST</a>, <a title="Viewing and controlling models" href="http://en.wikipedia.org/wiki/Model_view_controller">MVC</a>, <a title="An idea that's all wet" href="http://en.wikipedia.org/wiki/DRY">DRY</a>, and <a title="Get your dirty mouth away from me you pervert" href="http://en.wikipedia.org/wiki/KISS_principle">KISS</a>, have eliminated the average programmer&#8217;s job security.</p>
<p>Here are ten quick tips for achieving maximum unmaintainability in your web application. Following them will ensure that, in thirty years, a web programmer like you will be as valuable as a fifty-eight year old COBOL programmer contracting at $200/hr for a Fortune 500 company that still hasn&#8217;t migrated off of PL/1. You too will be able to live on a dairy farm in Pennsylvania, grow a beard down to your navel, and work in your underwear. And you&#8217;ll never have to learn anything new, work with anyone else, or start another new project.</p>
<ol>
<li><strong>Mix it up.</strong> Put some JavaScript into external files, but be sure to intersperse JavaScript into your HTML, some of it in <code>&lt;script&gt;</code> tags. Cram multiple JavaScript statements into <code>onclick</code> and other event attributes — the longer, the better. Do the same with CSS; put some into external files, some in <code>&lt;style&gt;</code> tags, and also put some critical CSS into complex <code>style</code> attributes. And remember to put most of your <code>&lt;script&gt;</code> and <code>&lt;style&gt;</code> tags in the middle of the page content, instead of in the <code>&lt;head&gt;</code>, so that they will be difficult to find.</li>
<li><strong>Make everything dynamic. </strong>Generate JavaScript and CSS in your HTML templates. Think of it as another type of <code>eval</code>. Generate HTML server-side using templates <em>and</em> browser-side using JavaScript. What&#8217;s harder than working around a obscure IE layout bug with weird markup tweaks? Making sure both your server templates and your JavaScript HTML generation work around the <em>same</em> bug with the <em>same</em> HTML black magic.</li>
<li><strong>Abstraction, Shmabstraction.</strong> Pass lots of data from the server to the browser, store it in hidden form fields in the page, and then pass it back, unchanged, when submitting the form. That way, when the back-end data model changes, you get to rewrite part of the interface too. Allow data-model or server implementation details to creep into the interface implementation. Is the database sharded? Is the cache dirty? Does this row use a composite key? No need to have the server abstract these details, just pass that information to the JavaScript and let it sort everything out. That way, a sysadmin or a DBA can break the UI just as easily as a web designer can.</li>
<li><strong>Keep your data unstructured.</strong> Make sure all communication between the browser and the server is just a flat list of key/value parameters. Some of your parameters will be data to store, others will be modes or flags that affect the behavior of the service you&#8217;re hitting, and still others will be modifiers to display messages or affect the behavior of the UI. Keeping your data unstructured ensures these different types of parameters will collide. Often.</li>
<li><strong>Commit to a platform.</strong> Don&#8217;t waste your time checking to see if your pages work in all browsers (at least not until you&#8217;re totally done). Better yet, develop only in a single browser and don&#8217;t even bother to find out whether the features you&#8217;re relying on even exist in other browsers. Nothing is more fragile than an application that&#8217;s tightly tied to a single platform.</li>
<li><strong>Trust the browser.</strong> Rely soley on JavaScript input checking for some data — don&#8217;t check input on the server-side. Store sensitive data in hidden form fields. Put authorization checks in the JavaScript rather than on the server. Parameters like <code>authorized=1</code> just scream out for URL hacking, and storing them in hidden form fields is only slightly harder to hack.</li>
<li><strong>Trust the server.</strong> Rely soley on the server to check, store, and generate only valid data in some places. That way, a DBA can change a single column constraint or data-type, and parts of the UI start to fail.</li>
<li><strong>Don&#8217;t use DOCTYPEs.</strong> That way you&#8217;ll never be sure what rendering mode different browsers are going to use to render your content.</li>
<li><strong>Ignore the cascade.</strong> Don&#8217;t bother to understand what the C in CSS stands for.  Just keep overriding styles until a page element looks the way you want. That way, your styles will be fragile and will break unexpectedly when an intern changes something a reasonable person would expect to be unrelated.</li>
<li><strong>Don&#8217;t use classes or ids.</strong> Instead, always write JavaScript and CSS that finds nodes based on tag name, <code>name</code>, <code>alt</code> or <code>title</code> attributes, or by their position in the DOM. That way when anything in the page changes, the hierarchy, the attributes, or when the site is translated into another language, things break. If you do end up using <code>class</code> or <code>id</code>, be sure to make a separate class for every node in your document and assign the same id to several different nodes.</li>
</ol>
<p>If, however, you want to write flexible code that can react to and evolve with the ever-changing needs of its users, even after you have left the project in the hands of a clever but inexperienced hacker, you should probably avoid these techniques, and read up on some of <a title="This one" href="http://en.wikipedia.org/wiki/Create,_read,_update_and_delete">those</a> <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">lame</a> <a href="http://en.wikipedia.org/wiki/Model_view_controller">new</a> <a href="http://en.wikipedia.org/wiki/DRY">design</a> <a href="http://en.wikipedia.org/wiki/KISS_principle">fads</a> instead.</p>
<p><em>Special thanks to all the programmers whose code has illuminated these techniques over the years. My job may not be as secure as yours, but at least my code, and my conscience, are clear. </em></p>
]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/essay/954/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some impossible objects before breakfast</title>
		<link>http://glyphobet.net/blog/essay/912</link>
		<comments>http://glyphobet.net/blog/essay/912#comments</comments>
		<pubDate>Wed, 29 Jul 2009 16:03:19 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[essay]]></category>
		<category><![CDATA[3-D]]></category>
		<category><![CDATA[AccuTrans3D]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[Blender]]></category>
		<category><![CDATA[boy's surface]]></category>
		<category><![CDATA[dual]]></category>
		<category><![CDATA[geometry]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[inside]]></category>
		<category><![CDATA[knot]]></category>
		<category><![CDATA[Knotted Gear]]></category>
		<category><![CDATA[Möbius band]]></category>
		<category><![CDATA[Möbius strip]]></category>
		<category><![CDATA[Meshlab]]></category>
		<category><![CDATA[Oskar van Deventer]]></category>
		<category><![CDATA[outside]]></category>
		<category><![CDATA[Projective plane]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[rapid prototyping]]></category>
		<category><![CDATA[render]]></category>
		<category><![CDATA[SketchUp]]></category>
		<category><![CDATA[three-dimensional modeling]]></category>
		<category><![CDATA[three-dimensional printing]]></category>
		<category><![CDATA[topology]]></category>
		<category><![CDATA[trefoil]]></category>
		<category><![CDATA[trefoil knot]]></category>
		<category><![CDATA[user interface]]></category>
		<category><![CDATA[VRML]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=912</guid>
		<description><![CDATA[Lately I&#8217;ve been playing with rapid prototyping, also known as three-dimensional printing. It&#8217;s a (relatively) new fabrication method that allows creation of shapes that would be impossible to create by moulding. It allows for creation of things like interlinked rings, objects trapped inside other objects, or complex voids.
Shapeways, a Netherlands-based website, offers high-quality, relatively cheap [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I&#8217;ve been playing with <a href="http://en.wikipedia.org/wiki/Rapid_prototyping">rapid prototyping</a>, also known as <a href="http://en.wikipedia.org/wiki/Three_dimensional_printing">three-dimensional printing</a>. It&#8217;s a (relatively) new fabrication method that allows creation of shapes that would be impossible to create by <a title="British spelling FTW!" href="http://en.wikipedia.org/wiki/Mold_%28manufacturing%29">moulding</a>. It allows for creation of things like <a href="http://www.shapeways.com/model/40552/united_puzzle_ring.html">interlinked rings</a>, <a href="http://www.shapeways.com/model/920/topmod_entry__smaller_.html">objects trapped inside other objects</a>, or <a href="http://www.shapeways.com/model/13883/level_5_sierpinski.html">complex voids</a>.</p>
<p><a title="The Dutch invented two-dimensional printing, now they have moved on." href="http://www.shapeways.com/">Shapeways</a>, a Netherlands-based website, offers high-quality, relatively cheap rapid prototyping, and <a title="SHAmeless self-Promotion E-Ways" href="http://www.shapeways.com/shops/glyphobet">a place to host your own selection of models</a>. As a website, Shapeways is no <a href="http://glyphobet.net/blog/essay/242">RedBubble</a> — the interface and marketplace tools leave much to be desired. The <a href="http://www.shapeways.com/forum/index.php?t=msg&amp;th=383">ratings and sorting can be gamed</a>, it&#8217;s trivial to figure out the markup on another user&#8217;s model from its price, <a href="http://www.shapeways.com/forum/index.php?t=rview&amp;th=386&amp;goto=2363">there&#8217;s no way to replace a published model with an improved one</a>, and the site has <a title="If Knuth could handle φ and π back in the 80's, you should be able to handle it today." href="http://www.shapeways.com/model/35911/mathematician_s_dice.html">encoding</a> and markup issues. But what&#8217;s a few flaws when you own the category?</p>
<p>The free version of <a title="Meet the new boss, same as the old boss." href="http://sketchup.google.com/">Google SketchUp</a> has been satisfactory for rendering thus far, and its user interface is leaps and bounds ahead of the bizarre interface of <a title="If Blender were rendering this webpage, you'd have to type ;Xj to follow this hyperlink." href="http://www.blender.org">Blender</a>. I&#8217;m sure Blender has a superior feature set, but what good is power when you can&#8217;t figure out how to use it? <a title="The kind with &quot;s&quot; doesn't blow up." href="http://meshlab.sourceforge.net/">Meshlab</a> and <a title="CAUTION: Website designed in 1982" href="http://www.micromouse.ca/">AccuTrans3d</a> have both come in handy for checking surfaces and converting between formats.</p>
<p>On to the models! Click on the pictures to see more views of each.</p>
<h3>Trapped Outside</h3>
<p><a href="http://en.wikipedia.org/wiki/Boy%27s_surface"> </a><a href="http://www.shapeways.com/model/40473/trapped_outside.html">Trapped Outside</a> is a model of <a href="http://en.wikipedia.org/wiki/Boy%27s_surface">Boy&#8217;s Surface</a> with a sphere trapped in the space cut out by the one-sided surface. <a href="http://en.wikipedia.org/wiki/Boy%27s_surface">Boy&#8217;s Surface</a> an <a href="http://en.wikipedia.org/wiki/Immersion_%28mathematics%29">immersion</a> of the <a href="http://en.wikipedia.org/wiki/Real_projective_plane">projective plane</a>, which means it is a <a href="http://en.wikipedia.org/wiki/M%C3%B6bius_strip">Möbius strip</a> with a disk glued to its edge. It is a non-<a href="http://en.wikipedia.org/wiki/Orientability">orientable</a> surface with no edges and no <a href="http://en.wikipedia.org/wiki/Pinch_point_%28mathematics%29">pinch points</a>.</p>
<p><a href="http://www.shapeways.com/model/40473/trapped_outside.html"><img src="http://www.shapeways.com/modules/udesign/utils/openfile.php?id=40473&amp;f=photos/photo4709.jpg" alt="Trapped Outside" /></a></p>
<p><a href="http://www.shapeways.com/model/40473/trapped_outside.html">Trapped Outside</a> was fairly easy to create using <a href="http://sketchup.google.com/">Google SketchUp</a>. It&#8217;s just a few circles extruded along each other here and there.</p>
<h3>Hollow Knotted Gear</h3>
<p><a href="http://www.shapeways.com/model/41507/hollow_knotted_gear.html">The Hollow Knotted Gear</a>, inspired by <a title="Dude, get a webpage already." href="http://www.youtube.com/profile?user=OskarPuzzle&amp;view=videos">Oskar van Deventer</a>&#8217;s <a href="http://www.shapeways.com/model/11915/knotted_gear.html">Knotted Gear</a>, consists of two interlinked knots; a <a href="http://en.wikipedia.org/wiki/Trefoil_knot">trefoil knot</a> (in green) and its dual, a <a href="http://en.wikipedia.org/wiki/Torus_knot">3,2 torus knot</a>. The green trefoil forms a rectangular cross section and a triangular hole. The blue knot forms a triangular cross section and a rectangular hole. The two knots gear perfectly together, and can move around each other, but only if they are both moved simultaneously.</p>
<p><a href="http://www.shapeways.com/model/41507/hollow_knotted_gear.html"><img src="http://www.shapeways.com/modules/udesign/utils/openfile.php?id=41507&amp;f=photos/photo4900.jpg" alt="Hollow Knotted Gear" /></a></p>
<p>After many failed attempts at getting various applications to render this complex extrusion properly, I wrote a small Python program to calculate the surface for me and output <a title="OMG 3-D web browsing is K-Rad!" href="http://en.wikipedia.org/wiki/VRML">VRML</a>. Then, after much more trial and error, I used <a title="CAUTION: Website designed in 1982" href="http://www.micromouse.ca/">AccuTrans3d</a> via <a href="http://winehq.org/">Wine</a> to convert the <a title="The FUTURE of the INTERNET!!!!!1!1!11!!" href="http://en.wikipedia.org/wiki/VRML">VRML</a> surface to a DAE file for uploading to Shapeways, and to a 3DS file for examining in <a href="http://sketchup.google.com/">Google Sketchup</a> (and to take screenshots).</p>
<p>There are a <a href="http://www.shapeways.com/model/39904/seven_eight_nine_die.html">few</a> <a href="http://www.shapeways.com/model/38410/media_die.html">more</a> <a href="http://www.shapeways.com/model/40292/spade__club__heart_and_diamond.html">of my</a> <a href="http://www.shapeways.com/model/35911/mathematician_s_dice.html">designs</a> <a href="http://www.shapeways.com/shops/glyphobet">on Shapeways right now</a>, and even more rattling around in my head just waiting to be prototyped.</p>
]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/essay/912/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A tiny fix to the jQuery hint plugin</title>
		<link>http://glyphobet.net/blog/essay/878</link>
		<comments>http://glyphobet.net/blog/essay/878#comments</comments>
		<pubDate>Tue, 28 Jul 2009 06:54:16 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[essay]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[hint]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[web programming]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=878</guid>
		<description><![CDATA[Here&#8217;s a tiny fix to Remy Sharp&#8217;s excellent jQuery Text box hints plug-in. Without this fix, jQuery&#8217;s val function will return the hint text if the text box hasn&#8217;t been filled out by the user yet.
Here&#8217;s the patch:
@@ -20,7 +23,7 @@
       $win = $(window);

     function [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a tiny fix to <a href="http://remysharp.com/">Remy Sharp</a>&#8217;s excellent <a href="http://jquery.com/">jQuery</a> <a title="jQuery tutorial: Text box hints" rel="bookmark" href="http://remysharp.com/2007/01/25/jquery-tutorial-text-box-hints/">Text box hints</a> plug-in. Without this fix, <a href="http://jquery.com/">jQuery</a>&#8217;s <a href="http://docs.jquery.com/Attributes/val"><code>val</code></a> function will return the hint text if the text box hasn&#8217;t been filled out by the user yet.</p>
<p>Here&#8217;s the patch:</p>
<pre><code>@@ -20,7 +23,7 @@
       $win = $(window);

     function remove() {
-      if ($input.val() === title &amp;&amp; $input.hasClass(blurClass)) {
+      if ($input.realval() === title &amp;&amp; $input.hasClass(blurClass)) {
         $input.val('').removeClass(blurClass);
       }
     }
@@ -41,4 +44,17 @@
   });
 };

+
+$.fn.realval = $.fn.val;
+
+$.fn.val = function (value) {
+  var i = $(this);
+  if (value === undefined) {
+    return (i.realval() === i.attr('title')) ? '' : i.realval();
+  } else {
+    return i.realval(value);
+  }
+}
+
+
 })(jQuery);</code></pre>
<p>And here&#8217;s the full plugin with the patch applied:</p>
<pre><code class="JavaScript">/**
* @author Remy Sharp
* @url http://remysharp.com/2007/01/25/jquery-tutorial-text-box-hints/
*
* better val() method added by Matt Chisholm, 2009/07/27
* http://glyphobet.net/blog/essay/878
*/

(function ($) {

$.fn.hint = function (blurClass) {
  if (!blurClass) {
    blurClass = 'blur';
  }

  return this.each(function () {
    // get jQuery version of 'this'
    var $input = $(this),

    // capture the rest of the variable to allow for reuse
      title = $input.attr('title'),
      $form = $(this.form),
      $win = $(window);

    function remove() {
      if ($input.realval() === title &amp;&amp; $input.hasClass(blurClass)) {
        $input.val('').removeClass(blurClass);
      }
    }

    // only apply logic if the element has the attribute
    if (title) {
      // on blur, set value to title attr if text is blank
      $input.blur(function () {
        if (this.value === '') {
          $input.val(title).addClass(blurClass);
        }
      }).focus(remove).blur(); // now change all inputs to title

      // clear the pre-defined text when form is submitted
      $form.submit(remove);
      $win.unload(remove); // handles Firefox's autocomplete
    }
  });
};

$.fn.realval = $.fn.val;

$.fn.val = function (value) {
  var i = $(this);
  if (value === undefined) {
    return (i.realval() === i.attr('title')) ? '' : i.realval();
  } else {
    return i.realval(value);
  }
}

})(jQuery);</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/essay/878/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My identity is not for your profit</title>
		<link>http://glyphobet.net/blog/essay/851</link>
		<comments>http://glyphobet.net/blog/essay/851#comments</comments>
		<pubDate>Sat, 18 Jul 2009 18:20:21 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[essay]]></category>
		<category><![CDATA[advertising]]></category>
		<category><![CDATA[identity]]></category>
		<category><![CDATA[okcupid]]></category>
		<category><![CDATA[online dating]]></category>
		<category><![CDATA[site design]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=851</guid>
		<description><![CDATA[OkCupid is one of the best-designed websites out there. It&#8217;s addictive, captivating, easy to use, and pretty. But since it&#8217;s free and completely funded by advertising, the ultimate design goal of the site must be to get users to visit more pages, view more ads, and click on some. And this design goal can be [...]]]></description>
			<content:encoded><![CDATA[<p>OkCupid is one of the best-designed websites out there. It&#8217;s addictive, captivating, easy to use, and pretty. But since it&#8217;s free and completely funded by advertising, the ultimate design goal of the site must be to get users to visit more pages, view more ads, and click on some. And this design goal can be taken to extremes that are at odds with the goal of providing quality matching. Consider this screenshot:</p>
<p><img class="alignnone size-full wp-image-850" title="why-im-not-on-okcupid-anymore" src="http://glyphobet.net/blog/wp-content/uploads/2009/07/why-im-not-on-okcupid-anymore.png" alt="why-im-not-on-okcupid-anymore" width="477" height="372" /></p>
<p>This was from the unauthenticated view of my (now-disabled) OkCupid profile. The black text in the bottom half of this screen-shot was my somewhat snide response to OkCupid&#8217;s seventh-grade reading level getting-to-know-you question. And at the top is a plug for a different user <em>and </em>an ad for a book that has absolutely nothing to do with me or my tastes<sup>1</sup>.</p>
<p>The last thing that any OkCupid user should want is for readers to be distracted from their profile like this. And I really didn&#8217;t want some site co-opting my identity and interspersing advertisements and links to generate more page views into the middle of it. Even if it was to support a free site. So, OkCupid, you have joined the ranks of other online dating sites that <a title="It’s not you, babe. It’s not me either. It’s the website." href="http://glyphobet.net/blog/essay/31">just don&#8217;t cut it</a>. Thanks, but no thanks.</p>
<ol class="footnotes"><li id="footnote_0_851" class="footnote"><em>A Summer Affair</em>&#8217;s plot summary on Amazon makes it sound like an upscale romance novel with a helping of East Coast affluence-porn thrown in.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/essay/851/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bring on the patches</title>
		<link>http://glyphobet.net/blog/essay/830</link>
		<comments>http://glyphobet.net/blog/essay/830#comments</comments>
		<pubDate>Mon, 01 Jun 2009 04:43:51 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[essay]]></category>
		<category><![CDATA[Guido van Rossum]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Zed Shaw]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=830</guid>
		<description><![CDATA[Zed Shaw&#8217;s recent Python Neglect article raises a few points that are unquestionably valid: easy_install and mx.DateTime suck big time, and it sounds like the email tools have some serious problems. But I would like to hear better explanations from him about:

What the datetime module (introduced to replace mx.DateTime and fix shortcomings with the time [...]]]></description>
			<content:encoded><![CDATA[<p>Zed Shaw&#8217;s recent <a href="http://zedshaw.com/blog/2009-05-29.html">Python Neglect</a> article raises a few points that are unquestionably valid: <code>easy_install</code> and <code>mx.DateTime</code> suck big time, and it sounds like the email tools have some serious problems. But I would like to hear better explanations from him about:</p>
<ul>
<li>What the <code>datetime</code> module (introduced to replace <code>mx.DateTime</code> and fix shortcomings with the <code>time</code> module) is missing? It&#8217;s always handled everything I&#8217;ve thrown at it.</li>
<li>What is wrong with <code>optparse</code>? Usage? Functionality? Implementation?</li>
</ul>
<p>I also just plain don&#8217;t understand his complaint about <code>del</code> versus <code>remove</code>. I think <code>mystuff.remove(mything)</code> and <code>del mystuff[4] </code> do exactly the same thing, so what&#8217;s the problem? That <code>del</code> exists?</p>
<p>His <a href="http://zedshaw.com/blog/2009-05-30.html">promise to provide patches</a> will be an interesting test of the Python community&#8217;s ability to judge patches on their objective merit, not by their contributor, since Shaw seems to have a tendency to ruffle feathers<sup>1</sup>.</p>
<p>And a &#8220;WSGI for templating,&#8221; and efficient state machines with generators? Sounds exciting.</p>
<ol class="footnotes"><li id="footnote_0_830" class="footnote">This is the pot calling the kettle black here.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/essay/830/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hacking the Constitution</title>
		<link>http://glyphobet.net/blog/essay/712</link>
		<comments>http://glyphobet.net/blog/essay/712#comments</comments>
		<pubDate>Tue, 26 May 2009 15:50:59 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[essay]]></category>
		<category><![CDATA[battleground state]]></category>
		<category><![CDATA[Congress]]></category>
		<category><![CDATA[constitution]]></category>
		<category><![CDATA[election]]></category>
		<category><![CDATA[elections]]></category>
		<category><![CDATA[electoral college]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[Hendrik Hertzberg]]></category>
		<category><![CDATA[law]]></category>
		<category><![CDATA[national popular vote]]></category>
		<category><![CDATA[NPV]]></category>
		<category><![CDATA[politics]]></category>
		<category><![CDATA[spectator state]]></category>
		<category><![CDATA[votes]]></category>
		<category><![CDATA[voting]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=712</guid>
		<description><![CDATA[A vote for the President of the United States is actually a vote for an &#8220;elector&#8221; who pledges, but is not legally obligated, to vote for a specific candidate in the Electoral College. Forty-eight states then allocate all of their electoral votes to the popular vote winner in that state. This means that a candidate receiving [...]]]></description>
			<content:encoded><![CDATA[<p>A vote for the President of the United States is actually a vote for an &#8220;elector&#8221; who pledges, but is not legally obligated, to vote for a specific candidate in the Electoral College. Forty-eight states then allocate <em>all</em> of their electoral votes to the popular vote winner in that state. This means that a candidate receiving the most votes nationwide is not necessarily the one that receives the most electoral votes and becomes President. If the popular-vote loser many states by small margins, and loses some of the others by large margins, <a href="http://en.wikipedia.org/wiki/Electoral_College_(United_States)#Arguments_against_the_Electoral_College">they can win the electoral vote, despite losing the national popular vote</a>.</p>
<p>This winner-takes-all system of allocating electoral votes also has the side effect of making a few &#8220;battleground&#8221; states the primary focus of election campaigns. Candidates descend on these states, funneling money and advertising into them, and tailoring their campaigns to win over voters there. Voters, of either party, in the remaining &#8220;spectator&#8221; states are effectively disenfranchised, and the small percentage of voters in the battleground states elect the president.</p>
<p>This isn&#8217;t even how the electoral college was intended to work. The framers intended that the electoral college would usually fail to choose a clear winner, instead nominating the most popular candidates for election by Congress. This hasn&#8217;t happened in over two hundred years.</p>
<p>Programmers have a term for something that&#8217;s neither operating as originally intended nor guaranteed to do what their users ask it to do. The Constitution is <em>buggy</em>.</p>
<p>Yet the Constitution is <a title="two thirds and then three quarters. " href="http://en.wikipedia.org/wiki/List_of_unsuccessful_attempts_to_amend_the_U.S._Constitution">notoriously hard to change</a>. A programmer might use the term <em>legacy</em>.</p>
<p>How would a programmer fix this? Find a way to hack<sup>1</sup> a bug fix into the legacy system.</p>
<p>What should the goal of the fix be? We should elect the president in the same way that every governor, mayor, senator, representative, city council member and dog-catcher<sup>2</sup> is; by popular vote. If popular vote is good enough for every single <em>other</em> elected office in this country and in many other democratic countries around the world, it should be good enough for the President of the United States of America.</p>
<p>How do we change the Constitution? Turns out we don&#8217;t have to. The founders left the allocation of electoral votes up to the states:</p>
<blockquote><p>Each State shall appoint, in such Manner as the Legislature thereof may direct, a Number of Electors&#8230; <em><br />
-U.S. Constitution</em></p></blockquote>
<blockquote><p>The appointment, and mode of appointment, of electors belong exclusively to the states <em><br />
-U.S. Supreme Court</em></p></blockquote>
<p>And the fix? The <a href="http://nationalpopularvote.com/">National Popular Vote Plan</a> allocates all of a state&#8217;s electoral votes to the <em>national</em> popular vote winner. It only goes into effect once enough states pass it to command a majority of electoral votes. The electoral college won&#8217;t go away, but it will become obsolete. In programming terms, this plan ensures a buggy legacy system will never (again) get fed the kind of data that triggers the bug.</p>
<p>The <a href="http://nationalpopularvote.com/">National Popular Vote plan</a> has been making its way through state legislatures for the last few years. I&#8217;ve brought it up in conversation a few times recently (because of my <a href="http://glyphobet.net/blog/essay/733">Visualizing the National Popular Vote plan</a> project), and I&#8217;m surprised how many people don&#8217;t know about it. There should be a huge grass-roots movement behind this plan to re-enfranchise the electorate, but even smart, well-informed, thinking people haven&#8217;t heard of it. So please, if you agree with me and think the National Popular Vote Plan is a good idea, forward this page or <a href="http://nationalpopularvote.com/">NPV&#8217;s website</a> to your friends, bring it up at parties, or <a href="http://nationalpopularvote.com/pages/donate.php">support it with a donation</a>. And if you <em>don&#8217;t</em> agree with me,  forward this page or <a href="http://nationalpopularvote.com/">NPV&#8217;s website</a> to your friends, bring it up at parties, or&#8230; well I guess I can&#8217;t expect you to support it with a donation.</p>
<p>Let&#8217;s get rid of this obsolete, broken, idiotic electoral college system once and for all.</p>
<ol class="footnotes"><li id="footnote_0_712" class="footnote"><em>Note to non-technical readers:</em> Among programmers, <em>hack</em> generally means <em>a quick, clever, &#8220;outside-of-the-box&#8221; solution to a difficult or intractable problem.</em> That is the sense in which I am using the term <em>hack</em> here. If you think the National Popular Vote plan is about subverting or circumventing the constitution, you have misunderstood it.</li><li id="footnote_1_712" class="footnote">My thanks to <a href="http://www.newyorker.com/online/blogs/hendrikhertzberg/">Hendrik Hertzberg</a>, National Popular Vote&#8217;s <a href="http://en.wikipedia.org/wiki/Thomas_Henry_Huxley#Darwin.27s_bulldog">bulldog</a>, in whose <a href="http://www.newyorker.com/online/blogs/hendrikhertzberg/">writings in the New Yorker</a> I first heard about this clever plan. I believe the inclusion of dog-catcher in this list is due to him but I cannot find the exact quote.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/essay/712/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visualizing the National Popular Vote plan</title>
		<link>http://glyphobet.net/blog/essay/733</link>
		<comments>http://glyphobet.net/blog/essay/733#comments</comments>
		<pubDate>Tue, 26 May 2009 15:50:00 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[essay]]></category>
		<category><![CDATA[California]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[Congress]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Hawaii]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[infographics]]></category>
		<category><![CDATA[information design]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[law]]></category>
		<category><![CDATA[national popular vote]]></category>
		<category><![CDATA[NPV]]></category>
		<category><![CDATA[politics]]></category>
		<category><![CDATA[repeal]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[veto]]></category>
		<category><![CDATA[visualization]]></category>
		<category><![CDATA[votes]]></category>
		<category><![CDATA[voting]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=733</guid>
		<description><![CDATA[This graphic visualizes the progress of the National Popular Vote plan (more about the politics of this plan in Hacking the Constitution).

The existing visualization on National Popular Vote&#8217;s website was flawed enough to inspire this attempt at fixing it. They use a national map with states colored according to the plan&#8217;s progress. Using geographical visualization [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://glyphobet.net/npv/">This graphic</a> visualizes the progress of <a href="http://nationalpopularvote.com/">the National Popular Vote plan</a> (more about the politics of this plan in <a href="http://glyphobet.net/blog/essay/712">Hacking the Constitution</a>).</p>
<p><iframe src="http://glyphobet.net/npv/npv.svg" hscale="0.56"></iframe></p>
<p><a href="http://glyphobet.net/blog/wp-content/uploads/2009/05/npv-flash-geo.png">The existing visualization</a> on <a href="http://nationalpopularvote.com/">National Popular Vote&#8217;s website</a> was flawed enough to inspire this attempt at fixing it. They use a national map with states colored according to the plan&#8217;s progress. Using geographical visualization conflicts with the plan&#8217;s intention to make the states as entities less influential, and with the plan&#8217;s success depending on the number of electoral votes, not the geographical size or population of the states<sup>1</sup>. And even though the steps in passing the plan suggest a spectrum, the colors are seemingly random.</p>
<p>Plus <a href="http://nationalpopularvote.com/">NPV</a> is a good cause that deserves more attention. And as <a title="suxxxxor" href="http://glyphobet.net/blog/essay/206">a vocal Flash criti</a>c, I should put my money where my mouth is and implement a cross-browser, scalable, interactive, vector graphic to show that it can be done without Flash.</p>
<p>Visualizing complex data well is challenging, and this is no exception. The plan will likely be adopted slowly over many years, so the graphic must be designed to expand. The technology must also be future-proof; I don&#8217;t want to have to re-implement the graphic, convert it to a different format, or get access to future versions of software, or the operating systems that software must run on, just to keep supporting it. This pretty much rules out Flash and Sliverlight.</p>
<p>These constraints make <a title="Extra! Extra! Read all about it! W3C designs usable standard!" href="http://www.w3.org/Graphics/SVG/">SVG</a><sup>2</sup> and JavaScript a good choice. SVG support is still nascent in Gecko and WebKit<sup>3</sup> (and even Opera supports it), but the standard is pretty usable and I expect it to gain more adoption over time. All of the rendering code is in JavaScript. I&#8217;d put money on JavaScript interpreters remaining readily available ten years from now. I unfortunately have no ability (or desire, for that matter) to test this in IE with <a title="I'm sure Adobe's page for this thing is totally unfindable and unlinkable" href="http://wiki.svg.org/Adobe_SVG_Viewer">Adobe&#8217;s SVG plugin</a>; if you try it, email me the results.</p>
<p>There are many different entities involved in the process: fifty states, each with two legislative bodies and a governor, and a total of 538 electoral votes; and many different events: passing the first body of a legislature, passing the second, bills passing the same body subsequent times,  being signed into law, being vetoed, vetoes being overridden, and (hopefully never) laws being repealed.</p>
<p>The data comes from disparate sources; most comes from <a href="http://nationalpopularvote.com/">NPV&#8217;s website</a>, but I had to search for the vetoes. The data is not just linear; it overlaps and interacts. A veto affects two of the charts but not the third, and a repeal would affect all three. The three charts have an order; a bill cannot pass both houses before it passes one, and cannot be signed into law before it passes both.</p>
<p>To include all this data, a visualization would either have to be interactive or poster-sized. This one is interactive; you can mouse over vertexes in the charts and get more information about the events they represent. You can quickly and easily find out:</p>
<ul>
<li>The exact progress of NPV at any time since its introduction.</li>
<li>Who, what and where for any NPV-related event.</li>
<li>All NPV-related events that have occurred in any particular state.</li>
<li>How significant each state&#8217;s contribution to the electoral vote tally has been.</li>
<li>Firsts, lasts, largests and smallests.</li>
</ul>
<p>As with many real-world data visualizations, unexpected patterns emerge. Most activity is clustered in the winter, spring and early summer, when legislative bodies are in session. The only things that happen between August and December are vetoes. This cycle will likely become much more obvious once the graphic spans a few more years.</p>
<p>Hawaii&#8217;s legislature overrode their governor&#8217;s second veto, and <a title="Aaaaaaahhhnod" href="http://images.google.com/images?q=the+governator">The Governator</a> has twice robbed the plan of California&#8217;s 55 electoral votes. Neither of these facts is obvious from the current graphic. If the plan is ever repealed, the graphic would need to show that too.</p>
<p>As I said in <a href="http://glyphobet.net/blog/essay/712">Hacking the Constitution</a>, the <a href="http://nationalpopularvote.com/">the National Popular Vote plan</a> deserves a lot more attention and support, so forward this page or <a href="http://nationalpopularvote.com/">NPV&#8217;s website</a> to your friends, bring it up at parties, <a href="http://nationalpopularvote.com/pages/donate.php">support it with a donation</a>, or include <a href="http://glyphobet.net/npv/">the graphic</a> on your web page.</p>
<ol class="footnotes"><li id="footnote_0_733" class="footnote">If a geographical design were used on a visualization of the progress of this plan, it should at least be <a title="The big one" href="http://www-personal.umich.edu/~mejn/election/2008/">a cartogram</a>.</li><li id="footnote_1_733" class="footnote">The HTML <a title="I dunno about this" href="http://en.wikipedia.org/wiki/Canvas_(HTML_element)"><code>&lt;canvas&gt;</code> element</a> might also have been a viable option, but I already knew SVG.</li><li id="footnote_2_733" class="footnote">For a good time, try resizing the font in Safari 3.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/essay/733/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another Ubuntu release, another core regression</title>
		<link>http://glyphobet.net/blog/essay/697</link>
		<comments>http://glyphobet.net/blog/essay/697#comments</comments>
		<pubDate>Mon, 04 May 2009 06:15:14 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[essay]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=697</guid>
		<description><![CDATA[It&#8217;s business as usual over at Ubuntu headquarters. This time the &#8220;Root Terminal&#8221; menu item, installed in the system menu by default for at least the last few years, is suddenly broken. Irate users commenting on bug reports in Launchpad are dangerously close to starting a full-blown flame war:
Sebastien, your comment seems to imply that [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s business as usual over at Ubuntu headquarters. This time the &#8220;Root Terminal&#8221; menu item, installed in the system menu by default for at least the last few years, is suddenly broken. Irate users commenting on <a href="https://bugs.launchpad.net/ubuntu/+bug/326158">bug</a> <a href="https://bugs.launchpad.net/ubuntu/+source/gconf2/+bug/328575">reports</a> in Launchpad are dangerously close to starting a full-blown flame war:</p>
<blockquote><p>Sebastien, your comment seems to imply that Launchpad bug reports are a waste of time. Is this really what you meant? I had been under the impression that Launchpad was intended to be a gateway/portal for bug reporting. If Launchpad reports do not get forwarded upstream automatically once triaged then what purpose does it have?<em> -<a href="https://bugs.launchpad.net/ubuntu/+source/gconf2/+bug/328575/comments/39">Russel Winder</a></em></p></blockquote>
<p>and:</p>
<blockquote><p>With all due respect Sebastien &#8212; I can hardly believe that<br />
I&#8217;m reading this: &#8220;ubuntu only distribute it&#8221;.</p>
<p>(why even have a bug reporting system in the first place,<br />
one wonders, btw.). -<em><a href="https://bugs.launchpad.net/ubuntu/+source/gconf2/+bug/328575/comments/38">bjd</a></em></p></blockquote>
<p>(That&#8217;s right, those are <a href="https://bugs.launchpad.net/ubuntu/+source/gconf2/+bug/328575/comments/37">in response to</a> the same Sebastien Bacher <a href="http://glyphobet.net/blog/essay/140">I took to task</a> for unhelpful comments on other bugs last year.)</p>
<p><a href="http://bugzilla.gnome.org/show_bug.cgi?id=564649">The bug itself</a> isn&#8217;t Ubuntu&#8217;s fault, but the fact that the menu item survived intact in the default Ubuntu configuration despite being non-functional for (at least) the last four months speaks volumes about what passed for testing on Jaunty Jackalope<sup>1</sup>.</p>
<p>Temporary workaround, until Gnome fixes this regression and Ubuntu inherits it: change the menu item to <code>gnome-terminal -e 'sudo -i'</code>. It took me longer to write this paragraph than to change that.</p>
<ol class="footnotes"><li id="footnote_0_697" class="footnote">I&#8217;m not even going to get into how the &#8220;upgrade&#8221; process left my system unable to find the root filesystem and therefore unbootable. My memory, and a judicious application of grub-fu, saved the day, and since I&#8217;m unwilling to downgrade to Intrepid and then re-upgrade to Jaunty, this bug must remain un-duplicable and un-reported.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/essay/697/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ignore your users&#8217; needs. Call them stupid instead.</title>
		<link>http://glyphobet.net/blog/essay/587</link>
		<comments>http://glyphobet.net/blog/essay/587#comments</comments>
		<pubDate>Tue, 21 Apr 2009 15:59:55 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[essay]]></category>
		<category><![CDATA[constant]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[DRY]]></category>
		<category><![CDATA[feature]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[specification]]></category>
		<category><![CDATA[variable]]></category>
		<category><![CDATA[w3c]]></category>
		<category><![CDATA[web 2.0]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[web programming]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=587</guid>
		<description><![CDATA[Bert Bos&#8217;s Why “variables” in CSS are harmful illustrates some all-too-common mistakes technologists make when considering feature requests from their users. It also indicates how deeply out of touch Bos (and possibly the entire W3C) is from people who actually have to read, write, debug, and use CSS on a regular basis.
It begins:
Constants have been [...]]]></description>
			<content:encoded><![CDATA[<p>Bert Bos&#8217;s <a href="http://www.w3.org/People/Bos/CSS-variables">Why “variables” in CSS are harmful</a> illustrates some all-too-common mistakes technologists make when considering feature requests from their users. It also indicates how deeply out of touch Bos (and possibly the entire W3C) is from people who actually have to read, write, debug, and use CSS on a regular basis.</p>
<p>It begins:</p>
<blockquote><p>Constants have been regularly proposed and rejected over the long history of CSS&#8230;</p></blockquote>
<p>Proposals for a feature indicate that a technology (whether it be a specification or an application) has pain points that are going un-addressed. When those requests are frequent, they indicate that the person (or organization, in this case, the W3C) in charge of the technology is out of touch with its users.</p>
<blockquote><p>&#8230;so there is no reason why constants should be useful now when they weren&#8217;t before.</p></blockquote>
<p>This claim that <em>constants are not useful</em> underlies the entire essay, but Bos fails to ever really justify it. Here he wanders around in pseudo-mathematical jargon instead:</p>
<blockquote><p>[An implementation of costants in CSS written in PHP] proves that it is <em>not necessary</em> to add constants to CSS&#8230;. But the PHP implementation has the benefit of letting authors determine the usefulness for themselves, without modifying CSS on the Web.</p></blockquote>
<p>It sounds like Bos refuses to consider an implementation of variables<sup>1</sup>  in CSS unless someone provides him with a mathematical proof of their utility. But utility is an opinion, not something that can be proven, like Turing-completeness or the irrationality of √2.</p>
<p>The existence of <a title="nothing written in PHP is ever good. i doubt this is an exception." href="http://interfacelab.com/variables-in-css-via-php/">the PHP implementation</a> Bos mentions, and of other implementations like <a title="OMG so fucking radical" href="http://sandbox.pocoo.org/clevercss/">the wonderful CleverCSS</a> or Reddit&#8217;s vaporous <a title="I smell VAPORWARE!" href="http://blog.reddit.com/2009/04/ride-snake-reddits-pycon-09-keynote.html">C55</a>, argues strongly that variables <em>are</em> useful &#8212; so useful that many people have implemented them on top of CSS. Of course, this does not <em>prove</em> usefulness any more than any other opinion can be proven.</p>
<h4>Implementation effort</h4>
<p>Next Bos considers implementation effort:</p>
<blockquote><p>&#8230;extending CSS makes implementing more difficult and programs bigger, which leads to fewer implementations and more bugs.</p></blockquote>
<p>Difficulty of implementation should never be a deciding factor in whether or not to address the needs of the users. This point is important enough that it bears repeating: implementation effort is not relevant when deciding what your users need.</p>
<p>Why not?</p>
<p>Technology exists to make users&#8217; lives easier. As a technology evolves and matures, users express needs and the authors of the technology develop features to address those needs. It is the user&#8217;s needs, not easily implemented features, that drive development of a technology.</p>
<p>If two features serve the same need, then picking the easier-to-implement one is perfectly reasonable. And if the only way to address the users&#8217; needs is with a feature that&#8217;s extremely difficult or impossible to implement, then a project might find itself considering whether some or all of it is still viable. But a difficult implementation is never a justification in itself for not addressing the users&#8217; needs.</p>
<p>In the case of CSS, the users ask for variables because they need some way to <a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself">stop repeating themselves</a> when they encode colors, lengths, and other values in CSS.</p>
<p>Refusing to serve the users&#8217; needs because the requested feature may be difficult to implement shows a lack of understanding of those users&#8217; needs as well as poor judgment about how to handle feature requests in general.</p>
<p>There&#8217;s another subtle fallacy here too. When Bos worries about ease of implementation, it sounds like he&#8217;s trying to make <em>browser authors</em>&#8216; lives easier, as if they were the users that the W3C are working for. But browser authors aren&#8217;t the real users of CSS any more than, for example, the authors of a C compiler are the ultimate users of C. Web designers are the <em>real</em> users of CSS. They are the target audience whose needs should be considered.</p>
<p>Arguing from implementation effort, and talking about browser implementors instead of CSS authors illustrates how far out of touch Bos is with real web designers, doing real work.</p>
<p>It&#8217;s also questionable how truly difficult implementing global, un-scoped variables (or un-changing constants) in CSS would be, especially compared to other complex aspects of CSS like the cascade. But that&#8217;s a discussion for browser authors.</p>
<h4>Maintenance of stylesheets</h4>
<p>Next Bos argues that variables would make CSS less maintainable, not more. Bos presents two reasons that code is encapsulated behind a function in programming languages:</p>
<blockquote><p>Dividing up a problem into smaller ones is only one reason for defining functions. Just as important is the fact that a function that fits on one screen is easier to write than one that needs scrolling.</p></blockquote>
<p>Because CSS variables wouldn&#8217;t help divide up a problem into smaller ones or help CSS stanzas fit on the screen more easily, Bos argues, they aren&#8217;t helpful:</p>
<blockquote><p>[Constants] would add a cost (remembering user-defined names) without a benefit (avoiding problems that are longer than one screenful).</p></blockquote>
<p>Experienced programmers know that there&#8217;s a third benefit to encapsulating code or data behind a function, variable, or constant: <a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself">not repeating yourself</a>.  This is <em>why</em> users keep asking for variables in CSS.  Bos goes on to say that variables would be detrimental to CSS because they would increase the length of stylesheets. However, not repeating yourself is much more important than just keeping your code short<sup>2</sup>, so this point too is moot.</p>
<p>This section concludes:</p>
<blockquote><p>What remains is the cost of remembering and understanding user-defined names.</p></blockquote>
<p>Of course, stylesheets are full of user-defined <em>class</em> names, and CSS authors seem to have no problem using and remembering <em>those</em>, so it&#8217;s hard to see how user defined <em>variable</em> names are going to be any more intellectually challenging for CSS authors than class names.</p>
<h4>Reusing style sheets and Learning CSS</h4>
<p>The next two sections, &#8220;Reusing style sheets,&#8221; and &#8220;Learning CSS&#8221; continue to conjecture that user-defined variable names would be a great hindrance to using and learning CSS. But the frequency of proposals to add variables to CSS suggests they are not difficult to understand, and including them would not significantly hinder learning CSS.</p>
<p>But there&#8217;s not much point in arguing over such conjectures. Arguing from the point of view of a theoretical group of users who have, and lack, certain skills, is a dangerous distraction. If you have data about your users, use it. If not, collect some before making your decisions, or base your decisions on what you know your users can already do.</p>
<p>For the sake of argument, assume Bos&#8217; hypothetical group of users exists. Assume there is a subset of the CSS authoring population that can comprehend the CSS cascade, relative sizes defined in ems, hexadecimal RGB color codes, and user-defined class names, but are unable to grasp the concept of a user-defined variable in CSS. (It sounds bizarre, but that&#8217;s what he&#8217;s claiming.)</p>
<p>These hypothetical users could just refrain from using variables in their stylesheets whatsoever. Unlike hexadecimal colors, em units, and many other aspects of CSS, nothing about variables would force CSS authors to use them. Variables could be added to the CSS standard without increasing its complexity or the effort required to learn it.</p>
<p>Bos also claims that user-defined variables would break easy reusability of CSS:</p>
<blockquote><p>CSS is fairly easy to learn to read, even if some of its effects can be quite subtle. When there is a page you like, you can look at its style sheet and see how it&#8217;s done.</p></blockquote>
<p>Anyone who has tried to copy a CSS effect from one site to another knows how difficult it truly is.  To copy the visual appearance of a single element, you must understand not only the computed style of that element, but the computed style of all of its parent elements. You need at least a rudimentary understanding of both the CSS cascade and the structure of the HTML of the page.  To copy the look of an entire page, you have to copy <em>all</em> of the CSS files for that page and mimic the structure of the HTML <em>exactly</em>, or reverse engineer the entire thing from the ground up.</p>
<p>Beyond the issue of whether copying CSS effects is easy or not, however, the question is whether CSS variables would make the job <em>more</em> difficult.</p>
<p>Bos points out that in-browser debugging tools help you to copy CSS by showing you the computed style. Presumably if CSS contained variables, those debugging tools would show you the values computed using those variables, not the just the variable names.</p>
<p>And if you were just copying a site&#8217;s HTML structure and CSS wholesale, then there&#8217;s no reason why you would even need to read the CSS or figure out what the variables mean.</p>
<blockquote><p>It is too difficult to look in two places at once, the place where a value is used and the place where it is defined, if you don&#8217;t know why the rule is split in this way</p></blockquote>
<p>Of course, when reverse-engineering the CSS for a site, a designer already needs to look in multiple &#8220;places at once&#8221; &#8212; they look in multiple CSS files, match class names in the CSS to names in the HTML, and consider the effects of the cascade. Is Bos really suggesting that a person capable of doing that will be incapable of finding a variable definition in the same file where that variable is used?</p>
<p>Rather than showing us that CSS variables would make re-using CSS more difficult, Bos asserts that a difficult, complex process is simple, and that CSS authors already performing this task are too stupid to handle a much simpler one.</p>
<p>Bos also claims that figuring out what variable names mean will be difficult for CSS authors &#8212; even when debugging their own code. Most CSS authors use generally descriptive class names like <em>green-button</em>, <em>huge</em>, and <em>floatleft</em><sup>3</sup>. High traffic sites run their CSS (and their HTML and JavaScript) through compressors/obfuscators, but most of those sites use descriptive names internally too. It&#8217;s hard to see how CSS variables would be named any differently than CSS classes, so it&#8217;s hard to see how CSS variables would be any more difficult for CSS authors to reverse engineer or remember.</p>
<h4>Summary</h4>
<p>None of Bos&#8217;s arguments against variables in CSS hold up. He claims CSS doesn&#8217;t need variables, but fails to recognize  CSS authors&#8217; true need to avoid repeating themselves. He argues CSS variables would be too difficult to implement, but implementation difficulties are invalid grounds to justify leaving users&#8217; needs unaddressed. He argues that CSS variables would add too much complexity to CSS and no benefit whatsoever, but overlooks a key benefit that CSS variables would provide. All his arguments about the complexity variables would allegedly add to CSS are difficult to accept given the current complexity of CSS.</p>
<p>A feature request is a need in disguise, and multiple, persistent feature requests indicate a serious need behind a very thin disguise. Rather than arguing against a feature, you should endeavor to understand the underlying need. Rather than arguing from implementation complexity, you should decide whether that need must be addressed. Rather than arguing from hypothetical, invented users, and speculating about complexity, you should collect real user data or look at the kinds of tasks your users already handle.</p>
<p>This entire article<sup>4</sup> calls into question Bos&#8217; ability (and, by association, the W3C&#8217;s) to identify and address the needs of real CSS users and choose features to solve real shortcomings of CSS. I hope my analysis of this article helps other technologists learn to understand and address their users&#8217; real needs better, and avoid poor reasoning when arguing against, or for, a specific feature.</p>
<p><em>For more on problems with CSS, see <a title="Why CSS Sucks" href="http://www.cybergrain.com/archives/2004/12/css_considered.html">CSS Considered Unstylish</a>.</em></p>
<ol class="footnotes"><li id="footnote_0_587" class="footnote">For brevity I&#8217;ve chosen use just the term <em>variable</em> throughout this article, even though all the points I make apply equally well to <em>constants</em>.</li><li id="footnote_1_587" class="footnote">Bos&#8217; point about the &#8220;computer screen becoming an extension of the programmer&#8217;s memory&#8221; is bizarre in the extreme. Even the best programmers or web designers will quickly end up with a program or stylesheet that&#8217;s bigger than will fit on a screeen, when working on anything but the most simple projects, if for no other reason than the project being split up into multiple files.</li><li id="footnote_2_587" class="footnote">Perhaps Bos does not always use descriptive class names; <a title="If I were an asshole I'd make fun of his background, too." href="http://www.w3.org/People/Bos/2007.css">The stylesheet</a> for his article uses the class names <code>yves</code> and <code>coralie</code>.</li><li id="footnote_3_587" class="footnote">The very end of the article has a clever suggestion: that constants be implemented as an external module. I&#8217;m not sure how this would work, but if it meant that a single set of constants for a site would be accessible in the HTML, and all of the site&#8217;s stylesheets, and maybe in the JavaScript too, well, that would be pretty cool.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/essay/587/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The next big thing, part 3: Taking the relational out of relational databases</title>
		<link>http://glyphobet.net/blog/essay/397</link>
		<comments>http://glyphobet.net/blog/essay/397#comments</comments>
		<pubDate>Mon, 06 Apr 2009 17:45:47 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[essay]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[graph databases]]></category>
		<category><![CDATA[model-view-controller]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[relational databases]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[TNBT]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=397</guid>
		<description><![CDATA[Part of an ongoing series.
The relational database is an extremely powerful tool. But sometimes data isn&#8217;t very relational, and sometimes transactional, relational, integrity is not as important as it is for, say, a bank. This is one reason why so many sites can get away with mySQL backed by myISAM tables &#8212; they&#8217;re fine if [...]]]></description>
			<content:encoded><![CDATA[<p><em>Part of <a href="http://glyphobet.net/blog/tag/tnbt">an ongoing series</a>.</em></p>
<p>The relational database is an extremely powerful tool. But sometimes data isn&#8217;t very relational, and sometimes transactional, relational, integrity is not as important as it is for, say, a bank. This is one reason why so many sites can get away with mySQL backed by myISAM tables &#8212; they&#8217;re fine if you&#8217;re read-heavy and data integrity is not mission-critical.</p>
<p><a title="Amazon cat eats Google's dog food." href="http://aws.amazon.com/simpledb/">Some</a> <a title="It's not a big couch." href="http://couchdb.apache.org/">new</a> <a title="Impossible to spell." href="http://sitepen.com/labs/persevere.php">projects</a> <a title="This article is kinda shite, but it has good links." href="http://www.infoworld.com/article/09/03/24/12TC-databases_1.html">have sprung up</a> which provide key-value stores or simpler kinds of databases without all the overhead and inflexibility of a relational database.</p>
<p>On the other hand, sometimes data is way more interrelated than a traditional relational database is prepared to handle. Sometimes different kinds of items (i.e. rows) in a database can be related to many other kinds of items in that database, and sometimes end users can create not just new items or new relationships, but new <em>kinds</em> of relationships between items. This type of database is called a graph database, and there are also projects pushing the boundaries of relational in this completely opposite direction.</p>
<p>Pretty much everywhere I interviewed back in February 2008 was either <a title="It's not sublimation. " href="http://www.freebase.com/">building their own graph database</a>, working on <a title="At least it's not named after a serial killer." href="http://www.mulgara.org/">an existing one</a>, or repurposing a relational database (or, in one case, <a title="Can't people code in something other than Java for once?" href="http://lucene.apache.org/">a search backend</a>), to kinda, sorta behave like one. The w3c, not one to be left behind when there&#8217;s a specification to be written, is even working on <a title="Leave it to the w3c to pick a name that *nobody* will be able to spell." href="http://www.w3.org/TR/rdf-sparql-query/">a SQL-inspired query language</a> intended to search them<sup>1</sup>.</p>
<p>Most applications have some combination of totally un-relational data that can go in a key-value store, some strictly relational data that belongs in a SQL database, and some flexible, highly relational data that belongs in a graph database.</p>
<p>What will happen when these alternative databases start giving traditional relational databases a run for their money? Well, sharding, caching, and normalization all start to sound a lot more complex when the data is in a few different <em>kinds</em> of databases &#8212; but then again, maybe optimization won&#8217;t be as necessary if a single SQL database isn&#8217;t doing all the heavy lifting. <a title="See second round" href="http://www.b-list.org/weblog/2009/mar/28/pycon-orm-panel/">Object-relational mappers</a> (and the <a title="It's not a big truck, it's a series of Pylons." href="http://turbogears.org/">web</a> <a title="It's not a big Lon, it's a series of Py." href="http://pylonshq.com/">frameworks</a> that use them) might need to talk to, and abstract away from, different kinds of databases<sup>2</sup>.</p>
<p>And the different types of data won&#8217;t always be easily separated along table boundaries. Maybe these different types of databases will talk to each other, or maybe they will mature into über-databases that understand lots of different types of data relationships.</p>
<p>But the monolithic, strictly relational, master SQL database is eventually going to go the way of <a title="Series of tubes series of tubes!" href="http://en.wikipedia.org/wiki/COBOL">Cobol</a><sup>3</sup>.</p>
<ol class="footnotes"><li id="footnote_0_397" class="footnote">Of course, if it&#8217;s anything like <a title="Xtremely Stupid Language for Templating" href="http://www.w3.org/TR/xslt">other</a> <a title="Completely Stupid Stylesheets" href="http://www.w3.org/TR/CSS/">technologies</a> designed by the w3c, it&#8217;s a steaming pile.</li><li id="footnote_1_397" class="footnote"><a title="SQL Alchemy" href="http://www.sqlalchemy.org/">Some</a> can already handle talking to multiple SQL databases, and of course there&#8217;s <a title="Should be called N-phase commit" href="http://en.wikipedia.org/wiki/Two-phase_commit_protocol">two-phase commit</a>.</li><li id="footnote_2_397" class="footnote">Or <a title="I.e. nuked. " href="http://en.wikipedia.org/wiki/Kobol">Kobol</a>.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/essay/397/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->