Thursday, June 28, 2007

Best Software Design Tool EVER

I'm reading Domain-Driven Design. Fascinating book. Written by a strong proponent of agile development methods, one of which is Extreme Programming (XP).

I'm also still thinking about writing a personal project management app. Something to help track the many things on my work plate, and all the details involved in each (especially paperwork), while leaving enough of my small mind to actually be productive.

So I decided to combine these two interests. I still consider reading the book to be my primary activity at home. But, needing a break from the book last night, I decided to try an XP-inspired technique and do some design on the project app.

So I got some index cards, and started a domain model.

I worked in pencil, knowing that I'd be making changes. And, sure enough, I was erasing enough that I stopped to get a "click eraser". But I was working very quickly - making cards for the objects I already knew about, and quickly filling in holes I didn't realize I had. Then I went through and added properties to each, and labeled each as either a value object or an entity. Last, I took up half the living room floor to lay them out to spacially view the relationships. This led to more properties and objects, as the relationships became obvious.

I've never had so much fun designing software.

I realize this was the easy part. Writing the classes, sorting out the logic, and finding bugs in the model have yet to be done. And the other layers must be written, too. (I dread UI more than infrastructure, but neither is fun.) But that's when you start to see results, too. I enjoy writing unit tests (or, rather, seeing them pass) because of the sense of accomplishment - the software I wrote actually works! And even the first iteration will save me time and confusion at work.

I worked on a Ruby on Rails version of this for months. But I abandoned the project, because learning Rails while designing a complex app in a relatively new language/environment was just too much. I expect that using my familiar environment of gvim, nant, mono, and nunit on my MacBook will limit my work to the app itself, and Domain-Driven Design will help me manage the app's complexity. (No, it's not an enterprise-level app. But for one guy to do at home, especially with three kids, it's a lot.) I also have several ideas for expanding the scope of this software. I don't know how to plan for that level of complexity with Ruby. I do know how to plan for it with C#.

I'm actually excited about this project now! I'm looking forward now to planning a few iterations (2-3, most likely) and working on the first to see how iterative development works for me at home.

Now where did I put those index cards...

4 comments:

Carrie said...

I'm trying so very hard to understand what the heck you're talking about! I love you even when you talk computers and all I hear is "blah, blah, blah"!

Phil said...

Index cards sweetie, index cards. That's all you've got to understand :-)

I'm just experimenting with newer ways to approach writing software. Since I don't get to do it at work, I'll try it at home.

And my experience last night with the index cards tells me there are WAY better ways to write software than getting handed a 100-page design and trying to turn it into working software.

not up to code said...

You're like a mad scientist - minus the crazy hair!

Anonymous said...

Minus the hair and the mad.