Zap

This week, I received a ~240V AC electric shock. I can’t recommend it.

A 10-year-old girl hangs from a scaffolding pole outside a white house.
As you may have guessed based on photos in previous posts, our house is currently wrapped in a convenient climbing frame scaffolding.

We’re currently having our attic converted, so we’ve had some electricians in doing the necessary electrical wiring. Shortly after they first arrived they discovered that our existing electrics were pretty catastrophic, and needed to make a few changes including a new fusebox and disconnecting the hilariously-unsafe distribution board in the garage.

Lifted floor showing central heating pipes and a tangle of electrical cables.
The owner before last of our house worked for SSEN and did all of his own wiring, and left us a rats’ nest of spaghetti wiring that our electricians described as being unlike anything they’d ever seen before. Also a literal rats’ nest under the decking, but we got rid of that already.

After connecting everything new up they began switching everything back on and testing the circuits… and we were surprised to hear arcing sounds and see all the lights flickering.

The electricians switched everything off and started switching breakers back on one at a time to try to identify the source of the fault, reasonably assuming that something was shorting somewhere, but no matter what combination of switches were enabled there always seemed to be some kind of problem.

Electricity shining a torch into a cupboard containing an fusebox with an open cover; the switches are in a mixture of on and off positions.
You know those escape room puzzles where you have to get the right permutation of switch combinations? This was a lot less fun than that.

Noticing that the oven’s clock wasn’t just blinking 00:00 (as it would after a power cut) but repeatedly resetting itself to 00:00, I pointed this out to the electricians as an indicator that the problem was occurring on their current permutation of switches, which was strange because it was completely different to the permutation that had originally exhibited flickering lights.

I reached over to point at the oven, and the tip of my finger touched the metal of its case…

Blam! I felt a jolt through my hand and up my arm and uncontrollably leapt backwards across the room, convulsing as I fell to the floor. I gestured to the cooker and shouted something about it being live, and the electricians switched off its circuit and came running with those clever EM-field sensor pens they use.

Somehow the case of the cooker was energised despite being isolated at the fusebox? How could that be?

Dan, bare-chested, lies in a hospital bed with an ECG hooked-up to him.
Buy one ECG appointment. Get a free partial chest-shaving free!

I missed the next bits of the diagnosis of our electrical system because I was busy getting my own diagnosis: it turns out that if you get a mains electric shock – even if you’re conscious and mobile – the NHS really want you to go to A&E.

At my suggestion, Ruth delivered me to the Minor Injuries unit at our nearest hospital (I figured that what I had wasn’t that serious, and the local hospital generally has shorter wait times!)… who took one look at me and told me that I ought to be at the emergency department of the bigger hospital over the way.

ECG printout showing a report of "Abnormal ECG: sinus arrhythmia".
The first hospital were kind enough to hook me up to an ECG before sending me on to the A&E department. It indicated possible cardiac arrhythmia in the sinus node – basically: my heart’s natural pacemaker was firing somewhat irregularly – which is kinda what you’d expect from an AC zap.

Off at the “right” hospital I got another round of ECG tests, some blood tests (which can apparently be used to diagnose muscular damage: who knew?), and all the regular observations of pulse and blood pressure and whatnot that you might expect.

And then, because let’s face it I was probably in better condition than most folks being dropped off at A&E, I was left to chill in a short stay ward while the doctors waited for test results to come through.

Two electricians, one in a hard hat, look in an outdoor metering cupboard by torchlight.
Apparently our electricity meter blew itself up somewhere along the way, leaving us with even less of a chance to turn the power back on again.

Meanwhile, back at home our electricians had called-in SSEN, who look after the grid in our area. It turns out that the problem wasn’t directly related to our electrical work at all but had occurred one or two pylons “upstream” from our house. A fault on the network had, from the sounds of things, resulted in “live” being sent down not only the live wire but up the earth wire too.

That’s why appliances in the house were energised even with their circuit breakers switched-off: they were connected to an earth that was doing pretty-much the opposite of what an earth should: discharging into the house!

Linesmen examining an electricity pylon by torchlight.
For the next day or so, a parade of linesmen climbed up and down all the pylons in the field behind our house, hunting for the source of the problem.

It seems an inconceivable coincidence to me that a network fault might happen to occur during the downtime during which we happened to have electricians working, so I find myself wondering if perhaps the network fault had occurred some time ago but only become apparent/dangerous as a result of changes to our household configuration.

I’m no expert, but I sketched a diagram showing how such a thing might happen (click to embiggen). I’ll stress that I don’t know for certain what went wrong: I’m just basing this on what I’ve been told my SSEN plus a little speculation:

MS Paint grade illustration showing how a faulty transformer on a power pole, crossing live with earth, might go unnoticed as a result of the earth spike behind our garage until the garage's (unsafe) circuit is disconnected.

By the time I was home from the hospital the following day, our driveway was overflowing with the vehicles of grid engineers to the point of partially blocking the main street outside (which at least helped ensure that people obeyed our new 20mph limit for a change).

A driveway full of vehicles spills out onto the nearby road.
We weren’t even able to get our own car onto our driveway when we got back from the hospital.

Two and a half days later, I’m back at work and mostly recovered. I’ve still got some discomfort in my left hand, especially if I try to grip anything tightly, but I’m definitely moving in the right direction.

It’s actually more-annoying how much my chest itches from having various patches of hair shaved-off to make it possible to hook up ECG electrodes!

A linesman hangs from his climbing belt at the top of a pole, while two others look on from the ground.
The actual conversation at this point seemed to consist of the guy at the top of the pole confirming that yes, he really had disconnected the live wire from our house, and one at the bottom saying he can’t have because he’s still seeing electricity flowing. Makes sense now, doesn’t it?

