More painting

I’m trying my hardest to get back to using these dwarves as practice: they’re supposed to be imperfect playgrounds with which I can learn some nice techniques to use on my more impressive models.

I’ve managed to test out some weathering techniques along with using inks to provide depth, before getting completely bored with this model and I’m fairly happy with the results, even with the obvious mistakes and deficiencies in the quality of my work.

Shakey Hands

After a break of a few years I suddenly felt like painting again, mostly to calm my mind and focus for a while. I’d forgotten quite how meditative it is! Unfortunately I’m rather out of practise and lacking in confidence. I spent most of my time considering how much impact that confidence has on my performance across the board, making little mistakes here and there and dwelling on them pointlessly. A microcosm of my psyche.

It’s clear how much of a waste of effort scrutinising those mistakes is, yet it’s nigh-on impossible to push this behaviour away. After an hour or so I’d decorated a shield, eventually letting the mistakes subside, and gaining confidence to take broader, more clear strokes. I’d like to think I learnt lessons from this but in reality, without that practise these revelations won’t stick.

Getting into Containers

For a while now I’ve been experimenting with Docker which provides a useful level of abstraction over Containers. I’m still finding my feet in this exciting new world of cheap sort-of-virtualisation but so far I’m really enjoying the isolation they provide, allowing for explicit bundling of dependencies and repeatable builds. You can probably see how interested I’ve been from my github history these past months!

One thing I have found is that I don’t really trust other people’s builds all that much and have been preferring to roll my own in most cases, which has the benefit of forcing me to learn the tool but obviously contributes to the existing problem that we already have lots of images purportedly doing the same thing - just have a look at the number of images for Caddy to get idea of this problem.

The problem is two-fold: the first half is that builds are not necessarily trustworthy because they aren’t signed - this is currently being addressed by the Docker team. The second half is more subtle though; with the tech being so new people are all doing their own thing in their own way; lots of images require volumes mounting with configuration being provided that way, while others prefer to take it from a central configuration provided by Consul or etcd. Personally I’m erring towards stdin and command-line arguments where possible, largely because I don’t like the volume solution and don’t have any experience with the enterprise-level key-value stores.

Watching the trends and best-practises should prove very interesting indeed.

So I got locked in a bookshop

I began browsing the sci-fi section, looking for trashy stuff mostly, like Harry Harrison. Having exhausted the obvious stuff I noticed a sign saying “more sci-fi in the back!” so I obeyed the call and found big piles of sci-fi to trawl. Heaven!

I should highlight at this point that this bookshop was described by my sister as “the one that plays loud music out onto the street” and indeed it was blasting out jazz this evening - a pleasant and quite endearing habit of theirs, but one that turned out to be my downfall.

I continued to browse the books and amassed infinitely more in my I’ll-probably- buy-this-stuff pile than I had expected (i.e. my expectation was for zero since I already have plenty of unread books to plough through!) There’s some great stuff there; from Harry Harrison to Heinlein to LeGuin, and even a Star Trek book which I’m pretty dubious about, but hey it’s about Romulans so it’s gotta be good, right?!

I eventually decided that the pile was big enough and that I should probably get out before I bought half the shop.

I looked around. Nobody. Called “HELLO?!” a few times. Nothing. I analysed the situation; the music was still on, as were the lights, there was an uneaten salad of some variety prepped and ready to dig into. Cool. They must be around somewhere.

I tried a couple of doors; one went downstairs and one up. It felt rather like a mixture of a horror film and one of those old text-based adventures:

You reach the stairwell: do you want to go [U]p or [D]own?

