Home
LiveJournal for thargol.

View:User Info.
View:Friends.
View:Calendar.
View:Memories.
You're looking at the latest 20 entries. Missed some entries? Then simply jump back 20 entries.

Friday, November 20th, 2009

Subject:The problem with SQL
Time:11:25 pm.
Music:Blaze Bayley -- "At the end of the day".
I have two tables. One represents individual customers. The other represents groups of customers. For the application I'm writing, I want to be able to apply restrictions to certain things, and I want the flexibility to be able to do that at either the customer level or the group level. So each table has a cutoff column, which says that any order with an ID lower than the cutoff should be ignored for a particular operation. So I can quite happily do:
select c.cutoff, g.cutoff from customers c, groups g where c.group_id = g.id and c.id = 45;
However, what I want to do is:
select mymax(c.cutoff, g.cutoff) from customers c, groups g where c.group_id = g.id and c.id = 45;
The problem is, mymax() doesn't seem to exist. I can't use the regular SQL max(), because that's an aggregate function that works across multiple rows. I want to return the larger of two columns in a single row. Oh, and it should know that any given integer is greater than null, because the common case is for there to be no cutoff, and only very rarely will both a customer and a group have a cutoff. I came up with a hideously complicated way of doing it using coalesce(), but it was so nasty I resorted to doing the comparison in python instead. Am I missing something? Surely this should be easy in SQL. I'm using PostgreSQL 8.3, FWIW.
Comments: Add Your Own.

Wednesday, November 18th, 2009

Subject:F1 driver lineup
Time:3:17 pm.
Music:Sabaton -- "Firestorm".
I can't remember the last time this high a percentage of F1 teams hadn't already confirmed their driver lineup by this time of year. But everyone's been hanging back to wait and see what the key players were going to do. Alonso was confirmed for Ferrari a while back, and with Räikkönen out of the running and Button signing for McLaren today, i tlooks like all of the main pieces are now in place. I expect the rest of the field to sort itself out pretty quickly from here.

Is it the right move for Button? I'm not sure. I think McLaren will have the faster car next year. But I also think that Hamilton's years with McLaren will give him a headstart and he'll be quicker, at least for the first part of the year. The cars will be longer and heavier next year, but it will still have more in common with the car Hamilton's been driving for the last couple of years than the one Button's been driving. Also, will he be bringing Andrew Shovlin et al with him? If not, he's going to have to forge a working relationship with his new engineers, rather than being able to hit the ground running.
Comments: Read 1 or Add Your Own.

Friday, November 13th, 2009

Subject:Fingers crossed...
Time:11:02 pm.
Mood: anxious.
Music:Wolf -- "Love at first bite".
I'm somewhat nervous right now. You see, my main server is moving datacentre. My hosting provider rents rack space, and then resells it to small operations like me. But the datacentre have just doubled their costs, so my hosting provider is taking their business elsewhere. I can't say I blame them. But it means my machine has to move. The problem is, that's something that's fraught with danger. Servers tend to run continuously. On the rare occasions when they're powered down, there's a reasonable likelihood that the drives will fail to work again. Empirically, the chance is far, far higher than for a regular desktop machine that is switched off every so often. The last time I did this, I had 6 drives fail in a 14 drive array. From personal experience, I'd say each drive has only an 80-85% chance of survival.

Of course, I'm a firm believer in not putting all of your eggs in one basket. So my machines are hosted in two separate datacentres, and although the main server is powered off (and I've decomissioned the other one that was in the same datacentre), I still have fully working DNS, SMTP and the critical web sites are all up. In the event that the main server has problems, I can move the non-critical web sites over, too. I have multiple copies of all the data. But still, it's an anxious time. I'll find out if all's OK in about 6 hours. Like I say, fingers crossed...
Comments: Read 1 or Add Your Own.

Monday, November 9th, 2009

Subject:Disaster recovery in the real world
Time:11:48 am.
Music:Sirenia -- "A mental symphony".
Maybe it's just that I've been working in IT for too long, but I think about disaster recovery in my everyday life. When you're about to do something, what might go wrong, and what can you about it? Apparently most people don't do this.

