Search Results: "pollo"

6 January 2008

Andrew Pollock: [life] Post-op, Day 3

Slow day today. I slept at home, and got in at around 9:40am. Sarah didn't sleep well again overnight, her O2 saturation levels kept dropping below 90% because she wasn't breathing deeply enough in her sleep, and that causes an alarm to go off. So she was pretty flat when I first got in, but she picked up as the day went along, and was fairly chirpy by around 11am. The doctor came by and explained the photos that we've been given, so I'll have to try and regurgitate all of it and update the captions. Her lungs are still looking a bit suboptimal. The third lobe on the right lung isn't inflating well apparently. They said something about there being some fluid as well, although the nurse said she can't hear anything. All that said, she spent a lot of time in a chair today, and her O2 saturation levels have been the best they've been since she was in the ICU. So good, that they're trialing having her off oxygen while she attempts to take a nap as I write. Her blood sugar levels are settling down. I think they're still slightly elevated, but not to the point that insulin is required. She only needed insulin with lunch yesterday, so it definitely looks like it's improving. She's already been on her three walks today, by 4pm. An occupational therapist came by, and went through the sternal precautions again, and showed us how to get in and out of bed without putting undue pressure on the sternum, and Sarah's been getting out of bed unassisted from horizontal since. Her pain has been quite manageable. So while today started out looking like it was going to be a small backward step, I think it's still a good move forward. Sarah's continuing her breathing exercises, so I'm sure her lungs will sort themselves out in the next day or two. I guess they'll take another chest x-ray this afternoon, although it's getting a bit late in the day. Sarah's starting to get a bit of cabin fever, but I think today's been pretty slow, in part because we deferred having visitors on account of her being not up to it in the morning.

5 January 2008

Andrew Pollock: [life] Post-op, Day 2

"Day Two Downers" be damned, Sarah's powering along like a freight train. Neither of us had a terribly fantastic night's sleep. Her chest drain is attached to this big box thing that has some sort of water seal in it, and with the suction going through it, it bubbles and makes noise like a massive aquarium. But she did get some sleep, and said she felt better this morning for it. The doctor came by at 8am, and took the incision dressing off, and we got our first good look at it. It's big (i.e. long). It runs from about the top of her breastbone to the bottom of her sternum. 20cm at my estimation. She said that she thought the chest tube could come out today, and sure enough it came out at about 12:30pm. They also took her urinary catheter out at that time, so now all she's hooked up to is oxygen. Her blood sugar levels were acceptable at breakfast time. Oh, the reason the incision ran so high was because they elected to do the bypass attachment to an artery in her neck, rather than further around the aorta, because the tissue was fragile and they didn't want to risk a dissection. Not doing the bypass in the aorta also left them the option of removing some of the transcending arch if they determined it still ended up being necessary. Sarah got up and had breakfast in a chair again, and was generally feeling pretty mobile. She moved between the chair and a wheelchair (and back) when they came to get her for another x-ray, without requiring any assistance. She took her first walk around the ward at 11am. I'd popped home for a shower and to check on the cats, and so I missed it. Doctor Miller dropped in at around 12:30pm to see how she was doing, and that was good as Sarah got a chance to talk directly to him about how the procedure had gone. He was very positive and said she could put this whole thing behind her now. At 2pm, she went for another walk, this time sans two thirds of the tubes from her first walk, and got in and out of bed unassisted. She took her last walk of the day at 4pm. Apparently her blood sugar is still on the high side, but within the range that they don't feel the need to give her insulin. Her chest is apparently looking better on the x-ray they took this morning. They took a second one after they removed the chest drain, but we haven't heard anything about how that looks yet. She's continuing to do extremely well, most of this less than 48 hours out of surgery.

4 January 2008

Andrew Pollock: [life] Post-op, Day 1

