Simple State Machines and Other Things I Have Learnt

We’ve just returned from 3 days at Fliss’ Mum’s house. Although we are still fairly sleep deprived things were made a lot easier by the presence of aunts and grandmothers who offered to take turns tending to the baby. This included one of those rarest of things, time for the two of us spend together without any other distractions. My life has now been reduced to a fairly simple state machine. There are predominantly 3 activities, for now ignoring the fourth: “At Work” which won’t kick in until the 10th.

1. Checking baby is happy

This involves running though a fairly simple set of checks. Is the baby too hot or cold? Is the baby clean? Is the baby hungry?

I have to confess I have quickly developed the parental habit of sniffing around the crotch area of the baby. It is so far the fastest and most effective way of telling if a change is required.

Ursula is starting show interest in things so occasionally the correct action is just to walk around a bit so she can look at new stuff. I have no idea how her brain is assimilating all the knowledge of corners and ceilings (being areas of contrast she can make out) but it could possibly point to a future career as a engineer ;-)

2. Checking Mummy is happy

Invariably the baby’s internal state eventually resolves to “Hungry” which requires it to be passed to Mum for feeding. Although we have been expressing and trying bottle feeds at the moment she gulps way to fast and invariably throws most of it up after the feed. So far we have found feeding “at source” is generally the most effective. However it does tend to immobilise Mum while she feeds so it falls to me to fetch and carry to ensure as many useful things are within reach when required.

3. Do everything else

The general order being cleaning, preparing food, household chores and finally if I’m lucky something else. Last night I did get a few hours to play through some of the latest CoD which Santa delivered over Christmas. I do harbour some hope of doing some recreational coding over the next few days although my start-up latency is so high that the state machine is often reset before I get into anything worthwhile.

The last few weeks have thrown up a few more interesting discoveries though. One of the more recent ones is that white noise is very restful for babies. We’ve managed to extend naps in the stroller/bassinet from around 5 minutes to up to 45 minutes by running a white noise app on the phone. My favourite Android app so far is Chromadoze which lovely little ope source app with a rather funky main display for setting the frequency balance of the noise. If I get a chance I may have a play at adding some features more aimed at soothing babies.

What big eyes you have

We’ve had Ursula at home for over a week now and are slowly getting into the swing of this parenting malarkey. So far we’ve nicknamed her “Trufflehog” after the manner she searches for the breasts when she’s hungry which seems to basically be when she’s awake. We are getting a growing amount of the “Quiet Attentive” awake state though. Her fascination is mainly with areas of contrast which to us mainly seems to be corners of the room. I’m not sure how much is down to baby face morphology but one comment that keeps coming up is how big her eyes are. Although I’m bound to be an overly proud Dad I’m fairly sure she’s already starting to track objects and points in space. You can play an interesting game carrying her around being guided by the position of her head. A head she seems to be able to keep upright most of the time by herself although she still hasn’t mastered the art of pushing up when on the play-mat.

As she is currently not self-propelling the day to day handling is fairly simple. However preparation is the key to success here:

I’m sure all too soon she will become self-propelling and then our lives will become a lot less sedentary. In the meantime we are feeling quite pleased having made it out of the house several times. We’ve managed a brief trip into town, a tea-morning and a couple of trips to the pub. Ursula certainly seems to be happy to drop off when ever she is put in the car seat and driven anywhere. This tendency also translates to the car seat being “fitted” to the shopping trolley.

One area we have struggled with is the pram cot which she doesn’t like at all – tending to kick and scream while at the same time divesting herself of the layers of warm blankets to shield her from the environment. While wheelies seem to briefly calm her down it’s not a long term practical solution. I wonder if she is developing Minbari sleeping habits?

As it has been almost impossible to get her to sleep in the mosses basket we’ve already taken our first major parenting decision to keep her in the bed with us. It has improved on the amount of sleep we actually get and it makes feeding her fairly non-distracting. We do worry about the advice against co-sleeping but feel the size of the bed makes it a little more practical and we’ve developed fairly light sleeping habits quite quickly. The feedback from others has been interesting though, ranging from warnings about making a rod for our own backs later to encouragements to go with what works for us. At some point we’ll have to encourage her to sleep on her own but it’s a bridge we’ll cross later on when she’s sleeping longer hours.

I’ve been back to work a few days and have the next two to look forward to until I break for Christmas. I’m already looking forward to what month 2 brings. I’m hoping just a little more sleep and a lot more activity from Ursula.

New Family Unit, Some Assembly Required.

I brought Fliss and Ursula home on Monday morning so we now have a complete family unit at home. We didn’t do much on Monday apart from appreciate being back in the house with all the attendant creature comforts. Tuesday didn’t involve much either but we had both sides of the family visit in the afternoon for a little celebratory drink. So far Wednesday’s most taxing task has been a trip to the doctors for a jab for Fliss. We are literally taking baby steps in building up our baby wrangling confidence.