What made me think about this? Well, I was at a gig last night. The band in question had flown 2000 miles to play in the UK for the first time, so you'd think they'd be prepared for various problems, and would have plans to deal with them. It seems not. You see, their DAT player had a Europlug power connector, while here in the UK we use BS1363 connectors, and they didn't have a converter with them. The venue had their own DAT player, which they offered to the band, but that had the wrong type of audio outputs, so that wasn't viable either. So when all else fails, what else would you do other than force the plug into the socket anyway?



Not an ideal solution as the pins are a different shape and have different spacing, so forcing it in will bend the pins and reduce the contact area. However, despite managing to get power to the DAT, the tape jammed in the player and wouldn't play. The band eventually decided to go ahead and play a cut down set without the backing tracks.

But whatever the reason, why hadn't the band planned for the DAT failing? I mean, they probably brought spare sets of strings for the guitars, in case one broke[1]. Why assume that the DAT won't break? If your backing track is that important to your show, then surely you ensure you have the ability to play it. So I'd probably have taken along a duplicate tape and also a couple of ipods or similar with the backing tracks on. Sure, the sound quality wouldn't be as good, but through a club PA, it will probably be more than acceptable, and will at least mean the gig can go ahead. A little forward planning would have gone a long way, particularly when they were so far from home.

They're far from unique here. I've seen numerous other bands that are similarly lax in their planning. For example, if you use a wireless transmitter for your guitar, wouldn't you also bring a long lead, just in case it breaks? I can name several bands that don't, including some that really should know better. Why isn't it more common to plan for failures? I don't get it.

[1] Although I've seen a friend play gigs without taking spare strings. No, I don't understand the rationale behind that decision.
Comments: Read 1 or Add Your Own.

Tuesday, November 3rd, 2009

Subject:Rattus norvegicus
Time:6:24 pm.
Music:Lacuna Coil -- "Cold".
http://www.flickr.com/photos/nic_temby/galleries/72157622382025698/
Comments: Read 1 or Add Your Own.

Thursday, October 22nd, 2009

Subject:400 years and counting
Time:8:37 pm.
Music:Triaxis -- "Autumn hourglass".
For reasons I can't remember now, I was thinking about Harrock House the other day. It's a manor house style building in East Sussex. I don't know if it was actually a manor house or not. Information about its history seems surprisingly scarce on the web. It used to be owned by my school, and there were school trips to stay in the house, and visit the sights in the surrounding area. I guess I was probably there in 1983 or so. Anyway, that led me to look up information about the house, which in turn led me to a facebook page for Old Owenians, where it was mentioned that the school is approaching its 400th year. I hadn't really thought about it before, but at the time the school was established, Shakespeare was still alive, the English Civil War was still some way off, as was the great fire of London, and the Mayflower had yet to set sail for the New World.
Comments: Add Your Own.

Tuesday, October 20th, 2009

Time:3:33 pm.
Music:Deep Purple -- "Highway star".
From http://survivingtheworld.net/Lesson40.html:

Comments: Add Your Own.

Sunday, October 18th, 2009

Subject:Fame
Time:11:42 pm.
Mood: tired.
Music:Wolf -- "Whisky psycho hellions".
Being asked for your autograph is a strange experience. I've had to sign mine several times over the last few years, initially at the drag strip. But it occurred to me this afternoon that I've signed more autographs due to my quilting than I have due to my racing. It's a strange world...
Comments: Add Your Own.

Monday, October 12th, 2009

Subject:Jesus
Time:2:56 pm.
Music:Blind Guardian -- "I'm alive".
From SMBC:

Comments: Add Your Own.

Subject:Out of cheese error
Time:11:52 am.
Music:Savage Circus -- "Tomorrowland".
http://everything2.com/title/Out+of+Cheese+Error
Comments: Add Your Own.

Wednesday, October 7th, 2009

