Visualizing dynamic program flow

Someone I know has been talking to me recently about bravely becomingthe first outside user of DWiki . As part of this, I realized he mightlike to have practical documentation about how DWiki templates get used in practice for things like producingthis blog. Which made me realize that I'd forgotten how the templateflow goes.

I could have re-read the templates and traced the execution path, butthen I had a bright idea: why not make the program do this for me? So Iinstrument template processing


The :; shell prompt trick

For years, I've had a somewhat unusual shell prompt. It looks likethis:

: ;

(where is the hostname of the current machine.)

Putting the hostname in your prompt is pretty ordinary, but what'sthe other stuff? These days, a more typical shell prompt is somethinglike ' cks@newman:~$ ', to quote a Debian example. (And manypeople use more elaborate prompts, such as Jamie Zawinksi's .)

The trick


A robots.txt surprise

Because I don't really like banning MSNBot , MSNSearch's web spider, I decided to drop our ban and see if its behaviorhad improved since last September . The process ofdoing this has led me to a little surprise about how at least MSNBotmatches User-Agent lines in robots.txt .

From looking at our logs, I already knew that MSNBot was still visiting;it pulled robots.txt at least once a day. So all I needed to do waschange robots.txt so that


Unicode is not simple

Unicode is very big these days, and there are a lot of people who willtell you that Unicode is simple once you take the effort to understandit and that you're a parochial spud if your new program doesn't supportit. Unfortunately, only simple Unicode is easy.

The simple vision of Unicode is that once you have your data inUnicode, you're just dealing with characters and your program canjust do stuff with them as normal. Okay, case and collation is hard , but there


A sad day for SGI: it's now a spammer

I once quite liked SGI and have been following its slow decline witha certain regret. But I did not expect to see this day come; SGI hasbecome a spammer.

Not directly, of course. Large corporations (which SGI still is, sortof) don't spam people directly. Instead they hire specialized placesto do this for them, like the well known (one could say 'infamous')Responsys Interact.

SGI might argue that we have previously been an SGI customer so theycould spam us


Practical RAID-1 read balancing

If you're doing performance analysis of a RAID-1 setup, one of theinteresting questions is 'which drive gets read from when?'

(Measuring how balanced the current IO load is is useful, but it doesn'ttell you how a changed load will affect the balance.)

Since seeks are the expensive thing on modern drives, you want yourRAID-1 system to deal in requests, not in individual blocks, and to senda sequence of sequential reads off to the same disk. If


A surprising effect of RAID-1 resynchronization

Today I got to run into an interesting performance impact of having aRAID-1 mirror resync running on a big partition of a live system.

An important system was having performance problems today, so we werepoking around it. When we watched the disk statistics, we noticed thatonly the first disk was seeing read traffic; the second disk was loafingalong with just occasional bursts of writes. Looking more closely wenoticed that a RAID-1 resync of a big partition was in progress; becausethe system was loaded


A web spider update: not actually Uptilt's web spider

A while back, I wrote an entry about a bad web spider that at the time appeared to belong toUptilt Inc. About a week after I published the entry, some of thesystem administration folks from Uptilt stumbled across it and got intouch with me to look into the whole situation.

In fact they were pretty puzzled about the incident, because (asthey put it) Uptilt didn't even do outgoing HTTP, much less have aweb crawler; their business is based on email. After I provided


Python's extra-clever function parameters

I'm not sure where I ran across this, but until recently I wasn't awarethat you could pre-explode lists and tuples when you declared whatparameters a function takes. That sounds stilted, so I'll give anexample:

def foo(a, (b, c, d)):  print a, b, c, d

This is slightly more compact than the equivalent:

def bar(a, tmp):  b, c, d = tmp  print a, b,

Weekly spam summary on February 25th, 2006

Here's how Hotmail stacks up this week:

  • 4 messages accepted; unfortunately, one of them was definitely spamand at least two more probably were.
  • 21 messages rejected because they came from non-Hotmail emailaddresses.
  • 49 messages sent to our spamtraps.
  • 4 messages refused because their sender addresses had already hitour spamtraps.
  • 6 messages refused due to their origin IP address, all for beingin the SBL ; four from SBL17935 ,one from SBL27471 ,