Archive for October, 2007

Pope and Bacon a dangerous combo

Saturday, October 27th, 2007

After meeting Ubuntu zealots Alan Pope and Jono Bacon at Fosscamp this morning, I made the mistake of leaving my laptop screen unlocked within the range of these two dangerous characters while I went to the bathroom. What’s worse, I left a terminal window with a root prompt open on the desktop. (I don’t remember why– I think I was installing some software earlier.) When I got back, this so-called “Pope” had blown up the font size on my terminal window and added “rm -rf /” at the root prompt.

It was good for a laugh. Unfortunately, I didn’t have the poise to take a screenshot.

Later, it was revealed that the Bacon, not Pope, was the instigator, or so says Pope.

Note for the non-haX0rs in the audience (I guess that’s you, mom): “rm -rf /” is a command that recursively deletes all files in your filesystem. Incidentally, I did once execute that command on an OS X server that I was maintaining a few years ago. I needed to reinstall OS X for some reason, so I tried executing the legendary command. It was pretty sweet– various programs on the desktop crashed, services disappeared, and the machine was eventually rendered unbootable.

Anyway, I won’t make the mistake of leaving my laptop unprotected when Bacon is on this side of the Atlantic.

One other interesting note from Fosscamp– I talked to Ubuntu Linux founder Mark Shuttleworth for a few minutes after one of the morning sessions; he mentioned that the Dell Linux machines that I was so excited about a few months ago were actually Dell’s idea. I had assumed that the whole Dell Ideastorm business was more of a marketing exercise, while Dell and Canonical had actually been planning Dell PCs with Linux for a while. I guess I was wrong.

Extracting files from a directory tree

Saturday, October 6th, 2007

Mr. Ben Polito has recently beating his drum to the tune that I am a repressed mechanical engineer who needs to release his inner software engineer.

Normally, I am too busy with preparations for the arrival of the Hard Times to spend time busting the myths spread by a sailor in the dark, but a recent problem I ran into at work gave me pause. The first version of our corporate wiki, a tweaked version of mediawiki, left a hierarchy of a few hundred directories sprinkled with around 1600 files. These files were attachments to the old wiki, and while most of them were transferred to the new wiki, some were not.

I thought to myself, “Ah! I bet I could write a little Python function that recursed through the directories, copying out the files and calling itself for each subsequent subdirectory!” This was Friday night around 10, after a day spent writing PLC code for work. It was at this moment that I thought, “Perhaps Mr. Polito has a point.”

To that end, I present Pylito.