Anyway, the short of it is that I recommend against getting zapped by the grid. If it had given me superpowers it might have been a different story, but I guess it just gave me sore muscles and a house with a dozen non-working sockets.

A 10-year-old girl hangs from a scaffolding pole outside a white house.× Lifted floor showing central heating pipes and a tangle of electrical cables.× Electricity shining a torch into a cupboard containing an fusebox with an open cover; the switches are in a mixture of on and off positions.× Dan, bare-chested, lies in a hospital bed with an ECG hooked-up to him.× ECG printout showing a report of "Abnormal ECG: sinus arrhythmia".× Two electricians, one in a hard hat, look in an outdoor metering cupboard by torchlight.× Linesmen examining an electricity pylon by torchlight.× A driveway full of vehicles spills out onto the nearby road.× A linesman hangs from his climbing belt at the top of a pole, while two others look on from the ground.× MS Paint grade illustration showing how a faulty transformer on a power pole, crossing live with earth, might go unnoticed as a result of the earth spike behind our garage until the garage's (unsafe) circuit is disconnected.×

There is a car

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

There is a car, in the hospital parking lot.

It is a faded red, covered with dust.

Other cars have parked and left on either side of it, every day, but this car remains.

I pass by it, as I find parking, on my way in to work.

I know what it means.

Short story by a nephrologist (kidney specialist). I haven’t a clue why people try to use Twitter to write long-form content – by the time you’re bending the medium so far out of shape, perhaps you chose the wrong medium? – but I still enjoyed this piece.

That way they would never know

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

Some 702 intimate examinations were done on sedated or anaesthetised patients (table 3). In only 24% of these examinations had written consent been obtained, and a further 24% of examinations were conducted apparently without written or oral consent.

This 2003 study at an “English medical school” determined that vaginal/rectal examinations were routinely carried out on anaesthetised patients without their knowledge or consent. “I was told in the second year that the best way to learn to do [rectal examinations] was when the patient was under anaesthetic,” one fourth year student responded, to the survey, “That way they would never know.”

Well ain’t that a thing.

Into the Lair of the Bladder Monster

Warning: this blog post contains pictures of urine, invasive equipment, and the inside of a bladder. It’s probably safe for all audiences, but you might like to put your glass of apple juice down for a minute or two. The short of it all is that I’m probably healthy.

Since my hospitalisation the other month with a renal system infection, I’ve undergone a series of investigations to try to determine if there’s an underlying reason that I fell ill. As my doctor explained to me, it’s quite possible that what I’d experienced was a random opportunistic infection (perhaps aided by a course of unrelated antibiotics I’d been on earlier this year or by certain lifestyle habits), but if that wasn’t the case – if there were some deeper explanation for my health problems – it was important to find out sooner, rather than later.

A sterile pot full of Dan Q's urine.
I’ve peed in so many little pots! If you laid them end-to-end across your kitchen counter, people would think that you were some kind of pervert.

Early on I had several ultrasound scans of my bladder (at a number of different times and at a variety of levels of fullness) and one of my kidneys, the latter of which revealed some “minor scarring” of one of them which apparently isn’t something I should be worried about… although I wish they’d started the two-page letter I got with that rather than opening with, effectively, “Contrary to what we told you at the hospital, we did later see something wrong with you…” But still, good to be reassured that this is probably not an issue.

Ultrasound scan of one of Dan Q's kidneys.
An ultrasound scan of one of my kidneys. Can you tell the sex yet?

More recently, I went to the hospital to have a “flow rate test” and a cystoscopy. The flow rate test involved the most-ghetto looking piece of NHS equipment I’ve ever seen: functionally, it seemed to be little more than a funnel on top of a large measuring beaker, in turn on top of a pressure-sensitive digital scale. The scale was connected up to the only fancy-looking bit of equipment in the room, a graphing printer that output the calculated volume (based on their weight) of the same and, more-importantly, the rate of change: the “flow rate” of the stream of urine.

A stream of urine pours down into a funnel.
I’m right, aren’t I? That’s basically a kitchen funnel, isn’t it?

I suppose one advantage of using equipment like this is that it basically operates itself. Which meant that the nurse was able to give me five seconds worth of instruction and then leave the room, which saved us from our own Britishness forcing us to make small-talk while I urinated in front of her or something. Ultimately, I turned out to be within the range of normalcy here, too, although I was a little disappointed to find that the ward didn’t maintain a daily “score board” of flow rates, as sort-of a science-backed literal pissing contest.

A graphing printer describes Dan Q's urine flow. The 'flow rate' graph shows an initial peak, then a trough, then continues to a higher sustained peak.
Apparently not all men experience that ‘spurt-and-then-full-pressure’ thing you’ll see on the graph on the right, when they start to pee, but some of us do, and it’s perfectly normal. I’m learning so much!

Finally came the cystoscopy, and this was the bit that I’d been most-nervous about. This procedure involves the insertion of a long flexible tube into the urethra at the tip of the penis, under local anasthetic, and pushing it all the way down, through the sphincter, down through the prostate and then back up into the bladder. It’s then used as a channel to pump water into the bladder, filling it to capacity and stretching out the sides, after which the fibreoptic cord (and light) that runs along its length is used to look around inside the bladder to inspect for any of a plethora of different problems.

Cystoscopy equipment, ready for insertion.
You’re going to put that WHERE?

The doctor invited me to watch with him on the monitor, which I initially assumed was because I was clearly interested in everything and kept asking questions, but in hindsight I wonder if it’s just that he – quite rightly – assumed that I might have panicked if I’d have been looking in the direction of the piece of equipment he brought in and jabbed at my penis with. I only looked at it while it was on its way out, and my god its a scary-looking thing: sort of like a cross between a tyre pressure gauge and a blowtorch. The first few inches were painless – the local anasthetic had made me completely numb right up to and including the external sphincter, which is at the base of the penis. However, what I can only assume was the second sphincter complained of the discomfort, and it stung pretty sharply any time the doctor would twist the cystoscope to change the angle of the picture.

