The future is inching its way onto our set-top boxes

I have from time to time lamented the tardiness of media producers in getting content in-front of my eyeballs. It’s not a case of being tight with money, although giving Murdoch £30/month for a glut of programming I’ll never watch is *too much* for me. I’ll happily pay for the stuff I want to watch as long as I can watch it now on whatever device I happen to have to hand. Until it’s made that easy for consumers the pirates will keep winning by default.

There was an interesting quote from the boss of Netflix in a recent interview: “The goal is to become HBO faster than HBO can become us”. Netflix is moving from being just a content distribution company to a producer of content. And if they can create content as good as their new remake of House of Cards hopefully the days of production companies being tied to restrictive bundle contracts are numbered.

The fact that shows can be disconnected from the broadcast schedules also offers other compelling opportunities. The BBC recently aired a number of comedy sketch show pilots which we only caught on iPlayer. Indeed they are now going to start trialling iPlayer net first runs of new shows over the next 12 months. No longer does the success of a show have to hope that it was picked up by enough of the 11500 viewers that happened to catch a random scheduled slot. Each and every viewing can be accounted for and counted even if the show is a slow burner like Firefly which was cruelly cancelled before it built up it’s cult following.

So the balls now in HBOs court. How exactly to I pay you so I can watch the next season of Game of Thrones when it comes out?

2012 a year in review

In past years when I would review the year I’d flip back through my blog. For 2012 however I managed on average one post a month and the majority of those were geek related ones which in some ways are a lot easier to write.

The big change has been becoming a parent of course but at the same time I also took back the reigns of management as I became the head of the software team at work. The combined effect has been a year that flew by very quickly leaving a slight sense of bewilderment about where it has all gone.

I no longer feel quite as out of my depth as I did half way through last year. The first 6 months are pretty gruelling in terms of missing sleep and trying to interpret the needs and desires of something that can basically sleep or cry. However Ursula has grown up so fast you soon forget about what she was like and try and re-focus on what’s she’s doing now.

For starters she’s now a fully mobile and operational battle-truffler able to move under her own direction. Next to that she’s moved from simply reporting state (happy/unhappy) to communication. Granted every object she sees currently seems to be a cat (or possibly “that”) but I suspect her vocal cords just need to catch up.

She’s now pointing to objects she wants to interact with including multiple objects she’d like to combine (e.g. Bonjella and teething ring) like some sort console RPG game. She laughs at silliness, enjoys playing around and being chased and basically has a personality that is uniquely hers.

I used to think that it wouldn’t get interesting until she learnt to talk but of course my preconceptions about what it would be like are constantly being shattered. Sure it still gets frustrating at times especially for Ursula. She understands more and more of what her parents are saying without being able to respond the same way. As she gradually realises she’s an independent being able to manipulate the world around her she’s very quickly having to learn that she can’t control everything. I suspect that would put teenage angst in perspective if only we could remember our really formative years.

Well this post seems to have turned into yet another one about my child growing up. Other things have happened to me that are not Ursula related but really there not as interesting. Instead I shall try and look forward to what’s coming up. The annual February walking holiday is just round the corner and I’m looking forward to catching up with all the other new (and slightly more experienced) parents at that. We’ll be up in Manchester (without Ursula) for P&K’s wedding which we are really looking forward to. And we’ll be off to the land down-under for a much delayed holiday in April. Hopefully the next post will not be too far away 😉

Edit with Emacs v1.12 now available

Apologies for the extended delay in getting out a new release of Edit with Emacs. Real life has been doing a good job keeping me busy that spare hacking time is in short supply. A number of people have submitted pull requests and I’ve also done a bit of clean-up on the code.

The JavaScript in the extension has had the hacky change tracking code replaced with a modern funky 21st century Mutation Observer implementation. This should solve some of the more obvious performance problems on highly dynamic pages.

I’ve also implemented the iterative save method for edit-server.el. Unfortunately it doesn’t quite work as intended if the edited region uses encoding (e.g. longlines). In theory the buffer you have saved should have it’s contents replaced with the new data from the browser but it just doesn’t seem to work. For now I’ve just ensured the kill-ring has the real data in it so it’s not overly painful to restore formatting. Patches and/or explanations are of course welcome!

