XP? (was Re: [Zope3-dev] Progress)

Jim Fulton jim@zope.com
Sat, 09 Mar 2002 13:29:14 -0500


I'm not an expert on XP, although I think I've learned a lot over the last
few months.

Tres, 

Please feel free to help me out here. :)

Stephan Richter wrote:
> 
> Hello everyone,
> 
> I just wanted to reply to some of the comments with some things I noticed
> last week:
> 
> 1. The XP model works well for vertical problem, meaning you solve one
> particular issue, like i18n. However this is not the case for horizontal
> problems, such as "Getting ZMI working with XUL." This problem consisted
> out of refactoring and extending many other modules.

I don't agree, but first, I'd like to use some terms more specific than
just "XP". XP encompases a number of things including:

- Incremental planning with very tight planning cycles,

- Unit testing

- Pair ptogramming

- Refactoring mercelessly.

I'm probably missing some things.

The aspect of XP I still have the most problem with is
refactoring mercelessly.  Refactoring a framework with lots of
clients can cause huge problems. I think that this is where I agree
with you. Refactoring mercelessly is a alot more attractive within
components or within frameworks without a lot of clients, such as vertical
application frameworks.  Refactoring within components can even be a problem
in the face of persistent objects.  That said, the Zope 3 effort is young
enough that we should feel free to refactor, even at the framework level
(as I did last week with interfaces) and we should be prepared to 
deal with it.

As for the other aspects above, I think that they are applicable to pretty
much any situation. While some amount of prototyping is appropriate before
writing tests, we should throw untested code away and write tests before
(or during) writing non-throw-away code.

We have a bit of a dilema with non-prototye existing code.

> 2. I did reuse a lot of existing code, so I knew most of this stuff worked
> already (especially the XML-RPC stuff). So, if tests exists then I will
> plug them in, otherwise I will write them.

Cool.

> 3. As pointed out, I did use my own branch for three reasons: (a) The code
> was not done, (2) I wanted other people to comment on my design and (3)
> encourage other people to look at it and start building the ZMI.

All good reasons.
 
> 4. I did collaborate with Jim and Shane quiet a bit these days, first
> trying to figure out how to do it and then about the approach.
> 
> So, I will get the code ready as soon as I can and check it in with
> documentation and tests.

Cool.

Jim

--
Jim Fulton           mailto:jim@zope.com       Python Powered!        
CTO                  (888) 344-4332            http://www.python.org  
Zope Corporation     http://www.zope.com       http://www.zope.org