[lug] Software Projects as well....

Rob Nagler nagler at bivio.net
Fri Oct 12 21:01:50 MDT 2001


> cleanly and possibly introducing new bugs... if I could do this project over
> again, I'd design it much more sanely from the beginning, but, c'est la
> vie...

This is hard to do.  I've been using XP (the original and right one ;-) for
my most recent projects.  It takes discipline, but it really does pay.  

Here's an example that happened today.  We were pair programming, trying
to refactor some code.  We didn't have unit tests, so we had to pray
east when checking in.  We had two modules accessing a collection of
gdbm files in perl.  After refactoring one of the classes with internal
changes only, I looked at the other class and said, "I think we could
use a common module".  We didn't test this hypothesis with 1) a set
of unit tests or 2) refactoring the other class before implementing 
the "common" class.  This is a bit abstract, but basically, the "common"
class for managing the gdbm files "went too far".  I made too many 
assumptions about the class we didn't refactor and indeed I wasn't
familiar with.  Now the "common" class needs to be changed around 
to better match the needs of both of its client classes.  This wasn't
a huge amount of wasted effort, but it was a very interesting experience.

I made the mistake of thinking I knew the answer before I really 
understood the problem.  Keep in mind that this code already existed,
was mostly working, and was based on over a year's experience 
with the problem in general.  Trying to understand a *new* problem 
that well would be N times harder, so I don't see how I could ever
get it "right" from the beginning, let alone the middle. :-( 

It's hard to write software right the first time.  Indeed, I would go
as far to say that it is an impossible goal.  The structure will change
as your customer (users) experiences the solution.  The customer will
realize the solution isn't really what she wants.  The developers will
learn more about the problem by trying out solutions which bring them 
them closer to the details.

Rob



More information about the LUG mailing list