Musings on my family, work and things I find interesting. Mainly, this was / is intended to record things for my kids so that they can get an insight into how I feel about them, plus I haven't done any writing for a long time, so would like to get some skill in that sphere again.
I've had a good teacher. Just noting some of the things I've come across.
Default Apache httpd configuration in a cluster with multiple filesystems
By default, Apache httpd generates an ETag of the format inode-filesize-timestamp. A symptom of this sort of physical architecture is seeing ETags for the same resource and representation that have the same last part; e.g. "518854-3504d-ce290380" and "c8578-3504d-ce290380", and probably the same Last-Modified value too. This can be fixed by changing the Apache configuration or ignoring the ETag and just using Last-Modified. I would normally recommend retaining the ETag and just using the MTime and Size parts to calculate the ETag value.
I'm not sure whether this is an application developer issue, or a problem with the EScenic server itself, but the ETag values that I've seen from this server aren't quoted.
The version of Django 0.96.1 that shipped with Google App Engine had a similar problem to the EScenic Server, so I'd recommend bundling Django with your app until Google update the bundled version. I went to fix this in Django trunk, only to find someone beat me to it!
Something happened earlier this year and I'm only now comfortable enough to able to talk about it. It happened on 22nd June. At the time, it was terrifying, but it has a good ending.
Al had gone away for the weekend and I was at home playing single parent. Sunday morning, not quite woken from my reverie by Cameron crying softly, I got up, changed his nappy then put him on the floor in his room to play. Connor started calling to get me to come help him on the toilet. I left Cameron's room, pulled the stairgate shut and went to the bathroom to help Connor, rubbing the sleep from my eyes. About 10 seconds later I heard the worst sound that I've ever heard. A soft thudding as the boy went down the stairs, followed by immediate screaming. Fuck. I raced down to find a scene from a Tarantino film. I don't know whether the detachment comes from my (long expired) medical training, or that's just what people naturally do in these situations. I noted the pools of blood on the Mediterranean-tiled floor. Then the bump on his forehead where the blood was coming from, as I cradled him. "That's a strange looking bump, more of an indentation. Oh, that's his skull." Reaching for a muslin to try to apply pressure to the wound. It was too wide really anyway to allow effective compression, so I tried to pack the wound while talking to the emergency services operator. It was very hard to hear them with my own state and Cameron either in pain or understandably upset. Got the other two to dress themselves while the ambulance came and I got some clothes on and mopped up the blood. A big part of me even at that point was worrying Al'll kill me if she sees this, and I didn't want his brothers to see all the blood.
Nee-nah
The ambulance came and we all piled in. Callum and Connor were thrilled to be in the van with the sirens going off. I was probably white as and trying to speak calmly to Cameron as they strapped me on the bed and we moved swiftly to Frimley Park. The ambulance crew were great and we got there, Cameron having thrown up on the journey and coming close to closing his eyes a few times.
A&E was very quiet. Lots of fabulous nursing staff were there, and able to take some of the load in terms of getting out toys for the other two boys and Cameron showed an interest as well. Then I could phone Al at her hotel on the hen-weekend and relay the bad news. She took it as well as could be expected and we had lots of crying phone calls as she was driven from Bath to get to the hospital. Due to the lack of urgency in how we were being treated, I was getting more confident at this point that it wasn't life-threatening. By this time, it was the boy's nap time and the nursing staff were happy enough that he could go to sleep. Al arrived maybe 15 minutes after he went to sleep and came into the ward to see him sleeping with his eyes open, head lolling back in my arms and a cut wider maybe a centimetre wide and 6 centimetres long on his forehead, with the bone showing through. It looked ghastly and we were both crying again. We had some fraught communication with the Reg / SHO about where the best place for treatment was. Doubtless that wasn't helped by our frame of mind, and the language issue with the guy. But we were immensely happy with the level of treatment and service that the emergency services provide. You only really miss something when you don't have it anymore; I don't ever want to experience that loss with our primary medical care.
Support
Due to the nature of the head injury, Cameron was kept in overnight for observation. Our friends Alan and Alison provided invaluable help in taking the two older boys with them to a rowing regatta where they got spoiled on BBQ and ice-creams until I went to pick them up later. As an indicator of where my head was, I picked them up and promptly drove the wrong way around a roundabout. Fortunately the guy coming the other way was going fairly slowly, then my brain kicked in and I recognised where I was. Al phoned later with the results of the CT scan (she's very persuasive!).
Cameron and Al were transferred to St George's Tooting to go to the Maxillo Facial surgical unit, where Dr Singh did an amazing job of closing him up. We got to take him home the same day.
Retro
We examined the stairgate. It is a retractable one, which clips onto the opposing wall at the top and the bottom. The top clip was on a block screwed into the wall. I had placed the block 4 years earlier, which had then been removed and replaced by the painter, and endured some abuse from the other two swinging on it. We saw that it was fairly easy to just clip the gate on the top alone, without clipping the attachment on the skirting board as well. When set like this, effectively it acted like a catflap and Cameron would have had hardly any resistance to crawling against it. Not ensuring that this was properly attached was completely my fault. We were so lucky with how this turned out; from the blood pattern it looked like he'd surfed on his stomach down the first 5 steps and hit the skirting board with his head. From there, he'd rolled down the rest of the stairs to the tiled floor below, but somehow not done further damage to himself when he got to the tiles. Then the first order was shooting some video so that both sets of grandparents could see the extent of the damage and be assuaged that they didn't need to travel down to see him straight away.
Just noticed that Facebook open-sourced a version of their BigTable data store and it's hosted on Google code, written in Java. I'll omit the obvious snickers about Facebook cloning BigTable and then hosting on Google Code.
I was hoping that now I don't have a Windows machine any more that I could wriggle out of IT support duties for the family. Well, Copilot works under Wine on Ubuntu 7.10. Arse. I was wondering about talking my folks through installing a VNC server on their machine, but just tried the Copilot quick free demo, and it all worked. And it's free on the weekend. So I guess that's my IT support position.
Finally it's happened! I've been able to get off Windows Vista and install Gutsy Gibbon on my work laptop. Herein follows a few notes on things that I noticed, which may help others take the leap. This will probably get updated as I notice things that I've missed, or that went well.
Cygwin. I can't say enough good things about that project. It's been great to have on Windows and ultimately played a very important part in getting stuff off my laptop before wiping the hard-drive. I've found the people involved very helpful and responsive. My initial attempts to rsync data to a safe location failed. If you're using Windows, go fuck yourself, jwz, 2007. Contacting the mailing list led me to try the snapshot versions, report issues and see them fixed very quickly. Thanks Corinna and others.
Firefox. My profile was split over ${HOME}/AppData/Local/Mozilla/Firefox and ${HOME}/AppData/Roaming/Mozilla/Firefox. I consolidated the two by copying to ~/.mozilla/firefox. The profiles.ini file needed editing, since it has an incorrect relative path to the profile folder. I also needed to rename extensions.rdf, so that a new one is built on startup. This preserved all of my extensions (apart from Google Toolbar; there is a Linux-specific version?) and associated data such as ModifyHeaders values, UserAgentSwitcher values, etc. I have needed to manually edit some preferences, such as Download location, and then restart Firefox for it to take effect, but otherwise it all seems to be working fine. Similarly for Thunderbird, although I should have exported my Lightning Calendars first - I seem to have lost them, but that's no biggie. I still have all of the emails (MBOX!) (although my tags seem to have disappeared. That's a bit of a pisser). Maybe I should have migrated that to GMail, rather than copying mboxes around, but it's worked.
SSH. I made sure that I copied my keys over and that they all worked. I seem to have missed the full known_hosts file; I have a copy, but some entries are missing, which is slightly annoying. Also, I forgot my System32/drives/etc/hosts changes, so I'll need to recreate the local aliases that I have for some servers. Sure I can remember that, so not too painful an omission.
sudo aptitude install tofrodos
Ubuntu just flies, versus the same hardware running Vista. That's a shocker, obviously ;-).
Update:
Eclipse was using a lot of file handles (I just install the world in terms of the number of plugins I have), which required an addition to /etc/security/limits.conf. # raise limits due to Eclipse complaining about too many open files * soft nofile 5120 * hard nofile 5120
Just finished Russell Brand's Booky Wook, which is what the title references. Interesting in terms of the honest coverage, but it did feel a little rushed (zeitgeist is everything, darling). At one point he talks about when a mouse lived in his hair (I think it was referenced in the Jonathan Ross interview as well). We can top that. Callum has a nit comb from school; apparently part of the national curriculum to inform hygiene issues. Connor was using it on Al the other night and kept lifting her hair.
There was some loss - mainly source code for personal hacking. My Jython UnicodeData implementation was lost, although I did have a copy of that in my GMail Sent folder which has been contributed to the committers in the hope that someone with more time and enthusiasm than me finds it useful. Apparently they have. The other thing lost was my WideFinder sketching. I surprisingly did have an early warning that the disk was close to failure, when my implementation (which was clocking ten seconds or something) suddenly started taking twenty minutes to complete. Obviously I didn't pick up on this warning; instead blaming it on some horrible mistake in my code. Some learnings from my WideFinder experience.
NIO can be tricky, and should probably have an easier API in comparison to classical IO. It was nice to look at this anyway, and I'll probably have a read of the Jython and JRuby IO stuff to see how others do it, and also the Apache NIO stuff.
Java string matching is slow using regexp. I'd not got as far as implementing Boyer-Moore or similar, but I expected to get a big hike out of my 10 second time when switching to that.
CAS is good, versus synchronized blocks. Brian Goetz has talked about the advantages of non-blocking forms elsewhere.
Java is quite restrictive. I must have been doing too much Common Lisp, Erlang and Scheme recently!
Former colleagues may recall how smug I once had occasion to be, when I migrated my old home machine from dual boot with Linux and W2K to solely Ubuntu. My preparation for that was very informed by this, but it was still slightly nerve-wracking to delete everything and start from scratch. After that, my backups got a little slack. A single 40GB IBM Deskstar with content being intermittently copied over to my external USB drive, with very infrequent backups to DVD. Then the IBM drive crashed. Arse. Oh well, still got the USB drive. Then the USB drive crashed two days later. Oh shit, that's five years of my life in pictures and film gone. The first photos of all the boys... I was feeling physically sick. A few days later and I have a better appreciation for what I've lost. Personal stuff - nothing. The USB drive started working again after leaving it on for half an hour. Everything was taken off that and put on my work laptop, and I still had photos and video on the cameraflash disk and digital tape respectively. Thank fuck for that.
Rebuilt machine - two Maxtor 360GB PATA drives (hey, my motherboard is seven years old!). My motherboard aslo has RAID 1 capabilities, but didn't appear to work too well when I installed Gutsy. It might be possible to do it, but I didn't have the patience and was worried about what happens the next time I upgrade the kernel. So I went for the softwareRAIDoptioninstead. I'm now doing the backups more frequently along with using S3 for anything that would give me serious pain to lose.
So just adding to the generalnoisearound this issue. Look after your data, people!
Does Apple have some quality issues? I'm in the market for a new laptop, and was considering a Mac, having heard good things from some. But recently, there seems to be a spate of problems. Think I'll be staying with Ubuntu on something for now, thanks all the same.
Snagged me a log file and starting cranking out some code tonight. I had some free time to think about this a couple of weeks ago, and got some sketches down, but I've only recently got the data to start seeing how the code can fly. So, I'm starting out on my work Dell laptop, Dual Core Pentium 2GHz with 2GB RAM and a really shitty disk, judging by the slowness and noises it makes (or is that just Vista?) [stay on topic! - Ed]. The Ruby version runs in just over a minute, once all of the caches are warmed up. My initial naive Java version runs in 14 seconds (I haven't figured out yet how to run it using time as per *nix environments - Cygwin says it can't find the time command when I pipe zcat output into it).
Now to start implementing my ideas. I have what I think is the shared update of the accumulator as well as I'm going to get it. I'm hypothesising that most of the updates are uncontended and so don't require the full weight of Java's locking capabilities. Now I just need to parallelize the I/O and determine the most efficient matching algorithm, which seems to be Boyer-Moore from reading the Wide-Finder series. That particular algorithm seems to pop up fairly regularly in searching. Might be interesting to see what else is available in that field, but it should be in a library, surely?
Just logging the early signs. Connor was walking to nursery with Al the other day, and kicked a cat. There is a history there, the cat had previously scratched him, but even so! The other sign to be aware of is from when the boys recently watched the middle Star Wars trilogy. Afterwards, Callum wanted to role play and be Luke. Connor wanted to be Darth Vader. Enough said.
I love Oakley[1], and not just for the quality of the purchased product.
From Lance Armstrong's book, he recounts telling his Oakley sponsor that he's been diagnosed with cancer, but he's not got health insurance. The guy from Oakley tells Armstrong not to worry and he sorts it out by telling the insurance company that Armstrong had better damn well be covered, otherwise Oakley will stop doing their company heath insurance scheme through that insurance company. I'm happy spending money with a company that employs that sort of human being.
When I recently lost one of the rubber noseclips from one of my pairs of Oakleys, I phoned up customer service and they posted some out the same day, no charge. That's just great service, and ensures that I'll continue to buy Oakleys and will probably be getting them from my three sons over time as well. Why aren't more companies that switched on about having a great long-term relationship with customers?
Went back to Sol, to go to the other end of it. Really struggled warming up; my arms would not work, and I have very mushy thin tips on all of my fingers and thumbs. Scott did a nice roof, first or second go. I really struggled to link it until I just got really angry, and just pissed up it. Why didn't I do that the first time and save all of the skin and energy, fool? Found it hard to get pysched today, tiredness and missing the family is starting to tell. Next we tried a really cool roof traverse into a slopey top-out. Great moves, but a bit hard for me in that state. Around 7a again, but I split a tip on about fourth go and that was me done. I'd got overlapping halves on it apart from topping out, which I'd split my tip on. Scottie got overlapping halves and topped out, but then seemed to lose power, the sun came around a bit more or something and he didn't look as smooth on it. I then tucked into the baguettes while he thrashed himself on a couple of other things.
While we were in the area, we went over to Masia. That looks like it's got a few nice things to do as well, so something else to go back for. Final night, we went back to El Molina del Gato, which serves nice beer, has strange music and all of the climbing topos, including French ones so we could work out where we'd gone wrong in looking for Tierra Media. And then another disappointing meal in a place off the main square. Not sure about Spanish food; it must be better than that. Maybe we couldn't speak the language that well, but people couldn't recommend stuff either, and we were getting cold peppers out of a tin served with bad fries and indeterminate meat. Not inspiring. I was already dreaming of Thai green chicken curry.
Had some unfinished business with a sit down start to an arete here, so wanted to go back. Mint conditions, quite cold and hard to warm up. Skin still felt trashed. Met up with the two guys from Bristol that we'd met at the car park earlier in the week. I think it was their first time to the area, so they were running around dead keen. Managed to do a few nice things; there was a place round the back quite similar to l'Elephant with sloping flared cracks. There was a really good-looking 7a rib (8a sit start) which I didn't try due to trying to preserve skin, and the original walls that we'd seen on our first visit to this area that we still hadn't tackled. Oh well...
Day four for the first rest day? Well, not really. The first day wasn't much; an hour or so of tinkering. So we've pretty much done the 2 days on, 1 day off thing. It seems to have worked out well, as this was a planned rest day, and it started raining last night.
So a very late start today, after a lot of vino tinto last night. We decided to go exploring and work out where best to go on our last two days. First off, up towards Techo. This was the first area that we found using the topo and didn't get lost! This looks like quite a brutal hardcore place. OK, so it was a rest day and we're feeling (or I am anyway) quite shredded, but most stuff here looks like you need to be doing 7b to get much out of coming here. There were some inspiring roof lines that looked around 8a; I'll save them until I've lost 10 kg and got strong again.
We carried on up the hill towards Madriles and Pyschokiller; more big stepped roofs again. Although apparently Pyschokiller might not allow climbing there. Some of the areas are restricted, but not at the time we were here.
Then we went looking for the visitor's centre that was listed on the national park signs. Unfortunately, our written Spanish was enough to understand that it was only open at weekends and holiday periods. But the drive to get there was quite something. The park seems to be raised about the plateau, and we had some fantastic views of the flood plain and the sandstone towers elsewhere. It looked like going for a walk in that area would be worthwhile on the rest day as well, if we were there for a longer period.
To round off the day, we tried to find Tierra Media, but our Spanish wasn't up to the task. We did find some striking red trees though; not sure if they were seasonally that colour, or that was their natural plumage, so to speak.
Well, a bit more about where we're staying. We're at Camping Albarracin. It's a somewhat strange place in terms of requiring an international bank transfer to pay the deposit, but they accept Visa when I came to pay the balance on arrival. We're in a bungalow advertised as being suitable for four, and it would do that, but it feels very bijou with just the two of us. Not sure how Andy, Emma et al will find it next week!
Went to Sol today, and again had slight problems finding our way there. We followed our Spanish topo, but went a bit far before breaking up the hill parallel to the road. Sol was good, lots of stuff to warm-up on. My skin is feeling it already though. Trying a big roof today; I couldn't quite use Scott's sequence due to not having sixty foot arms, but need to work on press moves a bit more. I couldn't quite press out over the lip enough.