I opted for Down: Up looked dark :(

In the basement there were a few things; a broken ladder, a couple of locked toilets, and then more stuff, detritus mostly. Not worth listing in a text-adventure.

Ok, so there’s nobody here. I’ll leave the hard-won pile of books near the till and come back tomorrow. No big deal!

Oh shit. The door is locked. I’m stuck in someone else’s shop and I’m alone and I have no food except someone else’s salad and when did I last use the toilet and will I survive the night?!?! Perhaps panicking wasn’t going to be so helpful: deep breath.

More investigation of the situation was needed: surely I was being a simpleton and there was actually a way to open this locked door. Nope. Sealed. Not a yale lock. Well then - let’s think logically about this - there must be spare keys? Found precisely one that looked promising. Didn’t fit. My heart sank.

Ok, phone numbers then - there must be a mobile scribbled down somewhere! Rescue is a phone call away! Nope. Ok, think laterally. Visit their website in search of a number… nope, only a landline for the shop… try it anyway in the vain hope that it’s forwarding.


Ok, that didn’t work. Tricky.

Around this time, and noting the security camera I decided it might be prudent to call the police, hopefully demonstrating that I wasn’t involved in the heist of a bookshop. I quickly got through, apologised in an extremely English manner for wasting everyone’s time, and explained the situation, at which point I must have been allocated the very lowest priority possible and stuck in a phone queue being repeatedly informed that more important emergencies were going on and to stop being a big baby. Well, that’s what I read into it anyway.

Know your enemy

Exploration was the way forward, it seemed, with no official attention (but holding on for the police to pick up) I ventured forth. Up I went. More shouting: “HELLO?! ANYONE THERE?!” thinking <I’m going to die>. Seems overly dramatic, but read on! Coulda happened!

Floors of books, and knick-knacks, and less books as I went up: top floor was largely empty - another ladder, not so broken looking, and jackpot! FIRE EXIT!

Unfortunately the damn thing wouldn’t open - the push-bar thing was stuck and I couldn’t urge it open, so I gave it a sharp kick and smelt the fresh air! I felt like Mel Gibson leading the charge against the melodramatically-and-largely-misrepresented English in Braveheart. FREEDOM!

Turns out it was open about 2 inches and now it was stuck. Really stuck. I booted it a couple more times for good measure but it didn’t shift and I was worried about breaking stuff. I decided to use the old lift-and-apply-pressure technique. Cue sound of rotten wood giving way. Oops. Broke the top hinge. On the plus side I could now get out, which I did, and then nipped back in and down to the till to write a letter of apology.


You locked me in your shop! I tried calling you but couldn’t find your mobile. I searched for a spare key to no avail.

I found a fire escape door at the top floor and pushed hard to open it, but the wood was rotten and the top hinge broke! I’m sorry!

I’ve been trying to call the police for 20mins but they put my on hold so I’ll try the fire escape.

I’ll pop in tomorrow to buy the books! [arrow drawn here to the treasure-trove of discovered books - my main concern at this point was genuinely that they might re-file my treasure-trove!]


Back up I went, out onto the fire escape which I discovered was really rusty and a lot higher up than I’d hoped… I don’t really like heights! At this point the police picked up and I apologised profusely and gave a short summary of events culminating in my position at the top of a dodgy fire-escape, the door for which I left ajar just in case I needed it - possibly the most sensible thing I’ve ever done!

The nice bloke on the end of the line suggested that if I felt safe I should try using the fire escape, and I didn’t want to seem too pathetic, having already been locked in a shop by mistake, and gave it a whirl. The first step was solid and I gained enough confidence to stride onto the next - which immediately loosened and gave way on one side. This was a sobering moment indeed. Shit was definitely real.

Not willing to let such trivialities as death-by-fall-and-impaling get in the way of a good escape I proceeded carefully down until I got to the first floor which had had its escape ladder chained up and padlocked. The padlock looked stronger than the entire set of stairs put together. I considered a heroic jump to the floor but the nice man on the line suggested that this was perhaps not the best idea.

He left me alone at that point for us both to regroup: he had to try to contact the owners, and I had to re-climb the steps-of-little-integrity and wait for rescue in the shop. It was out of my hands now - kinda reassuring in a pathetic sort of way. I welcomed opportunity to use two hands now that I wasn’t holding my phone and ascended, breaking bits off here and there and trying to retain my sanity whilst considering my ridiculous death. Thankfully the door was still open when I reached the top - I had already resigned to the inevitability that it would’ve swung shut in the minimal wind so this was a positive development.

I resolved to wait, and have a read whilst I was there - may as well make use of the perks available, right? After a few pages I got fed up waiting and called the police back with my incident number and had a good laugh about my situation with the very nice lady on the line - one should always appreciate one’s ridiculous misfortunes.

They had the foresight to enquire as to how much battery I had remaining: 33% but I pointed out that I was manning the phones in the bookshop this evening so if they needed me I was pretty available!

They had had no luck contacting the owner and were sending someone over. Confused at what this someone might be able to achieve, and not welcoming the spectacle of a fire-engine rescue, I went back to reading.

The police turned up and suggested that I could get back down the fire-escape and they could bring a ladder, but by this point I’d decided a couple of things:

  • I wasn’t sure the fire escape would be charitable enough to stay up for a redux
  • This was going to take a while anyway, so why rush things?

We began discussing the fire brigade again and my heart sank. I could picture a fireman triumphantly carrying me over his manly shoulder - the pathetic wretch he supported not even able to escape a mere bookshop.

Hey, this is my shop!

God finally got bored of torturing me for cheap laughs. The owner was back! One-and-a-half hours after leaving me to my doom. He’d gone for a coffee, and this was the one time in 30 years running the shop that he hadn’t shouted “FIRE DRILL! EVERYONE OUT!” before locking up. I was just relieved that not too much fuss had been made, and was of course very apologetic about the door.

I’ll be back tomorrow to buy that pile of books - they don’t take card, as it turns out.

uPubSub - A micro pub/sub implementation for NodeJS

So I built my own PubSub…

<dramatic pause, awaiting shouts of “Not Invented Here syndrome!”>

heh. So I did this as a product of my need for an eventing system for one of my secret side-projects, built using the CQRS and Event-Sourcing paradigms, for which I needed a simple PubSub as my output. This grew slightly when I implemented a simple Event Store and needed to latch onto all of the events that pass through the system.

In my case I have no need of a topic-based approach or clever error-handling. I’ve not even considered Promises and I don’t want to think about NodeJS vs. Browser Compatibility. It’s all very interesting stuff but I need to stay focused if I’m ever to finish what I’m doing, and of course if my requirements evolve past the abilities of my simple little PubSub I’ll be more than happy to swap to a 3rd-party library.

A whirlwind tour:

$ npm install --save upubsub


var uPubSub = require('upubsub'),
    pubsub = new uPubSub();

function handler(message) {
  console.log("Handling " + message);

pubsub.subscribe("eventName", handler);
pubsub.publish("eventName", "foo"); // outputs "Handling foo"
pubsub.unsubscribe("eventName", handler);

For now I have a nice little pubsub that dispatches in an async manner, and does as little clever stuff as possible. It’s available from my github and npm and weighs in at 66 loc and 1.72kb. If you want to use it in a browser it’ll need to be run through browserify.

One thing that did catch me out is that my app was built with a fluent interface which doesn’t play nice when the output is events and the write-model is getting updated later than the next fluent call. Oops. I could just force the pubsub to be synchronous for testing purposes (the main use of the fluent API) but this seems like cheating!

Blogging Platforms

A pretty general title, but I’ve been putting some thought into it. It’s one of those projects I’d like to do at some point that isn’t now. I’ll call them scribbles.

So what I’m thinking is that while I like editing in Vim, it doesn’t quite suit me as a blogging environment. To be clear I suppose that text editors don’t suit me as blogging environments and I’d prefer to see what I’m doing as I’m doing it. Ghost is pretty nice, but I haven’t put much time into understanding its way of doing things, and having gotten into Jekyll and just pushing up to GitHub I think I’d miss the transparency of the approach.

I’d like something that can mix up a few bits and pieces, and since I think in trees, here’s a sketch:

  • Markdown

It’s nice, and I appreciate that it’s readable in text editors if that’s what I want

  • Flat files

Both the source and result should be flat so that hosting is easier

  • Live Reload

Having that instant feedback helps to avoid mistakes, it’s pretty easy to achieve this these days, without nasty hooks into the browser

  • Native code blocks

I want to be able to stick some code in and have it highlighted, and not need some other service, even though GitHub’s gists are cool

  • A nice text editor that supports Vim key bindings

Because why would you want to type any other way? ;)

I might code something up sometime, perhaps with a mixture of NodeJS, event sourcing and some other bits and pieces. Of course, it’s just as likely that I’ll end up getting used to using Vim & Jekyll as my environment and not waste any further time on it!

When to stop caring?

I received some bad news about an estranged friend before I went on holiday and my first reaction was really “should I even care?”, see; the estrangement was pretty mutual and was the result of what I see as profound differences in our respective approaches to friendship.

I don’t want to dig all that up, having spent a long time getting to grips with it and accepting that some relationships just don’t work. It really took a long time to stop thinking about my friend and feeling hurt about what had happened.

So back on topic; I had this bad news and it stirred all these feelings up, and my defensive reaction was simply that I shouldn’t care: so I’d try not to. I had a good holiday but I did dwell on it in-between having fun: am I really being honest with myself here? Can I really just ignore this bad thing that’s happened? Let’s bear in mind here; the bad thing is completely not his fault so it feels completely unjust to mix that up with the things for which I do hold him accountable; those actions and inactions that led up to the split.

I haven’t managed to find an answer within myself to the question I’ve asked; I can’t switch my feelings on and off, and I can’t stop caring or wanting to help even if I (cynically) feel that I’ll end up disappointed that he’s not magically become a friend I want to have. So I’ll help where I can and I’ll hope anyway. I can’t see any other way that works for me.

Seinfeld Method

It seems apt to start my new one-a-day blogging by discussing the Seinfeld Method which has stood me in good stead for a number of different habits. But I’m getting ahead of myself; I should explain.


The idea is that you can wrest control of your habits away from your subconscious - instead of being controlled by them. This means both creating new habits and breaking those undesirable bits and pieces you have lodged in your mind that you do without conscious thought.


So what is a habit anyway? Wikipedia says “A habit (or wont) is a routine of behavior that is repeated regularly and tends to occur unconsciously.” I think this is a helpful definition; it shows off the strength that we can harness by taking control and using this artefact of human psyche for our own, initially conscious, benefit.

The Gist

So Seinfeld felt that just by doing something each day: making sure you really do it, you make it easier to keep doing it. He was applying it to writing comedy, but I’m applying it in a few different areas: I used it to break my habit of biting my nails, for example!

So how does it work? It’s pretty simple: you use a big, real life, highly-visible calendar and mark off the days where you did, or didn’t do, the thing you said you were going to do, or stop doing. Simple, right? The “chain” part of it comes in where you don’t like to leave holes in your calendar - it looks untidy - so you have this extra bit of motivation to execute the action and cross off a day.


So I’ve used this method for a year or so and applied it in a number of ways and found that you need to use a few guidelines in order to use it effectively.

  1. Use vague objectives; don’t say “I want to go to the gym every day”, instead say “I want to do exercise every day” – this allows you to have a lazy day now and then, or to do alternative exercise when you’re on holiday, i.e. make sure that the goal is achievable each day.

  2. Some goals require detail and that detail stops you doing them each day if something comes up; e.g. I have some objectives around coding on a specific project, where just doing miscellaneous coding wouldn’t do (because I like neglecting projects…) So you need to allow yourself planned days off where you know you won’t be able to do this activity.

I would say that needing to do this is a hint that you’re going too specific and should really be trying to back off and make the goal more manageable and flexible. So your preference should be to ease the goal instead of adding in a level of paperwork like this that could spell the failure of your objective.

  1. Real-life, month-sized, single objective calendars are the way to go: you might think that this will make managing many objectives difficult, and you’d be right. Think of it as a hint that you shouldn’t push yourself so hard! Physical calendars are really a must as they’re much harder to ignore than some ephemeral digital version.

When am I done?

As with many things this is a judgement call: you’re done when you no longer feel that executing your desired action takes any effort; you do that thing naturally, without needing to make space for it in your schedule – it’s now a core part of your day. You can throw the calendar out and consider building or breaking a new one.



This is a game that’s taken minimalism as a mantra; its aesthetic, audio, controls, and attitude as a whole push for a focus on what you can do in the world, which is not huge but large and challenging enough to provide a lot of enjoyment if puzzle and skill-based platforming appeal to you.

Pixel art

The first point point of judgement for me about any game is the graphics, and these are retro; like really, really simple. This is taking pixel art right back to Commodore 64 levels. I’m actually not a huge fan of the graphics; they’re so utilitarian that there’s really very little artistry to the look; it’s no Fez!

On the other hand the minimal graphics give the game a focused feel: you’re here to solve puzzles and to die, it’s really clear and it fits with everything else, and you really feel the charm of an unhappy face when you screw up – it makes me smile through the frustration.

Chip tunes

The music, again, is simple but nicely paced to urge you on. The effects and overall ambience has that minimalist feel but this time without feeling so raw; more by design. I sat playing for a while with the game muted while taking screenshots and it’s amazing what a huge difference in motivation is made by the lack of sound whilst being challenged.

Cheap controls

The controls are simple too: left, right, invert, interact. And I debated listing “interact” given that you need to hit enter only to teleport, read stuff, or talk to other characters. You do none of these things frequently!

The controls are tight and you know that it’s your fault when you die, though it’s a bit frustrating to hit spikes after the screen changes. To be fair this is certainly by design, and there are rolling movement stages that really push you to hit pace and ability in tandem which can be very rewarding.

Quick death cycle

In a game like this you need to get back into the action after dying; much like Super Meat Boy you pass the challenges through muscle memory as much as anything else and being thrown back in encourages you to try “just one more time”. If I were to “correct” one thing about the game it would be to remove the tiny delay in re-spawn; this is the time that I decide to quit and removing it would change that thought process; learn from SMB!


It’s important to distinguish between SMB’s purely skill-based gaming and VVVVVV’s mix of puzzle elements and skill challenges; VVVVVV’s switched gravity mechanic provides many slower puzzles that require a more Portal-esque mentality to solve and progress, and its interesting companion subsection forces you to consider the actions of an NPC, albeit in a form that you indirectly control.

NPC interactions

It’s almost not worth mentioning the NPC interactions; they’re so few and far between. I’m calling them out simply because they make me smile: they really embrace the general minimalism of the game by hinting at a back story but almost mocking the idea that there’s any credible explanation for their predicament and the context for our gaming. The sense of humour and its subtle, almost dismissive character really appealed to me.

In conclusion…

VVVVVV is a cool indie game, great for a quick blast, it’s got a nice aesthetic which some really nice tunes to keep the pace up and which really helps with getting back into the puzzle you just failed, and fail you will!

LibGDX on iOS!

The first LibGDX/RoboVM powered app is on the app store. This is really great news for indie game developers who don’t have the cash to shell out for Xamarian in order to deploy to iOS.

It’s a really exciting time for developers looking to write-once-deploy-everywhere as this enabled games written in Java using LibGDX to be deployed to the desktop, HTML5, Android and now (stable soon!) iOS.

TDD on Views

I’ve been struggling along for a while seeing whether I can bear the pain of employing Test Driven Development with my Views (I went for an MVC architecture for my app for simplicity) and I’ve gotten to the point where I’m just going to remove all the unit testing on them; it’s so brittle (as foreseen by everyone else).

The point of this post isn’t to express surprise, it’s to admit defeat and move on, perhaps revisiting UI testing when I have more time to properly dedicate myself to it.

To be fair it really pushed me to create a decent architecture and did a great job of highlighting where my architectural decisions were poor, but it’s now feeling like cleaning it up would make rewriting my tests so arduous that I’m put off, and that should never be the case! Definitely time for them to die :)