I just called the ICU for an update before I head in for the day. She's apparently doing well, and can probably transfer out of the ICU later today, although apparently beds are tight in the ward. Update 1 I've managed to find somewhere with EVDO access, so I can update this in between ICU visits. She's looking really good this morning. She asked for some 7up, because her throat's really dry and sore from being intubated. She had something to eat at 6am. She hasn't had much sleep though, because the ICU has been too busy. She's getting turned every two hours, which isn't terribly enjoyable, but her pain is manageable. She's such a trooper. Update 2 Sarah's continuing to do well. The nurse sat her up on the side of her bed for lunch, and had half a roast beef sandwich and some fruit. Her throat's still pretty sore, and she's really preferring the liquids. Apparently her blood sugar is a bit high (something that can happen post-operatively) so they gave her some insulin before lunch. Getting her back down again looked a bit painful, as did shuffling her up the bed. Apparently there's a bed with her name on it in the intermediate ICU, so as soon as the doctor's order comes through to move her, she'll be moved. They'll also take out the central line and one of the peripheral lines at that time. Update 3 Last update today. Sarah was moved out of the ICU and into intermediate intensive care (where she'll remain until she's discharged) at 2:25pm. She got a private room again, which is very fortunate. It's nice and quiet, so she should get a good night's sleep. I can stay the night as well. One of the doctors from the team looking after her came by at about 5:50pm. She said the chest drain can come out in the next day or two. They took another x-ray this afternoon to check on some pleural effusion that they were worried about. When we asked the doctor about it this evening, she described it more as trapped air than trapped fluid, and that it should work itself out in the next few days. The x-ray showed that it was "stable", in that it hadn't really changed from the x-ray in the morning. They'll take another x-ray tomorrow morning to see how it's going. Other than that, she's continuing to do really well. The pain seems manageable. She got up into a chair for dinner (with help). They didn't give her any more insulin beforehand, so I presume her blood sugar is settling down again.

3 January 2008

Andrew Pollock: [life] Post-op, Day 0