Subject:Freedom at last
Time:12:39 pm.
Mood: mellow.
Music:Blind Guardian -- "Another holy war".
I have no phone. Its battery ballooned. Furthermore, the spare battery I had is refusing to charge, so I'm currently without a mobile phone. But the thing is, it's surprisingly liberating. I have long despised the telephone. It's an instrument of the devil. This is mostly because I'm not great at holding a conversation. I struggle to think of things to say. I'm really enjoying not being contactable at will. I feels as though a weight has been lifted from my shoulders (one that I didn't realise was there in the first place). Carphone Warehouse not only don't have a new battery for me, but they can't even order one[1]. I've ordered one from a mail order place on the net, and it will no doubt arrive in a few days. But even when it arrives, I'm considering using my phone less. I suspect I'll still take it with me when I'm out and about. But I may well have it turned off much of the time. I like the feeling of freedom.

[1] What's that about? It's not as if it's a prehistoric phone. Sometimes I despair at the increasingly disposable nature of the consumer electronics market.
Comments: Add Your Own.

Monday, October 5th, 2009

Subject:Wallpaper meme
Time:5:12 pm.
Music:The Vision Bleak -- "Kutulu!".
Taken from [info]ajax

01. Anyone who looks at this entry has to post this meme and their current wallpaper at their LiveJournal.
02. Explain in five sentences why you're using that wallpaper!
03. Don't change your wallpaper before doing this! The point is to see what you had on.

Anyway, here's mine. You can click on it to see it full size:



Why am I using it? Because it's wide. There's a company called 9X Media that makes multiple monitor display systems, and they made a selection of free extra wide images available for download on their web site, so that people with large displays would be able to have a sensible backdrop, without having to scale up a smaller image. This is one of their older ones, which doesn't seem to be available any more. I tweaked it in GIMP to change the colours from the original brown to something a bit more pleasing to the eye.
Comments: Add Your Own.

Friday, October 2nd, 2009

Subject:Short bus
Time:4:23 pm.
Music:Divercia -- "Of steel & man".
http://lwn.net/Articles/354860/

Sometimes you can really appreciate living in a world that isn't 100% driven by a company's bottom line. Can you imagine the uproar if Gates, Balmer or Jobs had come out with a comment like that? Yaaay Linus.
Comments: Read 1 or Add Your Own.

Thursday, October 1st, 2009

