Domain-Driven Design, meet Interaction-Driven Design?

I've been reading Domain-Driven Design by Eric Evans as a result of being part of a Lean Book Club (thanks to Darcy for introducing me to the club). I'm only on chapter 6, but it's a good book so far. The main thrust of the book is explaining how a well-developed, well-maintained model of your domain allows you to build better software and how a "ubiquitous language" shared by developers and domain experts is necessary to make sure that model means the same to everyone. The book has already given me some insights into why some of the projects I've been involved with in the past (either as developer or as domain expert) have succeeded or been failures.

As a result a bunch of the book so far deals with talking with domain experts and how to crunch the knowledge you get from them into a useful domain model and ubiquitous language. Much of the rest of what I've read so far deals with how to take that model and build your software around it, continuing to develop the model along the way. Eric says: Use the model at the core of your whole development. I'm really looking forward to the rest of the book and to see how Eric brings all this together.

But then, I was having lunch with someone, and we started talking about user interaction. Specifically how some designers only think in static terms, and don't think about interaction. My mind had been thinking about this Domain-Driven Design stuff, and so I was looking at all software development through a "domain model"-oriented lens. But during this conversation I swung my perspective, and started thinking about how a good designer might interact with good developers.

Interaction-Driven Design?

Is there a similar process in developing a set of interactions and a "ubiquitous language" with designers as there is with domain experts? If a domain model is the result of interactions between developers and domain experts, what's the analogous result of interactions between designers and developers? I'm not sure about exactly what the answers to these questions are, but I'm pretty sure there's a comparison to be drawn.

What's interesting to me is that there might be some consequences that arise if both domain-driven and interaction-driven design need to be used simultaneously. In many cases I can think of, business software is defined by the domain experts, and then used by them. There are cases however where the domain experts have to define the software and then have interaction designers make that domain model accessible to other users. In these cases, you might have to continue the model and ubiquitous language up from the domain experts through the developers to the designers, and then you may have to do more knowledge crunching up there, and then bring it back down to the domain experts. This means you have three parties iterating you model instead of just two.

It may be the case that all three parties can sit down in a room and work it out together, but I worry that you might lose the "implement-ability" of your model if the developers don't sit in the middle. One of the tenets of domain-driven design as Eric Evans sees it is that the model sits at the heart of the software. I imagine that you might lose that without the developers in the middle... but in the middle the developers' jobs get more than twice as hard.

This is a really interesting problem to me, and I don't have any answers right now. Anyone else have thoughts?

Building Natty Narwhal Ubuntu Images for Amazon EC2 (with instructions that actually work)

For my current project, I'm using Amazon's Elastic Compute Cloud (EC2). I've chosen Ubuntu as my OS, and so I started with the Ubuntu EC2 Starters Guide, and the UEC images therein. Those are a good base, but I need my own configuration on first boot of the VM.

Naturally, I looked around to see how Ubuntu built their EC2 images, and found in the EC2 FAQ that they build them using python-vm-builder-ec2. Sweet! That seems easy. Oh wait, the EC2 part of vmbuilder has been broken since Lucid. Oh, there's a patch in that bug report. Darn, that doesn't work either.

Fine, let's look up UEC (Ubuntu Enterprise Cloud) stuff and see if that provides successful information. Oh look! How to make your own UEC image, with different instructions! Maybe that will work? Oh no, the part file provided doesn't work with vmbuilder, and the instructions don't port over to EC2 that well. Grrrrr.

Well, looks like I need to provide my own instructions (and eventually fix the wiki). So here I go:

  1. Start by creating a part file that will work. As per the vmbuilder man page, each line in the part file can have four fields: mountpoint size (device) (filename). In the man page, it says the third and fourth fields are optional. They're not. So a valid part file is: root 400 /dev/sda1 rootfs /mnt/ephemeral 2000 /dev/sda2 instance

  2. Next, build an Ubuntu vm image. This works as long as you don't use any of the ec2 options: $ sudo vmbuilder xen ubuntu --suite=natty \ --firstboot=/usr/share/doc/python-vm-builder-ec2/examples/ec2-firstboot.sh \ --part=./part

  3. Bundle and upload your newly created image: $ mkdir image $ ec2-bundle-image --image ubuntu-xen/rootfs --destination ./image --cert $EC2CERT \ --privatekey $EC2PRIVATEKEY --user $EC2USER --arch i386 $ ec2-upload-bundle --access-key $EC2ACCESSKEY --secret-key $EC2SECRETKEY \ --bucket $EC2IMAGESBUCKET --manifest ./image/roofs.manifest.xml $ ec2-register --cert $EC2CERT --private-key $EC2PRIVATEKEY \ $EC2IMAGES_BUCKET/rootfs.manifest.xml

  4. The last line of that step will return "IMAGE ami-xxxxxxxx" where the "ami-xxxxxxxx" part is your AMI ID to use when launching instances.

Some notes:

  1. You could specify a different --kernel and --ramdisk when you ec2-bundle-image, but the defaults work well. I couldn't find a list of AKIs and ARIs with descriptions. If someone could help me out on that it would be awesome.

  2. You need to set up the environment variables (the things that start with $) to make this work. The names should be self-explanatory.

  3. You may want to customize your first boot script from the ec2 default.

  4. You can use the --addpkg parameter to add packages to your vm in the vmbuilder step (one package name per --addpkg). That's from the old JeOSVMBuilder docs. Lots of "hidden" info about vmbuilder there.

Balancing Robot at KwartzLab TON

At July 12th's KwartzLab Tuesday Open Night there was a Balancing Robot made by Phil and Nick, two UW mechatronics students, for their 4th year project. It's designed to eventually allow telepresence, but the fact that it stands on its own is awesome!

