Trailing commas and unfeasibly high line numbers July 8th, 2008

Bursting IE’s Javascript parser, or: generating bizarre error messages through subprocess apoptosis

User loading and saving in Drupal 5.x June 9th, 2008

Workflows of Drupal’s user load and save functionality: spot the hooks and win a programmatical prize.

Subversion log messages need not be set in stone January 14th, 2008

Simon Willison mentioned a while back a link to help on how to undo a svn commit in subversion (more a kind of internal branching than an actual undo, of course: but that’s subversion). That’s all very well, but how about undoing the log message for a particular commit?
Say you have a codebase that only [...]

“You have to have something bad happen to you” January 7th, 2008

Steve Yegge on code’s worst enemy:
… This brings us to the second obviously-bad thing that can go wrong with code bases: copy and paste. It doesn’t take very long for programmers to learn this lesson the hard way. It’s not so much a rule you have to memorize as a scar you’re going to get [...]

Checking the changes for many svn versions, one version at a time October 30th, 2007

Say you want to see both the log and diff of a given svn version, just the differences between it and the previous version, plus log message (i.e. what was committed, and why, for version NUM) The following will work at a bash command prompt:
$ r=NUM; rr=-r`expr $r - 1`:$r; svn log -r$r; svn diff [...]

Visualizing an application’s entire call stack September 5th, 2007

KentBye, Flickr user, has been playing with GraphViz. He’s used it to turn an XDebug output into a pretty visualization of Drupal’s call stack, or what functions call what functions during a typical Drupal request.

OpenSSH, Ubuntu popups and IPv6 July 16th, 2007

I have a couple of on-login tasks doing various distributed office jobs for me: one brought in all the networked drives from machines in this and the other office; the other backed up my locally stored email to the office server. Because my work rarely spans offices I don’t pay much attention to the former; [...]

Taking Drupal to pieces April 17th, 2007

Since listening to Garrett Coakley speak at the first Geek Night on the topic of Drupal, I’ve been sniffing round that open-source CMS. He kindly came to speak to us again, and very inspiring it was too. We’re now having a deeper look at it, seeing what it can do, what are its strengths and [...]

Throw it all away! November 27th, 2006

I’ve recently been experimenting with calling external commands (mplayer and lame, so you might be able to guess what I’ve been doing) from within a scripting language (Python, although it needn’t have been as it turns out). Bizarrely, the external commands—argumentae intactae—worked absolutely fine on their own, chained together by me, by hand. However, when [...]

Testing across the CF/Java boundary November 23rd, 2006

For reasons of speed I’m currently embedding Java in Coldfusion code. Given Coldfusion is built on Java, and can instantiate Java objects through createObject(”java”, class_name), you’d think that’d be reasonably easy. But the boundary between Coldfusion and Java is like the gap between two halves of a broken bone: jagged, bleeding-edged and painful when coerced [...]