Sunday, July 30, 2006

softwear engineering

I spelled that the way I meant that :-)

I've been knitting since I was nine. I love to knit, and find it very relaxing. I knit socks, sweaters, Aran knits, and am currently attempting an Icelandic pattern I brought home from Iceland.

It occurred to me that it is not all that surprising that I like both knitting and programming. In many ways, knitting is very similar to programming - knitting is executing a design in yarn; programming is executing a design in a particular language. The designs are written down (patterns/specs). In both, it is best to know what you are setting out to do ahead of time, and the end result is hopefully useful. And it is the more experienced knitters/programmers who write the designs.

The similarities run deeper still. The state of mind I find myself in when knitting is similar to that I experience from coding, and I get similar rewards from looking at the finished product.

Perhaps there are things to be learned from knitters in programming. Imagine if the creation of a sweater was handled as a software product. Assignments would be doled out - this team member does the cuffs of the sleeves, another does the rest of the sleeves, another the back, another the front, another would be in charge of putting it together, and yet another fixing any issues that arose, and there would be someone in charge making sure it all hung together in the end.

But as a knitter, I would never ever pick up anyone else's sweater and start working on it. The knitting project is a very personal endeavor. Everyone's stitch is unique - if I started knitting in the middle of a sleeve on someone else's sweater, the sleeve would have a discontinuity. The other knitter would be highly annoyed. And the end result would be the less for it.

Today's software projects are usually way too large for a single person to build themselves, but the lessons to be learned from the craftsman are still important. The differences in knitters' stitches are a very visual clue, but the software product does reflect the programmers who put it together, too. When dividing up a project, we need to make sure that each programmer has something they can look at and say "I did that!" and feel the craftsman's pride in accomplishment. And we need to manage the boundaries between different areas of code to ensure that they fit together seamlessly (pun not intended, it just happened...) Those seams affect the feel of the product.

I still remember one of the best things anyone ever said to me.... Speaking of ViP, a senior Lotus architect told me that he could see me in the product. That is one of the best things anyone can tell an engineer. When we divide up a software project, we need to make sure that every engineer can hear that!


Neil Wainwright said...

It's slightly off-topic, but what do you think about software specifications / knitting pattern vs. actually having a vision and writing the code / doing the knitting? I find in a lot of situations there is an over-emphasis on writing specs versus having talented engineers who have been educated on what their product will be used for...and letting them build the best system they can envision, given reasonable deadlines (with iterations of course).

Maureen said...

I agree - I'm very comfortable winging it, just diving in with a feeling of what I want to do. I need to see something to know if it's right or not, and it helps to get something down to start iterating over. I've changed knitting patterns on the fly, too :-)

When I'm coding, I feel the specs are more for other people to keep track of and plan for what I'm doing. I never view them as final until I'm done with my own iterations over the code.

So in isolation, I would either not write a spec at all, or would write it after the fact. But I'm not in isolation, so specs are the vehicle to communicate the plan to others. And I do tend to drive people a little crazy when I feel free to change it along the way. But better to change a design than to ship the wrong thing!!

Neil Wainwright said...

I completely agree..."better to change a design than to ship the wrong thing". I've been building/extending a quite complex J2EE asp website for the last four years...and my business partner and I have yet to write a spec or any kind. The cool thing is that our designs have been right on, with only one time pre-launch where we stopped and did a "quake" by re-designing a piece of our foundation (we knew it was the right thing to do).