View up a urethra, from a cystoscope.
The view as you ‘travel’ up the urethra looks pretty much like I expected. With a motion simulator, it would make a pretty cool ride!

Seeing the inside of your own body is an amazing experience. I mean: it’s not amazing enough to even be worth the experience of a cystoscopy, never mind the illness that in my case preceeded it… but it’s still pretty cool. The ultrasounds were interesting, but there’s nothing quite so immersive as seeing a picture of the inside of your own bladder, gritting your teeth while the doctor points to an indentation and explains that it’s the opening to the ureter that connects to your own left kidney!

Unfortunately I neglected to take my phone into the operating room, having put it into a locker when I changed into a gown, and so I wasn’t able to (as I’d hoped) take photos of the inside of my own bladder. So you’ll have to make do with this video I found, which approximates the experience pretty well. The good news is that there’s probably nothing wrong with me, now that the infection from earlier this year has passed: nothing to suggest that there’s any deeper underlying issue that caused me to get sick, anyway!

The bad news is that while the procedure itself was shorter and more-bearable than I’d expected, the recovery’s been a real drag. A week later, it still hurts a lot to urinate (although I’ve stopped yelping out loud when I do so) and my crotch is still too sore for me to be able to cycle. I’ve also discovered that an errection can be painful enough to wake me up, which is definitely not the most-pleasant way I’ve been roused by a penis. But it’s getting better, day by day, and at least I know for sure that I’m more-or-less “right” in the renal system, now.

A sterile pot full of Dan Q's urine.× Ultrasound scan of one of Dan Q's kidneys.× A stream of urine pours down into a funnel.× A graphing printer describes Dan Q's urine flow. The 'flow rate' graph shows an initial peak, then a trough, then continues to a higher sustained peak.× Cystoscopy equipment, ready for insertion.× View up a urethra, from a cystoscope.×

The Bladder Monster

As I mentioned last week, I’ve been ill. For those who wanted the grisly details, well: here you go.

Warning: this blog post contains frank subjective descriptions of the symptoms of slightly-icky medical conditions including photographs. It’s probably safe for all audiences, but you might not want to be drinking anything while you read it.

The trouble began, I suppose, about a month and a half ago, when a contracted what seemed to be a minor urinary tract infection. If you’re a woman then, statistically-speaking, I probably don’t need to tell you what that is, but for the benefit of the men: it’s what happens when bacteria (or, sometimes, a fungus or virus) infects the renal system: the kidneys, bladder, ureters, and especially the urethra. It’s not pleasant: it gives you the feeling of needing to pee the whole time, makes it harder to pee, and – when you do – it feels a little bit like you’re piss is made of lava.

Microscope view of infected urine.
This urine contains white blood cells (the big circles) and bacteria (the tiny ‘wormlike’ things). Healthy urine contains little to none of these. Anybody else feel like they’re playing Spore?

Despite it not being common for men (more on that later), I’ve had mild UTIs on a couple of occasions in my life, and I’d always found that ensuring that I got plenty of water and a full RDA of vitamin C was more than enough to make it clear up all by itself within a couple of days. So that’s what I started doing. But then things took a turn for the worse: I started getting a stabbing pain in my left kidney. Recognising this as being pyelonephritis, I went to the doctor who prescribed me a course of the antibiotic ciprofloxacin. Within a couple of days I was feeling right as rain (of course I continued to finish the course of drugs, although I was interested to see that that advice is starting to become controversial).

Dan and Annabel have a picnic in the park.
Happy, healthy, and out for a picnic.

Naturally I was a little disappointed when, the week before last, I started getting UTI-like pain again, followed very swiftly this time by pain in my bladder that constantly felt a little like I was recovering from being punched. Back to the doctor I went, where (after the usual tests to work out what the most-likely best-antibiotic to use was) I was prescribed a course of nitrofurantoin. I’d never had this particular drug before, and it wasn’t initially clear which of the escalating ill-effects I was experiencing were symptoms of the infection and which were side-effects of the medication: it started with joint pain, then nausea, then diarrhoea, then a full-on fever. It was at the point that I was fully-clothed in bed, running a temperature and soaked in sweat but still feeling cold and shivering that Ruth called 111, who told her to take me to A&E.

(Which, like her care for me in general, she did fabulously well, except for a little bit where she sort-of ran me over in the car park of the hospital: thankfully some friendly paramedics were standing around and were able to drag me into the building. Anyway, I don’t have much memory of that bit and I certainly don’t have any amusing photos, so I’ll skip over it.)

Dan, shortly before inpatient admission but already recovering from the worst parts of his hospital visit, last week.
Feverish to the point of delirium, I don’t have much recollection of the first few hours(?) in the hospital. But I was alert enough to request that a photo was taken for the inevitable blog post. Ruth, however, insisted upon waiting until I apparently looked a lot less like I was about to die: so here it is!

A few tests later, the medical staff seemed confident that what I was experiencing was not an allergic reaction to the antibiotic (however, I see that they still made a note of it as a risk on my notes!) but was a progression of the infection, which seemed to have crossed over from the tissues of my renal system and into my bloodstream and was now generally causing havoc by attacking the rest of my body. They hooked me up to a drip of an intravenous antibiotic and kept me stocked with painkillers, then sent me up to the urology ward and set me up with a “bed” (urology mostly deals with outpatients, and so my ‘bed’ was actually a trolley, but they wanted to keep me close to the urologists in case of any complications).

