[techtalk] More XP vs UML

jennyw jennyw at dangerousideas.com
Mon Apr 2 19:26:11 EST 2001


Hi, everyone,

UML and XP are not mutually-exclusive. Unified Modeling Language, as the
name implies, is a way of describing things. XP is a process for software
development. The inventors of UML (Booch, Jacobson, and Rumbaugh) all now
work at Rational and are promoting Rational Unified Process (RUP) for
software development.  However, RUP, too, isn't necessarily mutually
exclusive with XP.  There's at least one prominent XP proponent who thinks
that a project can be both RUP and XP at the same time (Robert Martin, who
is working with Grady Booch (of Rational) on a RUP book).

XP doesn't do away with design. In fact, Erich Gamma (one of the GoF who
wrote "Design Patterns" -- possibly the most famous design books ever) is a
supporter of XP. In fact, he co-wrote jUnit (the Java testing framework)
with Kent Beck.

XP's reputation for being short on design probably comes with it's
assumption that customers will change their minds (often in the middle of a
project). XP also assumes that the best design isn't always the one that you
come up with first. Iterative development is the norm these days, but XP
takes it to extremes (hence the name). In some cases, they will do hourly
builds (and people think daily builds are hot stuff!).  The amazing thing is
that these builds all work, or at least should all pass the automated tests
(one rule of XP is that if you break something, you have to fix it before
moving on. If it doesn't work by the end of the day, you roll back.).

Instead of doing lots of up-front design, XP has programmers design all the
time. Each day  may involve several design sessions. However, the idea is to
not design too much at once. Interestingly enough, even though you generally
don't try to spend a lot of time designing in XP, you will find patterns
emerging on their own as you refactor code (one of the rules of XP is to
refactor mercilessly). It's hard to believe until you see it. I was
convinced when I went to XP Immersion and Kent Beck and Bob Martin did a
demo of the process with audience participation. Indeed, after the coding
was done, we recognized familiar design patterns.

We adopted XP for a project because of experience with changing expectations
and deadlines. Because at the end of each day you should have working code,
XP is a process where when 50 percent of the time has elapsed for a project,
you should have 50 percent functionality in a working program.  Many
methodologies do not have anything usable produced until you've spent 85
percent or more of your time.

Also, a lot of people say they do XP when they're really not doing XP. Some
of the main tenets of XP that are often missed are pair programming (an
extreme version of code reviews -- every line of code is looked at by more
than one person) and test-first programming. Test-first programming is the
one thing that XP introduced (the other parts of XP are basically best
practices). The idea is that you write an automated test for all the code
that you develop _before_ you write the code itself. This way, unit tests
exist for the entire code base, making things like refactoring much easier
(it takes away the fear that if you change one thing in a base class, you
won't know what you've done to the code base). It also encourages you to
think of interfaces and helps clearly define the problem.

Anyway, if there's a single point to this post it's that XP isn't
design-lite, nor is it not-well thought out. Martin Fowler, author of
"Refactoring: Improving the Design of Existing Code" is another proponent
(he co-wrote an XP book with Beck). Laurie Williams, who's done a lot of
research on pair programming (see www.pairprogramming.com) is also an XP
supporter. Smalltalk guru Ward Cunningham is one of the originators of XP
(Beck says that he got XP from just observing what Cunningham does
naturally).

Tom DeMarco ("Peopleware...", etc.), an old timer and formerly a strong
supporter of upfront design, not only supports XP but actually said it's the
only thing that can work (he was at the same XP Immersion that I attended.
We were all pretty amazed that an old-timer would adopt XP so vigorously).

Anyway, just a few thoughts.

Jen

----- Original Message -----
From: "BiOFH" <biofh at biofh.org>
To: <techtalk at linuxchix.org>
Sent: Friday, March 30, 2001 8:53 PM
Subject: [techtalk] More XP vs UML





More information about the Techtalk mailing list