Subject:Greetings, people of Facebook!
Time:9:21 pm.
Music:Diablo Swing Orchestra -- "Balrog boogie".
So some while back, [info]digital_eye mentioned that she was playing Block Star on Facebook. It was a Tetris-a-like game. She claimed to be good at it, and doubted that I'd be able to beat her score. Now I'm not normally one who rises to the bait of such challenges, but in this case, I'd been playing Tetris pretty much since she was born. I was reasonably confident. So created a throwaway Facebook account to play the game. Sure enough, I beat her score. But then they took away Block Star, and replaced it with an officially licensed version called Tetris Friends. That was rubbish, though, and not worth playing, so I gave up on it, and didn't return to Facebook again (maybe it's just me, but I don't get the appeal -- it's sort of like LJ but the user interface is 10 times worse).

Anyway, fast forward a year or so, and out of the blue, I got a friend request for my Facebook account. And then another. And now, somewhat unexpectedly, I have several Facebook friends. So, errrr.... hi!
Comments: Add Your Own.

Tuesday, September 29th, 2009

Subject:Public transport doesn't work
Time:3:43 pm.
Mood: annoyed.
Music:Within Temptation -- "Utopia".
Let me rephrase that. Public transport works just fine. But only in some areas. I get the tube into work every day[1]. Yes, there are a few problems every now and then, but by and large, it gets me where I need to go, reliably and for a reasonable price. But yesterday, I needed to get to March in Cambridgeshire, by train. No problem, I thought. So I looked at the National Rail journey planner, and then I recoiled in horror at the cost. 60 quid to travel 80 miles? That's ridiculous. It would have been cheaper to drive there than to take the train. To put that into perspective, I'm not talking about driving there in an ordinary car, but in my 7.6l race car, which isn't exactly the most fuel efficient vehicle on the planet. It would have been quicker, too. It ended up taking me 4 hours from when I left work to when I arrived in March.

I like the idea of public transport. In theory, it's a great idea. But it seems that in reality, it's just not realistic to expect people to use it. Next time, I'll go by car/bike.

[1] Recently, at least. The parts have arrived, and my bike should be back on the road later this week. Yaaay.
Comments: Read 3 or Add Your Own.

Thursday, September 24th, 2009

Subject:The origin of Taoism
Time:1:19 pm.
Music:Lita Ford -- "Hellbound train".
http://abstrusegoose.com/187
Comments: Add Your Own.

Monday, September 21st, 2009

Subject:Suzuki Bandit N1200
Time:9:33 pm.
Mood: content.
Music:Sabaton -- "The cliffs of Gallipoli".
This weekend, I needed to go to Nottingham. Ferret had the road car, my race car isn't particularly practical to take on that sort of journey, and my bike is in for repairs. Nothing major, but I guess it's going to become an ever more common problem with an old bike, in that the parts are proving hard to find. In this case, something as trivial as fork seals -- they're now ordered and should be here in the next day or two, but it wasn't in time for the weekend. So my mechanic, Doug, offered to lend me his bike.

The bike turned out to be a Suzuki Bandit N1200. Or rather, a somewhat modified one. I don't know the full extent of the changes, but at the very least, it has the fairing removed and a set of straight handlebars for a streetfighter look. It also has some performance mods. Anyway, the net result is a bike very different from my normal ride. The bars and the position of the pegs and clutch and brake levers mean the riding position is leaning much further forward than I'm used to. The clutch requires you to be superman. It's not too bad on the open road. Indeed, it's actively good, with nice crisp gear changes. But when you're stuck in traffic around town, it's really not pleasant, and your left hand rapidly aches. The bike has bucketloads of power, and in particular, torque. It's all too easy to lift the front wheel from a set of traffic lights, even when you're not trying, and it just keeps on pulling all the way up through the gears. The steering is incredibly direct, and the brakes are out of this world compared to what I'm used to.

Wikipedia claims it has a reputation for being a hooligan's bike, and it's not hard to see why. It's fair to say that it's quite a bit quicker than my Magna. It's not particularly comfortable to ride, though, and I certainly couldn't commute to work on it as I do at the moment. But the bit where you open the throttle and find yourself in the next county with a huge grin on your face? Yeah, I like that bit...

Comments: Add Your Own.

Tuesday, September 15th, 2009

Subject:Royal Mail
Time:1:08 pm.
Mood: angry.
Music:Borknagar -- "The genuine pulse".
That's it. I've had enough. The Royal Mail can't come to an end soon enough. Privatise the whole thing, lay off all the staff (who seem universally inept) and start again from scratch. It's the only way to be sure (in this instance, taking off and nuking the site from orbit probably isn't practical).
Comments: Read 1 or Add Your Own.

Friday, September 4th, 2009

Subject:I wasn't expecting that to work
Time:2:50 pm.
Mood: calm.
Music:Blind Guardian -- "The bard's song (in the forest)".
I went to Sainbury's yesterday, and went through the self service tills. Once you get past the intensely annoying "unexpected item in bagging area" warnings, they're actually pretty good, and generally speed up the process of paying for your goods and getting out of the shop. Then when it came time to pay, I realised I only had a Scottish £10 note on me. I resigned myself to it failing horribly, and having to call a member of staff to manually authorise it. But no, I put it in the machine, it recognised it without problems, gave me the appropriate change and that was that. I really wasn't expecting it to be that painless. It's increasingly rare for machines to work the way they should these days, so it's always nice when you find one that does.
Comments: Read 1 or Add Your Own.

Thursday, September 3rd, 2009

Subject:Stormtroopers
Time:4:40 pm.
Music:Sirena -- "A shadow of your own self".
Comments: Read 2 or Add Your Own.

Advertisement

LiveJournal for thargol.

View:User Info.
View:Friends.
View:Calendar.
View:Memories.
You're looking at the latest 20 entries. Missed some entries? Then simply jump back 20 entries.