To be fair to Ursula she’s not overly demanding as of yet. If she’s awake she is generally hungry (and/or in need of changing) otherwise she sleeps a lot. Today we got the first glimpses of a growing interest in the rest of the world, but mainly it’s the eating and sleeping that keeps us occupied. It’s a good design feature because they are fairly uncomplicated needs to fulfil when operating on a reduced sleep cycle. Still it felt like a small victory to have had a few hours of sleep each last night.

Tomorrow we may tackle the immense task of visiting town to obtain some heavily engineered mammary holders. Before that I need to work out exactly what the minimum functional travelling baby bag is.

Light at the end of the tunnel

Ursula is quite possibly the healthiest baby that has ever graced the Special Care Baby Unit at our local hospital. The sequence of events that led us there were more than a little concerning. As we were about to be discharged the midwife observed a leg twitch that didn’t look like the standard myoclonic twitch you expect with sleeping babies. This led to a summoning of the paediatric registrar followed by the consultant and her crash bag. At the time we wondered if it was just the hospital stalling our discharge as we were getting impatient to go home having been told the final blood test result was one hour away for several hours in a row.

There are a number of possible causes for these twitches, mostly neurological in nature with various infections including meningitis potentially acquired during the birth. After an examination the registrar assured us the most likely cause would be “just one of those things your baby does”. However they obviously wanted to rule out any of the other potential causes. Ursula was whisked up to the neo-natal intensive care unit and plugged up to various monitors and a cannula for monitoring and a series of tests. The experience was a little unsettling but the staff were very re-assuring and professional and obviously used to the shock that affects parents as their newborns get whisked into a room full of hospital beeps and alarms.

So far all the tests Ursula has been subjected to have come back negative. The only remaining possibility is meningitis for which the test involves a delicate lumbar puncture procedure. After 3 failed attempts (wriggly babies are very rarely compliant) they abandoned the notion. As a result the working assumption is it was caused by meningitis and Ursula needs to complete the anti-biotic course she has been on since she moved to the ICU. She has since been moved into the rather more sedate Special Care Baby Unit (less beeping, more space) where she continues to be a hungry, alert and otherwise very healthy baby.

Fliss was discharged on Wednesday and has been going through a bit of a hormonal roller-coaster as she comes home after spending the day feeding and reading to Ursula. However the end is in site and we hope to be bringing Ursula home on Monday evening (or possibly Tuesday morning) once she has finished her course of antibiotics.

The experience has been a little unsettling. It seems I’ve collected the “Parental Worry” trophy a bit earlier than I was planning. However I remain grateful to the professional NHS staff who have been taking care of our precious daughter where her health and not the cost of her care has been their top priority. Meanwhile I’ve been back to work for a few days so as not to burn all my paternity before the family is fully assembled at home.

Reaching escape velocity

The last few days have been frustrating. Every time we get ready to pack up and come home something comes up. First it was a bout of jaundice which needed seeing to. Now the pediatricians are being abundantly cautious about a twitch she has while she’s asleep. This has extended the sentence by at least another 48 hours which is really aggravating. Having a quite day or two to myself to potter and get the house ready is one thing, but at this rate I’ll have burnt all my paternity leave before my child gets home.

I feel bad for abandoning Fliss who keeps patiently sending me home to get another good nights sleep. I know it will be all right in the end but it’s definitely making me aggravated. I would like my family at home please!

Do the stars shine brighter tonight?

This was my thought as I unpacked the car tonight. It may have been the cold weather and clear skies though, it’s hard to be sure. I’m currently pottering around the house tidying up and preparing to welcome Ursula to the home tomorrow. I suspect my perspective may have altered in the last few days.

Lets start with the birth. As it approached it felt much like a late night after party when everything was getting a bit hazy. You know the sort, you’re sure someone said something profound but it’s been a very long night.

For a variety of totally mundane reasons it had taken us 28 hours to reach the d√©nouement of this particular hospital visit. I’ll spare the tedious details although I’ll happily give you the story as I remember it over a beer if you ask me in person. 28 hours is a long time to be awake and the sensation of transforming from the theoretical future parent to an actual real one is much akin to being launched off on a roller-coaster of unknown length and duration. I have now joined that biggest of shared clubs – hello my fellow breeders, I can talk about my child now ;-)

Picture of a newborn baby looking hungry

When I was ordered to bed the first night I excitedly blurted the news across the social media. I was worried I would bore my followers with parental ramblings before being reminded there are a lot of parents out there happy to share their experiences. I’ll be paying closer attention to what they say in the future on my journey to responsible adulthood.

I’ve ticked off a few things on my journey so far.

* My baby certainly didn’t look like Winston Churchill. I don’t know all those other parents cope ;-)
* Nappies aren’t really an issue, parental pragmatism kicks in pretty quickly.
* Nuzzling post-feed babies are indeed cute, even to a manly bloke like myself

I’m sure I am quickly acquiring the list of stereotypical parental behaviours. I get the sense it’s going to be a wild ride catching them all!

Edit with Emacs v1.10 released