Septoplasty: Acheivment Unlocked!

Warning: Some of this post might squick out the faintest of heart among you. No gory details, but enough that might make you say "Ewwww!" once or twice.

About five months ago, my snoring got so bad that my wife insisted I go see a doctor about it. The doctor sent me for a sleep study, which found that my snoring wasn't apnea, and referred me to an Ear, Nose, and Throat specialist. The ENT took one look inside my nose and throat and said: "You've got a Deviated Septum!" As a result, my palette and uvula have enlarged, which flap around in my mouth while I sleep.

So today was the first of three special days. I got my deviated septum corrected! Huzzah! Surgery was easy, but it will have some negative consequences on my short-term life (though it should be very positive in the long run).

So today I got up at 5:15, had nothing to eat or drink, and headed off to St. Mary's Hospital for 6:30 (three hours before my surgery, as instructed). I got into my "preparation bay" (number 23!) around quarter to seven.

Alex and I got to listen to the day surgery ward nurse deal with a guy who hadn't read any of the instructions or filled out half of the forms. He showed up with his rings on (a big no-no), and they had to cut one off. They also had to ask him a bunch of questions that he should have already answered. Oh, and did I mention that he got in at 7:30 for a 9:00 surgery? Geez.

At about 9:45 I got wheeled into the OR and was put under. One of the cool and spooky things about general anaesthetic for me is I lose the time I'm under. I'm not sleeping, I'm just gone.

So I woke up at about 11:45 int he recovery room, where they removed 6cm long nasal packing from each of my nostrils. Kind of amazing there was that much in there!

After having my nose dressed, I was brought back into my "preparation bay", where Alex met me. I had to have my dressing changed twice (one hell of a nosebleed!), but after about an hour I had recovered sufficiently to be sent home! Home by 1! Woo!

So now I sit on my living room floor, reclined 45 degrees, which is how I have to stay for the day. If I lean forward (when sitting or standing) I can feel the blood putting pressure on the clots. That's the wierdest thing. My nose is almost completely full of clotted blood (i.e. scab). It'll fix itself over the next few days, but it's just really odd.

The thing that sucks about this is that after keeping up my exercise for nearly two weeks, I'm going to have to discontinue. No cardio for 2-3 days, and after that weight training (even body weight) is out. I'll try to keep my cardio up, but I'm going to have to restart my exercise habit building once all of this is over... in September.

Oh well, time to find a new habit!

I'd like to thank the staff who helped me out at the hospital: Jeanette and Michelle, the Day Surgery Nurses; Bruce, who wheeled me into the OR; Jackie, the recovery room nurse; Gail, the OR nurse; Dr. Alexander, the anesthetist; Dr. Bharadwaj, who did the surgery; and everyone else who helps St. Mary's run (especially the IT guys, unsung heroes that they are).

The Whole Canada Post Thing

I suppose I should write my thoughts on this whole Canada Post debacle that happened over the last month or so. I will open with the chronological facts as I understand them. If they're wrong, my thoughts may be wrong, so please correct me if they are.

  1. The Canadian Union of Postal Workers (CUPW) began rotating strikes after their talks with Canada Post (CP) broke down. These strikes were in no more that two cities at once (though they may have expanded given the chance).

  2. CP locked the CUPW out.

  3. After a week, the Government of Canada (Conservative) introduced Bill C-6 to get Canada Post operating again, which:

    1. Orders CP to stop the lockout;

    2. Orders the CUPW back to work;

    3. Sends the remainder of the outstanding issues to arbitration, except for salary and term of contract; and

    4. Orders the final settlement to have lower salary increases than CP's last offer before Bill C-6.

  4. The Official Opposition (NDP) filibustered the bill over the weekend.

  5. Following that, the Opposition proposed amendments to the bill, which were rejected by the Government.

  6. Bill C-6 passed.

  7. Mail service has resumed.

In how things turned out, everyone was stupid and a loser in one way or another, except possibly the Conservative Party, but I'm not even sure about that.

Canada Post was stupid by locking their workers out. Hundreds of thousands of Canadians switched to online billing over the lockout period. So in trying to help lower their expenses, they also lowered their revenue. Even if they were promised by the Government that they'd get a resolution in their favour, they might not be considered an essential service next time.

The Canadian Union of Postal Workers was stupid in that they didn't accept the offer on the table the instant the Government announced its intention to get involved. The Conservative Party of Canada is not known for it's kindness to Unions. Now the CUPW has been legislated back to work with lower wages than they could have had.

The NDP was stupid in that they filibustered the bill before they proposed amendments. In doing so, they lost some of their credibility with the general populous. They came into the opposition on the promise of restoring civility to the house. The civil thing to do is to try to work together on legislation first, then to filibuster if you believe it's fundamentally bad for the country. I haven't seen polling data on the event, but I wouldn't be surprised if it were bad news for the NDP.

The Government was stupid because they overstepped their bounds. It's the governments job to mediate and push labour disputes to arbitration if they affect essential services, i.e. to get them back to work. It's not their job to specify terms in that agreement, and especially not their job to specify terms "worse" (from the union's perspective) than what is on the table.

I'm not pro-union by any measure. Unions can be some of the most destructive forces in our society. I've watched unions negotiate themselves into a worse deal than the original offer from management. I've seen unions intentionally give away their workers rights, because some of the management was unionised. What I am is a supporter of the right to bargain collectively. We know what life is like without unions. If you don't know, just listen to the song Sixteen Tons.

When mediating a negotiation, you know you've done your job right if no party to the negotiation is happy with how things went, but also no party is angry. That is how you know that the right balance has been struck. I can't help but feel that the Conservatives have walked away happy, while the CUPW are pissed off.