The view from my hospital ward window: Oxford city is visible in the distance.
It was only the following morning, with the delirium passed, that I realised that I was on the sixth floor. Looking out of my window, I could just make out the spires of the Bodleian Library in the distance, so I dropped my coworkers an email to apologise for not being on my way there.

A consultant switched me to a week’s course of yet-another different antibiotic – co-amoxiclav – and recommended keeping me in for another night. Now, I think that co-amoxiclav is a really interesting drug, so I’m going to be a bit of a nerd and tell you about that for a bit (I promise we’ll get back to my health in a moment: if you don’t want the science bit, just scroll past the diagrams to the next photo).

Amoxicillin, with lactam ring highlighted.
This is amoxicillin. I’ve highlighted in blue the lactam ring, which is the important bit.

Co-amoxiclav is a mixture of two drugs. The first is the antibiotic amoxicillin. Amoxicillin belongs to a class of antibiotics (which includes penicillin) called β-lactams, which is the most-commonly used family of antibiotics. These antibiotics contain a four-point lactam ‘ring’ (highlighted in blue above), and the way that they work is that this part of the molecule bonds with a particular protein common to all gram-positive bacteria. Normally this protein is responsible for producing peptidoglycan, which is an essential ingredient in the cell walls of these kinds of bacteria, but when it gets locked to a β-lactam ring it stops working. As a result, when the bacterium reproduces the new child doesn’t have a proper cell wall, and can’t survive long in even the least-hostile environments.

Of course, we’re in a medical arms race right now because some of the bacteria which we’re targetting with antibiotics are becoming resistant. And here’s one what that they’re doing so: some of these bacteria have evolved to produce beta-lactamase, also bonds with beta-lactam rings, adding an OH to them and making them useless. Bummer, eh?

Clavulanic acid, with beta-lactam ring highlighted in blue.
And this is clavulanic acid. Recognise that shape on the left-hand side of the molecule (highlighted in blue)? Yup: it’s another lactam ring.

The second drug in co-amoxiclav, then, is clavulanic acid, which was discovered in the 1970s and started being added to drugs in the 1980s. Despite having a β-lactam ring (as you’ll see in blue above), clavulanic acid by itself it isn’t an effective antibiotic (for reasons I can’t quite get my head around – anyone want to help me?). But what it’s great at is bonding that lactam ring to beta-lactamase, thereby deactivating the bacterial counter-offensive and allowing the amoxicillin to carry on working, combating resistance.

So what you’ve got in co-amoxiclav is a an antibiotic and a chemical that counteracts the effects of a chemical that deactivates that antibiotic. Wow! It’s things like this that really make me wish I had a brain for biology!

A cannula in the back of Dan's hand.
These things aren’t terribly comfortable when you’re trying to sleep.

I was eventually discharged from hospital and released to go home for lots of bed rest and water, along with a further week’s course of co-amoxiclav. Unfortunately it turns out that I’m one of the unlucky folks for whom amoxicillin makes me dizzy, so I spent most of that week lying down in-between wobbly vertigo-filled trips to and from the bathroom. But it worked! Within a few days I was feeling much better and by the end of last week I was able to work from home (and actually feel like I was useful again!).

Free of symptoms and off the drugs, I returned to work properly on Monday morning and everything seemed fine. Until, late in the morning, I went to the bathroom and started pissing blood.

A kitten lying on its side.
I took a picture, but it’s too grim even for this blog post. Here, have a kitten instead. Do an image search for ‘gross haematuria’ if you want a clue: the kitten will still be waiting here when you need it.

Now apparently blood in your urine, while horrifying when it happens to you unexpectedly, isn’t actually a sign of a medical emergency. I was starting to get bladder pain again, quite intensely, so I excused myself from work and called the urology ward, who decided that I wasn’t in bad enough a condition to go and see them but sent me straight to my GP, who gave me another fortnight’s worth of co-amoxiclav. They’re monitoring my progress with urine and blood samples and if by Friday it’s not having an impact, they’re going to want to send me back to hospital (hopefully only as an outpatient) and pump me full of the intravenous stuff again. So… fingers crossed for a good result out of these drugs.

Co-amoxiclav tablet in packaging.
My co-amoxiclav tablets each come individually wrapped in a nitrogen-filled foil bag. I’ve no idea what it is that they’re concerned that they’ll react with, but I’m eating three of them a day anyway.

I was hoping that by this point I’d be writing this blog post and telling you all about how I’d fought the bladder monster and won. But it looks like I won’t be able to claim that victory for another week or two, yet. All I know is that I searched for “bladder monster” and found this. Yeah: that feels about right.

Microscope view of infected urine.× Dan and Annabel have a picnic in the park.× Dan, shortly before inpatient admission but already recovering from the worst parts of his hospital visit, last week.× The view from my hospital ward window: Oxford city is visible in the distance.× Amoxicillin, with lactam ring highlighted.× Clavulanic acid, with beta-lactam ring highlighted in blue.× A cannula in the back of Dan's hand.× A kitten lying on its side.× Co-amoxiclav tablet in packaging.×

Calculating Pi (when you’re ill)

So, I’ve not been well lately. And because a few days lying on my back with insufficient mental stimulation is a quick route to insanity for me, I’ve been trying to spend my most-conscious moment doing things that keep my brain ticking over. And that’s how I ended up calculating pi.

Dan, shortly before inpatient admission but already recovering from the worst parts of his hospital visit, last week.
When I say I’ve been unwell, that might be an understatement. But we’ll get to that another time.

Pi (or π) is, of course, the ratio of the circumference of a circle to its diameter, for every circle. You’ll probably have learned it in school as 3.14, 3.142, or 3.14159, unless you were one of those creepy kids who tried to memorise a lot more digits. Over the years, we’ve been able to calculate it to increasing precision, and although there’s no practical or theoretical reason that we need to know it beyond the 32 digits worked out by Ludolph van Ceulen in the 16th Century, it’s still a fascinating topic that attracts research and debate.