So grab it now from webstore. The changes are as follows:


* Upgraded manifest to version 2 for future releases of Chrome
* Added an “Enable Debug” flag to control logging to console
* Use Mutation Observers to better track changes in dynamic DOMs
* Fake a keypress when updating the textarea
* Bug fix for handling editable DIV elements


* Now available from the MELPA package archive!
* Beta support for iterative C-x C-s saving (it works but is ugly, see kill-ring)
* Default to using UTF-8 coding for process communication
* Raise existing frame consistently on Mac
* Tweak the portion of the URL used to name buffers

Many ways to skin a GNU

It’s time for another examination of Emacs LISP and a selection of ways to solve the same problem. In this case it’s the behaviour of the etags-select package. This handy function will present a selection table when it finds multiple definitions of the same tag. This is handy if your global TAGs file contains reference to multiple binaries that might have a common code heritage. It even provides a handy function etags-select-find-tag-at-point which will check point to see if that is a tag. However if point is on a blank line I’d prefer it to just prompt me for a tag name.

First version:

(defun my-naive-find-tag ()
  "Find at point or fall back"
  (unless (etags-select-find-tag-at-point)

Unfortunately this fails rather badly. I naively assumed etags-select-find-tag-at-point would return ‘nil on failure. Instead it bombs out with an error because etags-select-find expects a parameter and when find-tag-default fails it errors out.

Second version:

(defun my-working-find-tag()
  "Find tag and call etags-select-find-tag-at-point if it will work"
  (if (find-tag-default)

This works by checking find-tag-default will work before calling etags-select-find-tag-at-point. Of course there is some duplication here because find-tag-default will get called again once I know it will work. Dissatisfied I asked the stackoverflow community for suggestions. The first solution is to simply trap the error case.

Third version:

(defun my-try-except-find-tag()
  "Find at point or fall to etags-select-find-tag on error"
  (unless (ignore-errors (or (etags-select-find-tag-at-point) 't))

This works by utilising deep lisp black magic to stop the error propagating and returning a ‘nil if it does. The (or (etags-select-find-tag-at-point) ‘t) line is to ensure a successful call returns something so we don’t then fall through. Interestingly the comments around subr.el mentions some of the keywords used may be redefined by common lisp.

Forth version:

(defun my-efficent-find-tag()
  "Find tag at point, caching find-tag-default"
  (let ((ftd (find-tag-default)))
    (flet ((find-tag-default () ftd))
      (if (find-tag-default)

While I expected something like ignore-errors to exist this demonstrates the flexibility of dynamic languages like Emacs Lisp. The key is the use of flet to redefine find-tag-default so when it gets executed again inside etags-select-find-tag-at-point it simply returns the cached value.

So as usual with these posts I try to invite feedback. Which of these forms do you prefer? Would you solve the problem another way? Have you just learnt something new about Emacs Lisp?

Living la vida ELPA

I’ve been running Emacs 24 direct from the version control tree (technically a git mirror, bzr still confuses me) for some time now. As many people have mentioned ELPA is one of the big features that helps de-clutter an Emacs users ~/.emacs.d directory. I thought it might be a useful exercise to discuss which packages I’m now loading from ELPA and which I still track directly.

First and formemost is my my dotemacs collection. Weighing in at around 2700 lines of elisp it’s small by some standards. I’ve toyed with moving my config across to things like the Emacs Starter Kit but I’m not sure if it’s worth the transition pain. There is certainly a lot of cruft in my code but there is also quite a lot of muscle memory now invested in it. I have been trying to modularise it a little more but to be honest most of that was driven by a desire to get autoload working nicely which is no longer much of an issue as my session tends to stay up for weeks at an end.

I’ll gloss over edit-server.el surfice it to say I’d hope your not surprised I keep the development version running given it’s for my extension 😉

After that we have Johnathan Rockway’s eproject. I work with lots of code bases during the day and some sort of sensible project type structure is a must. I’ve tried a number of different solutions and this one stuck as it was fairly lightweight and easy for my smaller lisp brain to extend. I’ve even managed to contribute some changes back. As a result I find tracking the bleeding edge of development useful.

The same reason applies to Stephen Bach’s lusty-emacs. While ido-mode and ibuffer work well for speed nothing matches lusty’s lazy file and buffer matching. It can get a little too much once you start dealing with hundreds of buffers at a time (something midnight-mode is trying to keep on top of). It’s still seeing some activitiy on the repository hence the local checkout.

Finally the biggie but generally unused cedet. There has been some work to make it comparitively easy to run out of a src checkout and as long as it’s included early enough it won’t conflict with the built in cedet shipping with Emacs 23+. I still haven’t really made much use of it although I have managed to get a completion out of it when editing some C. It’s basically sitting there until I can commit enough time to figuring out how to use the beast.

Finally a quick review of the ELPA packages that I’ve got loaded. Obviously there is the latest org-mode which I’m spending an increasing amount of time in. I also have my favourite zenburn-theme for easy on the eyes goodness. The popular GIT interaction mode magit also sits there which I use every day. js2-mode and ssh_config_mode completes the list of modules that I actually use.

I have a number of additional things in there which I don’t actually use at the moment but I plan to try out including nose (for python unit test), jsshell (for JavaScript coding) and another one I see a lot of the wizards using yasnippet but again is awaiting time to play with.

So what ELPA packages have you discovered and what hidden gems to you track directly in your .emacs.d?

Trials and Trufulations

One of the most challenging things about managing small bundles of fun is the fact their neural circuitry is brand new and developing very quickly. A key part of development at this stage is bonding with their parents. The last few weeks have been quite hard when Ursula has spent large chunks of time in my sole presence being very un-happy and wanting Mum (who I’ve been trying to let have some sleep). Understandably at this point she is most familiar with Fliss as well as having a fairly base urge for the milky goodness only she can provide. It hasn’t helped that I’ve been working hard so not always been able to get home in time for the evening bath and bed ritual.

This combined with lack of sleep has seen me reach a fairly low ebb of late. In fact it’s possible I’ve had a glimpse of the lack of emotional state that someone with depression has to deal with on a more regular basis. I was certainly hard pressed to remember the last feeling of emotion I’d had for some time.

It was fortunate then the jubilee weekend celebrations saw us visiting Leominster for M&T’s wedding anniversary. Being able to spend time with both Ursula and so many of my old friends from Manchester was an excellent tonic for my depressed mood. What was even more useful was being able to chat to fellow parents who had already been down this particular road and were more than reassuring. I didn’t realise quite how much I’d been bottling up worries about my parental abilities and it was good talk about it.

Of course now with those worries put aside for now we are tackling the next emotional roller coaster of trying to instill a regular sleep pattern in our dear daughter. Much as it is satisfying to successfully rock a previously fractious baby to sleep it’s not a long term viable solution. Ursula will have to learn to “self-sooth” and get herself to sleep without her parents. The process however is fraught and there is a lot of conflicting theories on the best way to achieve this. Suffice it to say it’s not been overly popular with Ursula herself and the resulting wobbly lipped tantrums have been taking their toll on us. We are trying to maintain perspective and keep our eyes on the long term goals. Wish us luck!

Edit with Emacs v1.11

I haven’t really had much time for hacking at home unless programming my daughters wetware counts. However a few enterprising users have been sending me in some pull requests that fix a few minor bugs that slipped through the extensive pre-release testing I did for v1.10 so I thought it was worth pushing out a bug-fix release:


* Fixed some breakage to the “edit focused area” feature
* Fixed broken link to embedded edit-server


* A couple of fixes for Emacs 24 compatibility
* Globalize the minor mode so it persists through major-mode changes

Now a Windows user!

I’ve finally buckled and now have a Windows laptop. It was mainly forced on me by the need to have some sort of access to the intranet during the large number of meetings I’m now involved in at work. I have to say the experience has been enlightening, especially seeing all the hacky stuff that has to be done to get things working under Windows. For example by default I couldn’t connect to any https (SSL) pages. Luckily I can just hand the laptop back to IT to fix it so I don’t have to scratch my head too much.

I’ve had only sporadic luck getting Emacs up and running on it though. Having been running the tip-of-tree release on my Linux workstation so long going back to Emacs 23 has been a bit of a retrograde step. It doesn’t help there are multiple suggestions for installation. I’ve been trying to get EmacsW32 working but I’ve run into problems on start-up. So far I’ve been unable to fix the issue as the paths Emacs references don’t seem to show up in the system file browser. This seems to be the only avenue by which I can fix the permissions it’s complaining about.

Getting my init file onto the system and in the right place has also proved to be more complex than it should have been (there seems to be two “HOME” directories, one under a Roaming title). The Windows shell has finally gained completion but it’s still a shadow of a decent Unix shell. On the positive side I can already run eshell from within Emacs which provides a nice alternative to the command shell. I’ve yet to get tramp working though but I suspect that’s just a case of getting ssh keys sorted out.

If there are better solutions to getting a decent Emacs set-up on Windows I’m all ears.

Everyone likes stats

So what has my blogging frequency been like, well I’m glad you asked:

[archive_chart name=”Posting frequency over the last 12 months” width=”600″ height=”300″ count=”12″]

It seems the trend is pretty clear and it’s not exactly surprising as my hands have been more than full with other concerns. Despite coming to a phase where the odd hour or two in the evenings is possible blogging is still fairly low down the priority list. This parenting lark does seem to occupy a fair amount of time. So far it’s an exercise in trying to balance a number of competing demands. While being responsive to Ursula’s minute by minute desires keeps her generally happy we are beginning to see the benefit of following some sort of routine. It seems the oft repeated parental sayings are founded in a degree of experience 😉

Of course just as we started to establish a successful routine we disrupted it all with a trip up to Manchester. Thanks to some friends parents we were able to set up a base of operations in Bolton. We then proceeded to do the local tour and introduce Ursula to our northern friends. She was very well received on her debut although we suspect the schedule may have taken it’s toll. By Sunday she was starting to get a little fractious so it was good to end up at P&C’s for a very relaxed evening. We took it easy on the journey down on Monday and have been getting back into the swing of the normal routine.

It was really nice to catch up with everyone we saw while we were visiting. Next time we come up North we will probably try a slightly less hectic schedule with hopefully a less frazzled family. Thankfully next week is all based at home which is a much more familiar environment for all of us!


As predicted the blogging has dropped off quite precipitously. I still seem to be functioning on a reduced amount of sleep (although Fliss is taking the brunt of the sleep interruption by far). However the evenings are both shorter and much more structured. Eating is slowly moving from a task best accomplished at speed as we alternate baby holding/entertaining duties with each other to one where Ursula is happy to sit in a bouncer/bumbo and watch us shovel food in our faces. We have started getting into the bathing/sleeping routine which currently puts us all to bed at roughly the same time.

However it’s still very rewarding. I didn’t think I’d get quite so gooey inside when Ursula started smiling at me. Although she’s simulated smiles for a while it’s mostly been a prelude to some sort of gas incident. She is now firmly into social smiling territory and every time she does it it’s like a gift to salve the troubled soul that your at least doing something right. In the time that this post has been brewing (I started it a couple of weeks ago) we have even moved on to giggles and laughs. It’s certainly noticeable from close up how fast they start developing their personalities as they move from needing food/sleep/cleanliness to discovery and play.

We have managed to leave the house for extended periods and spent a lovely weekend in snowy Yorkshire on the annual walking holiday with friends from Fliss’ time at university. It was particularly fun because there was a spike of new parents with their kids (along with a couple of old hands) along with plenty of helpful hands willing to hold babies when parents needed to do something else. I found is particularly helpful chatting to people a few months/years ahead of us in the parenting game and be reassured about what we are doing. My stated parenting style is to exude a air of calm confidence while paddling like mad under the water to figure out what to do next.

Fliss’ mum was very kind to come over and spend the night giving us a chance for a meal at one of our favourite Italian restaurants with just the two of us. It was nice to get a few hours to ourselves to remind us of what life used to be like. However for all the work and disruption that a new family member causes we are happy with our new life and only occasionally think wistfully of our former freedoms. It does also make those periods of freedom when they do happen taste all the sweeter.

In other news I have also been working quite hard at my day job and have recently been promoted to Principle Software Engineer. I’m now responsible for all the software engineers in the company as well as all the software deliver-ables. I’m not quite a drop-in for the old Head of Software as I’m sharing some of the management type responsibilities with the Head of Engineering as I’m quite keen to keep my hand as a developer. 2012 is certainly shaping up to be a busy and rewarding year.