A little gotcha with os.path.join

For my sins, I am one of those people who doesn't always read Python'sfine documentation carefully enough. For example, I wrote a large chunkof code using the helpful os.path.join() before I noticed a littlegotcha: it's very helpful. In particular:

Joins one or more path components intelligently. If any component isan absolute path, all previous components are thrown away, andjoining continues .

(Right there in black and white in the fine documentation .)


Setting up to build RPMs

There's three ways to build RPMs: the silly way, the easy way, andthe better way.

The silly way starts with /bin/su root , which should be enough of a warning sign. You really don't wantto be building and installing packages as root unless you don't have achoice, and you do.

The easy way is:

$ cat >$HOME/.rpmmacros
%_topdir /some/where
^D
$ cd /some/where
$ mkdir BUILD


Side effects are bad: a personal illustration

One of the things they tell you in programming school is 'side effectsare bad; you should avoid them if possible'. Apparently every now andthen I need a reminder of this, because side effects were at the bottomof my feed whoops from last night.

One of the most expensive bits of DWiki is converting pages from DWikiText into HTML. Originally the conversion was simple andstraightforward; stick wikitext in, get HTML out. But as DWiki grew morefeatures, the wikitext started having additional information: whetherpeople


We apologize for the disruption in syndication feeds

In the process of enabling caching in DWiki , I managed to illustrate theimportance of thorough testing by failing to properly cache the realtitles of entries and then not noticing, because that the Atom feedsstayed the same was the one thing I didn't test. (I carefully andsomewhat obsessively tested that the rendering of all of the otherpages did stay the same. I even have that automated.)

This caused the syndication feeds for WanderingThoughts to revert toplain filename based titles for eight hours or so, until


Solaris patch exit codes and what they mean

This isn't my work; it's from a comment on an earlier entry . I'm repeating it here partly to haveit handy, and partly because DWiki mangled the nice clear plainASCII formatting of the original. So thank you, mostly anonymouscommenter.

The following are the explanation of patchdd script exit codes:

0No error
1Usage error
2Attempt to apply a patch that's already been applied
3Effective UID is not root
4Attempt to save original files failed
5pkgadd failed
6Patch

Atom versus RSS

David Heinemeier Hansson in the comments on one of his entries :

Joe: Atom is just RSS without the bugs. [...]

What he said.

The more I've learned about syndication formats, the more thankful I'vebeen that I picked Atom way back when .(I'm not sure why I chose Atom; possibly because it seemed the more upto date of the choices at the time, since it had an RFC in developmentand all.)

The difference between Atom and RSS


Google Desktop and conditional GET (part 2)

When I start grumpily thinking of ways to punish a program's badbehavior is about when it sinks in that I don't like it. Which meansthat Google Desktop has a problem.

Back in December I wrote about Google Desktop and conditional GET and concluded that I didn't have enoughevidence to really know what the heck was going on. Well, I have severalmonths more data and more people using Google Desktop against me, andI've reached a conclusion: Google Desktop doesn't do


The backend for our recent mirroring

Since I alluded to it in passing in an earlier entry , I might as well describe what I know about how THEMIS set up their systems to handle theload. (Disclaimer: this is second and third hand.)

To cope with the visitors to their regular web site, THEMISput their ordinary web servers behind eight Squid proxies , which were in turn behind a load balancerbox. This apparently held up very well to the quite a few millions ofextra visitors from Google Mars .The main movie page was on


An optimization thought

Today's random optimization thought, brought to my mind by the processof trying to make DWiki run slightly faster:

If you can't make it faster, maybe you can call it less.

Caches are the degenerate brute force case of this, but programrestructuring is better. Repeatedly calling the same core routine canbe a sign that the upstream interfaces aren't really doing what higherlevels want, so the higher levels have to do redundant work.

Besides, if you can figure out a way to call


Weekly spam summary on March 18th, 2006

The basic volume numbers are that this week, we:

  • got 13,909 messages from 248 different IP addresses.
  • handled 18,580 sessions from 927 different IP addresses.
  • received 195,437 connections from at least 36,864 different IP addresses.
  • hit a highwater of 16 connections being checked at once.

These are mostly down from last week ,although not as much as I would like to see. Again, the per