Ben Godfrey

Archive for January, 2004

See you in two…

Might post from Nairobi or Mombasa, but quite possibly won’t. Look after yourselves until I’m back! Don’t hack into anything and break stuff. Be nice to your fellow man, etc, etc. Probably will have the hugest mother of posts when I get back. Hometime is the 30th, though it’ll be months before I write it all up, if Italy is anything to go by.

Later d00ds.

Can’t quite bring myself to turn my laptop off…

24

Ish.

Hours, before we have to leave to get to Heathrow to leave to get to Schipol to catch a flight to Nairobi to visit a new continent. It’s crazy. My mind is swimming with possibilities. I feel distinctly intrepid. But then, if my sister can do it, so can I!

gf

Vim files can have girlfriends too :-). In command mode gf will open the file who’s name is under the cursor. Make sure your pwd is right.

Oh yeah…

Look what happened to Blanket the other day:

Graph of requests for the blanket for the first ten days of January, 2004. The curve starts at 500, then steadily grows to 1710 on the 6th, then on the 7th and 8th the request spike rapidly to 250,000 then 900,000 requests, before falling back to 5000 then 1100 on the ninth and tenth

I had to take it offline, it was killing the server. I haven’t got around to looking to see what caused such a spike, but it’s definitely got something to do with search engines. I have moved the results page to a sub-url (/site/) and banned search engines from spidering that URL. It seems to have worked.

Hmmm, on second thoughts, a quick grep | awk | sort | uniq at the log files makes it look like all 1.2m of the hits in that spike came from 130.94.202.16, which is just a plain old box in Verio’s network somewhere, one that is now down. Seems like whoever they are/were they requested some 812,802 unique pages through the blanket, some of them up to 300 times. Either they had a sudden Johnny-5 like thirst for knowledge or there’s something going on…

Close proximity

Our neighbour runs a nightclub. He gets home late, pissed and coked up. He invites friends around too. Fair enough so far. Our flat shares a flight of stairs with him and two other flats. Each flat has an intercom which connects to a shared button panel at the door. The buttons are unlabeled and the mechanism for labeling them is protected by a metal plate puttied to the wall and screwed in with weird screws. So when the pissed friends turn up at five in in the morning, they buzz us instead of our neighbour. They wake us up, a lot. Louise doesn’t get proper sleep when that happens. It’s been getting worse and worse, to the point where they’ve disturbed us and the residents of the other two flats pretty much every night this week. We’re not happy at all.

When we got buzzed by the guy’s very pissed and abusive girlfriend this morning, Louise hit the roof. We ignored it the first three times but when this woman started holding down the button Louise went out to sort it out. I got a bit worried because she was out arguing with this guy and his mates after a while and I felt sheepish staying in bed so I went and joined in. We had an argument which must have lasted almost half an hour. The guy fed us all kinds of bullshit about why it was happening and what he would do about it and starting banging on about how important his Dad was. Typical cokehead behaviour. After a while we had to give up as we had made our point in the short term and weren’t going to get any further. One of his mates was more understanding and was taking our side. It all gets so away from the point when you’re dealing with somebody who just doesn’t listen and who spouts out bullshit in response. In the end I was saying to him, look, we just don’t want to get buzzed at night, OK, is that too much to ask? God only knows how much went in and didn’t go straight out the other ear.

Today Louise went at the intercom with pliers and screwdrivers and a stanley knife and managed to label the buttons with large bold labels. You’d have to be pretty ridiculously pissed or stupid or both to get the wrong button now. We even put names on for us and him, to make it even more obvious. It remains to see just how retarded and useless the guy’s mates are. For now at least the silence is holding, but we’ll see what happens this week.

On the way back from the cinema tonight the guy and his understanding friend were leaving the square. I gave them a thumbs up and a grin. To be honest, the guy’s such a muppet that I just feel superior to him now. I have, as they say, got his number. He’s a kid, he’s just too dumb to really get pissed off, so he was friendly, in this big dumb everybody wants to be my mate cor yeah no worries geezer way. We chatted briefly and with smiles and he gave some more empty but vaguely positive promises. I told them both to take it easy, as I do, and off they went. It was a good thing. We don’t want to be enemies with this guy. We don’t want a whole feud going on, we just want a bit of peace and quiet at night.

