Imported From Epistula Moving to Letchworth Personal

Lines of Communication

Our garage door is broken, one of the wires that allow us to open it has snapped, leaving it jammed open.

So I phone our letting agents, who phone our landlord, who says she’ll get the builders to phone me.

Nothing happens.

So I phone our letting agents, who phone our landlord, who says she’ll phone the letting agents, who phone me.

Nothing continues to happen.

So I phone our letting agents (imagine about a days gap between every paragraph break here. The door has been broken a week now) who phone the landlord, who phones the builders, who subcontract out the door repair to “Acorn doors”, who tell the builders to tell the landlord to tell the letting agents to tell me that they’ll phone me on tuesday to arrange a time to fix the door.

If that doesn’t happen, I’m to phone the letting agents.

Imported From Epistula MLP

Random Numbers Redux

Your random-number-fu is useless. The prize has gone (See if you can work out why), but you all get one last guess.

MP was the first. It was 64. Look to your right, if you’re on the front page…

Fiction Imported From Epistula Personal programming Work

Coding, Not going postal, and Going Postal

So, today I took time out of my busy schedule to go buy tea.

Actually, I wasn’t getting any work done, really. I’m having a small concentration problem since we entered testing, in that the stuff I’m currently working on is Deep System stuff that is interdependant on almost everything else. This means it takes about fifteen to twenty minutes to swap all the various memory pages into place before I’m producing much new code of any real worth. Each time someone in our open plan office asks me a question, it shatters this delicate balance as I have to swap in other processes like the HTML/CSS structure. The first couple of times this happens I could possibly be refered to as “ratty” at the shattering. After five, I feel the urge to hit things. Not that the office have any real way of telling that I’m currently juggling – to switch metaphors – a couple of dozen balls at the moment, and would like to be left alone.

Net result is that I had a minor argument with someone else that is, in fact, solvable by inserting quote marks, something I realised when I had time to actually think about the problem, rather than desperatly trying not to lose my place in what I was doing to answer the question.

So I went to buy tea.

Since I’m abandoning London for the forseeable, and had run out of English Breakfast (Leaving me with only four types of black tea, five of green (which I don’t drink, but LC does), one of white and three types of Infusions) I decided to go visit Drury in Covent Garden. Naturally I got lost, so I navigated to Covent Garden Market (Specifically, the big square where the bloke who walks on his hands does his show. I’ve never been to Covent Garden without him performing there) and navigated from there. I replaced my Breakfast Tea, got some Ceylon Orange Pekoe and two packets of “Fruit Flavoured” tea – One Apricot, One Mango – and considered that I’d got off lightly.

Then I passed Waterstones.

Or rather, I didn’t. Actually, I went in. I resisted buying a number of books before I found Going Postal. Going Postal is the new Discworld book, It’s good, and it doesn’t come out until the 7th October. You could tell it wasn’t out yet, because there was a noticable lack of large displays with it on or any of the other paraphernalia I usually expect with a new DW release. Specifically, the store only had five copies.

Obviously, it now has four.

It’s good. It’s a ‘standalone’ book in the same way ‘The Truth’ was. Being that it takes place in Ankh Morpork there’s going to be background people you’ve seen before, but the only central person who is a major character is Vetinari, who starts of in a scene that is incredibly similar to one from the Colour of Magic and goes on from there.

It’s good. It also leads neatly on to the next book in the series, which is about Thud. You should go buy Going Postal

Imported From Epistula MLP

Wrong Wrong Wrong

You’re all wrong. Try again. One more guess each…

Imported From Epistula MLP

International Lottery

I have on my monitor a Post-it note bearing a random whole number between 1 and 100 inclusive.

First person to correctly guess it will win a prize. Only one guess each for now.

(Nicked from Songster)

So far, you’re all wrong. I’m keeping track of the guesses here and not accepting from the LJ anymore (Because I can’t tell who guessed first easily)

Imported From Epistula Politics

Absolutly Nothing

Stephen Fry:

Bertrand Russell, the great philosopher and mathematician, got into terrible trouble by writing quite fearsome articles against the first World War when it began. He got all these letters from people who said, My child is prepared to lay down their life for their country. Dont you think that sacrifice demands some respect?
He wrote this extraordinary essay in which he said, Dont you understand? The sacrifice were asking of our young is not that they die for their country, but that they kill for their country. Thats the sacrifice. To ask a child to kill someone else, whom youve never met. Thats a moral choice, pulling a trigger. Having a bullet hit you is not a moral choice. You dont decide to be killed. Its a terrible thing that happens to you. But killing something is something you do and thats a desperate sacrifice. And were seeing that in the Iraq war. Thats what this poor Lynndie England did, this tragic soldier who was shot smugly smiling next to naked Arab prisoners. Thats the chickens coming home to roost. Its not Americans being asked to die by President Bush. Its Americans being asked to kill and to torture. Not necessarily by name. He doesnt say, I want you to kill this or that one. Of course, politics isnt that simple. Essentially that is what society does. It asks its young to kill, and thats what we all have to live with.

