Author Archives rss

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.

Why it’s 90% not about ‘less code’

I hear a lot of talk about ‘less code’ being something we should favour.

[Edit - I should qualify that by 'favouring less code' I mean favouring a shorter class file or fewer classes in the code base, not splitting long methods into shorter methods or large classes into single responsibility classes, both of which I'm absolutely sold on.]

I disagree, and out of curiosity I just did a little experiment to see whether my feeling was well founded.

What’s in a name? (Or a package)

Last night, I put a shout out on twitter for some input into something I’ve been wrestling with:

On-screen text content, model or view?

It all depends where you’re going (and where you start)

As developers, our main task is to make the journey from A to B. A is you and the idea of an application, and B is the actual application, working well, a happy client and job (or flow of work) security for you.

As with any other journey, how you make it very much depends on where A and B actually are, and how they’re connected into transport options.

Video: code generation with Sprouts & TextMate

Recently a few people, including Troy (@troygilbert) and Paul Robertson (@probertson) have been asking about my workflow with TextMate and Sprouts.

So I screencapped an example of where I really feel like they are giving me a power-up. I’m sure you can do this level of code generation in many other IDEs, but the ease with which you can do it with Sprouts+TextMate makes it hard to resist.

My mailman doesn’t open my mail

or, implement the Mediator-Mini-Controller anti-pattern at your peril.

The robotlegs out-of-the-box implementation – what I like to think of as the standard issue trousers – relies on a version of the mediator pattern.

In this usage, the mediator’s job description is clear: deliver stuff from the application’s shared event dispatcher to the view, and from the view to the event dispatcher.

Like any good delivery service*, it also offers enhanced packaging for your exotic sending needs. Perhaps slipping your simple MouseEvent into an air-mail-approved CustomEvent envelope.

A good delivery service also varies its delivery approach based on the type of thing being delivered. Simple letters belong in the mail box. Packages requiring a signature lead to a knock on the door. Fragile goods are handled carefully.