It’s still to soon to relax yet. As I type this I keep expecting the buzzer to go and for it all to kick off again. It’s a horrible feeling, I just can’t relax quietly with myself, something I can usually do quite easily. The whole thing’s been very stressful. It’s making it hard to work as well. I just hope that it never happens again, I don’t want the annoyance, but more I really just don’t want the anger and the confrontation.

He’s pissed off the other people on the staircase as well, and we’ve all been talking. If it goes on then we’re going to have a case to take to the resident’s committee, the management company and even the police if it goes that far. I really hope that the problem is over though. I just want to chill out properly.

Lost In Translation

It’s been a while since I’ve seen a film as funny and as beautiful as Lost In Translation.

It was short and punchy, the pace was faultless. I hate most films because they labour under their need to explain everything in so much detail. I’m tired from LOTRs and Matrices, but Lost is perfectly respectful of the abilities of it’s audience. Every scene seemed to fall effortlessly into place as it explores the energy of a new relationship.

I don’t know what to say really. I just loved it. It was perfect. All the way through Murray gets the punchlines. Coppola gives him quality stuff and he runs with it. He’s often absolutely hilarious. It defines him, his character is so close to what we know of the man himself, just as Johansson is young, having the kind of post-grad anti-crisis that myself and my friends are so familiar with. The tenderness between them is splendid and rich. You feel the love of both, as friends, family or lovers, but also the superior qualities of their relationship. Something about it that just elevates it beyond the average cinema romance, something in the truth of it.

What the future holds

Louise and I got talking about the past and then the future. We’ve decided to buy a new desk for the flat and we talked about the fact that both of us, separately had fleetingly thought about it as being another thing tying us down. We like our life, we just don’t want to live it for too long. For differing reasons. Louise very much wants a career as a cinematographer, a writer and/or a director and she’s working two jobs to get herself out of debt. It’s going to take a while, but not too long in the bigger scheme of things. Me I sometimes feel like I haven’t really begun living yet, there’s so much I haven’t seen. The thought that I’m slowing down (I definitely am) is scary.

I do definitely enjoy my life and work and I have lots of great friends, but I’m restless sometimes. I’ve always been jealous of my friends who’ve spent long periods of time abroad and I’m very jealous of my sister and step-sister who are doing it right now. I still want to do it and I’m concious that I just might never get around to it. But doing it would mean leaving Louise for a long time, not something I really want to do. It makes us both very sad to be apart for even a week.

My experiences tell me that I should go, even if it means leaving her for a long time. Three or six months sounds like a long time, but in hindsight it’s the blink of an eye. One of the best things I’ve done in the last few years is move to London. Before I did that it was big and scary and seemed so hard, now I feel I should have done it earlier.

It all seems so silly, it’s definitely a hard choice: between the one you love and the life you want to lead. But that’s not was it is beneath the surface. I’m starting to think more and more that I might spend the rest of my life with Louise. If I’m to spend all those years being happy, I have to face up to the things that I regret not doing now, rather than letting them bubble up into bigger regrets that could be more damaging. I’ve done that already, to a certain extent, it’s time to grab myself by the throat and tell myself to stop thinking so much and to just get on with life.

Sounds easy doesn’t it.

WorldPay sucks

Very bad customisation. I wanted the page to look like part of my application, WorldPay wanted me to use their design service! I’m pretty good at HTML, but they gave me no tools to perform the required alterations. The result is ugly. Plus their documentation is out of date, so it didn’t tell me that their advanced Java product wasn’t supported on Tomcat. Grrr. Their support is pretty good though, but it’s nothing to write home about.