Graph illustrating the calculation of digits of pi over the millenia. Note the logarithmic scale on the left and the staggered scale on the bottom axis.
Our calculation of pi has rocketed since the development of the digital computer.

Most of the computer-based systems we use today are hard to explain, but there’s a really fun computer-based experimental method that can be used to estimate the value of pi that I’m going to share with you. As I’ve been stuck in bed (and often asleep) for the last few days, I’ve not been able to do much productive work, but I have found myself able to implement an example of how to calculate pi. Recovery like a nerd, am I right?

A "pi pie", from a Pi Day celebration.
Pi goes on forever. Pie, sadly, comes to an end.

Remember in school, when you’ll have learned that the formula to describe a circle (of radius 1) on a cartesian coordinate system is x2 + y2 = 1? Well you can work this backwards, too: if you have a point on a grid, (x,y), then you can tell whether it’s inside or outside that circle. If x2 + y2 < 1, it’s inside, and if x2 + y2 > 1, it’s outside. Meanwhile, the difference between the area of a circle and the area of a square that exactly contains it is π/4.

A circle of radius 1 at the intersection of the axes of a cartesian coordinate system.
Think back to your school days. Ever draw a circle like this? Do the words “Cartesian coordinates” ring any bells?

Take those two facts together and you can develop an experimental way to determine pi, called a Monte Carlo method. Take a circle of radius 1 inside a square that exactly contains it. Then randomly choose points within the square. Statistically speaking, these random points have a π/4 chance of occurring within the circle (rather than outside it). So if we take the number of points that lie within the circle, divide that by the total number of points, and then multiply by 4, we should get something that approaches the value of pi. You could even do it by hand!

Output of Dan's demonstration of the Monte Carlo method as used to approximate the value of pi.
I wrote some software to do exactly that. Here’s what it looks like – the red points are inside the circle, and the black points are outside.

The software illustration I’ve written is raw JavaScript, HTML, and SVG, and should work in any modern web browser (though it can get a little slow once it’s drawn a few thousand points!). Give it a go, here! When you go to that page, your browser will start drawing dots at random points, colouring them red if the sum of the squares of their coordinates is less than 1, which is the radius of the circle (and the width of the square that encompasses it). As it goes along, it uses the formula I described above to approximate the value of pi. You’ll probably get as far as 3.14 before you get bored, but there’s no reason that this method couldn’t be used to go as far as you like: it’s not the best tool for the job, but it’s super-easy to understand and explain.

Oh, and it’s all completely open-source, so you’re welcome to take it and do with it what you wish. Turn off the graphical output to make it run faster, and see if you can get an accurate approximation to 5 digits of pi! Or slow it down so you can see how the appearance of each and every point affects the calculation. Or adapt it into a teaching tool and show your maths students one way that pi can be derived experimentally. It’s all yours: have fun.

And I’ll update you on my health at some other point.

Dan, shortly before inpatient admission but already recovering from the worst parts of his hospital visit, last week.× Graph illustrating the calculation of digits of pi over the millenia. Note the logarithmic scale on the left and the staggered scale on the bottom axis.× A "pi pie", from a Pi Day celebration.× A circle of radius 1 at the intersection of the axes of a cartesian coordinate system.× Output of Dan's demonstration of the Monte Carlo method as used to approximate the value of pi.×

Guess where I woke up this morning, MegaMasons?

This link was originally posted to /r/MegaMasonsLounge. See more things from Dan's Reddit account.

The original link was: http://i.imgur.com/vUxVG6Z.jpg

Dan in hospital

So yeah: that’s not entirely pleasant. A couple of days ago I was diagnosed with what was supposed to be a minor bladder infection and given antibiotics. Then yesterday I became feverish and collapsed. And now I’m in hospital.

But on the upside, they’ve spent all night pumping me full of some kind of intravaenous antibiotic that must be made from like unicorn spunk and leprechaun tears or something because it’s frankly magical: feeling so much better today than yesterday.

Just wanted to say hi. Hi, all!

“Uncle Dan”

A week ago, Ruth pushed a baby out of her body, completely upstaging my birthday and, incidentally, throwing all of our lives pretty much into chaos. Having gotten to the point at which she’d resigned herself to “being pregnant forever“, Ruth would have certainly been glad to have that stage over and done with, were it not for a long and painful labour followed by a torturous and exhausting birth.

Dan, Ruth, JTA and 'Tiny' in the delivery suite of the hospital.
If Ruth looks like she’s about to die of exhaustion in this photo, that’s because that’s how she’s feeling.

There’s a lot that can be said about the labour: a 38-hour crescendo of Ruth gradually and repeatedly finding levels of pain and tiredness that each seemed impossible, until she reached them. But Ruth has suggested that she might like to write a little about it herself, so I shan’t steal her limelight. What I can say is that I didn’t – and I don’t think that JTA, either – appreciate quite how emotionally draining the experience would be for the two of us, as well. There was a strange sensation for me about twelve hours in: a sensation perhaps most-comprehensible by our friends who’ve done emotional support work. That was: after watching somebody I love so much suffer so greatly for so long, I felt as if I’d somehow begun to exhaust whatever part of my brain feels empathy. As if the experience of supporting Ruth had served to drain me in a way I’d never fully experienced before, like when you discover a muscle you didn’t know you had when it aches after an unusual new exercise.

Forcep-marks still visible, the newborn takes an extended nap in a crib alongside Ruth's recovery-bed.
Forcep-marks still visible, the newborn takes an extended nap in a crib alongside Ruth’s recovery-bed.

