Simple State Machines and Other Things I Have Learnt

Posted on Tue 27 December 2011 in general

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 ;-)

  1. 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.

  1. 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.