aqcom Imported From Epistula Perl programming


Aquarionics’ logging system was designed to work against mod_log_sql, a module that, er, logs to an SQL database. This worked until we upgraded to Apache 2, which log_sql didn’t support until recently. Since part of the logging system is the bit of AqCom that shows who linked here recently, I’d rather not convert it to run off plain text files (though I may be converting it to use Sqlite at some point), so I created a perl script that feeds the log into the database in log_sql’s format. It looks like this:


use DBD::mysql;

#Database options:
$dbUser = "user";
$dbPass = "password";
$dbName = "epistula";

$database = DBI->connect("dbi:mysql:$dbName:localhost:1114", $dbUser, $dbPass);

# - - [24/Dec/2003:15:23:38 +0000] "GET /archive/writing/2003/08/
	19 HTTP/1.0" 200 11873 "-" "msnbot/0.11 (+"

while (<>) {
  my ($client, $identuser, $authuser, $date, $method,
      $url, $protocol, $status, $bytes, $referer,$agent) =

/^(S+) (S+) (S+) [(.*?)] "(S+) (.*?) (S+)" (S+) (S+) "(.*?)" "(.*?)"$/;
  # ...
        $q = "insert into apachelogs (remote_host, remote_user, request_time,
			request_method, request_uri, request_protocol, status, bytes_sent, referer, agent)
        (".$database->quote($client).", ".$database->quote($authuser).", '".$date."', "
			.$database->quote($method).", ".$database->quote($url).", "
			.$database->quote($protocol).", ".$database->quote($status).", "
			.$database->quote($bytes).", ".$database->quote($referer).", "

        #print $database->quote($url)."n";
        my $sth = $database->prepare($q);


…and is run using this crontab line:

@reboot tail -f /var/log/apache2/ | $EPBIN/ &

Now, the important thing to remember is that this gets pretty big pretty quickly, since it logs every line. It’s vitally important that you don’t under any circumstances, forget that you commented out this crontab line:

@daily echo "delete from apachelogs where time_stamp < `date +%Y%m%d --date '1 month ago'`" | mysql epistula

Because otherwise you’ll discover that your daily database dumps start to hit 16Mb each… BZ compressed… 380Mb uncompressed… oh, lets say four months and twelve days later.

For example.

(I ran the above query, or one like it, just before I started this entry. It’s just stopped:

mysql> delete from apachelogs where time_stamp < 20040825;
Query OK, 913830 rows affected (21 min 44.87 sec)

Reformatting for the girlymen who don’t have 2000px wide displays and are reading the RSS feed. See? This is why I want to only do partial content, because that way when I do something like this it only fucks up in IE

Cantrip Imported From Epistula programming Python

Cantrip Diary – ZopeTastic

Okay, so my new workplace use Zope, so it’s probably a good idea for me to use that as a framework. I mean, enough people use it for it not to be too bad, right?

Dear god does it suck. I mean, Whales though really thin gauze, it sucks that badly. I got it working on my local network after swearing at it quite loudly. It’s own personal religion of “Not Invented Here” is going to really annoy me, I can tell.

Lets start with the web server. It doesn’t run though Apache without a tremendous amount of futzing around. I like Apache, and run everything else off Apache, so the fact that all my Zope applications will run off a non-standard port (There are fixes for this, yes, but they also require a tremendous amount of futzing around). This is annoying.

Then there is the user system. I have a user account on this machine, you could even talk to it though LDAP. Requiring your own little world to run in – let alone where you don’t tell me the initial username & password, or where the access file is, or anything – is really annoying. Also, it should be noted that in every SINGLE guide I found on how to reset the password manually it missed the fairly basic piece of information that once you have reset the password, you must restart the Zope server otherwise you will spend half an hour working out why it doesn’t take the data. This, admittedly, is partly a Debian Package problem, but since delving has lead me to believe that it used to ask you for a default username and password on configure, and now doesn’t, I’m leaping to the conclusion that whining isn’t going to fix this any.

It should be a default requirement that every Debian package contains a file in /usr/share/docs explaining a) Which configure options were used, b) What you’re going to have to do next to make the package work, and c) Common pitfalls of the above.

