Half-Baked Epiphany

Posted by trevor Wed, 18 May 2005 18:41:23 GMT

Browsing when I should be working, I learned something when I came across this little essay. Garrett’s ideas are interesting but some of the comments really struck a chord.

One comment in particular talks about “cogs”. To paraphrase – a designer starts from how something looks, building cogs to support it, while a programmer starts from a cog and drapes a skin over it to act as an interface.

What’s interesting is “cogs”. That’s pretty visual isn’t it?

It’s also nothing like how I operate as a programmer. I don’t imagine discrete machine parts turning in concert, I imagine discrete entities talking to each other. Nouns and verbs.

When I express a problem in my head I don’t see the solution unfold, I hear it.

Think fast: Observer or Listener? Granted, they aren’t exactly the same thing but they address similar needs. What do you instinctively reach for? Do you imagine your objects are watching for changes or listening for changes?

Does it even matter? Maybe.

It may be why starting with the interface feels a little unnatural to me. Of course it makes sense – starting with the interface helps to ensure early on that your priorities are aligned with the priorities of the person paying the bills.

I think why I’ve felt it unnatural is because an interface is something you see (it’s not called a ‘display’ for nothing) and something you touch. It passively waits for you to poke and prod. It’s a viewpoint that’s habit more than anything else – I spent too long writing code and then grafting on the interface when the designers were done.

The “half-baked epiphany” is that I’ve probably sold myself short. Not to insult your intelligence (dear reader) by stating the obvious, but “the visual” speaks too. I need to spend more time giving the users an appropriate vocabulary to talk to my code.

Emergent Behavior Sucks

Posted by trevor Tue, 17 May 2005 16:49:00 GMT

I’ve got two Rails apps in ‘production’ mode. That is, they are (were) stable, humming along nicely and hadn’t been changed in weeks. Until this morning, that is.

All of a sudden FastCGI is going nuts spawning copies of itself and complaining of incomplete headers – of course, no crash log is generated, so my only pointer is incomplete headers. Not much help there.

I rebooted the box, killed all the old session files and removed the FCGI IPC directory (to get a clean one). No joy.

I tried switching back to vanilla CGI - works fine so it’s not issues further down the chain (like the DB). Still no joy then.

After much digging (and swearing), I found that by removing the -restart flag from my system-wide FastCGI settings I could make the problem go away.

The problem is, I’ve had the -restart flag set for ages with no issues. I haven’t touched the box in, like, forever (internet time). So from the guy who can often be found saying “OK, I know you don’t think you changed anything but try really hard to remember what you might have done”, I’m saying dammit, I didn’t change anything!

So what’s the deal? Oh wait – it’s Tuesday isn’t it? That must be the problem. Tuesday.

Stupid emergent behavior…