When I create an application, consistency is vital. In future I will recommend to my clients that they go the full nine yards and get SSL hosting or a cert for their server and collect CC details themselves. I know some consider this a mugs game, but I wouldn’t store those details. I would transmit them (via SSL again, of course) to the payment provider from my backend rather than with the client’s frontend. I wrote something similar once, there was no payment provider however, and sending the details on involved GPG them and emailing them. I was careful to make sure nothing leaked out on to the server. As long as nothing unencrypted goes to disk or stays in RAM too long, I’m happy.

My first JNI function

I just wrote a Java native function that discovers the MAC address of the first network interface. It wasn’t too bad, could have been easier. I would have liked to pass back an array of shorts, but that seemed to cause issues and I already had a working String implementation so I stuck with it. Overall, it was OK, but I’m not sure I’d like to make too much of a habit of it.

Also we took the Christmas tree down today. We have a big gap in the front room at the moment. However, we’re soon going to embark on a huge furniture moving session, which will involve getting rid of the high table and buying a long desk of some kind for Louise and I to share, hopefully solving both our current desk woes.

The little desk I sit at is OK, but it has drawers under the top, these get in the way of my legs and mean I’m always stretching wierdly in one way or another. This has lead to some nasty muscle pain at the base of my spine and around my hips recently. The chair I sit on is also becoming increasingly uncomfortable. I spend a lot of time sitting at my desk so it’s worth spending some money to make sure the ergonomics are good. At the moment it’s a bit of a disaster.

I believe

Michael Howard can keep his empty rhetoric.

His advert in the Times states what he believes and what he doesn’t believe, they even compliment it with a front page article, practically advertorial IMHO. By issuing statements about what he does and doesn’t believe, he implies (quite effectively) that Labour share none of his values. The truth of course is that his statements are so vague and meaningless as to be well in the court of any politician. Indeed, they are the timeless milestones of public speaking of all colours and they’ve long since lost all real meaning.

An example of this that’s always irked me would be the conservative (small c intentional) classic, small government. The government should as big as it needs to be to do it’s job, no bigger, no smaller. Everybody agrees on that. Cutting the size of the institutions as a specific goal is ludicrous. Institution size is not the priority and it’s nothing but a way of masking the desire to cut government assistance. But everybody admits that’s what conservatism is all about anyway, so why bother masking it?

Encode project knowledge in XML

I went and sat and read the XSLT cookbook again. This time I read a bit about SVG but also the introduction to the chapter on code generation. The gist of it was that by encoding project knowledge in XML (or something similar) and using XSLT (or similar) to generate implementation files (of any form) you can adapt to changes in that source knowledge easily.

For example, I’m asked to build a website and as part of the design we decide to put tabs across the top of the page to link to the main areas of the site. When we begin the project we agree on six areas, but as I build the site I notice that two areas could be merged into one. Instead of having to change every page I’ve made so far (by hand or by Perl), I just tweak my knowledge file and set my stylesheets loose on it again.

I was discussing code generation with Miles recently and he raised the points that edge cases easily throw big spanners into the process and fixing these situations after the generation puts you at risk of regression errors. The knowledge encoding should be flexible enough to allow the author to identify edge cases (by some kind of pattern recognition most likely) and provide additional information that allows the transformation process to avoid making errors. Even if that is as simple as being able to include Ant tasks that use Perl or other external software to hack the implementation outputs.

I did try something similar once. WEBWAX was a system where you created a knowledge file for a website, that would be converted into the output site by XSLT. It worked quite well, but it was a bit inelegant. Having learned much more about XSLT since then and also having become familiar with Ant, I know I could write a much better system.

XML and XSLT are a great system for encoding knowledge and generating outputs because they have powerful friends. A knowledge file might be transformed into an Ant build file and a set of other XML documents. The Ant build process can perform a lot of work, moving files, running programs or even performing further transformations. Or the stylesheet could generate SVG so that you can create diagrams and graphics for documentation purposes. A website map could be generated easily in this way, as could ERDs for an application. XSLT can output any kind of text as well, plain text ain’t going out of fashion and it’s a route into many many systems.