tag:blogger.com,1999:blog-26434632331379446532024-02-08T10:39:16.338+00:00Short Controlled BurstsGeorgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.comBlogger40125tag:blogger.com,1999:blog-2643463233137944653.post-25730159031332857592010-09-15T22:34:00.004+01:002010-09-15T23:56:24.423+01:00On Babies, Bathwater, and DatabasesMy friend Ed has written a good, provocatively-titled <a href="http://blog.edparcell.com/only-a-moron-would-use-a-sql-database-in-2010">piece</a> in which he explains the relational-vs-noSQL debate in terms of the vested interests of the respective parties. I think that's a valid line of thought - fanatical views are almost always manifestations of strong incentives. But, like the flame wars that inspired it, Ed's article perpetuates the premise that one has to choose <span style="font-style: italic;">either</span> old-fashioned, slow, 20th Century SQL databases <span style="font-style: italic;">or</span> newfangled, 21st Century, fast-and-loose 'Web-scale' databases. I don't think that's true.
<p>It's worth thinking at a slightly more fine-grained level about the properties of older technologies, so as to be able to understand whether they should be abandoned completely. For the sake of argument (and because I'm marginally familiar with it) take PostgreSQL as an example of an old-school relational database. Use it, and out of the box you get (among other things):
<ul><li>Familiar SQL syntax, understood by generations of programmers <span style="font-style: italic;">and software tools</span>;</li><li>Schema management commands;</li><li>Data management commands;</li><li>Hard guarantees about data integrity, through transactions;</li><li>A sophisticated query planner with a choice of algorithms.</li></ul>Now, the argument from the "Web programmer" camp, that these days it's expedient to forsake integrity in the name of scalability, is a valid one. But that only concerns one of the items listed above. Is it really worth discarding over thirty years of accumulated expertise in the light of that one observation? I'd say not - and good relational database systems can be configured to be more relaxed about traditional ACID properties, precisely so as to be able to gain performance.
<p>Similarly, it's true that an out-of-the-box relational database doesn't suit vast quantities of data distributed over large numbers of machines. Its query planner doesn't understand that situation. But a query planner is a mechanical embodiment of a task that used to be done by humans. To discard relational databases entirely is to shift that burden back onto those humans. I've seen this first-hand again and again - you wouldn't believe how much time Google engineers spend thinking about the most efficient way to query the data, and then writing fiddly bits of code to represent their conclusions. Far better is to upgrade the query planner to embody our understanding of the layout of data in the 21st Century.
<p>The benefits of adapting and tuning existing systems are things like continuity and interoperability. Google's staggeringly huge repositories of data are carefully designed from the ground up to suit the queries they need to support. That's an affordable and necessary activity when you're shunting petabytes and more around. But it means that each repository comes with its own equally peculiar tools for querying, modifying and managing the data and the schemata. And there is certainly a high cost to that, as soon as any activity needs to span projects.
<p>In short, I want a pony. I want the same pony everyone else wants (although some people haven't realised it yet). I want a pony that I can throw concise, high-level queries at, but that will scale. It doesn't have to be always consistent; it's okay for it to be eventually consistent. But I want it to take expressive queries in a well-known syntax - I shouldn't have to learn a new UI or API just to be able to investigate that one record which my current bug refers to. I want it to make plans for executing those queries, explain to me how much time and energy they're going to cost, and run them. All of which, I suspect, is best accomplished by surgery to tools that already exist.Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com0tag:blogger.com,1999:blog-2643463233137944653.post-24223383549606622012010-06-03T00:43:00.003+01:002010-06-03T00:50:30.567+01:00How to Stop SSH from Hanging on OS XRun ssh with -vvv to get plenty of debug output. If it hangs immediately after emitting the line:
<blockquote style="font-family: courier new;">debug3: Trying to reverse map address ...</blockquote>then probably you have Kerberos credentials on the client machine, but the host is not part of the Kerberos setup. The problem can be solved by destroying the Kerberos credentials with:
<blockquote style="font-family: courier new;">kdestroy</blockquote>Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com0tag:blogger.com,1999:blog-2643463233137944653.post-46338300021599679592009-05-28T12:31:00.004+01:002009-05-28T12:42:28.167+01:00Installing GHC binaries on Linux (or: umask is evil)<ol>
<li>Go to <a href="http://www.haskell.org/ghc/dist/">the dist list</a>.</li>
<li>Choose the directory for the version you want.</li>
<li>Make sure to download the file <strong>for the right architecture</strong>.</li>
<li><strong>Very carefully</strong> untar the downloaded file, using <code>tar xjfp</code>. The <code>p</code> option to <code>tar</code> is particularly important. The options are:
<ul>
<li><code>x</code> extract</li>
<li><code>j</code> through <code>bzip</code></li>
<li><code>f</code> a file</li>
<li><code>p</code> and <strong>do not filter its permissions through <code>umask</code></strong>.</li>
</ul>
Without that last option, your umask might remove world-readable permissions from all the installed files, in which case they will be inaccessible to non-root users after they're installed.
</li>
<li><code>cd <var>extracted-dir</var></code></li>
<li><code>./configure</code></li>
<li><code>sudo make install</code></li>
</ol>Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com0tag:blogger.com,1999:blog-2643463233137944653.post-87189988201596415742009-05-20T15:58:00.005+01:002009-05-20T16:05:35.081+01:00How to set the Window Manager under Gnome 2Gnome 2 is strongly inclined to use Metacity as its window manager.
In theory one is able to set the <span style="font-family:courier new;">WINDOW_MANAGER</span> environment variable in order to specify a different window manager. But I had no luck doing that in way that would work with NX, since NX runs gnome-session directly (rather than through GDM) and so there's no way to get the environment set up first. For example, setting this in <span style="font-family:courier new;">~/.gnomerc</span> had no effect.
It turns out that a nice non-intrusive way to set the window manager is via a largely undocumented Gnome setting:
<pre>gconftool-2 -s /desktop/gnome/applications/window_manager/default -t string ${MY_WM}
gconftool-2 -s /desktop/gnome/applications/window_manager/current -t string ${MY_WM}</pre>Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com0tag:blogger.com,1999:blog-2643463233137944653.post-68097225413561684472009-05-13T15:53:00.002+01:002009-05-13T15:57:59.807+01:00GWT Hosted Mode Classpath Woe (and Solution)Working in Eclipse, I added a new dependency to my GWT project, and included the corresponding jar in the project setup (as a user library). After clicking "Restart Server" in the hosted mode control window, I was nonetheless confronted with:
<blockquote>Unable to find <new dependency.xml> - could be a typo, or maybe you forgot to include a classpath entry for source</blockquote>
I checked everything, and the classpath was certainly set up correctly. It turned out that the "Restart Server" button is not enough if your classpath has changed - you need to stop the server altogether, then restart it from within Eclipse.Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com0tag:blogger.com,1999:blog-2643463233137944653.post-55484163385473410842009-04-22T04:59:00.003+01:002009-04-22T05:07:13.104+01:00GWT/Eclipse UnsatisfiedLinkError (and solution)My first steps using the <a href="http://code.google.com/eclipse/">GWT plugin for Eclipse</a> weren't as smooth as I'd have liked. Everything installed fine and I was working through the Quick Start guide happily until I tried to launch my virgin autogenerated GWT project and was confronted with:
<p/>
<blockquote>.../eclipse34/stable/plugins/com.google.gwt.eclipse.sdkbundle.linux_1.6.4.v200904062334/gwt-linux-1.6.4/libswt-pi-gtk-3235.so: /usr/grte/v1/lib/libc.so.6: version `GLIBC_2.4' not found (required by /usr/lib32/libgtk-x11-2.0.so.0)</blockquote>
<p/>
A little rooting around on Google internal mailing lists turned up an incompatibility with OpenJDK. Switching the project JRE from OpenJDK 1.6 to Sun JRE 1.6 solved the problem. So, if you ever see the above error message, maybe you'll find the same action helps.Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com0tag:blogger.com,1999:blog-2643463233137944653.post-33234175752449923962009-03-29T22:41:00.009+01:002009-03-31T19:02:18.237+01:00Installing PostgreSQL on OS X: How to Make it Difficult for YourselfI installed PostgreSQL the easy way using the excellent installer from <a href="http://enterprisedb.com/">enterprisedb.com</a>.
<p>
Unfortunately the installer was (quite reasonably) not prepared to cope with the fact that there was already a user called <span style="font-family:courier new;">postgres</span> and that user's shell was set to <span style="font-family:courier new;">/usr/bin/false</span>. That was because I'd long ago begun to install PostgreSQL in a more manual way, but given up.
</p><p>
The installer puts a script in <span style="font-family:courier new;">/Library/StartupItems</span> that is supposed to start the database server when the machine bootstraps. The script didn't work because it uses <span style="font-family:courier new;">su</span> to run the server as postgres, but <span style="font-family:courier new;">su</span> starts the impersonated user's shell. I tweaked some lines in the script to use <span style="font-family:courier new;">sudo</span> instead, and now it does work. The specific changes were in <span style="font-family:courier new;">StartService()</span>:
</p><p>
</p><pre># su - postgres -c "/Library/PostgreSQL/8.3/bin/pg_ctl -w start -D \"/var/PostgreSQL/8.3/data\" -l \"/var/PostgreSQL/8.3/data/pg_log/startup.log\""
sudo -u postgres /Library/PostgreSQL/8.3/bin/pg_ctl -w start -D "/var/PostgreSQL/8.3/data" -l "/var/PostgreSQL/8.3/data/pg_log/startup.log"</pre>
<p>
and in <span style="font-family:courier new;">StopService()</span>:
</p><p>
</p><pre># su - postgres -c "/Library/PostgreSQL/8.3/bin/pg_ctl stop -m fast -w -D \"/var/PostgreSQL/8.3/data\""
sudo -u postgres /Library/PostgreSQL/8.3/bin/pg_ctl stop -m fast -w -D "/var/PostgreSQL/8.3/data"</pre>
<p>
Additionally, the <span style="font-family: courier new;">psql</span> command doesn't pick up the effective user when executed under <span style="font-family: courier new;">sudo</span> (even under <span style="font-family: courier new;">sudo -s</span>). Consequently, to get a <span style="font-family: courier new;">psql</span> command prompt as user <span style="font-family: courier new;">postgres</span>, the following is needed:
</p><p>
</p><pre> sudo -u postgres psql -U postgres</pre>Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com0tag:blogger.com,1999:blog-2643463233137944653.post-2384380612663211542008-10-27T23:30:00.002+00:002008-10-27T23:34:39.551+00:00Best. TV. Evar.I don't normally watch much TV, much less plan my evening around watching any particular broadcast. But today I was flicking through that edifying publication which calls itself <i>The London Paper</i> and a show on E4 caught my eye so I watched it. A recipe for it follows:
<ul><li>Start with <i>28 Days Later</i> (yes, fast zombies)</li><li> Add in an equal measure of <i>Big Brother</i> </li><li> Allow plenty of very convincing gore, in the style of the above film</li><li> Get Charlie Brooker to write it, so that there's plenty of loathing for reality TV</li><li> Get Channel 4 to produce it, giving access to all the real <i>Big Brother</i> paraphernalia</li><li> Sit back and enjoy the inhabitants of the <i>Big Brother</i> house (scarcely hammed up at all) arguing about nothing while the rest of the world goes to shit</li></ul> Find it and watch it. It is essential.Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com1tag:blogger.com,1999:blog-2643463233137944653.post-52739370694078777482008-07-03T20:21:00.000+01:002008-07-03T20:21:58.303+01:00This one's for HarryA bit more <a href="http://www.bizarremag.com/weird_world/body_world/7173/zombie-boy.html">zombie</a> material...Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com1tag:blogger.com,1999:blog-2643463233137944653.post-33926492086860483342008-06-30T20:21:00.000+01:002008-06-30T20:21:42.056+01:00Farming Considered Harmful<a href="http://www.sciam.com/article.cfm?id=a-case-for-no-till-farmin&sc=rss">Not even old-fashioned farming is sustainable</a> which means we can pretty accurately foretell the end of our civilisation.Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com0tag:blogger.com,1999:blog-2643463233137944653.post-76201984840184662082008-06-30T20:18:00.000+01:002008-06-30T20:18:32.942+01:00Fighting and MathematicsApparently even <a href="http://www.telegraph.co.uk/earth/main.jhtml?xml=/earth/2008/06/27/sciwar127.xml&CMP=ILC-mostviewedbox">war is governed by a power law</a>. Although don't believe the <span style="font-style: italic;">Telegraph</span>'s headline hype - this won't predict attacks; it only describes their distribution.Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com0tag:blogger.com,1999:blog-2643463233137944653.post-18881284176923250792008-06-30T10:02:00.000+01:002008-06-30T10:02:04.376+01:00Music and AmnesiaA piece from the <span style="font-style: italic;">New Yorker</span> about <a href="http://www.newyorker.com/reporting/2007/09/24/070924fa_fact_sacks">severe amnesia</a>, by Oliver Sacks.
<a href="http://www.newyorker.com/reporting/2007/09/24/070924fa_fact_sacks"></a>Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com0tag:blogger.com,1999:blog-2643463233137944653.post-84070531695804823472008-06-27T20:55:00.000+01:002008-06-27T20:55:58.258+01:00I can't readbut I like to look at the silly <a href="http://fishki.net/comment.php?id=37177">pictures</a>.Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com0tag:blogger.com,1999:blog-2643463233137944653.post-27279467014082770732008-06-24T21:08:00.000+01:002008-06-24T21:08:44.946+01:00Intriguing Headline of the Day<a href="http://www.asylum.com/2008/06/23/giant-penis-man-disappearing/">Giant Penis Man Fading, Needs Sheep</a>Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com0tag:blogger.com,1999:blog-2643463233137944653.post-45823349704774030552008-06-23T14:21:00.000+01:002008-06-23T14:21:35.106+01:00Method ArtThis is way too cool not to be spread everywhere: <a href="http://methodart.blogspot.com/2008/06/virtual-ball-pit-from-kevin-atkinson-on.html">Method Art</a>. Check out the four links from the bottom of the post to some other effects.Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com0tag:blogger.com,1999:blog-2643463233137944653.post-6412056204202092892008-06-11T10:29:00.000+01:002008-06-11T10:29:52.588+01:00Abandonware<a href="http://petitions.pm.gov.uk/BletchleyPark/">Save Bletchley Park</a>. No site was more important in the defeat of Nazism.Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com0tag:blogger.com,1999:blog-2643463233137944653.post-64293136331884096452008-06-10T11:55:00.000+01:002008-06-10T11:55:36.327+01:00The Sky, From Above - The Big Picture - Boston.comUntil I saw <a href="http://www.boston.com/bigpicture/2008/06/the_sky_from_above.html">these pictures</a>, I'd forgotten I wanted to be an astronaut.Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com0tag:blogger.com,1999:blog-2643463233137944653.post-49991329499257197932008-06-08T11:35:00.001+01:002008-06-08T11:38:39.022+01:00I Had No Idea What a Geoduck Wasbut it was fun to <a href="http://www.darkroastedblend.com/2008/06/geoducks-are-strange.html">find out</a>.Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com0tag:blogger.com,1999:blog-2643463233137944653.post-10726831252493837542008-04-01T20:47:00.001+01:002008-04-01T20:48:13.605+01:00What "Wii" Really Means... <a href="http://www.thinkgeek.com/stuff/41/superpiipii.html?cpg=70H?">in Japan</a>Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com2tag:blogger.com,1999:blog-2643463233137944653.post-70145208488370198022008-03-27T11:22:00.000+00:002008-03-27T11:22:35.246+00:00Things people worry aboutIs it safe to eat snow? Is it okay to lie? Why don't fish drown? These are just a few <a href="http://upload.gaiatools.com/files/googlesuggest_1.png">questions that are often covered by the Internet</a>.Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com1tag:blogger.com,1999:blog-2643463233137944653.post-81138571719830681032008-03-22T01:41:00.000+00:002008-03-22T01:41:53.098+00:00Never Gonna Give You UpI didn't realise how long it had been since I wrote anything here. Anyway, <span style="font-style: italic;">The Guardian</span> has an excellent piece on <a href="http://music.guardian.co.uk/news/story/0,,2266526,00.html">the origins of rick-rolling</a>. Meanwhile, <span style="font-style: italic;">XKCD</span> suggests an <a href="http://xkcd.com/396/">extreme response to being rick-rolled one time too many</a>.<a href="http://music.guardian.co.uk/news/story/0,,2266526,00.html">
</a>Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com0tag:blogger.com,1999:blog-2643463233137944653.post-17405613647368826122008-03-22T01:27:00.002+00:002008-03-22T01:46:41.969+00:00What Not to WearHere's an <a href="http://improveverywhere.com/images/nopants8_22.jpg">unlikely combination of clothing</a>. Context: a <a href="http://improveverywhere.com/2008/01/16/no-pants-2k8/">ruse by Improv Everywhere</a>, earlier this year.Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com0tag:blogger.com,1999:blog-2643463233137944653.post-25254032554588628932008-02-27T23:43:00.001+00:002008-02-27T23:43:24.974+00:00A Song About the Future<div xmlns='http://www.w3.org/1999/xhtml'><p><object height='350' width='425'><param value='http://youtube.com/v/WGoi1MSGu64' name='movie'/><embed height='350' width='425' type='application/x-shockwave-flash' src='http://youtube.com/v/WGoi1MSGu64'/></object></p><p>Including an interesting point regarding the treatment of elephants.</p></div>Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com1tag:blogger.com,1999:blog-2643463233137944653.post-43555096964099336952008-02-26T12:38:00.001+00:002008-02-26T12:39:17.767+00:00Clearing Snow with a CannonHere's a <a href="http://www.viruscomix.com/snowcannon.jpg?">random cartoon</a> all about it.Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com0tag:blogger.com,1999:blog-2643463233137944653.post-83904412979051799332008-02-25T15:06:00.001+00:002008-02-25T15:07:23.814+00:00The Real Facebook<a href="http://www.explosm.net/comics/1137/?2">This one</a> is for Paul.
<a href="http://www.explosm.net/comics/1137/?2"></a>Georgehttp://www.blogger.com/profile/15092158976724598178noreply@blogger.com1