I'm exhausted, but very relieved. The important news: the operation was a success, the surgeon, Dr D. Craig Miller, bless his cowboy boots, managed to spare the aortic valve (he'd given us a 99% probability of being able to do so beforehand), so we don't have to be concerned about pig/cow valves for now, and mechanical valves later. He was reluctant to say that her own valve will last her the rest of her life, but it should last a "long time, long enough to have a family". When I left the hospital, Sarah was in intensive care, extubated, conscious, and talking to me, but very very tired. She's got a daunting array of things coming out of her at the moment (a lot of which I couldn't see because she had blankets over her). It's been a long day, so I decided to head home, rather than potentially keeping her awake for the next two ICU visiting times tonight. Here's the time line that I recorded: 05:15 - Arrive at the hospital to go through the admissions process 06:35 - I leave Sarah shortly before they're going to wheel her off to the operating room (I'll get into my fun at the end). 09:30 - I ask for an update, and they tell me she's going on bypass 10:30 - It looks like they can save the aortic valve 12:25 - Still doing the valve stuff, making a new sinus of Valsalva 14:15 - I ask for another update, everything is going okay, someone will come out to talk to me 14:55 - Still going, at least another hour until they start to close up 15:15 - Closing up, surgeon will be out to talk to me 16:10 - Surgeon comes out to talk to me about how the operation went 16:50 - I got to see Sarah briefly in the ICU, she was still intubated, but conscious and seemed to respond to my voice ~18:15 - Extubated. Spoke with her briefly. She was very tired, and I decided to let her rest for the remaining visiting times and go home and get some rest myself So what the surgeon had to say for himself was very interesting indeed. He didn't end up doing exactly what he'd said previously, based on how things looked once he actually got in there. He said that the sinuses of Valsalva were paper thin. So thin, you could see the blood flowing through them. They were about 0.5mm thick, rather than the normal 1.5mm thick. Sounds a bit like a disaster waiting to happen. Apparently it's not possible to detect this with imaging, you have to get in there and see it for yourself. He didn't end up removing as much of the aorta as previously planned (specifically the part around the transcending arch) as whilst the diameter was a bit bigger, the tissue apparently looked healthy. He said the part of the aorta he did remove (preceding where the braciocephalic, left common carotid and left subclavian arteries branch off) was "cheesy" in consistency, so it's not like she just happened to have an enlarged aorta, no aneurysm, and way too thin sinuses of Valsalva. There was definitely some unhealthiness to the aortic tissue, just not as bad as thought from the imaging. So it's all good. I think she'll spend a day or two more in the ICU before getting moved to a normal ward, but it's too soon to say what's going on with all of that. There's some elevated risk of stroke due to blood clots for the next 24-48 hours, but she's on blood thinners, so it shouldn't be a problem. The day was pretty crazy for me. I'm not sure if it was stress, or the stomach bug that's been doing the rounds of Central Park Apartments, but I went to bed last night at 11pm, was up again at 1am, with shall we say, a gastrointestinal upset, and up again at 3am, throwing up. We got up at 4:15am to get to the hospital. I felt really nauseous all morning, and was an absolute wreck while I was in with Sarah when they were putting a peripheral line in her before they wheeled her off to the OR, so I bailed about 5 minutes early and just made it to the bathroom in time to throw up again. I haven't eaten all day, just tried to keep the fluids up. I'm debating having some plain boiled rice for dinner, or waiting until tomorrow to have something easy on the stomach. I definitely felt a lot better as the day progressed, but my stomach is still pretty tender. Sarah and I ate pretty much the same stuff yesterday, so I don't think it can be food poisoning. She tends to have a very sensitive stomach at the best of times, so I'd expect her to be showing problems before me if it was food poisoning. But enough about me, I'll live. I hope it's not a stomach bug, as I don't want Sarah to come down with it as well, now that she's on the road to recovery from this surgery. Many thanks to Shona, Briana, Laura, and Christina for spending time with me throughout the day to keep me occupied. ICU visiting hours are every even hour between 10am and 10pm, for thirty minutes at a time, so I plan on spending all day at the hospital tomorrow. Hopefully I can find a good spot to get some EVDO coverage, so I can update things as the day goes along, rather than at the end of the day when I get home, like I had to today. Hopefully I'll sleep better tonight than I did last night.

2 January 2008

Andrew Pollock: [life] Pre-op

We went in to Stanford Hospital this morning for a few hours of pre-op stuff. They took blood, did an ECG, a chest x-ray, and we had a chat with someone from anesthesiology. A physicians assistant and a nurse practitioner talked to us (separately) about what to expect. We also watched a short video about what to expect. We now have to report back at 5:15 tomorrow morning (there's a 5:15 in the morning, how about that?) for a 7:30am procedure. They're saying it'll take 6-8 hours and that Sarah will be on a ventilator for the first 4 hours or so that she's in intensive care, post-op. She'll probably be in the ICU for a couple of days. It's sounding like I can only spend 10 minutes in there every few hours, but we'll see how that pans out tomorrow I guess. It's sounding like I won't get to see her until around 4pm tomorrow I think someone was saying. I guess we'll see how that pans out as well. I've just doped myself up with some NyQuil so I hopefully get a better night's sleep than last night. I'm going to need it, it's going to be a long day.

1 January 2008

Andrew Pollock: [life] Time flies when you keep yourself busy

We really haven't stopped since we lost Joshua. It's helped us kill time until Sarah's surgery, which is now in two days time. It's hard to believe it's rolled around so quickly, really. We've got about four hours of pre-op stuff tomorrow, from 9am, which sounds like it entails blood tests and a chest x-ray, as well as general Q&A. The surgery is scheduled at 7:30am the next day. It's good that it's early in the day. We found a good page that describes what they're going to be doing (a modified David's Reimplantation Procedure)). I'll be able to write something more competent about proceedings tomorrow after the pre-op stuff I expect.

Andrew Pollock: [life] Home again

Well, this is actually our fourth day home, I just haven't had the time or inclination to write anything until now. We had an uneventful trip home on the 29th. I think I'm getting more used to these long-haul flights, the time went pretty quickly. There is much to be said for Qantas' in-flight entertainment system. And Melatonin tablets. We had a good, jam-packed three weeks in Australia. We landed on a Sunday morning, at around 8am. Sarah's Aunty Glenda picked us up from the airport, and we stayed with her for the week. We caught up with two sets of friends on the Sunday, and managed to last until the evening without crashing. I spent the week working from the Sydney office. Jetlag is a wonderful thing for making me into a temporary morning person. I was at my desk by 8am every day. I'd forgotten how early the sun got up in Australia in the summer time. Monday in Sydney is Sunday in California, so Mondays are blissfully quiet and great for getting things done. The beauty of getting in by 8am meant I still caught Mountain View from about about 1pm onwards for the rest of the week, so that was good. I got a lot done while I was in the Sydney office. On Tuesday morning we went to the US Consulate to sort out Sarah's visa renewal. It was a no-brainer, and our passports were back at my parent's place within 48 hours. Thursday night was the Sydney office Christmas party. The Friday night we flew out of San Francisco was the Mountain View office one, so it was good to be able to catch a party somewhere. Got to love working for an international company. Photos here. Sarah spent the week in Sydney pottering around and catching up with relatives. Every night was booked out with dinner with friends. Photos from the week in Sydney are here. Next stop was Canberra for four days. We stayed with different friends each night. We'd really come to appreciate how bug-free California is. Apparently Canberra was having a particularly bad fly season this summer. They were just about carrying us away. We stayed a night with Rusty and Alli on their farm out at Majors Creek, which is always a nice getaway. It was great to see how the place is coming along. We won't recognise it next time we're there. At Canberra airport on the way to Brisbane, totally by chance, we bumped into our old upstairs neighbour Melissa, from when we lived in Turner. Her and her husband and kids moved to Brisbane around the time we moved from Turner to Ainslie, and we hadn't done a very good job of keeping in contact. To cap it off, she ended up sitting in the seat across the aisle from us on the plane, so we had a good old chinwag for an hour and half. Photos from Canberra are here. Then we got to Brisbane and did the family thing. It was good to see my family again, and show them all of the photos of Joshua and just spend time with them. Brisbane traffic has degenerated significantly in the last 12 months. The Gateway Arterial Motorway near the airport is a complete mess. There's a lot of construction going on for the new cross-city tunnel they're putting in. Probably the highlight of the trip was the mass outing to Australia Zoo. It's been a couple of years since we've been there, and boy, does that place just keep getting better. My hot tip is to save yourself a fortune, and a precious couple of hours, and avoid purchasing food from the catering area. It's sheer bedlam, and very expensive. The zoo is getting so big, that you really need all of 9am to 4:30pm to see it all properly, so you can save a lot of time by bringing your own lunch, or getting a pass-out and getting lunch from somewhere nearby. Photos from the zoo trip here The weather in all parts of Australia that we saw was pretty grey and wet for the most part. I'm not complaining, we need all the water we can get. It was sounding like most of the rain was falling outside the catchment areas though. It was nice to see Canberra not looking all brown and dry though. Photos from the time in Brisbane here. In a brief fit of spontaneity we decided to sign up for Qantas Club memberships. I'm really kicking myself for not getting lifetime membership back in 1999 when I sold my share of our business. I've done so much travelling since then, and it'd have really come in handy. As it happened, we got good use out of it this trip. The flight from Brisbane to Sydney was at 8:15am, so we left my parents' place at about 6:15am, sans breakfast or showers, and breakfasted at the Brisbane airport, and showered in the Sydney airport, as we had about 5 hours to kill until our flight to San Francisco departed.

21 December 2007

Andrew Pollock: [tech] Waiting for a software RAID-1 to resync is like watching paint dry

I'm so annoyed with myself. So today was the day I was going to upgrade the disks in daedalus. I'd finally managed to convince Dell to sell me two new 140Gb disks to replace to two 70Gb disks that were fast approaching capacity. I'd organised for access to the datacentre from 10am. I arrived early. I didn't manage to get into the datacentre until about 11am, because they were having problems remotely unlocking the door, and I had to wait until an air conditioning repair guy turned up, who was fixing some air conditioning problem. I hadn't had a lot of time to plan how I was going to do the upgrade, but I figured it was going to be pretty straightforward. Each disk is partitioned into three partitions, all of which are mirrored using software RAID. The first partition is the root filesystem, which is just an ext3 filesystem, mirrored. The second partition is swap, also mirrored, and the third partition is an LVM physical volume. The first two partitions are only a couple of gigabytes. So the basic plan was to remove the second disk (disk 1, aka /dev/sdb), put in the new bigger disk, load the partition table from the original disk 1, resync the three mirrors, and then boot off the new disk 1, and rinse and repeat with disk 0. This was all going swimmingly, when right at the end (in fact after the third partition finished syncing according to the kernel), /dev/sda decided it had a few unreadable sectors. This made the software mirroring have a dummy-spit, and decide it needed to restart the syncing from scratch. I'd seen this before with a bad disk. So I wishfully hoped it was something to do with the new disk being bigger than the old disk, so tried to roll back to the original disk 1. As was pretty much expected, disk 0 exhibited the same problems at the same point. So the problem was disk 0, not the new disk 1. So it seemed like I just managed to pick the wrong half of the mirror to work from. I thought I'd try manually dd'ing the third partition from /dev/sda to /dev/sdb, ignoring the errors, but that didn't result in a usable half of a mirror either. Interestingly, these bad sectors hadn't made themselves known until this point. The RAID array had been otherwise healthy, and SMART hadn't uttered a peep. I think at this point, after spending about 3 hours fighting with it, I decided to move up a layer. I could successfully sync /dev/md0 (the root filesystem) and /dev/md1 (the swap device), and the only reason I could think of these bad sectors not giving me grief already, was because they were right at the end of the disk, and I hadn't quite used all the free physical extents in LVM yet. Lucky I hadn't decided to grow things any further. So I decided that rather than trying to convince this existing /dev/md2 to sync with the new /dev/sdb3, I'd just build a new degraded RAID-1 on /dev/sdb3 and move all the physical extents from the degraded RAID-1 on /dev/sda3 to the new degraded RAID-1 on /dev/sdb3. I tried the logical volume with /tmp on it first, since it was fairly sacrificial. It worked fine. So I tried the largest logical volume, /srv, which was 30Gb. That went fine as well, so I moved the rest. All of them went without complaint. So then I removed the now unused /dev/md2 from the volume group, and finally managed to boot with just the new disk 1. Then I was able to put in the new disk 0, and just do a standard RAID-1 rebuild onto it. Hooray for LVM saving the day yet again. And this is where I should have stopped. At this point it was about 3pm. I'd been aiming to leave by 4pm to pick up a rental car that I had to get by 5pm. I'd wanted to also upgrade to Etch while I was physically in front of the box, in case there were any nasty kernel/udev issues that made the box unbootable. The catch was, I needed to grow /var, which was quite full. The intention had been that once I'd got the two new disks in and all synced up, I'd create a fourth mirrored partition, and add this to LVM as a new physical volume, then I could just keep merrily growing things. It felt a little bit dirty having to make a new partition to get at the extra space, and I'd reading about mdadm's "grow" mode, whilst I was sitting around waiting for things to sync. So I thought to myself, I'd just delete the third partition, and recreate it using the remaining additional cylinders I now had at my disposal, then use this grow feature of mdadm to tell Linux the array was now bigger, then resize the physical volume, and go from there. This is where things went a bit pear-shaped. I deleted and recreated (larger) the third partition on each disk, and rebooted. I was then messing around with mdadm trying to update /etc/mdadm/mdadm.conf, since the UUID of /dev/md2 had changed, when I discovered that /dev/md2 had completely disappeared. It seems that recreating that partition made Linux completely fail to see /dev/sda3 and /dev/sdb3 as RAID-1 members, and so because of the fairly transparent nature of Linux's RAID-1, LVM had seen the underlying physical volumes, and just decided to run with /dev/sda3 as the physical volume, and everything had continued to work. I just had no redundancy any more. So it was about 3:20pm at this stage, and I was starting to panic, thinking I'd never get this sorted out before I had to leave, and I'd end up returning to the US with a non-redundant mess on my hands. Then I remembered that I had the backups of the partition tables of the old disks, from before I removed them. So I thought I'd go back to that state, and just have the additional cylinders unallocated. I hadn't yet attempted to grow the RAID-1 (partly because it had vanished), so in my haste, I didn't see this being a problem. The problem was, I'd booted into multi-user mode, and things had merrily been operating on just half the mirror. I restored the partitions, and rebooted, and lo and behold, /dev/md2 magically reappeared, already 100% consistent according to /proc/mdstat. I was somewhat surprised by that, but I booted back into multi-user mode again, only to discover that the /var filesystem was panicking and remounting itself into read-only mode. This was pretty weird, given that during boot, it was considered clean by e2fsck. So I was really getting bothered by this stage, so I rebooted into emergency mode (single-user mode in Debian starts way too much), and manually started up LVM, and forcibly fscked everything. There was a bit of filesystem damage to /var, /home and /srv. Thinking I'd now fixed the problem, I rebooted into multi-user mode again, but again /var, which was considered clean during the fscking/mounting phase of booting, panicked shortly after mounting, and remounted itself read-only. So I rebooted again, broke the mirror, and forcibly fscked the filesystems again (only operating on what was on /dev/sda3. Then I rebooted without incident into multi-user mode and resynced the mirror. At this point I ran away. So I'm really annoyed with myself. This should have been a blog post about how crap Linux's software RAID is at error recovery, and how LVM saved the day yet again, but it was overshadowed by me overreaching in my haste, and managing to cause silent data corruption. The morals of this story: I think that is all. I'm just so pissed off that what could have been a perfect (enough) upgrade with zero data-loss, even considering I had a bum disk, wasn't.

8 December 2007

Andrew Pollock: [life] Australia bound

We're heading back for the annual trip home. This time it's not really a holiday, it's just three weeks of running around like a headless chicken, catching up with friends and family. We're killing time at SFO at the moment waiting for our flight to board. There's much to be said for arriving at the airport ludicrously early. We had the shortest check in line I've ever seen for an international flight. Security was also ridiculously quick. It all adds up to a stress-free travelling experience. I'm working from the Sydney office for a week, and then taking two week's vacation. Sarah's sorting out her E-3D renewal while we're in Sydney, as she was unable to travel when I renewed mine in Dublin earlier in the year. After that I'm taking all of January off as unpaid time off, so I can look after Sarah after her heart surgery in January and just generally decompress. We got a good deal with Qantas. The package gives us three domestic flights within Australia, which works out perfectly to allow us to visit Canberra and Brisbane. I'm looking forward to seeing my family, as I haven't seen them since we lost Joshua, and I'm sure it's been as hard from them as it has been for me being so far apart from each other. It'll be good to have a cry together.

5 December 2007

Andrew Pollock: [life] Queensland dragged kicking and screaming into the 60's

I'm pleased my home state of Queensland (which bills itself as the Smart State) has finally decided to start fluoridating its water, a move the rest of the country made back in the 1960's and 1970's. Hardly surprising I guess, when the No campaign for a referendum on daylight saving involved a fear of the curtains fading from that extra hour of sunlight... I remember when I was little, my Mum used to give me fluoride tablets. Dentists to this day, who have known I've grown up in Brisbane, have remarked how they can tell by my teeth that I've had fluoride as a kid. Apparently ones teeth are noticeably different (for the better) if fluoride has been involved.

1 December 2007

Andrew Pollock: [tech] MacOS 10.4 setup rant

We popped out and bought a MacBook Pro for Sarah today, as her PowerBook G4 is starting to really fall apart. Despite Leopard being well and truly out now, it came with Tiger preinstalled, but included a Leopard upgrade DVD. No big deal. So we fired up the laptop, and went through the final install steps for Tiger. I was trying to preempt any networking problems by adding the MAC addresses to my DHCP server and wireless access point before it went to try and connect to the network. I have a whitelist of allowed MAC addresses in my access point, and DHCP server is only configured for static reservations on that interface. The onboard Ethernet MAC address was easily determined. It's printed inside the battery cavity. Finding out the wireless Ethernet MAC address is another story altogether. Basically I couldn't, so I gave up, hoping maybe the access point would log the unauthorised MAC address, and I could then add it where it was needed. Well, the access point didn't appear to log anything useful. The Mac did however pop up a dialog box saying something the effect of the laptop needing to be added to the wireless access point's access control list. The one piece of useful information to display at this point would be, you guessed it, the very MAC address I need to be adding to the access control list! I ended up temporarily disabling MAC address restrictions in the access point and then the DHCP server happily logged the MAC address that didn't have a lease, and we were able to proceed. Maybe preinstalled Leopard does it better. We'll never know. Update Aww crap. Seems I didn't study the box closely enough. There's a sticker with all that pertinent information on it.

28 November 2007

Andrew Pollock: [tech] Two years of Python

As last Wednesday was the second anniversary of me joining Google, I thought it an opportune time to reflect on how I've found learning Python. It's no big secret that Google is a Python shop. I'd been meaning to learn it a for a while prior to joining Google, but never found enough reason to other than because it seemed to be the cool new language. If I had a task that required me to write a script, I could do it in Perl in 30 minutes, or spend a day trying to wrap my head around how to do it Python. I think I'd known and been writing Perl in some form or other for about 9 years. I've hardly written any in the last two, which is a bit sad. I even bought Perl Best Practices shortly after moving over here, and haven't gotten around to reading it. The only Perl I write these days is for personal tasks to try and stop myself from going totally rusty. Anyway, I thought I'd write down some of my observations of Python, from a "veteran" Perl programmer's perspective. Not that I consider myself to be a shit-hot Perl coder by any stretch of the imagination... No punctuation I really like the lack of punctuation. It makes the code look a lot cleaner. I go back to Perl and my eyes bleed after trying to dereference a reference to a scalar, or something like that. It's just ugly in Perl. No curly braces/indentation for blocks The indentation thing isn't so bad. If you're using vi, you really need something along the lines of
set shiftwidth=2
set smarttab
set autoindent
set expandtab
in your ~/.vimrc What I do miss is being able to bounce on the % key to find the beginning and ending of a block. I've heard rumours of a way to configure vi to do something similar for Python code, but I haven't gotten around to finding out. There seems to a general opinion that if you're writing a block that is so big you can't find the beginning and end of it, you're probably doing something wrong. String concatenation It's always struck me as bizarre how the most obvious way to concatenate a string in Python is also one of the least efficient. In fact, there's whole studies been done into different methods of string concatenation and their efficiencies. Prototyping is easy Now I may just be ignorant of some Perl shell here, but the number of times I've written a quick Perl script in /tmp to do some proof-of-concept thing is immeasurable. The fact that you can just fire up a Python interpreter and try something quick and dirty to see if it's syntactically sane, or does what you expect is fantastic time saver. ipython makes it an even more pleasant an experience. No CPAN I was initially a bit disappointed that there wasn't something like CPAN for Python modules. In practice, using Debian, I haven't found this to be that big a problem though. List joining is wacky I still find it weird that you don't join a list by a method of the list, you do it by a method of the string you want to use to join the list together with, that is, I think it should be mylist.join(" ") when it's really " ".join(mylist). That's just always struck me as unintuitive. urllib2 doesn't hold a candle to libwww-perl I think even last time I checked with Python 2.5, it's impossible to make a HEAD request. The mind boggles. No setuid support I can't complain too much, I think I heard somewhere it's going away in Perl as well, but it was certainly very convenient to be able to write setuid Perl scripts. I miss that convenience in Python. Not that one has to write setuid scripts all that often. Regular expression handling is painful It's about on a par with Java. You just can't beat Perl's =~ operator. "There's more than one way to do it" versus only one way to do it Perl's always had the adage of there being more than one way to do things. I think that has been its downfall in terms of readability. Heck, I've written some monstrosities that I've looked back on in a month's time and wondered what on earth I was thinking at the time. I think it's far easier to write readable Python than it is to write readable Perl. I think that's about everything. I never did any real object-oriented programming in Perl, and so I tend to take a procedural approach to things in Python as well. I haven't written any massive bodies of code in Python (although I did help maintain one for about 18 months). I like Python. It's become my first choice for writing random scripts now. Now I look at Ruby like I used to look at Python when I knew Perl quite well. Ruby has some nice things (like Perlish regular expression handling), but it brings back all that punctuation noise again. I'm not in a huge rush to learn it, even though there's a lot of hype around Ruby on Rails. I think I'd rather investigate Django or Pylons

26 November 2007

Andrew Pollock: [life/americania] Thanksgiving below zero

We got home from our week in Arizona late last night. We decided to drive non-stop yesterday, and get home in a day, rather than split it over two days like we did getting there. It ended up taking around 15 hours (we had an unexpected delay at Lost Hills because we found a stray dog (we initially thought it to be injured to boot) and Sarah was trying to get hold of some local animal control people to do something about it), otherwise it'd have taken closer to 14 hours. The drive to Phoenix was pretty uneventful. We took our time leaving Mountain View on Sunday (we had an early Thanksgiving dinner with all of our neighbours on Saturday night), and decided to call it a night at Cabazon. For about the same price that we stayed in a crappy motel last time we went this way, we stayed at the Morongo Casino, which was really nice. We were in a "Canyon View" room, and, well this is what the view looked like... We arrived at Craig and Sarah's place at about 5pm on Monday afternoon. Their new place is really nice. It's huge, with a huge yard, and a nice view of the hills. I've found suburban Phoenix (well Peoria to be precise) to be the closest looking thing to what I consider "normal Australian suburbia" that I've seen so far in the US. Granted, Peoria's a bit upmarket (at least the part that Craig and Sarah live in). So we spent a day and a half vegging out at Craig and Sarah's place, then on Wednesday afternoon, we headed off to Woods Canyon Lake, in the Sitgreaves National Forests. I rode most of the way with Craig in their new motor home, and then swapped to drive our car after we got close to our destination. It turns out that the headlights in RVs are universally crap, so it was better for the Prius to be out front lighting the way on the gravel road. I'd always associated Arizona with cacti and sand, but as it turns out, the majority of the state is forest. We arrived at the campsite after nightfall, and set up shop. We met some of Craig and Sarah's friends that night, who were all very friendly towards us. It was ridiculously cold that night. We went to bed rather under-dressed for the temperature, and absolutely froze. The next day (Thursday), we all drove from the campsite (Craig towed their Jeep behind the RV) to Woods Canyon Lake itself, and went fishing. Arizona fishing licences for non-Arizona residents were a bit on the expensive side, so Sarah and I just hung out on the rocks and chatted to people and took photos. The collective haul of trout from about 5 hours fishing was pretty impressive. I'm not quite sure why, but Friday was the group Thanksgiving dinner. Everyone pitched in, and cooked up a storm. They deep-fried three turkeys (which came out very nice and looking much less like KFC than I expected), and we had way more food than we needed. We all ate outdoors at around 3:30pm, and it was about 33°F (0.55°C). The only downside of this (aside from it being bloody cold) was the leftovers went cold almost instantly, so going back for seconds was a bit of a disappointment. Everyone gravitated back to the fire pretty quickly afterwards. It got pretty cold that night. I think it was down around -4°C when we went to bed that night. We left a bit before 8am the next morning, and the car thought it was -7°C outside. One of the other campers told Sarah his thermometer was reading something closer to -14°C. I'm not sure how cold it was when we were in New York in January, but I didn't think it was that cold. It was a good week away. The mix of camping and not camping was about just right. Now it's back to work for two weeks before we head off to Australia. Photos from the trip are here.

19 November 2007

Andrew Pollock: [life] Road trip!

It's been a while, but we're off putting a few more miles on the car. I decided to take the entire week of Thanksgiving off, and we're heading to Phoenix to spend some time with our friends Craig and Sarah as I write. They've got an RV, so we're going to go somewhere with them and hang out in it with them. The air quality around the I-5 was particularly dreadful today. I've no idea if it's smoke, dust, fog, smog, or some combination of all four, but it was really quite disgusting. You could barely make out mountains looming up through the haze, and the sun looked a funny colour. Then we got to LA, and the air quality was just as bad. It makes me appreciate living in the Bay Area. The air there has its off days, but it doesn't seem as bad as it looks down here.

Andrew Pollock: [life/americania] Two years in the US

So as it turns out, two years ago today, was when I arrived in the US with the intent of staying here for a bit. Aside from recent developments, it's been a good couple of years. We're both pretty settled, have made plenty of wonderful friends, and seen a bit (not as much as we'd like) of the country. Sarah would have liked to have had a better time with employment, but it's not like she's been sitting around at home climbing the walls in her unemployment, either. We keep talking about "when we move back", but I'm personally in no huge rush. I also don't have any strong desire to do anything relating to putting down roots over here. Buying a place just feels extremely unfeasible, and we can't really stay forever on the visa type I'm on, and I can't really see myself ever qualifying for a H-1B.

13 November 2007

Andrew Pollock: [life/americania] Trip to Boston (well Cambridge really)

The week before last I spent in Cambridge. I didn't really see a lot of the place (although we ventured out on the T to have dinner in Boston a few times). I quite liked what I saw of the place though. I like any city with half-decent mass-transit. I think ever since I saw the MTR in Hong Kong I've really liked big subway systems. Ones that run so often you don't need to have a timetable. What I saw of Boston felt like New York without quite the same size and pace, which made it feel slightly less intense. I'd go visit again.

Andrew Pollock: [debian] My First Ubuntu Developer Summit

I've been procrastinating writing about my Boston trip, for no particular reason. A bunch of us went to the Boston Ubuntu Developer Summit (in Cambridge, actually) for work purposes. We currently derive from the Long Term Support releases, and Hardy Heron is going to be an LTS, so I wanted us to get more involved directly, particularly at this stage of the game, rather than after it's already a done thing. Anyway, the reason I'm writing this in the "Debian" category is I found the whole thing to be totally awesome. Debian should do something similar. Rather than being a conference, this was essentially a week of 1-2 hour small-group meetings to discuss various features for Hardy. I thought it worked pretty well. I'd never seen gobby used before, and it's basically a poor-man's Google Docs (although one could argue it handles real-time collaborative editing better). They had VoIP up the wazoo. You could dial into a conference bridge to just listen in, or you could dial a different bridge to participate. Every room had a Polycom conference phone in it. That seemed to work pretty well. I think the main reason I think Debian could take a leaf out of Ubuntu's book on this was it helps resolve potentially controversial technical decisions very quickly. Rather than having a two week protracted flame war on a mailing list, you can have a 30 minute rational debate in person and move on. So I've no idea how this UDS stacked up to previous ones, but I was very impressed by the whole thing. I'm in total awe of Scott James Remnant and Colin Watson for not having burned out by now. Doing a release every 6 months, with all the associated stuff that goes around it (i.e. running a UDS) has got to take it out of you.

7 November 2007

Andrew Pollock: [life/americania] "As keen as mustard"

Daniel observes that the simile "as keen as mustard" isn't grokked by Americans, and had some trouble explaining the etymology of it. As far as I understand it, it derives from a brand of mustard, known as Keen's. Keen's mustard

4 November 2007

Andrew Pollock: [tech] Making mutt deal with HTML mail better

Cord Beermann is a life saver

Andrew Pollock: [life] Solar power for Cloncurry

It's exciting to read that Cloncurry is going to get a solar power generation plant that sounds something similar to the honking great big one in Spain. All for only $7 million. Apparently the Spanish one cost 1,200 million, which by my calculations is something obscene like $1.8 billion. The Spanish one is going to produce 300 megawatts though, and the Cloncurry one is only producing something like 10. I'm mildly concerned about the other Australian solar tower project that I've been watching with interest. Their latest annual report doesn't offer a status update, and the last two news articles on their website aren't very promising. It'd be a shame to see this project only ever produce the wrong sort of hot air...

Next.

Previous.