I received a bunch of feedback and patches from my last announcement but I think all the outstanding bugs are now squashed. The edit-server.el has seen some love to make it more idiomatically correct for elisp. The main change is new code to handle editable DIV tags beloved of such sites as Google+ (which you are welcome to follow me on, maybe I should have an elisp circle?).

A big cosmetic change is a brand new settings page which looks less like a web-form from the early 90’s and more like part of Chrome. Alas I can take no credit for this but can thank Frank Kohlhepp’s fancy-settings library. In fact a lot of the credit should go to third party libraries like jQuery and of course the growing list of contributors who have submitted code for merging.

So the final changelog for 1.10 is:

Extension

* Ignore textareas marked as read only
* Don’t tag areas that are not visible
* General clean-up to use jQuery to find elements
* Explicit CSS for edit button to override page settings
* Handle editable DIV blocks (e.g. Google+)
* Optimise the finding of text areas for highly dynamic pages
* Revamp the settings page with “Fancy Settings”

edit-server.el

* Allow customisation of edit-server-default-major-mode
* Allow edit mode to be set by matched URL
* Tweak detection of MacOS X Emacsen
* Change behaviour of C-x C-s to save to kill-ring
* Persist the buffer-local variables beyond mode changes
* Setup keymap within defvar
* Clean-ups to code to be more idiomatic.

Call for testing for Edit with Emacs

I’ve been doing a bunch of house-keeping on Edit with Emacs recently in preparation for a new release. I can only apologise to those people who have submitted patches and merge requests for my tardiness. I’m afraid Real Life tm has been taking precedence.

As regular readers of the non-emacs sections of my blog will be aware my recreational coding time is about to be severely curtailed. As it’s been a while since the last release and a number of new features have been added it would be nice to get some wider testing. I therefor am hoping to elicit the help of the Emacs community to check out the code and give the tires a bit of a kick before I push out the final release to “the cloud”. I’d rather not regress behaviour for the 1917 users who get Edit with Emacs from the Chrome store just before I disappear into a haze of nappies and parental responsibilities. The current changes over the last release are:

Extension

* Ignore textareas marked as read only
* Don’t tag areas that are not visible
* General clean-up to use jQuery to find elements
* Explicit CSS for edit button to override page settings
* Handle editable DIV blocks (e.g. Google+)
* Optimise the finding of text areas for highly dynamic pages

edit-server.el

* Allow customisation of edit-server-default-major-mode
* Allow edit mode to be set by matched URL
* Tweak detection of MacOS X Emacsen
* Change behaviour of C-x C-s to save to kill-ring

Project Veg Patch

I noticed I haven’t posted anything this month about what’s going on in my life. Well as you can imagine the impending arrival of our first child has kind of glossed over everything else. I have not yet achieved a state of panic but it’s very firmly in the radar now. Although I’ve been taking it easy on the drinking (so as to help Fliss avoid the temptation) I’m now going fully dry as I’m on potential hospital driving duties.

It was nice to catch up with a bunch of people at Adam and Lou’s wedding last weekend. It more or less qualified as our last venture away from home for the foreseeable future. This weekend I spent a good deal of the time laying the excess turf from Project: Veg Patch over what used to pass for our front lawn. This of course means the main landscaping of the new “Vegetable” patch at the back of our property is now complete:

I have to admit most of the work at the back was contracted out including a my brother and his partner who did most of the work levelling, laying and building what will hopefully be a productive growing area. Still we are both very pleased with the outcome and hopefully the grass will take and we can concentrate on planting what will provide us with fresh food for the future family!

*ritchie=NULL;

Now the smoke has settled on the passing of Jobs I’d like to talk about a real computing hero of mine. Someone who literally has changed the world (at least for everyone reading this). I learnt last night that Dennis Ritchie had passed away. Without pioneers like Ritchie we wouldn’t have most of the computing infrastructure we have today.

When I was growing up in our computer filled house I learnt like many people playing with BASIC interpreters embedded into many of the early micro-computers. From there I started to learn about assembler and writing code that runs directly on the processor. However it wasn’t until I picked up my first copy of The C Programming Language (often just called K&R) I truly started my journey towards becoming a real programmer. Pretty much every procedural language since has borrowed from or been developed from the foundations of C. I still own a copy of the first edition which holds a honoured place on my computing bookshelf. It’s hard for me to imagine a better book to learn from for my first “proper” programming language.

C has been subjected to much criticism over it’s long history for being a source of many classic programmer errors. Non programmers may have even seen their computers complaining about a “NULL pointer de-reference” when a program goes bang. This is because the history of C was wrapped up in the need for a powerful low level language (“close to bare metal”) that allowed the development of powerful yet portable systems including the original UNIX which Richie was also involved in the development of. Without C/Unix there would have been no Objective-C, no NeXT and ultimately no Mac OS X which is important for much of the renaissance of Apple now enjoys.

If your looking for true pioneers of modern computing Dennis Ritchie is certainly among them. The world of computing has lost of it’s true innovators and one of my personal computing heroes.