Of course, after the ordeal we got to take home a little bundle of joy, who continues – despite now having a perfectly fabulous name of her own – to be referred to as “tiny”, even though her birth weight of 8lbs 12oz (that’s about 4kg, for those who – like me – prefer to think in metric) doesn’t really make that a very fitting nickname! Nor the amount of damage she did to Ruth on the way out, which also might be ill-described as “tiny”! She’s also often referred to as “the poopmachine”, for reasons that ought not need spelling out.

Dan, sitting in the sunlight, rocking the baby.
I’m smiling, because I don’t yet know that, within seconds of this photo being taken, she’s about to fill her nappy.

My employer was kind enough to give me paternity leave, even though I’m not the biological father (JTA is; and he’s very-much still in the picture!). I’d looked at my contract and discovered that the wording seemed to imply that I was eligible, stating that I’d be permitted to take paternity leave if I was about to become a father, or if my partner was about to give birth, the latter of which seemed perfectly clear. To be certain, I’d wandered along to Personnel and explained our living arrangement, and they just had looks on their faces that said “we’re not touching that with a barge pole; let’s just err on the side of giving him leave!” As a result, we’ve had all hands on deck to help out with the multitudinous tasks that have suddenly been added to our lives, which has been incredibly useful, especially given that Ruth has been spending several days mostly lying-down, as she’s been recovering from injuries sustained during the delivery.

Tiny in front of the new beta version of Three Rings.
If only we had some kind of way to set up a web-based rota of feeding, changing and comforting the little one…

Despite everything, we and the rest of the Three Rings team still managed to push the latest version into testing on schedule, though fitting in time for bug-fixing is even harder than it would be were we at our “day jobs” during the daytimes! It’s not that our little poopmachine takes up all of our time, though she does seem to take a lot of it, it’s simply that we’re all so tired! For the last few nights she’s been fussy about sleeping, and we’ve all lost a lot of rest time over keeping her fed, clean, and feeling loved.

Ruth snuggles with her baby.
Who loves boob? Baby does! Also, everybody else in the house.

For all my complaining, though, what we’ve got here is an adorable and mostly well-behaved little bundle of joy. And when she’s not covered in poop, shouting for attention, or spitting milk all over you, she’s a little angel. And I’m sure you’ll all be sick of hearing about her very soon.

Dan, Ruth, JTA and 'Tiny' in the delivery suite of the hospital.× Forcep-marks still visible, the newborn takes an extended nap in a crib alongside Ruth's recovery-bed.× Dan, sitting in the sunlight, rocking the baby.× Tiny in front of the new beta version of Three Rings.× Ruth snuggles with her baby.×

The Snip, Part 2

This is the second part of a three-part blog post about my vasectomy. Did you read the first part, yet?

My vasectomy was scheduled for Tuesday afternoon, so I left work early in order to cycle up to the hospital: my plan was to cycle up there, and then have Ruth ride my bike back while JTA drove me home. For a moment, though, I panicked the clinic receptionist when she saw me arrive carrying a cycle helmet and pannier bag: she assumed that I must be intending to cycle home after the operation!

The Elliot-Smith Clinic. Picture copyright Google Street View.
The Elliot-Smith Clinic lives in an old prefab building buried at the back end of the hospital campus. If you think it looks scary in this picture, imagine what it’s like when it’s dark and you’re going there to be stabbed in the genitals.

It took me long enough to find the building, cycling around the hospital in the dark, and a little longer still to reassure myself that this underlit old building could actually be a place where surgery took place.

My tweet: "Arrived at vasectomy clinic. It's the most well-hidden, badly-lit, shady-looking building I've ever seen on a hospital campus."
My tweet upon arriving at the clinic.

Despite my GP‘s suggestion to the contrary, the staff didn’t feel the need to take me though their counselling process, despite me ticking some (how many depends primarily upon how you perceive our unusual relationship structure) of the “we would prefer to counsel additionally” boxes on their list of criteria. I’d requested that Ruth arrive at about the beginning of the process specifically so that she could “back me up” if needed (apparently, surgeons will sometimes like to speak to the partner of a man requesting a vasectomy), but nobody even asked. I just had to sign another couple of consent forms to confirm that I really did understand what I was doing, and then I was ready to go!

I’d shaved my balls a few days earlier, at the request of the clinic (and also at Matt‘s suggestion, who pointed out that “if I don’t, they’ll do it for me, and I doubt they’ll be as gentle!” – although it must be pointed out that as they were already planning to take a blade to my junk, I might not have so much to worry about), which had turned out to be a challenge in itself. I’ve since looked online and found lots of great diagrams showing you which parts you need to shave, but the picture I’d been given might as well have been a road map of Florence, because no matter which way up I turned it, it didn’t look anything like my genitals. In the end, I just shaved all over the damn place, just to be sure. Still not an easy feat, though, because the wrinkled skin makes for challenging shaving: the best technique I found was to “stretch” my scrotum out with one hand while I shaved it with the other – a tricky (and scary) maneuver.

Where to shave before your vasectomy: front and side of the scrotum.
If I’d had a diagram like this, rather than an Italian street map, I might have stood a better chance of just shaving what I needed to shave.

After sitting in the waiting room for a while, I was ushered through some forms and a couple more questions of “are you sure?”, and then herded into a curtained cubicle to change into a surgical gown (over the top of which I wore my usual dressing gown). The floor was cold, and I’d forgotten to bring my slippers, so I kept my socks on throughout. I sat in a separate waiting area from the first, and attempted to make small talk with the other gents waiting there. Some had just come out of surgery, and some were still waiting to go in, and the former would gently tease the latter with jokes about the operation. It’s a man thing, I guess: I can’t imagine that women would be so likely to engage in such behaviour (ignoring, for a moment, the nature of the operation).