Three, the interface. In the last six months or so, the bar for a web-based interface has gone from a minor hurdle to a max-height pole-vault, mostly due to GMail. However, I can state with no fear of derision that <textarea /> is the single most fucking awful method of inputting code since I used a C64 with a broken delete key, and the fact that the physical location of the source files is shielded from me (and will, I suspect, be chowned something silly anyway) means the best way I can see to develop with this pile of shit is to copy/paste from my default text editor, which is just retarded (And yes, that is exactly how I compose blog entries, but I don’t normally need to keep blog entries in CVS). I suspect there is a better way to do this. In fact, I’m sure there must be, or else Zope would be deader than a very dead thing, which brings me to my next point.

The Docs

My first problem with the docs is the inline commenting system. When I’m trying to digest a reasonably complex idea it is of no use whatsoever for the flow of the text to be interrupted constantly by inane slashdotesque comment. On the other hand, without the inline commenting I’d not have known that the introduction to Zope tutorial – which is far better than the one included in the distro – existed, also, I’d have read the chapter on DTML before the chapter on the more advanced, easier to use, designer friendly and new paradigm of Zope Page Templates, which starts off by pointing out how crap everything you read in the previous chapter was. ARGH

Nevertheless, I shall persevere with this Evil, because I’ve got no choice but to know it, in the hope that I will learn my way around it.

Okay, so “find / -iname ZopeZoo” has failed to find any of the files that are part of the tutorial. Where the hell is Zope putting the bloody files? *ARGH*

Computer Games Gaming Imported From Epistula

We lied to you, too

Open letter from the Computer industry to the Entertainment industry

Look at us: every year, we churn out more computer games than your entire industry is worth. You know how we do it? We like our customers. We don’t treat them like potential criminals, and try to make our products do less

This part, if no other part of that manifesto, is bollocks.

This month I’ve bought five new games (It’s been something of a bad month for my self control). Of these, four of them have had sixty-four-thousand digit CD-Keys that I have to type in, three wouldn’t work in my old CD Drive, and one had a prerequisite of two other games (It was the final NeverWinter Nights expansion pack) which also required sixty-four-thousand digit CD-Keys, and one required signing up on a website also.

All in the name of “Copy Protection”.

In fact, I could bypass all this copy protection by downloading the games from Kazaa or eDonkey or something, because the first thing the Pirates do is remove all the copy protection. So it’s not the people who download the games who end up feeling like they’re being treated like criminals. It’s us, the people who buy the fricken games for £30 a pop.

The only game that didn’t have any kind of copy protection – no magic drivers, hidden sectors, no CD-Keys, no Web registration – was also one of the ones that wouldn’t work in my old CD Drive.

Since it was a 1950s era Monopoly set.

It’s got wooden buildings and everything, it rocks.

Imported From Epistula MotW

Lost in the music

Today, I was on the train.

This is not an extraordinary thing, really. I spend between an hour and two hours on trains every week day (depending on which trains I manage to catch). I was using my laptop (Well, work’s laptop) as an MP3 player (Tell laptop not to shut down when the lid closes, turn on iTunes, put laptop in backpack with headphones plugged in, listen, occasionally wishing I could access iTunes with bluetooth so I could do “Next Track” from my phone) and prance merrily on my way.

Except I was on a train, so I was coding (work, regretably. I need to finish this project before I leave) whilst listening to the music, so I nearly didn’t notice that we were passing Hitchin, so I had a few minutes to pack up before we hit Letchworth – my stop.
At this point, for the first time in my history of commuting to and from London, the ticket inspecter tried to make his way down a packed commuter train.

Normally they know better than this, since all the trains from four ‘til six have people sitting in the aisles. This one didn’t, so a couple of minutes fumbling for the ticket and photocard, and we were pulling into Letchworth. Panic!

Shut laptop, shove in bag, get coat, put in earphones, stand up. And the earphones. Come out. Of the Socket meaning that the laptop plays the current track on full volume. Said track happens to be Liposuction by Da Vinci’s Notebook. Not ideal for saving face in a commutor environment. This would have been better if I hadn’t accidentally done that another twice. Argh.

So, in conclusion half a train full of commuters I’ll see every day for the next month or so now think I’m a fool. Still, could have been worse

But the MP3 of the week is neither of those. It’s a band I can find no mention of anywhere on the InterWeb, which is kinda freaky as I have to assume they don’t really exist. So, to introduce you to these people, who are good, the Little Screaming Pilgrims, Better Sideburns

Same deal as ever, they’ll be gone next week.