Where am I? I’m repairing my shared event-dispatching system….

So, it turns out that the whole shared event bus concept is totally old-hat. And I don’t mean Java 1.0 old-hat, I mean some time between the primordial slime and the first organisms that had cells that weren’t all identical.

Disclaimer: the following is an analogy and my biology knowledge is sketchy.

Most interesting creatures, including humans, use hormones to allow decoupled systems (organs and stuff) to respond to changes in each others’ state. The shared event bus is your blood stream, and the hormones are the events. Some parts of the body monitor state – hydration, blood sugar, sodium levels, infection markers … – and when they detect that the system is going out of whack they release those little event hormones in appropriate quantities. Other organs listen for those hormone events and then react accordingly.

In some cases the listener is even double-decoupled (a phrase I have liked for a long time). For example the hypothalmus releases one hormone event, the pituitary picks up that event, considers it in the presence of a few others and releases another hormone event, and then the kidneys, adrenal glands and many other organs get busy in response. And sometimes they even release another hormone event that – say – the pancreas is totally interested in.

At least that’s the idea.

Unfortunately my shared event dispatching system is borked.

My key event dispatcher has stopped dispatching some important events, and some of the organs got so bored of never hearing anything of interest to them that they’ve tuned out (or actually decayed).

This means that all those automagic processes that the body takes care of without us even noticing – balancing fluids, electrolytes, blood sugar, immune response, wakefulness and so much more – aren’t automagic anymore. In a nutshell I have a kind of “diabetes of all the things”, known as Addison’s.

The joy of the reproducible bug

The good thing about the diagnosis is that after several months – or maybe even several years – of bizarre and seemingly random errors (crazy stuff like stopping breathing in response to a cold drink), we’ve finally tracked down the problem to a core bug, and it’s reproducible! Of course the borked-build is already installed, but it can still be patched. Phew!

The patch consists of me, a set of drugs, a handful of gadgets that measure stuff and the willingness to manually monitor and control systems that we normally expect to be automatic. Basically, I have to dispatch my own events. Mostly just by swallowing pills but sometimes by injecting myself deep into muscle or direct into a vein (which some teenage version of me thinks is kind of fun).

The patch also requires enormous amounts of support from my GP, diabetes nurse, endocrinologist, endo nurses, pharmacist and the NHS in general, who collectively saved my life in March when I was much closer to blue-screening than any of us had realised. The fact that I get all of this care without ever being asked whether I’d like to pay by cash or card, is amazing.

I’m not quite at beta version of Stray 2.0 yet, but I’m getting there, agile style, one new use-case at a time.

So – there you have it, my quietness – and indeed my exit from the Robotlegs team, though I didn’t know it at the time, I just knew that I didn’t have the energy for everything on my plate – is all down to my need to master this manual event-dispatching business. As most of team try{harder} said – “shoulda used Signals!”

 

 

 

About the Author

I'm an actionscript programmer living and working in a tiny village in the Yorkshire Dales, UK. I used to be a TV reporter, but my inner (and often outer) geek won. I also write stuff. Most recently Head First 2D Geometry.

Visit Stray's Website

Share the post

Delicious It Digg this! Stumble this! Share on Reddit Share on Buzz Share on FriendFeed
  • http://alecmce.com Alec McEachran

    I’m so sorry to hear about your Addison’s, Stray. Of course, I’m also impressed and heartily amused that you are able to express it so elegantly in coding terms! Good luck, and my very best wishes to you both. Alec x

    • http://www.xxcoder.net Stray

      Thanks Alec – and Helen says thanks too – she has been through the wringer a bit, often having more awareness of how scary things were than I did. Obviously my next personal project is an Addison’s app for tracking it all and data mining for the patterns I don’t notice :) I hope you’re both thriving, Stray x

  • http://www.newtriks.com/ newtriks

    Stray you’re one tough lass it has to be said! To go through all of that and come out the other side with such an admirably positive outlook on the future deserves the highest props. I am glad its finally been pigeon holed so you can now keep on top of your health. Love to you and Helen x

    • http://www.xxcoder.net Stray

      Thanks Si! I’m not sure I’ve felt very tough – one of the first symptoms of low cortisol is excessive weepiness! But we’re very relieved to have an answer, especially one that is treatable without me having to go to the butchers and get pig and cow adrenal glands to mush up (yes, really, that was the only treatment until about the 1950s). Love to you and yours too – apparently there are Addison’s dogs – I think Ruby might be one already as she alerted H to me being in serious trouble a couple of times in the run up to diagnosis. x