There are several different approaches to vasectomy, and my surgeon was kind enough to tolerate my persistent questions as I asked about the specifics of each part of the operation. He’d said – after I asked – that one of the things he liked about doing vasectomies was that (unlike most of the other surgeries he performs) his patients are awake and he can have a conversation while he worked, although I guess he hadn’t anticipated that there’d ever be anybody quite so interested as I was.

Warning: The remainder of this blog post describes a surgical procedure, which some people might find squicky. For the protection of those who are of a weak stomach, some photos have been hidden behind hyperlinks: click at your own risk. (though honestly, I don’t think they’re that bad)

With my scrotum pulled up through a hole in a paper sheet, the surgeon began by checking that “everything was where it was supposed to be”: he checked that he could find each vas (if you’ve not done this: borrow the genitals of the nearest man or use your own, squeeze moderately tightly between two fingers the skin above a testicle, and move around a bit until you find a hard tube: that’s almost certainly a vas). Apparently surgeons are supposed to take care to ensure that they’ve found two distinct tubes, so they don’t for example sever the same one twice.

Next, he gave the whole thing a generous soaking in iodine. This turned out to be fucking freezing. The room was cold enough already, so I asked him to close the window while my genitals quietly shivered above the sheet.

Next up came the injection. The local anaesthetic used for this kind of operation is pretty much identical to the kind you get at the dentist: the only difference is that if your dentist injected you here, that’d be considered a miss. While pinching the left vas between his fingertips, the surgeon squirted a stack of lidocaine into the cavity around it. And fuck me, that hurt like being kicked in the balls. Seriously: that stung quite a bit for a few minutes, until the anaesthesia kicked in and instead the whole area felt “tingly”, in that way that your lips do after dental surgery.

Pinching the vas (still beneath the skin at this point) in a specially-shaped clamp, the surgeon made a puncture wound “around” it with a sharp-nosed pair of forceps, and pulled the vas clean through the hole. This was a strange sensation – I couldn’t feel any pain, but I was aware of the movement – a “tugging” against my insides.

A quick snip removed a couple of centimetres from the middle of it (I gather that removing a section, rather than just cutting, helps to reduce the – already slim – risk that the two loose ends will grow back together again) and cauterised the ends. The cauterisation was a curious experience, because while I wasn’t aware of any sensation of heat, I could hear a sizzling sound and smell my own flesh burning. It turns out that my flaming testicles smell a little like bacon. Or, if you’d like to look at it another way (and I can almost guarantee that you don’t): bacon smells a little bit like my testicles, being singed.

Next up came Righty’s turn, but he wasn’t playing ball (pun intended). The same steps got as far as clamping and puncturing before I suddenly felt a sharp pain, getting rapidly worse. “Ow… ow… owowowowowow!” I said, possibly with a little more swearing, as the surgeon blasted another few mils of anaesthetic into my bollocks. And then a little more. And damnit: it turns out that no matter how much you’ve had injected into you already, injecting anaesthetics into your tackle always feels like a kick in the nuts for a few minutes. Grr.

  • The removed sections of my vas, on a tray (actually mine)
    You can see the “kink” in each, where it was pulled out by the clamp. Also visible is the clamp itself – a cruel-looking piece of equipment, I’m sure you’ll agree! – and the discarded caps from some of the syringes that were used.

The benefit of this approach, the “no-scalpel vasectomy”, is that the puncture wounds are sufficiently small as to not need stitches. At the end of the surgery, the surgeon just stuck a plaster onto the hole and called it done. I felt a bit light-headed and wobbly-legged, so I sat on the operating table for a few minutes to compose myself before returning to the nurses’ desk for my debrief. I only spent about 20 minutes, in total, with the surgeon: I’ve spent longer (and suffered more!) at the dentist.

"Happy Vasectomy" card from Liz and Simon
Later, I would receive this “Happy Vasectomy” card from Liz and Simon. Thanks, guys!

By the evening, the anaesthetic had worn off and I was in quite a bit of pain, again: perhaps worse than that “kick in the balls” moment when the anaesthetic was first injected, but without the relief that the anaesthetic brought! I took some paracetamol and – later – some codeine, and slept with a folded-over pillow wedged between my knees, after I discovered how easy it was to accidentally squish my sore sack whenever I shifted my position.

The day after was somewhat better. I was walking like John Wayne, but this didn’t matter because – as the nurse had suggested – I spent most of the day lying down “with my feet as high as my bottom”. She’d taken the time to explain that she can’t put a bandage nor a sling on my genitals (and that I probably wouldn’t want her to, if she could), so the correct alternative is to wear tight-fitting underwear (in place of a bandage) and keep my legs elevated (as a sling). Having seen pictures of people with painful-looking bruises and swelling as a result of not following this advice, I did so as best as I could.

Today’s the day after that: I’m still in a little pain – mostly in Righty, again, which shall henceforth be called “the troublesome testicle” – but it’s not so bad except when I forget and do something like bend over or squat or, I discovered, let my balls “hang” under their own weight, at all. But altogether, it’s been not-too-bad at all.

Or, as I put on my feedback form at the clinic: “A+++. Recommended. Would vasectomy again.”

(thanks due to Ruth, JTA, Matt, Liz, Simon, Michelle, and my mum for support, suggestions, and/or fetching things to my bed for me while I’ve been waddling around looking like John Wayne, these past two days)

The Elliot-Smith Clinic. Picture copyright Google Street View.× My tweet: "Arrived at vasectomy clinic. It's the most well-hidden, badly-lit, shady-looking building I've ever seen on a hospital campus."× Where to shave before your vasectomy: front and side of the scrotum.× "Happy Vasectomy" card from Liz and Simon×

The Snip, Part 1

I’d like to start with a joke:

Is there a difference between men and women?

