Extreme Programming Explained
The Hook
Want to write better code? How about working less overtime, getting along with your team better, meeting customer demands more quickly and accurately, spending less money, and having more fun?
Extreme Programming may be for you.
Be prepared to make some adjustments and sacrifices. Individual code ownership? Gone. Programming for the future? Slow down, cowboy. Working on your own? Grab a partner and dance.
What's the Scoop?
Extreme Programming is a way to improve software development by focusing on what really matters. If it will cost you $50,000 to implement a feature now that may not be used for two years, and it will cost you $55,000 to implement it in two years, hold off. If running test suites is good, write tests for every significant piece of the system. If multiple pairs of eyes make bugs shallower, program in pairs. If you enjoy meeting deadlines (and not working your fingers to the bone every night for weeks to do so), make shorter deadlines.
It sounds simple, even deceptively so. It may also set your teeth on edge at first.
Imagine that your customer has the time and the manpower to send a representative to sit with your programming team. He is actively involved in the design, writing 'stories' about how the system works for the end users. Every morning and afternoon, your programmers meet to decide which tasks to tackle, and they pair off, sharing one computer between them. One person codes and the other watches, and they switch off as necessary.
With every change to the system, the previous tests are rerun until they work perfectly, and new tests are added to test new functionality. Changes are not commited until all tests run successfully.
Releases are started early (six months, for a big programming project) and continue quickly after that (every couple of months). With a customer sitting in with the programmers, feedback can be instantaneous. The initial investment pays off quickly, while expenses are spread out over a greater period of time.
With no one owning a particular section of code, and with everyone working with different partners from day to day, everyone should have a good overview of the system as a whole. This can lead to better programming, from less bugs to very quick refactoring. New programmers can also be brought in and up to speed much more quickly.
What's to Like?
The book is clear and readable -- even funny. Chapters are short and to the point. Beck uses the metaphor of driving to bring his point across. (Driving is not about pointing in the right direction and maintaining that course, it's about making slight corrections all of the time.)
The bibliography is a great place to find some classic works (including books by Brooks and Knuth and even the movie 'The Princess Bride' -- no, really!).
Extreme Programming itself has a lot of promise. Some of the principles (programming for today, releasing early and often, peer review, community code ownership) fit in pretty well with open source/free software. Some of the other ones would be nice to see....
What Might Annoy You?
It's not clear where Extreme Programming fails. To the author's credit, he mentions this and gives some guidelines, but the choice and the implementation ultimately rest with the managers and bean counters. There will be some resistance at first, but Beck's enthusiasm is infectious and his clarity of explanation might be enough to overcome it.
The Wrapup
If you're a member of or a manager of a moderate programming team, you ought to read this book. It will go nicely on the shelf next to "The Mythical-Man Month". If you're curious about new ways to look at programming (especially in a group), you'll want to pick it up.
Purchase this book at fatbrain.
Table of Contents
- The Problem
- Risk: The Basic Problem
- A Development Episode
- Economics of Software Development
- Four Variables
- Cost of Change
- Learning to Drive
- Four Values
- Basic Principles
- Back to Basics
- The Solution
- Quick Overview
- How Could This Work?
- Management Strategy
- Facilities Strategy
- Splitting Business and Technical Responsibility
- Planning Strategy
- Development Strategy
- Design Strategy
- Testing Strategy
- Implementing XP
- Adopting XP
- Retrofitting XP
- Lifecycle of an Ideal XP Project
- Roles for People
- 20-80 Rule
- What Makes XP Hard
- When You Shouldn't Try XP
- XP at Work
- Conclusion
Get praise for the work you do right, and be ashamed for your mistakes. Community code, as such, doesn't teach each programmer his mistakes, IMO. If you feel that you have the syntax correct, and convince your partner in that, what if the next day a new pair of coders happen upon it and tear it to pieces. Granted, it was returning null values in the first place, but if the work is already done and posted up, you can look over it, but do you really learn from it?
The way I like it, each person on their own, knowing what to work towards. On routine schedules, a manager(s) will look over everyone's code and test it together. If a problem is found, the manager will discuss it with the coder, and give help on fixing it.
This may be less time effective, but you know that the skills of each programmer are rising, rather than looking at the overall skill of the community (the strong make up for the weak).
I like the part about customer feedback (i.e., end user feedback). That is often hard to come by in projects I work on. The tricky part is balancing it with management feedback. A typical situation is one where the users of the software want ultimate flexibility, but management wants software that adheres to certain business rules. As in "you can't set a ship date for whatever you want, it has to be within five weeks of the order date."
BTW, all this is from the perspecitive of "business apps," which some twit said wasn't "real programming" here a while back. Whatever.
DO NOT DISTURB THE SE
With infinite resources anyone can write the most beautiful, bug-free code. I agree that 2 pairs of eyes are better than one, but if they can get that 2nd pair of eyes to go program something else, they can get more programmed in the same amount of time. These are the days of companies being shortstaffed and projects having to be done "yesterday". It all sounds great in theory (just like all the good practices you learn in college C++ class), in the real world, things don't work how you'd ideally like them to.
Now I can't stand to program alone... drives me nuts! I go a lot slower too. Really screwed up my CS grades last year, we were explicitly not allowed to work in pairs on the code :(
"God does not play dice with the universe." -Albert Einstein
Those who fail to understand communication protocols, are doomed to repeat them over port 80.
The 'extreme' moniker is probably just marketing hype. This is isn't really all that 'out there'. This is the way most large consulting firms and code shops work. It may not be the most efficient (or enjoyable) way to develop small apps, but it keeps the pace manageable and the schedule on track for multi-million, multi-year engagements. Specifically, to address the previous poster's comments regarding non-maintainable code: This is in fact one of the best ways to write maintainable code, because everything has has to be documented because everyone has to work on it. No one person owns the code. Again, takes some of the random joy out of coding (no more pink floyd lyrics in the header), but if you're into that, you probably don't work for a consulting firm or a code shop anyway. -thanz
VERY LOW SODIUM
I have flipped through this book at the bookstore and it looks to me as if they initiate a code then analyze/fix methodology. I have no problems with doing this on a project that has flexablity and no deadline. I do have a problem with the idea that you can skip the analysis and design stages of a large complex implementation and just code then go back and fix issues as they come up. Bad habits == bad results. A little planning goes a long way. I have great experience with past projects on this matter. But like I said I only have flipped through the book. Now I have to go buy it and really understand.
Bascially, he embraces a hacking mentality instead of rejecting it, and then looks for ways to improve this process through peer review and heavy testing.
As it stands, I think his approach is both good and bad - good in that it doesn't try to turn your world upside down and fore a new methodology on you, but bad in that it seems to deny the usefulness of some valid quality engineering practices.
If it's anywhere close to being as effective, it's definitely worth a look.
I learned about XP (Extreme Programming) a while back and while we don't follow all the practices Beck recommends, the pair programming has worked well for us! This should be obvious to Open Sourcer's since it's just peer review on an immediate level. The real advantage of this for us is that it produces code which is understandable to more than one person, right off the bat. This alone is a good thing. But if you do something devious like pair a programmer with a more knowledgable person, you're also getting some training in. Add to that the fact that more than one person at a time is actively designing the system, and you've got a pretty solid system in place.
This is something I highly recommend that everyone try at work. Only people with huge egos shouldn't bother, but you did remember to check that at the door, right?
Please mod this post only if you think others should/n't read this. I have enough ego^H^H^Hkarma. Thanks!
After doing "normal" coding for the past 7 years, I thought I had it down pretty good. We started switching over to "XP" about 12 weeks ago and our company is on it's 2nd project using it. One difference, we split our teams out into 3 week chunks. The teams are small and we work tight. After 6 months of this, each programmer really has a feel for the system and because they work on each piece for 3 weeks, they're not leaving a mess of bugs for the next team. This "XP" thing isn't as bad as it seems. When run side by side with a "normal programming", the XP team always comes in under budget, ahead of schedule, and with fewer bugs. And the constant client feedback on each 3 week iteration is a lot better than the old school "design sessions" and "requirements gathering" phases, which left out a lot of developer/client contact.
I don't like the name either, it gives managers the willies and makes them think we're going to program their pet project while snowboarding. We just call it "pair programming", makes it sound boring and safe.
..."
"You got that routine done yet?"
"Not yet, got snow in my goggles!"
"OK. hey watch out for that
*aiiiieeee*
"...tree." *wince*
:+>
Please mod this post only if you think others should/n't read this. I have enough ego^H^H^Hkarma. Thanks!
When coding a library, write just those functions you actually need to support the application, and put the tests for that functionality in the test program alongside the library source, which must run successfully before committing the code.
Then, as the functionality develops, watch for factoring opportunities and allow yourself two days to re-factor, running the identical test program successfully to ensure you haven't messed it up.
Every so often, allow four days for a major new-functionality-free re-coding.
This approach gets results quickly and above all allows re-use for the next application with just those extra functions needed being added as required.
Don't spend forever in meetings discussing library design. Let the application drive the libraries and watch as successive application coding efforts get shorter and shorter with greater re-use.
Just my opinion. Flame on.
--------------------------------------
--------------------------------------
Dere's a storm a-comin'...
For example, maintainability is maintained through several cooperating practices, the first being PairProgramming. Every line of code is written with two sets of eyes looking at it. There are reasons for this that I won't go into here, but you can find out about them at the URL I mention below. Next, there is the rule about OnceAndOnlyOnce. This says that code can only appear in one place in a system. If you have the urge to replicate some portion of the code, then you are obligated to refactor the system to provide for a single place for that code to live. This above all else serves to create an elegantly designed system. This leads to RefactorMercilessly, UnitTestsFirst, and a few other of the XP practices.
In the end, though, XP-produced systems tend to be exactly what the customer wants (PlanningGame), thoroughly debugged (UnitTestsFirst), and easily maintainable (OnceAndOnlyOnce et al.).
Check out the Extreme Programming Roadmap for a thorough discussion of the XP principles, and subscribe to Rational's Object Technology User's Group for a spirited discussion with many of XP's founders.
Comments about user feedback are right on the money. Frankly, if you're developing a mission-critical app and you *don't* have constant feedback from the users during development, you're asking for failure. Software engineers aren't domain experts, and we will screw it up we lock ourselves away from the users. Yes, you'll have management constraints but you must always present options to the user. "We can implement the 100% solution using X time/money, or we can give you the 80% solution in X/2 time/money and also have resources to attack Y and Z. You pick."
Neutron
I get my kicks above the
I had a little chuckle when my brother introduced me to this 'new' concept. I've been working like this for a number of years. The key points to me are:
- no-one 'owns' their own code
- peer review early in the cycle
- test sooner rather than later
- end user involvement
- shared responsablity (?)
The words 'open-source' spring to mind...I can't believe that no one else has posted a link to the Extreme Programming web site yet. A former coworker pointed it out to me. It is worth the time to read. Some of the ideas are excellent. The one I particularly liked which I have seen used by a group I work with is coupling an automated regression test suite with a requirement that all code changes must pass that suite before they can be committed.
The net will not be what we demand, but what we make it. Build it well.
"Wait a second!" shouted my partner, leaning over my shoulder and beginning to type.
"WHAT?" I asked, watching him move the cursor.
He cursored over to a piece of Lisp code, and pressed the space bar. "Sorry," he said, "That was bugging me. Now it's indented properly."
www.HearMySoulSpeak.com
One of the things I dream about is detailed specifications.
:) Time and time again the people I write applications for turn out to have no real idea what they're asking for, or how it should work. "uuh, I donno, make it work" really doesn't do much for me as a programmer, which is why the following bit caught my eye:
I used to dread the paperwork and meetings and monotonous never-ending corporate BS involved in "requirements gathering" and the like, but the last several jobs I've done have demonstrated their value beyond any shadow of a doubt.
People don't understand how programmers work, much less the computers they use
Imagine that your customer has the time and the manpower to send a representative to sit with your programming team. He is actively involved in the design, writing 'stories' about how the system works for the end users
The jobs that have been done correctly, the ones where you don't spend 1/2 the time "adding features" that should have been included in the initial design specification (requiring changes to the fundamental architecture, blah blah blah), have all included this kind of a buffer between the "client" and the programming team. These are the people that hammer out 80 page requirements documents, which may at first appear to take all the fun out of it, but in fact save a whole lot of work in the long run.
"The Client" always seems to know which "little changes" require you to rewrite the whole application. "Oh, what you've done is *great*, but could you just make this *little change*..." So you have to rework the whole thing from the bottom up, break half of it in the process, and "the client" can't understand why it takes you so long...
Those kinds of headaches can be avoided *only* by getting a detailed specification before you even start...
Anthony
"I think any time you expose vulnerabilities it's a good thing." -Attorney General Janet Reno
I am reading "The Pragmatic Programmer : From Journeyman to Master" by Hunt, Andrew and Thomas, David and they have many good idea that run parallel to XP. May be a another book someone could review. If needed I can do it if I can find the time.
While I can see it working well in a number of circumstances, most of the projects that I've worked on it wouldn't work very well.
Project type 1 where is wouldn't work is any large project, say over fifteen developers (plus management). Any system that big and complex will not be understandable by everyone. Cross-fertilisation is a nice idea, but when things get too complex you need an expert or a keeper.
I guess you could have several experts, but you come up against the cost aspects very quickly.
Project type 2 are those with varying technologies. One I worked on recently used Oracle, Unix, NT, LotusScript (Domino), NotesPump, VBScript, JScript and HTML. I would argue that you can't be an expert in all of them. I do Oracle and Unix and have an appreciation of the others, but I couldn't really add much when I reviewed the work in other teams.
Again you could switch around each team once in a while, but any good team-leader would do that if they could anyway.
And that's before you even get into the 'egoless' bits, and the fact that management like people to be responsible. How can you have a scape-goat if it's everyones fault?!
Anyway, that's enough. Nice idea, but it wouldn't work in real life.
The problem is that people view engineering as a phase. Engineering should permeate every phase of engineering projects. "Engineering" is not design, but it is an important part of design.
-Jordan Henderson
No, you'll have programmers who understand the whole system. Where I work we shift responsibilities around fairly frequently (although not daily). This means that everyone understands how every part of the project works. And if you know that you're handing your code off to someone else in a few weeks or months you'll write maintainable code. The biggest incentive to write maintainable code is the knowledge that if you don't you're going to piss off your co-worker who takes it over from you.
/peter
This book is available at Amazon for $20.97, instead of the $29.99 Fatbrain wants for it.
If you are so into the whole patent thing, well go ahead and pay more I guess. I just saved 8 bucks, myself.
DrLunch.com The site that tells you what's for lunch!
I keep harping on my boss to present a detailed specification to our customers for approval.
While my company does medium sized, database driven websites, I still get frustrated everytime my boss comes back and says, "Oh, the customer thought it was going to do this..."
I don't usually consider work 'coding for fun', because it's nothing like what I work on when I have spare time. It's a job for me, so I like it when it is very clearly stated what it is that the code I write should do.
Dana
That's sort of like what Brooks was arguing about, when he didn't like data hiding.
He changed his mind.
You need an overview of the whole system. Detailed knowledge has a hidden threat - it inclines you to think that the internals of other parts of the system are static, and that you can depend on them.
My blog: http://www.seebs.net/log/ --- My iPhone/iPad app: http://www.seebs.net/seebsfrac/
Treating coders as unspecialized labor tends not to work because coders are not like factory workers but more like artisans or craftsmen. When you treat programmers like cattle they tend to resent it and deliver substandard code, at best.
While getting the entire programming team involved with the design of every piece of the code might sound good, it results in design by committee, which doesn't tend to work in practice. The best designs come from inspired individuals or from very small teams of people.
Finally, individual code ownership minimizes the need for communication accross the entire group (the N^2 communication problem noted by Brooks in The Mythical Man Month). By requiring a very high degreen of communication between all coders in the group, this technique is almost certain to fail for any group larger than a half dozen or so.
Ignoring N^2 communication issues is inexcusable in any methodology postdating The Mythical Man Month.
A methodology that doesn't address the need to redesign the production system, however, will suffer from cost overruns and reliability problems (both of which XP is explicitly trying to avoid) due to the need to work around mistakes and compromises made when designing the prototype.
If XP is really dependant on some of these assumptions then it seems unlikely that it is a generally applicable methodology.
So, it sounds a good piece, but I don't see anything that sets it apart from standard practice or from design methodologies that have already been elaborated elsewhere. Some of the ideas are good, but others just seem to be naieve or illconceived: some even seem to smack of outright voodoo software engineering.
Rotating programmers throughout a project?? Not only is that going to lead to unmaintainable code, but you'll have programmers working in areas that they know nothing about.
Rotating programmers is also very inefficient from a manpower useage point of view. Remember Brook's Mythical Man-Month? As you add people to a task, individual productivity decreases because of communications and learning time. It can get to the point where as you add people to a project, the entire project cycle lengthens.
Each time you rotate a programmer you are going to lose the time he takes coming up to speed. He is also likely to make a lot of mistakes during this period.
It kinda reminds me of an event that took place one day at my house - a debugging party. I was showing off a game I had written, and was getting close to releasing a new version. A couple of my friends hadn't seen it, so, I set down and showed it off to them. I let one of the guys play it, and noticed an area where it slowed down a bit too much...
We spent hours all of us staring at the screen, finding places that the code could have been a little more efficent, etc.
It worked out great, really. I don't think I would want to program like that all the time, but, it's a great way to discuss the code all at once, what the function of a piece of code is, etc. and come up with ways to re-optimize things. I figure before my next release I'll go down to the liquor store and buy some Zima and some beer, and have another debug party :-)
Midnight RyderDavis Ray Sickmon, Jr - looking for something to read? Check out my three free novels at MidnightRyder.org
For some reason this book reminded me of Gerald Weinberg's ancient tomb. Esp the advocacy of very small teams.
I can vouch for the team of 2 while writing code. Never actually seen it used in business (how would the bean counters justify it?), but I used it on some of my hefty college projects (like writing a pascal compiler). Felt that I was never more productive than in school coding as a team of 2. Or perhaps it was that I had a crush on my partner.....
Know there's a concept: Pair a geek guy with a beatiful woman and sit back and watch him try to impress her with his technical prowess (of course it never works, beatiful woman don't care about techy stuff, she'll use him to get promoted/ get an "A" then go out with a jock, but don't tell the geek that he'll create technical marvels in record time)
:)
Keep on keeping on.....
A foundational part of XP is the mutability of code: you write the code for what you know now, and be willing in the future to totally change it. One of the best technical books I've read recently discusses the how-tos of this: "Refactoring" (by the way, the link directs you to a price comparison site which I find REALLY useful).
I tried to use this method is my latest project, a test framework, and I was extremely pleased by the results; not only did the design morph as I discovered the requirements (so the final result was a design I was pleased with), but the final result snapped into place around the item being tested and no bugs have been discovered in it!
I can highly recommend at least that part of XP: refactoring and coding for today. I'm going to try some of the other parts in small bits at a time, but from what I see they look very useful.
I certainly wouldn't describe XP as being for someone who doesn't have time to design; I would describe it as something for someone who doesn't expect to get it right the first time, and who wants to get it right anyhow. I would also describe it as being for someone who wants to be useful to customers without hurting his own productivity -- see the Bill of rights on the Extreme Programming website. In short, XP is about never having to tell a customer that you can't make that change now -- and it's also about always being able to make changes when you need to.
-Billy
Prices for this book range from $23.92 (Buy.com - out of stock) to $33.90 (Borders.com) (both are UPS ground prices).
It's saved me a few dollars, now and then.
Jeff
I have, and it works beautifully. In fact, the nastier and more complex the coding problem the better. Two people watching pointer arithmetic are always more careful than one.
That said, a few commonsense caveats must precede its adoption. Namely:
I know of no piece of code that I've written this way that hasn't been FAR less expensive than its more traditionally coded counterparts, once debugging and QA expenses are factored in. The interesting part is that design and refactoring remain part of the process long after they would normally, as ones assumptions must be continually re-examined as people new to the code come in.
No, these are not code reviews -- they don't produce the documentation which code reviews do, and the documentation they DO produce is intended to document the entire project, not only the code quality.
Code reviews are definitely cool, and with enough programmer mobility this would remove *some* of the need for code reviews. I would still want them, though; they provide another aspect of managability. I would also want to use RMMM reports with spiral lifecycle model. This also seems to combine nicely with a modified Surgical Team model.
Of course, all I've done is the Refactoring part of XP -- but it alone was enormously effective. I can't wait to start pulling in more and more pieces from XP, and eventually start combining it with other proven methodologies.
-Billy
Yes, I took a day to specify the requirements for one program that I'm working on. So what. That saves weeks in overall development time, since I won't need to throw away that work in the future due to an implementation that doesn't meet future requirements.
-E
Send mail here if you want to reach me.
For a gentle introduction, check out ExtremeProgramming.org. They also have a nice on-going column about developing an "extreme"-style coffee maker.
cpeterso
Disclaimer : I hope I do not offend Design Pattern purists in my following loose interpretation of DP. I merely attempt to attribute my own ideas to others. If the following ideas deviate too greatly to be called DP, then I am grateful I have actually formulated or described something original.
There are many threads above that argue vehemently against and for a non-written-spec-based development pattern, "hacking" so to speak.
What makes a great project, and makes for great programming, is not the *winner* of the paradigm or design pattern.
It is not something as simple as "OO rulez", or
"Pedal to the Metal."
A great project, and a great programming team, distinguishes itself by the proper choice and appropriate use of paradigms and patterns.
// Flame Bait Alert Begins
Zealous proclamations like "Never have multiple function exit points", "Never use gotos" and "Never have modules exceed N number of lines" often stem from *inexperience* that never had such proclaiming coders be *forced* into such circumstances when breaking such rules lead to easier to read or more maintainable code in the long run.
// Flame Bait Alert Ends
Many development books and paradigms are written as if code and programs are created in perfect sanitized heavens that I have yet to experience in any game development house.
On the flip side, there are many game programmers or *hackers* who can so glibly discard decades worth of language or system theory research, and sincerely believe they can create thought systems of equal robustness in a matter of months.
We do not need more flame throwers.
We need accessible information and research to cloistered practitioners like us. And we need to contribute back to academia codified and scientific "development patterns" we corroborate with our colleagues/competitors so the system of knowledge can "grow" instead of "treadmill."
Post-mortem's and magazine articles, even interviews, are good baby steps. But our field needs something more scientific and codified than that.
We need to know not only what fails and what works. But what works in "which circumstances." What fails in "which other." Lots of lots of redundant information to prove one way or otherwise.
In retrospect, what I describe is more "development" pattern than "design" pattern.
I would greatly appreciate if fellow posters and programmers can point to me, or discuss from personal experiences, various "development" patterns that work, and various that fail.
The most enlightening discussions would be given the same "development" pattern, one that succeeds in one circumstances, and fails in another.
Then is the failure based on inappropriate circumstances, or improper application?
A more informative discussion is not "this paradigm fails" "this paradigm is god" but how which paradigm best works in which circumstances.
I hope to see from now on discussion goes more in that path.
Apologies of diverging from the topic of the specific book.
Disclaimer : If you are inclined to respond in flames, please at least first re-read what I am really saying. Thank you.
Corrinne Yu
3D Game Engine Programmer
3D Realms/Apogee
Corrinne Yu
3D Game Engine Programmer
If you pair programmers in the same cubicle, with only one computer between them, you don't have to worry that one or both of them are wasting their time reading and replying to Slashdot articles.
I tried pair programming here at work [WebObjects/ObjectiveC], and it worked wonderfully!
We came out ahead of when we thought we could get through, had very few errors along the way, and had a LOT of fun.
I remember that when my partner left, everything suddenly seemed to slow down. Two people working on a problem at once has a synergetic effect. It forces a laser-like attention without distraction, and shows views of things from more than one angle. At least, that's my explanation for what happened.
An absolutely wonderful experience.
Read the articles here: you'll notice a lot of SPECULATIVE "I don't think it will work"s, and you'll notice a lot of "We DID it, and it works great."
Lion Kimbro =^_^= . o O ( Someday I'll get yet another Slashdot account...)
Extreme Programming (XP) is supposed to be an ongoing dialog between "Business" (the "Client") and Development. If the client wants a new feature, the developers need to introduce the Client to the "Software Triangle" (Cheap, Fast, or Good: choose two). Clients are paying for the software, so they should get what they are willing to pay for. If a client wants a new feature "quickly", the Developers give the client a revised time and cost estimate for the added feature. Developers are good at deciding how long something will take to implement. Clients are good at deciding whether they want to invest the time and money for that feature, once they know how long the feature will actually take to write.
cpeterso
If you don't want to be modded down, guy
Don't threaten, okay? Just ask. You had a good question, but this is just plain rude. An apology would serve you well.
Anyhow...
give us links for that stuff. I'm just a real programmer, not a CS wonk, and I haven't even heard of half of your buzzwords.
No problem.
RMMM doesn't matter (it's a detail of spiral development); look up Spiral Lifecycle Model in any decent SW engineering book. The closest one I have is "Rapid Development", and it does indeed discuss it.
Code Reviews are a formal SW engineering practice documented at Univ. Hawaii's page.
The Surgical Team model is one of the many memorable concepts discussed in Fred Brook's "Mythical Man Month". Read it. It's the #1 most recommended book by the Greats of CS and SW engineering.
Refactoring is part of XP, and is documented best in the book titled "Refactoring". I highly recommend it; serious programming stuff there, no fancy-pants process requirements.
XP is facinating because it tends to reduce the parasitic overhead of process. For example, no formal design documents are required with the exception of the user stories and the code.
-Billy
my experience with minute-by-minute customer feedback is that the entire notion of a functional specification is lost immediately, as about one out of every five opinions they have on something will in fact be a new feature they just thought of now that they are seeing their product come to life. Having the customer sit with the programmer all the time means there is no project management layer in between, its just the client making demands directly to the programmer who has much more pressing (and non-programmer intangible) issues on his/her mind than all the random little frills that should have been spec'ed out and properly scheduled. All of the customer's thoughts and use case scenarios should be gathered into a proper and complete specification before any programming work is begun - if the programmer needs to ask questions to the customer during development, then the specification was not completed. Continuing down the road of developing a large project without a roadmap will guarantee project failure, major psychological/physical trauma to your programmers, or both.
I found your comment about Business Programming being "programmed programing" interesting. A fair amount of what I do is repetitive (I would argue that some is not. That some businesses are so specialized in what they do and so convuluted in how they go to market that no AI computer program could ever replace a talented System Analyst and programming team).
This dovetails nicely with something I came across on the web the other day. General Office. It's an Open Source Accounting package. Many different modules. Ability to use a large variety of data sources (Access, SQL server, Oracle), although with the source you could use anything without too much problem. Written in VB6, source included. LIcensing options for resellers. I thought "man, we can start with that, customize for the client, and it'd be like doing a whole custom app for them!" I think this is a GREAT idea.
DO NOT DISTURB THE SE
The benefits of forcing everyone to expand their domain knowledge and have a better overview of the system far outweigh the communication and ramp-up obstacles.
In the real world, a programmer quits on the average of every sixteen months. If that individual "owns" lots of code that others are not
familiar with, the costs are enormous. It happens all the time.
Given that the average tenure is so short, teaching other people the code is still a waste of time because they too will be gone in 16 months.
When everyone is gone, what do you have? Code and the documentation. Except under Extreme Programming the code is built ad-hoc, and the documentation is non-existent.
In addition if you read Brooks, he had a rather different view of the programming process. It is very well known that GOOD programmers are as much as 1000 times more productive than average programmers. Brooks's methods were designed to take maximal advantage of the talent of the top programmer, rather than this pair-programming idea which seems to me designed to achieve least-common denominator code quality.
Rotating responsibilities is just one idea that has immense value outside of general XP practice.
I've worked in rotationg responsibility environments, in technical organizations outside the computer industry. Do you know what happens? Nobody is in a job long enough to become really proficient.
Caveat: I was one of the technical reviewers of the book. (Yes, Kent misspelled my name.)-:
... often much faster.
... A methodology that doesn't address the need to redesign ...
I see some big problems with the technique:
There are concerns about when and how to apply XP (Kent raises some of them in the book), but your response based on the review is off base.
I haven't "done" XP; I have successfully used some of the practices Kent calls for as part of XP. Here's my experience on how some of those practices work.
no individual code ownership: this seems to suggest that the design would either be imposed from the top, which implies that coders would be treated as unspecialized labor, or that the entire team would be involved in the design of every piece of the code
No. Lack of individual code ownership is one of the extreme practices, but neither of your deductions is correct. The design is fluid (as it is with any working method); no one is forbidden from making changes (there's no code only I can touch), but no one [pair] makes changes without understanding the code as proven by the fact that their changes must pass the existing unit tests and must be supported by additional unit tests created before or at the same time as the changes.
Lack of code ownership is controversial. I work in a project with a couple hundred thousand lines of code, and half a dozen programmers, that makes it work just fine (not using XP). I work alongside a much larger project, with hundreds of programmers, that also works that way.
new team members: the review asserts that "New programmers can also be brought in and up to speed much more quickly." but doesn't specify how.
By pairing new members with more experienced members. (The new member "drives" most of the time, so the information flows through him or her; he/she's not watching, but doing.)
debugging in pairs is a good idea, and should be used by any programming team that has the personnel to spare
No no no no no no no. Programming in pairs is *not* just about debugging, and is NOT about "spare" staff. When it works, two people programming (designing/ coding/ testing/ debugging) in pairs work faster than the two individuals working together
XP (and refactoring, as described in a book reviewed here a few weeks ago) calls for generating huge numbers of unit tests, completely automated, that can be run at the push of a button, and which are run several times per hour by each pair. That's where your coverage comes from.
design to throw one away
XP calls for continous refactoring of the system "to work around mistakes and compromises made when" developing, not disposable prototypes, but earlier versions of the system.
Most programming projects don't have the latitude to set prices for each feature
Each feature will take as long as it takes. XP suggests ways a project can learn how to better estimate these "prices", and spell them out for the customer. Any project, XP or not, where the customer says, "You say this will take six weeks, but I need it in one, so you'll have it in one week," is doomed anyway.
Stupid job ads, weird spam, occasional insight at
Caveat: I was one of the technical reviewers of the book. (Yes, Kent misspelled my name.)-: Funny coincidence: I got my copy of the book Tuesday, just about exactly when the review was posted at Slashdot.
... not yet, anyway.
I can't find fault with anything in particular with the review, but to me it doesn't capture what makes XP so, um, extreme. Here's my take.
XP is a lightweight, high discipline method (to quote Alistair Cockburn). You don't write a lot of documents; no "Victorian novel" requirements boat anchors. What you do, you do all the time; no "cowboy coders" (despite what you might guess from this or other reviews).
What you do in XP:
o Programming in pairs: No one designs, codes, tests, or debugs by themselves. There's an incredible gestalt you can take advantage of; if you've done it, you know what I mean. (If not, read the book.)
o Unit tests: Hundreds, thousands of them, more every time you make a change, run several times an hour, all available at the touch of a button. The idea is to save time, not spend it; if you make a mistake, the unit tests have a good chance to find it fast.
o Refactoring: Don't design or code your system to do what you think it might do; instead, implement the features you're working on currently, but be willing to go back and refactor it (make big changes) "just in time". You're not making the smallest, simplest change each time; that leads to the evolution of unmaintainable dinosaurs. Instead, you're creating the smallest, simplest system that does what you need it to do, even if that's big time different that the smallest, simplest system that does what you needed last week. (How can you be sure you didn't break anything? Hit that "unit test" button, early and often.)
o Low tech project management. Break the project down into "user stories" (use cases); track the estimates and actual time for each; learn what your project's "load factor" is, and how to improve your future estimates. Gantt chart weinies need not apply.
o Short development intervals; incremental releases every few (two to six, often) weeks. Avoid the "90% done" disasters. Yes, this is in the spirit of what Grady Booch calls "spiral development." (Does anyone still think they're following the "waterfall" model???)
o Teamwork. Kent doesn't say so, but XP's not likely to work for programmers who punch a time clock (though he strongly encourages working only eight intense hours a day and then going home!)
XP is a very new method. There's not a lot of track record, sucesses or failures, out there yet. Consider it for a project with three to ten developers and the need for having something minimal working fast, and more features on a regular basis after that. (Read the book first!) Don't bet your next hundred developer project on it
Stupid job ads, weird spam, occasional insight at
"No, you'll have programmers who understand the whole system"
You will? I've been in my current job for 14 months, and I still don't even understand my own subsystem (40+K of C++ involved with network management systems and multiplexers).
The whole system here is just under a MLOC of complex code. (Okay, so it's legacy, but aren't
most systems? Especially those where you need to turn things on their heads to meet new pressures)
We rotate staff frequently, in 14 months we've had 13 people leave (mostly internal transfers). That's bad for a team which has about 7 developers (plus 3 integration/test people).
Swapping people doesn't work. Learning time soaks up any and all advantage in bringing in even highly experienced people.
Aside from that much of the XP rules are okay, but not shockingly novel. I've been pair programming and constantly peer reviewing for months, it helps, but the single most important thing on a big project isn't mentioned in the XP book (skimmed it only so far) - source control.