Monthly Archives: October 2011

Pants and prostatectomies

They tell you a lot of stuff around a prostatectomy—before, during and after. Well not actually during, hopefully you’re fast asleep during, but definitely before and after. They talk about incontinence and impotence and pain management and deep vein thrombosis and catheter care and all sorts of other stuff. But nobody mentions pants1.

Which is bad. Because there’s a lot you need to know about pants if you’re having a prostatectomy. Here’s what I’ve learnt,  in the hope that it might save some of you the pain of having to work it out for yourself.

Forget boxers. Boxers are bad. By which I mean the loose type. And that’s the big thing to know. Somewhere you’re maybe thinking “after all that surgery, I want loose, comfortable clothing”. No you don’t.

You’ll leave hospital with a catheter in. And probably with instructions to try to move, to go for a walk each day. You might think loose pants are good because they won’t trap the tube. That’s the least of your problems.

The thing is, when you go for a walk in loose, comfortable pants your willy swings about. And the tube that’s stuck in it swings about. And with each little swing it rubs a little. And before long the inside of your willy is getting mighty annoyed about this and decides to let you know the only way it knows how—by really hurting. Wear tight, close fitting pants. It’ll save you a lot of pain.

I didn’t work this out until the day before my catheter was removed, not until after a long walk around a local park. Fortunately, when my wife had collected me from hospital someone had left have a tube of lidocaine containing gel on the table by my bed, and she had the forethought to figure it might come in useful…

Once the catheter is out you’re going to pee yourself. Hopefully not much and not for long, but it’s going to happen, and nothing anyone says to you beforehand will prepare for just how humiliating this feels when it does. So you’re going to need pads. And pads are no damn use in loose pants. Once again you’re going to need something close fitting.

Close fitting pants come in a variety of designs. Which is best? All of them. No, that’s not any of them. It’s all of them. Make sure you have lots of different pants. Why? The pant wearing is relentless. There is no respite (OK, the bath, but how long can you spend in the bath?). You’ll be wearing pants all night as well as all day. And the pressure of the waist band on the wound really starts to irritate. So stock up on pants. Each time you buy pants in the run up to surgery, ask yourself these things:

  • Are they close fitting?
  • Is the waist band in a different place to all the other pants I own?

If you can answer yes to both questions, these are good pants. Even if they have a fuzzy, pink ‘My Little Pony’ design on them. Forget the look. Go for comfort.

  1. American readers please note: I’m British. ‘Pants’ to me are smaller and worn closer to the skin than your pants. This article is about underwear, underpants []

Call popups with Asterisk and Thunderbird

There are several applications around for Windows users that offer popup notification of incoming calls to an Asterisk server, looking up the caller’s name in various Personal Information Managers (PIMs). Since I don’t use Windows, they’re not much use to me, so I wondered if there was anything available for Linux.

A Google a while back threw up this script by Olivier H. Beauchesne which looked promising. It does part of what I wanted—it generates a popup notification of incoming calls, but it makes no attempt to look up the name of the caller.

I considered writing something as a Thunderbird extension, but there seemed to be a couple of downsides to this approach:

  • From recent experience of working with Thunderbird’s address book for a click2dial extension I knew that it doesn’t lend itself well to look ups keyed on phone numbers
  • I wanted something that would always be running, irrespective of whether or not I’d fired up Thunderbird

I decided to have a go at hacking Olivier’s script, quite ambitious considering I’d never written anything in Python before.

It didn’t actually take much to get it to look up incoming numbers in a SQLite database. I then wrote a dirty Perl script to pull all the phone numbers out of my Thunderbird address book and populate the database. The Perl script was way to ugly to share and I always intended to tidy it up, but just never found the time. Until now.

callPopPy in action

callPopPy in action

A prolonged period off work sick has driven me to looking for things to keep my mind occupied, and so I’ve returned to this project. The Perl script has been scrapped. In it’s place I’ve written a Thunderbird extension named Squalit, a much neater solution. Squalit can export a single contact or an entire address book to the database, and can be configured to update the database periodically, ensuring that call popups and Thunderbird are always in sync.

I then turned my attention to the popup script itself. The original relied on libnotify and its Pyhon binding, pynotify. These are only available on Gnome based Linux distributions such as Ubuntu. I thought it would be useful to make everything more portable, so rewrote it to use a library I stumbled across by Daniel Woodhouse, gtkPopupNotify. After a fair few other changes I was left with a distant descendant of Olivier’s original script, which I’ve called callPopPy. callPopPy is portable enough that I’ve had it running on a Windows XP machine, and is doing just what I wanted on Ubuntu. The advantage of the two stage approach is that other utilities could be written to integrate callPopPy with other PIMs.

The combination of TBDialOut for click2dial with Squalit and callPopPy for call popup notification provides me with great integration between Thunderbird and my Asterisk server—I guess this is what is meant by CTI.