Search Results: "pollo"

20 November 2009

Andrew Pollock: [tech] "#!/bin/sh -e" considered harmful

Russell Coker advocates putting -e on the shebang line of shell scripts. I disagree. From my experience this is extremely unhelpful to people who may be debugging your shell scripts in the future. Consider this, you've added -e to the shebang of a script, and some poor schmuck down the track is trying to debug why it spontaneously exits. What's the most obvious way to do this? Run the script with sh -x or bash -x. What happens when you do this? The shebang is completely ignored, and the script is directly run by the shell interpreter. If the person doing the debugging doesn't happen to transpose all of the shell options on the shebang line to the manual shell interpreter invocation, you're going to get different behaviour. So I advocate an explicit set -e on the second line of shell scripts instead. As much as making shell scripts set -e is a good practice, it drives me absolutely batty having to deal with scripts that spontaneously exit as soon as something they run exits non-zero. Particularly when you've chained a bunch of shell scripts together, or have one sourcing a bunch of script fragments from a directory. For this reason, I prefer to write in Bash and use an exit handler, to make it very obvious when a shell script has abended due to set -e.

19 November 2009

Andrew Pollock: [life] Here we go again (~27 weeks to go)

It's looking all good, so we're game to tell the world: Sarah is 13 weeks pregnant! She had the nuchal translucency ultrasound today (which, due to the tight timing required for it, I was totally bummed to be unable to attend). The scan came back all clear, which is an enormous relief. In the nausea department, poor Sarah has had a much worse time than with the first pregnancy. Particularly on the flights to and from Australia. This makes me think it's going to be a girl (just because the nausea characteristics are totally different from the first time around). It's amazing how fast they grow in just a few weeks. Here's the ultrasound from 10 weeks: 10 week ultrasound And here's the ultrasound from 13 weeks: 13 week ultrasound

16 November 2009

Andrew Pollock: [life] Blogging on a plane!

Well, here I am, sitting in a chair at 10,000 feet (or whatever the altitude currently is), using WiFi. Writing a blog post. And we still don't have flying cars. I'm on my way to Dallas for the Ubuntu Developer Summit for the 10.04 (Lucid Lynx) release. Being an LTS release, this is of particular interest for what I do at work. Sarah's still in Australia (well she's actually on a flight to LAX as I write), so I took the VTA light rail + shuttle to the airport. I must say, aside from not being particularly speedy, it was a pleasant experience. I've finally cracked open The Audacity of Hope, which I received for Christmas or my birthday last year. I'm really loving the renovated San Jose airport. Now that all of the check-in counters have moved downstairs, they've about quadrupled the space the TSA has, which makes getting through security a much more pleasant experience. Add to that, the nice lady in the Admiral's Club kindly reseating me in an exit row, all by myself, and this is a pretty sweet trip so far. http://www.youtube.com/watch?v=8r1CZTLk-Gk

12 November 2009

Andrew Pollock: [life] RIP Stumpy