Yes! There’s a vas deferens.

What’s no joke, though, is the human population explosion. There’re just too damn many of us, as I explained last year. That’s the primary reason behind my decision, held for pretty-much the entirety of my adult life, to choose not to breed.

World population for the last 12,000 years.

I’m fully aware that the conscious decision to not-breed by a single individual – especially in the developed world – makes virtually no difference to the global fate of humanity. I’m under no illusion that my efforts as a vegetarian are saving the world either. But just like the voter who casts a ballot for their party – even though they know it won’t make a difference to the outcome of the election – I understand that doing the right thing doesn’t necessarily have to have a directly quantifiable benefit.

Somehow, this delicious-looking BLT makes an appearance almost any time I talk about overpopulation or vegetarianism. This is the fifth time.
Somehow, this delicious-looking BLT makes an appearance almost any time I talk about overpopulation or vegetarianism. This is the fifth time.

That’s why I’m finally taking the next obvious step. Next month, after literally years of talking about it, I’m finally going to put my genitals where my mouth is (hmm… maybe that wasn’t the best choice of words)! Next week, I’m getting a vasectomy.

The "F" is for "Fuck me you're going to put a scalpel WHERE?"
The “F” is for “Fuck me you’re going to put a scalpel WHERE?”

I first asked a doctor about the possibility of vasectomy about a decade ago. He remarked upon my age, and said – almost jokingly – “Come back in ten years if you still feel the same way!” I almost wish that I still had the same GP now, so that I could do exactly that. Instead, I spoke about a year ago to my (old) GP here in Oxford, who misled me into thinking that I would not be able to get the surgery on the NHS, and would have to have it done privately. Finally, a second doctor agreed to sign off their part of the consent form, and I was good to go. The secret, it seems, is persistence.

I suppose I'll be eligible for a Golden Snip Award. Click through for more information.
I suppose I’ll be eligible for a Golden Snip Award. Click through for more information.

I’m sure that this is a decision that won’t be without it’s controversies. And believe me: over the course of the most-of-my-life-so-far that I’ve hinted at or talked about doing this, I’m pretty sure I’ve heard all of the arguments. Still: I feel like I ought to pick up on some of the things I’ve heard most-often –

"Breeder Bingo" card. Complete a line, get a free case of contraceptives!
“Breeder Bingo” card. Complete a line, get a free case of contraceptives!

What if you change your mind?

Even despite medical advances in recent decades in vasectomy reversal, vasectomy should still be considered a “one way trip”. Especially when I was younger, people seemed concerned that I would someday change my mind, and then regret my decision not to spawn children.

I suppose that it’s conceivable – unlike my otherwise potential offspring – but it’s quite a stretch, to believe that I might someday regret not having children (at least not biologically: I have no problem with adopting, co-parenting, fostering, or any number of other options for being involved in the upbringing of kids). I honestly can’t see how that’d come about. But even if we do take that far-fetched idea: isn’t it equally possible that somebody might ultimately regret having children. We take risks in our lives with any choice that we make – maybe I’ll someday regret not having taken my degree in Law or Chemistry or Rural Studies. Well then: c’est la vie.

Do you just not like children?

Children are great, and I’d love to get the chance to be involved in raising some. However, I don’t define myself by that wish: if I never have the opportunity to look after any kids, ever, then that wouldn’t be the worst thing in the world: I’d just spend my years writing code in a house full of cats. I have no doubt that raising children is great (for many people), but just like there are plenty of people for whom it’s not great, there are also plenty of people – like me – who could be happy either way. No biggie!

There are those who have said that this laid-back “take it or leave it” approach, especially when coupled with the more-recent act of rendering myself infertile, will make me less attractive to women. Leaving aside the implicit sexism in that claim, wouldn’t a fair retort be to point out that a woman who is looking for monogamous breeding probably isn’t my “type” to begin with!

But if only we could make sure only the RIGHT people breed...
But if only we could make sure only the RIGHT people breed…

But you should be breeding?

This argument’s usually based on the idea that I’m somehow genetically superior and that my children wouldn’t be such a strain on the world as somebody else’s, or that mine would have a significantly better-than-average chance of curing cancer, solving world hunger, or something.

The explosion of planet Earth.
Only sterilisation can prevent the detonation of the planet. Maybe.

And let’s face it, any child of mine would be just as likely to be the one to build a really big bomb. Or create a super-virus. Or just engineer the collapse the world’s economies into a prehistoric barter economy in a technophobic future anarchy. Attaboy.

In any case, I’m pretty sure that my personal contribution to the betterment of the world ought not to be a genetic one. I’d like to make a difference for the people who are around right now, rather than hypothetical people of the future, and I’d far rather leave ideas in my wake than a handful of genes. I’m sure that’s not the case for everybody, but then – it doesn’t have to be.

How about a vasectomy? (comic)
It takes balls to have a vasectomy. Literally.

Or are there some arguments that I’ve missed? If you’re among the folks who feel really strongly about this, then you’ve got about seven days to make them, and then it’s off to the clinic for me! Just remember: what’s right for me isn’t necessarily what’s right for you, and vice-versa. Just because I use Emacs doesn’t mean that some other, inferior text editor might not be the right choice for you.

I wonder what my surgeon might say to the possibility of me live-tweeting the process? Would anybody be interested? (I promise not to include any photos.)

(with thanks to Nina Paley for permission to use the comics)

× Somehow, this delicious-looking BLT makes an appearance almost any time I talk about overpopulation or vegetarianism. This is the fifth time.× The "F" is for "Fuck me you're going to put a scalpel WHERE?"× "Breeder Bingo" card. Complete a line, get a free case of contraceptives!× But if only we could make sure only the RIGHT people breed...× The explosion of planet Earth.× How about a vasectomy? (comic)×