<?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>Thu, 12 Apr 2012 19:51:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>A week with Snow Leopard and Lion</title>
		<link>http://glyphobet.net/blog/essay/2077</link>
		<comments>http://glyphobet.net/blog/essay/2077#comments</comments>
		<pubDate>Mon, 03 Oct 2011 09:55:52 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[essay]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Dashboard]]></category>
		<category><![CDATA[Exposé]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[Lion]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Migration Assistant]]></category>
		<category><![CDATA[Mission Control]]></category>
		<category><![CDATA[Snow Leopard]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[Spaces]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=2077</guid>
		<description><![CDATA[After starting a new job a few weeks ago, I found myself in the somewhat unusual position of having a new Mac OS X Lion (10.7) installation at work and a Snow Leopard (10.6) installation at home. Switching every day focused my attention on the differences between the two. Read on to hear my thoughts. [...]]]></description>
			<content:encoded><![CDATA[<p>After starting a new job a few weeks ago, I found myself in the somewhat unusual position of having a new Mac OS X Lion (10.7) installation at work and a Snow Leopard (10.6) installation at home. Switching every day focused my attention on the differences between the two. Read on to hear my thoughts.</p>
<h4>Mission Control</h4>
<p>What used to be Dashboard, Spaces, and Exposé have been combined into Mission Control. Overall, this is a tremendous improvement.</p>
<p>The All Windows mode scales all the windows proportionally, like Exposé did in Leopard. If you use any application with small windows (like Stickies), you&#8217;ll know how silly Snow Leopard&#8217;s Exposé looked when it scaled a 1200&#215;1200 browser window to the same size as a bunch of 100&#215;100 sticky notes and threw them all in a grid. (The non-proportional scaling in Snow Leopard&#8217;s Exposé is so useless <a href="http://forums.macrumors.com/showpost.php?p=10103736&amp;postcount=98">I hack the Dock after every upgrade</a> to bring back Leopard&#8217;s scaling.) The Application Windows mode in Lion uses Snow Leopard&#8217;s non-proportional scaling, which is generally ok because multiple windows in the same app are usually similarly sized.</p>
<p>All Windows also groups windows together, which I find helpful, although not critical. You can drag windows into other desktops from the All Windows mode, too. But if you move your pointer even slightly while clicking on a window to activate it, Mission Control thinks you&#8217;re starting to drag it, and ends up doing nothing when you meant to activate a window. This is maddening. There should be a threshold below which any mouse movement while clicking just ends up as a click (or perhaps there is; if so, it&#8217;s too low).</p>
<p>Mission Control stole Ctrl-Left and Ctrl-right keystrokes to switch desktops, which I use in the terminal all the fricking time. Luckily these keystrokes can be turned off in the settings. I was a multiple desktop power-user back when I used Xwindows, but I never turned on Spaces on Snow Leopard and still haven&#8217;t used them on Lion. I&#8217;m not sure why not.</p>
<p>There are a few display bugs. Sometimes the blue window highlights are way bigger than the window previews. Textmate&#8217;s Find dialog doesn&#8217;t (always) show up in Mission Control, which I hope will be fixed sometime before <a href="http://blog.macromates.com/2011/whats-next/">Textmate 2 is released later this year</a>.</p>
<p>The biggest problem for Mission Control is that it doesn&#8217;t let you restore or even see minimized windows in All Windows mode, only in Application Windows mode, where they are lumped in with previously opened documents. If you enable &#8220;Minimize to Application Icon&#8221;, the only way to get at your minimized windows is via the Application Windows mode.</p>
<h4>Scroll bars</h4>
<p>I got used to the new scroll bars in 30 seconds. I haven&#8217;t missed the up/down arrows at all. Weirdly, the default scrolling direction on the MacMini was set up out of the box for trackpads, but on the MacBook, it was set up for scroll wheels.</p>
<h4>Migration Assistant</h4>
<p>Earlier this year I helped my mom migrate from a vintage MacMini running Tiger (10.4) to a new one running Snow Leopard. The Migration Assistants on the two machines completely refused to cooperate with each other during the initial setup of the new Mini. It took many, many attempts after the install was complete to I get it to migrate her documents. I thought this was because I was migrating between two major releases.</p>
<p>I started out using Lion on an elderly MacMini while my new laptop was in the mail, so I got to experience Migration Assistant again. Before attempting to migrate, I set up the new laptop using a dummy account, and ran Software Update on both computers until they were both running 10.7.1. I hoped the up-to-date Migration Assistant would do better at migrating between two identical versions of Mac OS, but it was just as recalcitrant as before. The two computers steadfastly refused to recognize each other at the same time, even though they were both on the same wireless network just inches away from each other (and from the wireless router). I finally borrowed an ethernet cable, turned the wireless off on both, and hooked them up ethernet port to ethernet port. It felt dirty, but it seemed to help; after a few more tries my account was migrated. I think it took longer to coax Migration Assistant into cooperation than it did to actually migrate my files.</p>
<p>So Migration Assistant is just as cranky between two Lion installs as it was between Tiger and Snow Leopard. I can&#8217;t imagine how frustrating it must be for the average, non-technical Mac user to migrate to a new Mac.</p>
<h4>The new Mail</h4>
<p>I forced myself to use the new side-by-side Mail interface for the first week, hoping that I&#8217;d come to like it. I didn&#8217;t. I hate it. I switched back to classic view after a week.</p>
<p>I can&#8217;t really say what bugs me about Mail, but it just feels wrong. One glaring issue is that the text and icons in the message list have been made bigger, which is a pain for someone with <a href="http://glyphobet.net/mailboxchart/">over ten years of email</a> in lots of different folders. Some people, including <a href="http://daringfireball.net/linked/2011/09/07/gemmell-mail">Jon Gruber</a>, speak highly of it, so I&#8217;m holding out hope that it will grow on me.</p>
<p>But when I install Lion on my personal machine, I&#8217;ll make a backup of Snow Leopard&#8217;s Mail.app and see if it works on Lion. Just in case.</p>
<h4>Autocorrect</h4>
<p>Autocorrect is for people who aren&#8217;t fast, good typers. It&#8217;s not for me. I turned it off. In Mail and system-wide. I wonder why Mail has its own setting for autocorrect that overrides the system setting.</p>
<h4>XCode</h4>
<p>Seriously, Apple? You mean I have to create an iTunes account, even though this is a work computer and I won&#8217;t ever be buying software for it, and verify it, just in order to download XCode? And then, the XCode application that gets installed is actually the XCode installer? What a hassle.</p>
<p>Ok, ok, to be fair, this isn&#8217;t a Lion thing. But seriously, Apple?</p>
<h4>MacPorts</h4>
<p>Aside from mysql5-server, I got everything I needed installed fine. I was even able to <a href="https://twitter.com/#!/glyphobet/status/118602625435435008">beat mysql5-server into submission</a>, with a judicious application of MacPorts-kung-fu.</p>
<h4>Textmate</h4>
<p>After hearing many rumors about Textmate not really working under Lion, I&#8217;m happy to report that it seems to work fine. (Aside from the aforementioned wacky interaction with Mission Control.)</p>
<h4>Launchpad</h4>
<p>I won&#8217;t use Launchpad. Apple is clearly trying to unify the experience of iOS and Mac OS. But I already have Spotlight, the Dock, and the Applications folder. How many views of my applications do I need?</p>
<h4>Resume</h4>
<p>The resume feature rocks, at least in Terminal. Quit Terminal or restart your machine, and when you relaunch Terminal, all your windows are there, in the same places, with the same tabs, and the scrollback buffers are still there.</p>
<p>I honestly haven&#8217;t used or noticed Resume from any other applications. Of course, all the web browsers already have something like it.</p>
<h4>Resize from any edge</h4>
<p>For the last twenty-odd years, Windows (since 3.1) and most Xwindows window managers have had the ability to resize windows from any edge And Mac OS, going back just as long, to Classic Mac OS, has always forced you to resize (only down and to the right) by grabbing a little, 16&#215;16 pixel box at the lower right of the window. This has always been a minor shortcoming in Mac OS&#8217;s interface.</p>
<p>Leave it to Apple&#8217;s UI designers to realize you could resize windows from any edge without having an fat, ugly, click-target border all the way around every single window. Resize from any edge is a perfect illustration of Apple&#8217;s design genius: Less clutter, same power. I&#8217;ve wanted this on Mac OS for so long, I&#8217;d be willing to pay the €23 just for this feature alone.</p>
 <img src="https://glyphobet.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2077" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/essay/2077/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Push to Github using Mercurial</title>
		<link>http://glyphobet.net/blog/essay/2029</link>
		<comments>http://glyphobet.net/blog/essay/2029#comments</comments>
		<pubDate>Sun, 17 Jul 2011 19:05:57 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[essay]]></category>
		<category><![CDATA[bitbucket]]></category>
		<category><![CDATA[DVCS]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[hg]]></category>
		<category><![CDATA[mercurial]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[VCS]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=2029</guid>
		<description><![CDATA[It&#8217;s simple to push Mercurial source code repositories to GitHub (or another git server). This is useful if you can&#8217;t, or don&#8217;t want to, switch off of Mercurial to git. You can take advantage of GitHub&#8217;s superior community and features (sorry, BitBucket) without having to puzzle over ____ (anti-git screed left as an exercise to [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s simple to push <a href="http://mercurial.selenic.com/">Mercurial</a> source code repositories to <a href="https://github.com/">GitHub</a> (or another git server). This is useful if you can&#8217;t, or don&#8217;t want to, switch off of Mercurial to <a href="http://git-scm.com/">git</a>. You can take advantage of GitHub&#8217;s superior community and features (sorry, <a href="http://bitbucket.org">BitBucket</a>) without having to puzzle over ____ (<a href="http://thomas.apestaart.org/log/?p=487">anti-git</a> <a href="http://glyphobet.net/blog/blurb/1805">screed</a> left as an exercise to the reader).</p>
<p>To do this, you&#8217;ll need the <a href="https://github.com/schacon/hg-git">hg-git</a> plugin for Mercurial, by <a href="http://scottchacon.com/">Scott Chacon</a> <a href="https://github.com/schacon/hg-git/graphs/impact">and others</a>. The technique is outlined on <a href="https://github.com/schacon/hg-git#readme">hg-git&#8217;s read-me</a>, but it still took me some effort to get working right, so I thought this blog post might be helpful.</p>
<p>I assume you already have Mercurial installed, a project in a Mercurial repository you want to push, and a GitHub account. Here&#8217;s how you do it.</p>
<h3>Install hggit</h3>
<p>If you&#8217;re using <a href="http://www.macports.org/">MacPorts</a> and Python 2.6, you should be able to do this with:</p>
<pre>sudo port install py26-hggit</pre>
<p>At the end of hggit&#8217;s install process, hggit prints out a line to add to your <code>~/.hgrc</code>. For MacPorts &amp; Python 2.6, this will look like:</p>
<pre>hggit=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/hggit</pre>
<p>Note: Installing hggit in a virtualenv is probably not a good idea unless you also are using a version of Mercurial installed in the same virtualenv. You could probably make it work, but it&#8217;s likely more work than it&#8217;s worth. </p>
<h3>Set up and connect to a GitHub repository</h3>
<p>Create an empty repository on GitHub to store your Mercurial project. Copy the git <acronym>URL</acronym> from the new repository. Append <code>git+ssh://</code> to the beginning, and change the <code>:</code> to a <code>/</code>. For example, this: </p>
<pre>git@github.com:mercurialpoweruser/mercurialrocks.git</pre>
<p>becomes this:</p>
<pre>git+ssh://git@github.com/mercurialpoweruser/mercurialrocks.git</pre>
<p>This <acronym>URL</acronym> then goes in the <code>[paths]</code> section of your Mercurial repository&#8217;s <code>.hg/hgrc</code>. If you want to push and pull from GitHub by default, it will look like this:</p>
<pre>
[paths]
default = git+ssh://git@github.com/mercurialpoweruser/mercurialrocks.git
</pre>
<p>Or, if you already have a remote Mercurial repository that you want to keep using, you can add the GitHub repository with a different name:</p>
<pre>
[paths]
default = ssh://hg@bitbucket.org/mercurialpoweruser/mercurialrocks
github = git+ssh://git@github.com/mercurialpoweruser/mercurialrocks.git
</pre>
<p>Next, push your repository to GitHub for the first time, with <code>hg push</code> (if GitHub is your default) or <code>hg push github</code> (if GitHub isn&#8217;t the default). </p>
<p>Now, go to GitHub and reload the page, and revel in the feeling that you are living in a utopian future where cars fly, cold fusion supplies our electricity, and different <acronym>DVCS</acronym>s interoperate with each other. </p>
<h3>Gotchas</h3>
<p>If you find that Mercurial mysteriously stops pushing new changes to GitHub, even though there are new changes to push and it&#8217;s pushing them to Mercurial servers fine, you might want to take a look your bookmarks. Do this with <code>hg bookmarks</code>. Make sure that the changeset ID for master is the changeset ID of tip: <code>hg tip</code>. If they&#8217;re not the same, update the master bookmark with <code>hg bookmark -f master</code>. This happened to me when I used an older version of Mercurial (1.3.1) without the bookmarks extension enabled. Don&#8217;t do that.</p>
<h3>Your mileage may vary</h3>
<p>I haven&#8217;t used this technique on repositories that have lots of branches, file renames, merge conflicts, or other &#8220;fancy&#8221; distributed version control features. I wouldn&#8217;t advise switching your entire development team and mission-critical repositories over to this technique without some more extensive testing. </p>
 <img src="https://glyphobet.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2029" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/essay/2029/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The FLOSS tortoise, chasing the wrong proprietary hare. Again.</title>
		<link>http://glyphobet.net/blog/essay/1979</link>
		<comments>http://glyphobet.net/blog/essay/1979#comments</comments>
		<pubDate>Sun, 20 Feb 2011 00:06:40 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[essay]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[Explorer]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Microsoft Windows]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[user interface]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=1979</guid>
		<description><![CDATA[For most of the aughts, the various Linux desktop projects tried to catch up to Windows by copying features wholesale, while Mac OS X innovated like crazy and blew past both by building an amazing desktop experience. The omission of Chrome &#38; Safari from Paul Rouget&#8216;s pro-Firefox Is IE9 a modern browser? reminds me of [...]]]></description>
			<content:encoded><![CDATA[<p>For most of the <a title="This is what we are calling the '00s, people. Get used to it." href="http://en.wikipedia.org/wiki/2000s_%28decade%29">aughts</a>, the various Linux desktop projects tried to catch up to Windows by copying features wholesale, while Mac OS X innovated like crazy and blew past both by building an <a title="This exposé shit is dope, people. Get used to it." href="http://en.wikipedia.org/wiki/Expos%C3%A9_%28Mac_OS_X%29">amazing</a> desktop experience.</p>
<p>The omission of Chrome &amp; Safari from <a title="Kudos on the Palatino, but that background is so 1998. " href="http://people.mozilla.com/~prouget/ie9/">Paul Rouget</a>&#8216;s pro-Firefox <a title="It's pretty, but a that font's too much like Helvetica." href="http://people.mozilla.com/~prouget/ie9/ie9_vs_fx4.html">Is IE9 a modern browser?</a> reminds me of that misguided attempt. I hope Firefox doesn&#8217;t make the same mistake as desktop Linux; it would be a shame if they focused all their energy trying to catch Explorer, while missing the <a title="Modern browsers ship." href="http://people.gnome.org/~jdub/2011/modern-browsers-ship/">rapid</a> <a title="A piece with a lot of screenshots about the close tab behaviour in Google Chrome" href="http://www.theinvisibl.com/2009/12/08/chrometabs/">user-interface</a> innovation going on elsewhere.</p>
<p><em>Update:</em> Here&#8217;s <a title="Basing the Design of History on the User’s Memory" href="http://blog.mozilla.com/faaborg/2007/01/13/basing-the-design-of-history-on-the-users-memory/">an example of a great idea</a> from 2007, from Alex Faaborg, out of the user experience team at Mozilla, that didn&#8217;t make it into Firefox 3.</p>
 <img src="https://glyphobet.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1979" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/essay/1979/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick update for subscribers</title>
		<link>http://glyphobet.net/blog/blurb/1935</link>
		<comments>http://glyphobet.net/blog/blurb/1935#comments</comments>
		<pubDate>Sat, 11 Dec 2010 15:41:04 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[blurb]]></category>
		<category><![CDATA[essay]]></category>
		<category><![CDATA[travelog]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=1935</guid>
		<description><![CDATA[I am going traveling very soon, so things will get pretty quiet around here. My posts here are split up into three categories, and each has a separate feed: Essays (subscribe here), my longer, in-depth writings, usually about technical subjects. Travelog (subscribe here), which is where I have written about my travels. Although will be [...]]]></description>
			<content:encoded><![CDATA[<p>I am going traveling very soon, so things will get pretty quiet around here. My posts here are split up into three categories, and each has a separate feed:</p>
<ul>
<li><a href="http://glyphobet.net/blog/category/essay">Essays</a> (<a href="http://glyphobet.net/blog/category/essay/feed">subscribe here</a>), my longer, in-depth writings, usually about technical subjects.</li>
<li><a href="http://glyphobet.net/blog/category/travelog">Travelog</a> (<a href="http://glyphobet.net/blog/category/travelog/feed">subscribe here</a>), which is where I have written about my travels. Although will be traveling soon, I&#8217;m not sure if I&#8217;ll continue to write travel log entries.</li>
<li><a href="http://glyphobet.net/blog/category/blurb">Blurbs</a> (<a href="http://glyphobet.net/blog/category/blurb/feed">subscribe here</a>), mostly links to things I find interesting, with very short commentary. For the last few months <a href="http://twitter.com/#!/glyphobet">I&#8217;ve been posting interesting links &amp; short commentary via Twitter instead</a>, so if you like my blurbs, or want to respond to anything on here, you could <a href="http://twitter.com/#!/glyphobet">follow me on Twitter</a>.</li>
</ul>
<p>There&#8217;s of course also a <a href="http://glyphobet.net/blog/feed/atom">master feed for all posts</a>. You <span style="text-decoration: line-through;">can <a href="http://digg.com/glyphobet">follow my posts on Digg</a>, or</span> follow <a href="http://glyphobet.soup.io/">my </a><a href="http://glyphobet.soup.io/">account on the awesome soup.io</a>, which aggregates this blog, and my <a href="http://twitter.com/#!/glyphobet">twitter</a>, <a href="http://glyphobet.redbubble.com/works">t-shirts</a>, <a href="http://www.shapeways.com/shops/glyphobet">3-d printing</a>, and <a href="http://glyphobet.net/typography">various</a> <a href="http://photo.theory.org/v/glyphobet">other</a> <a href="http://www.flickr.com/photos/glyphobet/">online</a> <a href="http://typophile.com/user/17008/">presences</a>. <em>(Update 2011 April 6: Digg has removed import by RSS)</em></p>
 <img src="https://glyphobet.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1935" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/blurb/1935/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is Git really better than X?</title>
		<link>http://glyphobet.net/blog/essay/1833</link>
		<comments>http://glyphobet.net/blog/essay/1833#comments</comments>
		<pubDate>Sat, 20 Nov 2010 21:51:58 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[essay]]></category>
		<category><![CDATA[Bazaar]]></category>
		<category><![CDATA[bitbucket]]></category>
		<category><![CDATA[bzr]]></category>
		<category><![CDATA[distributed version control]]></category>
		<category><![CDATA[DVCS]]></category>
		<category><![CDATA[fossil]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[hg]]></category>
		<category><![CDATA[mercurial]]></category>
		<category><![CDATA[perforce]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[VCS]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=1833</guid>
		<description><![CDATA[Most of Scott Chacon&#8217;s points in Why Git is Better than X are spot-on. The page could even be renamed &#8220;Why distributed version control systems are better than Subversion and Perforce,&#8221; since those two are the clear losers. (And yes, Bazaar is so slow I think it deserves to be listed twice in the speed [...]]]></description>
			<content:encoded><![CDATA[<p>Most of Scott Chacon&#8217;s points in <a rel="nofollow" href="http://whygitisbetterthanx.com/">Why Git is Better than X</a> are spot-on. The page could even be renamed &#8220;Why distributed version control systems are better than Subversion and Perforce,&#8221; since those two are the clear losers. (And yes, <a title="No wonder Canonical takes so long to fix Ubuntu bugs." href="http://bazaar.canonical.com/en/">Bazaar</a> is so slow I think it deserves to be listed twice in the speed section.)</p>
<p>I&#8217;ve used each of Git, <a href="http://mercurial.selenic.com/">Mercurial</a>, and Bazaar for several months in  medium sized teams; I&#8217;ve done quite a bit of branching and merging in  Mercurial and Bazaar, and a fair amount in Git. Based on that experience, I am compelled to disagree here with a few of the points, specifically with regards to Mercurial.</p>
<h3>Cheap local branching</h3>
<p>Chacon argues that only Git offers cheap local branching, but Mercurial allows exactly the same work-flows that he outlines, and they are just as easy. Chacon claims that Git&#8217;s branching model is different:</p>
<blockquote><p>Git will allow you to have multiple 							local branches that can be entirely independent of each other&#8230;</p></blockquote>
<p>This isn&#8217;t quite correct. The real difference between Git&#8217;s branching model and the others is that Git does not assume a one-to-one relationship between a logical branch and a directory on the file-system. In Git, you can have a single directory on the file-system and switch between different branches with the <code>git checkout</code> command without changing directories.</p>
<p>Mercurial (and Bazaar) <span style="text-decoration: line-through;">enforce</span> default to<sup><a href="http://glyphobet.net/blog/essay/1833#footnote_0_1833" id="identifier_0_1833" class="footnote-link footnote-identifier-link" title="Update: Thanks to David Wolever, who points out that hg branch and hg bookmark can be used to have more than one branch per directory in Mercurial. I didn&amp;#8217;t even know about these commands when I first wrote this post. But I think my central point still holds; creating cheap local branches in Mercurial is just as easy as in Git. ">1</a></sup> a one-to-one relationship between a logical branch and directory on the file-system. You can, however, use the <code>hg clone</code> command to make a new, &#8220;entirely independent,&#8221; branch. You can clone a local directory, a remote directory over SSH, or a remote Mercurial repository. Cloning a repository that&#8217;s on the local file-system is the way to create cheap local branches in Mercurial. Mercurial will even create hard links to save disk space and time.</p>
<p>For example, in Git, you make a cheap local branch with:</p>
<p><code>git branch featurebranch<br />
git checkout featurebranch</code></p>
<p>And in Mercurial, you make a cheap local branch with:</p>
<p><code>cd ..<br />
hg clone master featurebranch<br />
cd featurebranch</code></p>
<p>In Git, you switch between branches with <code>git checkout branchname</code>. In Mercurial, since branches are in a one-to-one correspondence with directories, you switch between branches with <code>cd ../branchname</code>.</p>
<p>In Git, you pull changes from a local branch with <code>git merge branchname</code>. In Mercurial, you pull changes into from a local branch with <code>hg pull -u ../branchname</code>.</p>
<p>Chacon&#8217;s four example work-flows using cheap local branches are not only completely possible in Mercurial, they are just as trivial as they are in Git. (The first three are even equally trivial in Bazaar; I&#8217;m not sure about the last one in Bazaar, though.)</p>
<p>Chacon says:</p>
<blockquote><p>You can find ways to do some of this with other systems, but the work involved is much more difficult and error-prone.</p></blockquote>
<p>Reasonable people might also disagree about the intuitiveness of the specific commands, but creating, updating, merging, and deleting them in Mercurial are one or two commands in the shell, just like in Git. None of these tasks are more difficult or more error-prone in Mercurial.</p>
<p>Chacon also says:</p>
<blockquote><p>when you push to a remote repository, you do not have to push all of your branches. You can only share one of your branches and not all of them.</p></blockquote>
<p>This is a little misleading. In Mercurial, since there&#8217;s usually a one-to-one correspondence between branches and local directories, and since you can&#8217;t be in two directories at once, you&#8217;re usually only pushing a single branch. In Mercurial, you generally don&#8217;t have to think about which branch you&#8217;re pushing, or whether you&#8217;re pushing other branches that shouldn&#8217;t be pushed, because you generally only ever push one branch at a time. I would actually turn this argument around, and claim that Git&#8217;s default of keeping multiple logical branches in a single directory forces you to worry about which branches you&#8217;re pushing, and actually makes cheap local branches <em>harder</em> and <em>more</em> error-prone in Git than in Mercurial.</p>
<p>Reasonable people might disagree about the intuitiveness of a branching model which does or does not <span style="text-decoration: line-through;">assume</span> default to a one-to-one relationship between logical branches and local directories, but that&#8217;s not why cheap local branches are so powerful in Git. Rather, it&#8217;s the ability to clone and merge between repositories locally that allows cheap local branches, and it&#8217;s just as easy in Mercurial as in Git, and nearly as easy in Bazaar.</p>
<h3>GitHub</h3>
<p>GitHub is unarguably the biggest community around any distributed version control system.  But Chacon goes too far when he says:</p>
<blockquote><p>This type of community is simply not available with any of the other SCMs.</p></blockquote>
<p><a title="It's not a big bucket, it's a series of commits." href="http://bitbucket.org/">BitBucket</a> may not be as big as GitHub, but it&#8217;s a &#8220;socially-targeted&#8221; community where Mercurial users can &#8220;fork and contribute&#8221; to other Mercurial projects. It might not have as many projects or contributors as GitHub, but a sheer difference in size doesn&#8217;t translate to &#8220;simply not available.&#8221;</p>
<p>Bazaar&#8217;s not listed as inferior to Git on this point, I assume because of <a title="nothing funny here, move along" href="https://launchpad.net/">Launchpad</a>. If Launchpad counts, why not BitBucket?</p>
<p>I&#8217;d also be interested to see usage numbers comparing GitHub and everyone&#8217;s favorite open-source community brontosaurus, <a title="It's not a big bronto, it's a series of sauruses." href="http://sourceforge.net/">SourceForge</a>. Has GitHub surpassed them in projects or users or commits or downloads?</p>
<h3>Minor haggling points</h3>
<p>I also disagree with Chacon about the benefits of the staging area or index, but that&#8217;s purely a matter of personal preference. I never wanted anything like the staging area before I started using Git, and I don&#8217;t miss it now when I&#8217;m using Mercurial. If anything, the extra concept of a staging area makes Git slightly harder to learn; newbies coming from any other version control system have to be taught about the <code>-a</code> option to <code>git commit</code> right away, or else they wonder why their changes aren&#8217;t getting committed.</p>
<p>In the &#8220;Easy to Learn&#8221; section, Chacon highlights the <code>add</code> commands in both Mercurial and Git, indicating that they are the same; but they are pretty different. In Mercurial, <code>add</code> schedules previously un-tracked files to be tracked. In Git, <code>add</code> adds changes in a current file to the staging area, or index, including, but not limited to, previously un-tracked files. That section is also missing Mercurial&#8217;s <code>mv</code> command. Other potentially confusing differences include Git&#8217;s <code>revert</code>, which corresponds to Mercurial&#8217;s <code>backout</code>; and Mercurial&#8217;s <code>revert</code>, which can be duplicated using Git&#8217;s <code>checkout</code>.</p>
<p>Last, I&#8217;d like to see <a title="Dear Zed, I give you Google Juice. Not that you need any." href="http://sheddingbikes.com/posts/1276624594.html">the ballyhooed</a> <a title="It's not a fossilized brontosaurus, that's for sure." href="http://fossil-scm.org/index.html/doc/trunk/www/index.wiki">Fossil</a> included in this breakdown.</p>
 <img src="https://glyphobet.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1833" width="1" height="1" style="display: none;" /><ol class="footnotes"><li id="footnote_0_1833" class="footnote"><em>Update</em>: Thanks to <a href="http://twitter.com/#!/wolever">David Wolever</a>, who <a href="http://twitter.com/#!/wolever/status/6114994492022784">points</a> <a href="http://twitter.com/#!/wolever/status/6114869539504129">out</a> that <code>hg branch</code> and <code>hg bookmark</code> can be used to have <a href="http://mercurial.selenic.com/wiki/NamedBranches">more than one branch per directory</a> in Mercurial. I didn&#8217;t even know about these commands when I first wrote this post. But I think my central point still holds; creating cheap local branches in Mercurial is just as easy as in Git. </li></ol>]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/essay/1833/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A two-step refactoring tactic</title>
		<link>http://glyphobet.net/blog/essay/1759</link>
		<comments>http://glyphobet.net/blog/essay/1759#comments</comments>
		<pubDate>Fri, 19 Nov 2010 19:10:46 +0000</pubDate>
		<dc:creator>glyphobet</dc:creator>
				<category><![CDATA[essay]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[refactoring]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://glyphobet.net/blog/?p=1759</guid>
		<description><![CDATA[In the middle of a major, hairy refactoring recently, I codified a tactic for refactoring that I&#8217;d been using, unconsciously, for years. The tactic is to break down refactoring into two modes, and deliberately switch between them: Clean-up mode: Clean up and reorganize the code, without changing the code&#8217;s external functionality. Change mode: Make the [...]]]></description>
			<content:encoded><![CDATA[<p>In the middle of a major, hairy refactoring recently, I codified a tactic for refactoring that I&#8217;d been using, unconsciously, for years. The tactic is to break down refactoring into two modes, and deliberately switch between them:</p>
<ul>
<li><em>Clean-up mode:</em> Clean up and reorganize the code, without changing the code&#8217;s external functionality.</li>
<li><em>Change mode:</em> Make the smallest, simplest self-contained change, making sure the code is functional again when it&#8217;s completed.</li>
</ul>
<p>You start in clean-up mode, and switch back and forth as needed. This tactic is probably unsurprising to experienced programmers, but for those of you not yet as hard-core as Donald Knuth, let me explain why it&#8217;s a good idea.</p>
<p>Separating clean-up and changes into discrete modes of working gives you less to think about at any one time. A refactor can be very invasive—code that was closely tied together is now completely decoupled, or vice-versa; functions, objects and modules become obsolete or nonsensical, or split apart or merge in unexpected ways; identifiers become ambiguous or collide. If you&#8217;re trying to reorganize everything at the same time you&#8217;re juggling old and new code in your head, it&#8217;s easy (for anyone) to get lost in the maze.</p>
<p>When you&#8217;re consciously in clean-up mode, you can focus just on tasks like making sure variables have unambiguous, correct names, object / module / function / &amp;c. organization and boundaries are sensible, and so on. You&#8217;re not changing any functionality, so your tests (you <em>do</em> have tests, right?) still pass, and the application still behaves as it always has (you <em>did</em> test it manually, right?). And you can be liberal in your clean-up; if you end up improving code that isn&#8217;t ultimately affected by the refactor, there&#8217;s no harm in that.</p>
<p>Once you feel like the code is clean and ready for the changes in functionality, commit your clean-up (you <em>are</em> using <a title="It's like git, only with less WTF" href="http://mercurial.selenic.com/">version control</a>, right?). I usually use a commit message like &#8220;clean-up in preparation for&#8230;.&#8221;</p>
<p>Now switch to change mode, and start making the changes. Quite often, you&#8217;ll discover something else that needs to be cleaned up. But you&#8217;re in change mode, not clean-up mode. Since you&#8217;re only making the smallest, simplest self-contained change, this new clean-up can probably wait until later. But if it <em>can&#8217;t</em> wait until later, then roll back your changes (or save a <a title="Larry Wall's claim to fame" href="http://linux.die.net/man/1/patch">patch</a>, or store your work in the <a title="It's like stash, without the idiocy" href="http://mercurial.selenic.com/wiki/AtticExtension">attic</a>, or the <a title="it's like attic with gotchas!" href="http://www.kernel.org/pub/software/scm/git/docs/git-stash.html">stash</a>, or <a title="it's like attic, only 1/10th as fast!" href="http://wiki.bazaar.canonical.com/BzrShelveExample">shelve</a> it, or <a title="A subset of attic, the kids say." href="http://mercurial.selenic.com/wiki/ShelveExtension">whatever</a> the kids are calling it these days). Complete the new clean-up, commit it, and <em>then</em> go back to change mode and your half-completed changes.</p>
<p>This tactic has some additional benefits that might not be immediately obvious, too:</p>
<ul>
<li>Clean-up mode forces you to read over all of the code that&#8217;s going to be changed and ask, &#8220;How is this code going to be affected by the changes I&#8217;m planning?&#8221; Sometimes you discover unanticipated edge-cases or bugs in your planned changes. Sometimes you realize the whole plan is flawed, and have to go back to the drawing board. And sometimes, after a good, hearty clean-up session, you realize that you can make the required changes in a less invasive, simpler way. I find that most refactors are more clean-up than anything else.</li>
<li>If the codebase has a &#8220;master&#8221; or &#8220;main&#8221; branch, and you use a &#8220;feature&#8221; or &#8220;working&#8221; branch for your refactor, you can put the clean-up commits into the master branch (they don&#8217;t change any functionality, right?) and only commit the functional changes to the feature branch. What&#8217;s the point of that? Well, everyone else gets to benefit from your code clean-up right away, and when you do end up merging your functionality changes into the master branch, because it&#8217;s a smaller delta, there&#8217;s a smaller chance of conflicts.</li>
</ul>
<p>The next time you&#8217;re staring down the barrel of a nasty refactor, and cursing the person who didn&#8217;t fully think think through the business requirements, try this. It won&#8217;t make every refactor a piece of cake, nor will it become the hot new programming methodology acronym down in the valley (<abbr>2SR</abbr>, anyone? <abbr>2SRT</abbr>?), but I guarantee you&#8217;ll be glad you tried it.</p>
 <img src="https://glyphobet.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1759" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://glyphobet.net/blog/essay/1759/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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 [...]]]></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><a href="http://glyphobet.net/blog/essay/1581#footnote_0_1581" id="identifier_0_1581" class="footnote-link footnote-identifier-link" title="Thanks to Steve for explaining that by &amp;#8220;first-class callable,&amp;#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&amp;#8217;s callables aren&amp;#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.">1</a></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>
 <img src="https://glyphobet.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1581" width="1" height="1" style="display: none;" /><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 [...]]]></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><a href="http://glyphobet.net/blog/essay/1501#footnote_0_1501" id="identifier_0_1501" class="footnote-link footnote-identifier-link" title="For those of you who hate your web browser and want it to crash, there&amp;#8217;s also a version of the Periodic Table of Periodic Tables that uses an off-the-shelf Flash app and 217% of your CPU to make a zoomable interface that could be done in about ten lines of CSS &amp;#038; JavaScript, and 0% of your CPU.">1</a></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><a href="http://glyphobet.net/blog/essay/1501#footnote_1_1501" id="identifier_1_1501" class="footnote-link footnote-identifier-link" title="My very own Periodic Table of the Europeans is at &amp;#8220;Eu,&amp;#8221; (number 63), smack dab in the middle of the &amp;#8220;Awesomeoids&amp;#8221; (the green row). Thanks, keaggy.">2</a></sup> are only funny because this tendency towards scientific organization has totally permeated popular culture. And that&#8217;s pretty encouraging.</p>
 <img src="https://glyphobet.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1501" width="1" height="1" style="display: none;" /><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>
 <img src="https://glyphobet.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1474" width="1" height="1" style="display: none;" />]]></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 [...]]]></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>
 <img src="https://glyphobet.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1230" width="1" height="1" style="display: none;" />]]></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 [...]]]></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>
 <img src="https://glyphobet.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1198" width="1" height="1" style="display: none;" />]]></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 [...]]]></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>
 <img src="https://glyphobet.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=954" width="1" height="1" style="display: none;" />]]></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[shapeways]]></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 [...]]]></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>&#8216;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>
 <img src="https://glyphobet.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=912" width="1" height="1" style="display: none;" />]]></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&#8216;s excellent jQuery Text box hints plug-in. Without this fix, jQuery&#8216;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 remove() { - if ($input.val() === title &#38;&#38; [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a tiny fix to <a href="http://remysharp.com/">Remy Sharp</a>&#8216;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>&#8216;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>
 <img src="https://glyphobet.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=878" width="1" height="1" style="display: none;" />]]></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><a href="http://glyphobet.net/blog/essay/851#footnote_0_851" id="identifier_0_851" class="footnote-link footnote-identifier-link" title="A Summer Affair&amp;#8216;s plot summary on Amazon makes it sound like an upscale romance novel with a helping of East Coast affluence-porn thrown in.">1</a></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>
 <img src="https://glyphobet.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=851" width="1" height="1" style="display: none;" /><ol class="footnotes"><li id="footnote_0_851" class="footnote"><em>A Summer Affair</em>&#8216;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>
	</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! -->