Well, she didn't make it. The diuretic the vet put her on to reduce the fluid around her heart and lungs was also causing kidney failure, so her condition wasn't treatable. She was euthanised some time today. Our neighbour Carol was able to be there with her. It really sucks that we weren't able to be there. It's still a real shock how she was a perfectly healthy cat last Friday, and now she's dead. Sarah's going to really miss her, as she was exceptionally got at being attuned to her (Sarah's) moods. Whenever Sarah was sick or just down, Stumpy would curl up with her.

11 November 2009

Andrew Pollock: [life] Well this just sucks

I'd had bad feelings about this trip, mainly because it was so short. I didn't expect this to happen though... Back story: Smudge has always been fairly wary of Stumpy, for some unknown reason (perhaps her boisterousness?) It came to a head when we did our road trip to Atlanta. We got back home, and Smudge had pooped in all the wrong places, and was hissing and growling at Stumpy whenever Stumpy looked at her the wrong way. The cat sitter plead ignorance, but something must have happened while we were away. Smudge has been pretty hopeless around Stumpy ever since. One theory was that maybe Stumpy (or Smudge) had some health problem, so we had them both checked out and no red flags were raised. The other option was to put Smudge on Prozac for a while to see if she settled down. I didn't like the idea of drugging her, so we've opted to separate them for a while. Smudge is in our bedroom and Stumpy and Lily have the rest of the house. Smudge and Stumpy only have supervised time together. We've tried a bit of play therapy as time permits, but it hasn't made much of a difference. So fast forwarding to now, and we didn't want to leave Smudge in our bedroom all by herself for the week, so we thought we'd put Stumpy in a cat boarding place, since we figured she could handle it, and let Smudge and Lily have the run of the house. Our neighbour Carol was going to check in on Smudge and Lily. All good. I think it was yesterday (my brain is not dealing with the various timezones plus jet lag) Sarah got an email from Carol saying that the cat boarding place had called her because Stumpy hadn't been eating, and was all lethargic. Carol went and brought her home, and she didn't do much better at home, she was just lying around, so she took her to our vet. She was having breathing problems, and generally showing symptoms of congestive heart failure! Her blood work was otherwise okay. The vet said they couldn't do much and needed to send her to a specialist vet at Campbell, where they could do an ultrasound on her heart. This is where she currently is, in an oxygen tent on diuretics for fluid around the heart/lungs. The prognosis isn't very good at all. She managed to make it through the night, but I don't know if she's going to make it until I can get home. I've moved my flight a day earlier to Friday night, so I can get out to the vet's on Saturday. The vet was saying that even if she does make it through this, her long-term prospects aren't good. Maybe a year. This is only a four year old cat! The vet said she has an enlarged heart, so it's some sort of congenital condition she's always had, but was probably triggered by the stress of being in the boarding place. It's just come as a total shock to us as she's always been really healthy, and the most hyperactive of the three cats. Sarah, being the cat lover that she is, is particularly upset, because this is "her" cat, and she feels terrible because Stumpy is all by herself. I'm really hoping Stumpy can at least hang in there until I get there. I don't want her to die alone, despite how frustrating she can be. We owe an enormous debt of gratitude to our neighbour Carol for doing a lot of running around for us. I don't doubt for a moment that Stumpy would be dead by now if it weren't for her.

7 November 2009

Andrew Pollock: [life] Whirlwind visit to Brisbane

Sarah's Mum is flying her back for the scattering of her grandmother's ashes, and I figured that as this will be her third trip back this year, and she's seen my family more than I have in the last 12 months, I should come as well. So I'm getting my first opportunity to sample V Australia's service. I must say that flying Virgin America to LAX and then transferring to V Australia to fly direct to Brisbane seems like a fairly civilised way to do it. Anything that involves Virgin America is always a delight. My only complaints so far are that the SFO-LAX flight left late, and the check in line for V Australia in LAX was ridiculously slow given it was so short. The time of the flight is pretty good - it leaves LAX at 10:30pm, so hopefully we'll get a semi-decent amount of sleep. It gets into Brisbane at 6:30am on Sunday, so we'll have to try and imitate the living dead for the day. I'm heading back again on Saturday, as I have to be in Dallas next week for the Ubuntu Developer Summit.

28 October 2009

Russell Coker: New Play Machine

Update:
Thanks to Sven Joachim and Andrew Pollock for informing me about /etc/init.d/mountoverflowtmp which exists to mount a tmpfs named overflow if /tmp is full at boot time. It appears that the system was not compromised. But regular reinstalls are always a good thing. On the 24th of August this year I noticed the following on my SE Linux Play Machine [1]:
root@play:/root# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda 1032088 938648 41012 96% /
tmpfs 51296 0 51296 0% /lib/init/rw
udev 10240 24 10216 1% /dev
tmpfs 51296 4 51292 1% /dev/shm
/dev/hdb 516040 17128 472700 4% /root
/dev/hdc 1024 8 1016 1% /tmp
overflow 1024 8 1016 1% /tmp The kernel message log had the following:
[210511.546152] su[769]: segfault at 0 ip b7e324e3 sp bfa4b064
error 4 in libc-2.7.so[b7dbb000+158000]
[210561.527839] su[778]: segfault at 0 ip b7eb14e3 sp bfec84d4 error 4 in
libc-2.7.so[b7e3a000+158000]
[210585.270372] su[784]: segfault at 0 ip b7e044e3 sp bff1b534 error 4 in
libc-2.7.so[b7d8d000+158000]
[210595.855278] su[789]: segfault at 0 ip b7e014e3 sp bfd18324 error 4 in
libc-2.7.so[b7d8a000+158000]
[210639.496847] su[796]: segfault at 0 ip b7e874e3 sp bf99e7b4 error 4 in
libc-2.7.so[b7e10000+158000] Naturally this doesn t look good, the filesystem known as overflow indicates a real problem. It appears that the machine was compromised. So I ve made archival copies of all the data and reinstalled it. As the weather here is becoming warmer I ve used new hardware for my new Play Machine. The old system was a 1.8GHz Celeron with 1280M of RAM and two IDE disks in a RAID-1 array. The new system is a P3-800 with 256M of RAM and a single IDE disk. It s a Compaq Evo which runs from a laptop PSU and is particularly energy efficient and quiet. The down-side is that there is no space for a second disk and only one RAM socket so I m limited to 256M that s just enough to run a Xen server with a single DomU. I put the new play machine online on Friday the 23rd of October after almost two months of down-time.

23 October 2009

Andrew Pollock: [life] Sarah's Trauma debut

The first episode of Trauma that Sarah was an extra in aired on Monday night. I'd seen a news story about how they were looking for extras for it with medical experience, and Sarah had just completed her Certified Nurse Assistant course. I mentioned the news story to her, and she signed up. Ironically, for the three episodes they've called her up for so far, the closest to using her medical experience is being a patient, and if you're lucky, you'll see her ankle. Marc was kind enough to rip out some stills from his recording of the episode.

3 October 2009

Andrew Pollock: [life] Surprise! It's a Kylie concert

Sarah told me a while ago that she was planning an early birthday present for me, but it was going to be a surprise. Last night, I found out what it was: tickets to see Kylie Minogue in concert at the Fox Theatre in Oakland. I had no idea that Kylie hadn't done a US tour before. Last night's concert was her second one ever, and was only put on by popular demand (the night before was her first ever). I've never seen Kylie live before and it was a great show. There was a DJ on stage for about 45 minutes prior to her starting. There were awesome lasers and lights, a live band, and excellent choreography. My only complaint was that the music tended to drown out her vocals a bit, but other than that, an excellent and totally unexpected night out. We nearly saw her when we were in Prague last year and she happened to be performing at the same time we were there, but I think this was a much better deal: a smaller venue and cheaper tickets. The general admission area was all of the standing areas on three levels. We could have elbowed our way right to the edge of the stage if we'd wanted to. The San Francisco Chronicle has a good review of her opening night.

23 September 2009

Andrew Pollock: [debian] PyMetrics

I recently learned of PyMetrics existence via 10 Ways To Let People Know You're A Bad Python Programmer I've yet to run it on any of my Python code to figure out how bad a Python programmer am I, but I was surprised to discover it was absent from Debian, so I fixed that. In writing this post, I just realised that I unnecessarily made it an architecture-dependent package, when it doesn't need to be. Better go fix that.

6 September 2009

Andrew Pollock: [debian] RSS feed of RC bugs?

Stefano Zacchiroli's post about fixing an RC bug a day got me thinking. In my Google Reader, I already have the feed of new Debian packages (which was incidentally the highlight of Debian Weekly News for me, and now that I found this feed, I miss its now infrequent publications a whole lot less). What I'd really like to compliment this, is a daily feed of new release critical bugs opened or elevated to release critical status. Then, in my copious amounts of spare time, if I got the urge when an appropriate RC bug went by, I might be more inclined to try and do something about it. Does such a feed already exist somewhere?

Andrew Pollock: [debian] ISC DHCP 4.1.0 available in experimental (call for testing)

I finalised the initial upload of the ISC DHCP 4.1.0 packages a couple of days ago, and it sat in NEW, because I've renamed the source package (no more dhcp3). Today it was ACCEPTed into experimental. (Kudos to the ftp-team for their quick processing of NEW) It should deal with upgrading from dhcp3-client or dhcp3-server to the newly-named equivalents, at least for the common cases. The rest will come out in the wash (which is why it's in experimental). Thanks also to AJ for letting me NMU ifupdown twice to sort out some problems with the way it invokes /sbin/dhclient (thinking it's the v2 client) as opposed to /sbin/dhclient3. I think the criteria for uploading to unstable will be:

4 September 2009

Andrew Pollock: [life] Two years later

It feels totally surreal that 2 years ago today, we lost our baby. The point is really driven home when we see friends kids who are of a similar age to what Joshua would be, and they're these walking (running), talking toddlers. It's hard to imagine that we too could be running around after a boy of that size by now. Two years feels like an absolute eternity. We're going to make a little getaway to the B&B we retreated to for Joshua's due date and just spend some quiet time together. September used to be my favourite month of the year. Every September school holidays we'd go to a beach house that we had in the family at Palm Beach, and I'd always associate September with two weeks of sun and sand. Now September is littered with painful memories of days when things that shouldn't have ever happened did, and days where things that should have happened didn't.

31 August 2009

Andrew Pollock: [tech] Finding out about conferences

Paul Fenwick says he finds out about conferences by word of mouth. Not that I ever do more than skim the page, but the Announcements page of Linux Weekly News (a fine publication well worth more financial support) mentions upcoming conferences. I've just learned that this page is derived from the LWN.net Community Calendar

Andrew Pollock: [debian] ISC DHCP 4.1 package progress report

It's been a while since I last wrote about where I was up to with the DHCP 4.1 packaging for Debian. I'm pleased to report that the packages are now ready for upload to experimental. The main delay was doing some basic testing to make sure that the transition from the v3 packages to the new v4 packages worked properly. I'm glad I took the time to set up a Xen test environment, because I found all sorts of problems, and fixed them. The only reason I'm not uploading the packages today is because my testing uncovered a bug (#544371) in the way ifupdown is invoking dhclient. Until that is resolved, there's not a lot of point in uploading, as dhclient won't work. Oh, and the DHCP server LDAP patch still needs to be sorted out, but I'm not going to wait for that to do an experimental upload.

5 June 2009

Cristian Mauricio Porras Duarte: Aptitude History Tracking progress report, Week 2


The first important task when one wants to carry out a historical study of the behavior of a system is to determine what information you want to store and how this is going to be saved, thinking of providing an easy way to access information when needed. In our case, we need to store the information of the packages status and the actions that have been made to them. For now I have confronted the aptitude state and the dpkg state. We use the state of dpkg to see the changes that other applications (Apt, Synaptic, Adept, etc..) can perform on the packets.
To see the changes we rely on the pkgstates file (which contains some information about the last state that was seen by aptitude) and the routine build_selection_list, comparing what is in the apt cache and what is stored in pkgstates. So the first task was to create routines to save in each member of the history the information that can be collected from pkgstates and the cache, which really is not much. This process is accompanied by the function to write in the text log and the binary database. I believe that work it s around 70-75%, missing optimization and definitions of some values.
I have been working this week on the aptitude state , creating a vector of entries which is storing the information collected from the state s changes through the functions cleanup_after_change, apply_solution and build_selection_list from aptitudeDepCache, calling on the last function to the routine that writes the whole vector of changes made so far in the text log and the database, I think this work is located at 50%. Plan for next weeks For the dpkg state, optimize the functions and add to the info of each package the date when it changed. Maybe based on /var/log/dpkg.log For the Aptitude state, finishing collecting the information about changes. For example the dep that trigger a change, groups of packets that share the same reason of change. Look at other relevant information that could be included for the trace of each package. Change the structure of the database to include information that is missing.
Open a separate branch in the repository of aptitude, looking for a more fluid feedback.
Pd. Hello Planet Debian!

Andrew Pollock: [life] Oh noes, my first cavity!

I've always prided myself in the fact that I didn't have any fillings. That's about to change, sadly. One of the teeth at the back, top right of my mouth has a deep valley, which makes it hard to get at with a toothbrush, and there's a small cavity at the bottom of that. Dentist trips for me have always just involved the cleaning and scaling and an exam. Aside from having my wisdom teeth out (which I had done under general anaesthesia) I've never had a dental procedure before. Eeek.

Andrew Pollock: [tech] Software controlling the power to USB Woot! lights

I've had a few enquiries from my blog post about trying to control dumb USB-powered lights. I thought I'd just write something up to save myself replying to any more emails. Yes, it's doable. Finding a USB hub that will do it is another story. From my own research, I found someone else who was doing something with USB-powered devices (I can't remember what now), and he had been using a what is now a Linksys ProConnect USB 4-Port Hub USB 2.0 I'd first tried a couple of random cheap hubs from Fry's with no success (fortunately I was able to return them) before I determined that the Linksys one would definitely work. The downside of the Linksys hub is it requires external power. It was also one of the more expensive USB hubs on the market. One of my co-workers, who is an Electrical Engineer by education, said that the USB spec requires the functionality that I wanted, but most chip manufacturers had cut a corner in the interests of cost saving. The Linksys hub uses an NEC chipset. Every other hub that I could get my hands on had a Genesys Logic chipset, and did not work. You can tell if you've got a winner by the output of lsusb -v. If the hub characteristics include "Per-port power switching", you're in business. To do the actual port powering on and off, I'm using a setuid-root hub-ctrl, wrapped with a small shell script, which has the USB ID of the hub and the port number the lights are plugged into hard-coded in it. In my searching, I found also that it may be possible to do with Python, but I did not invest the time trying to find out.

30 May 2009

Andrew Pollock: [life] On obtaining an E-3 visa from the US Consulate in Vancouver

I've already had one enquiry, so I guess I'd better get writing. Despite the lawyers being really down on using this Consulate, I have to say that from my experience, it's been the easiest so far. Or I'm just getting used to the rigmarole. The one screw up was I didn't read the instructions thoroughly enough, and we rocked up to the Scotia Bank branch to deposit the visa application fee in their bank account, and I thought the fee was quoted in Canadian dollars. Turns out, it was quoted in US dollars. It wasn't the end of the world that we didn't have cash, they could sell us US dollars on a credit card, except the bank would only accept Visa card, not Mastercard. I haven't had to deal with such bullshit since the great Cabcharge/Visa card war in Australia in the late 90's. Moral of that story: read the instructions multiple times. Carry one of each flavour of credit card when traveling internationally, just in case. That minor transactional hiccup aside, everything went fine. The Consulate itself does all of the pre-interview shenanigans on one floor (the bulk of the waiting around, the fingerprinting and photographing) and then they shoot you up to another floor for the "interview". Annoyingly, they run you through the metal detectors again on the higher floor. The interview was basically "So you work for Google? How about the food?" and then he told us to come back the next day to pick up the passports. I think we were in and out in about three, three and a half hours. I have to say, the ability to collect the passports from the Consulate later is a real boon. When you're in a foreign country, the last thing you want to deal with is any glitches in the postal system, or trying to get mail delivered to a hotel. This alone makes me like the Vancouver Consulate the best. We went back at the 2:15pm allotted "passport pick up time", and they came down to the security checkpoint on the ground floor and you show your receipt and they give you your passports back. They tell you to step outside and check it, and come back if there's any problems, so I presume you can at least talk to a human at that point if there are any problems. This is my third E-3 visa. They did not ask to see any of my supporting paperwork showing ties with Australia or anything else that I had in my giant wad of paperwork, just the approved Labor Condition Application, which they kept and returned with the passport the next day.

16 May 2009

Andrew Pollock: [tech] Deciding between the Lenovo T400 and X301

I'm in the market for a new laptop. I've got almost 4 years out of my Dell D610 (which I've been despising from not long after purchasing) and decided that I'll never buy from Dell again. I used to be very down on ThinkPads because of the placement of the Escape key, but since I've been using one at work for the last 3.5 years, I've gotten used to the Escape key location, and found the laptops themselves to otherwise be very solid and well supported by Linux. So Lenovo it is. Next question: T400 or X301? I've seen both, and the X301 is very sexy in terms of thickness, weight, and having all the latest bells and whistles, but boy, is it expensive. I did a side-by-side comparison between a T400 decked out the way I wanted, and an X301 decked out the best I could choose, and I've opted for the T400. The main problems I had with the X301 were that there was no choice of processor, and the processor available seemed significantly slower than what I could get in the T400, and of course the cost. I seemed to be paying nearly $1000 more for a slower processor, just to get something extra thin and light, with LED backlighting and an SSD disk. What finally swayed me to spending less money and getting an arguably "better" laptop was if I paid less now, I'd be more comfortable possibly getting something in less than 4 years time down the track. So if it came down to the X301 for 4 years or the T400 for 2 years, the T400 seemed like a better deal. What will hopefully end up happening is I'll end up using the T400 for four years and not end up hating it by the end of that time. Here's what I ended up going with: All of that plus a 2 year warranty and an additional 90W AC adapter came out at $1,240 (they have a 15% off discount code thing running until tomorrow, which brought the price down a bit) I'm particularly excited about not having a proprietary graphics chipset. I'm particularly unexcited about it including Windows Vista Home Basic. Drat, enumerating all of the options made me just realise that I seem to have omitted the 5-in-1 media reader from the final order. Oh well. That was largely just a nice-to-have anyway. Sarah tends to do all of the photo management on her laptop. I doubt this will get to me before Thursday, so I should have it waiting for me by the time I get back from Barcelona.

Next.

Previous.