{"id":131,"date":"2010-11-17T15:00:42","date_gmt":"2010-11-17T14:00:42","guid":{"rendered":"http:\/\/leanmagazine.net\/?p=131"},"modified":"2024-03-15T15:18:50","modified_gmt":"2024-03-15T14:18:50","slug":"is-something-rotten-in-the-practices-of-xp","status":"publish","type":"post","link":"https:\/\/leanmagazine.net\/issues\/issue-2\/is-something-rotten-in-the-practices-of-xp\/","title":{"rendered":"Is something ROTTEN in the practices of XP?"},"content":{"rendered":"

\"\"<\/a>The attendees of the 2007 QCon and the \u00d8resund Agile 2007 conference could see how XP i<\/strong>n general, and Test-Driv<\/strong>en Development in particular came under heavy bombardment by the well known Agile profile Jim Coplien. Lean Magazine contacted the nowadays Elsinore-based software professor, currently working as an Agile Coach for the Danish consulting firm Nordija, and asked him to further explain why he seems to have such a problem with this part of the Agile movement.<\/strong><\/p>\n

Being devoted to Agile Development Jim Coplien is not against XP in general. But he has some problems in regards to its origin, and how some of its diciplines have been adopted by the software industry.
\n\u2013 The discipline as a whole has some goofy aspects, but many of its tenets are good \u2013 sometimes by accident, I think, and sometimes by design. For example, the Planning Game is a great step forward from Microsoft Project\u00a9 hell, he says. But he thinks that some of the other practices are misconceived by many in the XP movement and often applied in a improper way. One of them being User Stories.
\n\u2013 Alistair Cockburn invented a concept called \u201cUser Stories\u201d that were truly stories, which appealed to customers as a lightweight way to get them into the specification process, says Coplien. They were never designed to survive into the project, but were only a way to bootstrap into Use Cases. XP saw Alistair\u00b4s concept as a good, lightweight notation and ran with it. However, XP lost both the notion that User Stories should not survive into the project and that they should convey a story, and the new notion of User Story went beyond lean to skeletal.<\/p>\n

TDD the problem child
\n<\/strong> But the main problem-practice of XP, according to Coplien, is Test DrivenDevelopment, and how some of its proponents perceive it as a design technique and that TDD in many projects replaces upfront architecture work. As Coplien pursued his critical scrutiny of XP in general and TDD in particular, he became alarmed about the patterns he saw. One pattern that emerged was that the projects would become \u201cstuck\u201d in about their third sprint or third release. Another pattern was that TDD projects would run
\ninto lots of usability problems in deployment.
\n\u2013 One of these projects was a medium-size Java project using XP inside one of our large clients, remembers Coplien. They got really stuck in about their third sprint because they just couldn\u2019t evolve the code any more. They hadn\u2019t started with a vision of the overall system structure but instead had let unit tests drive the design. The tests were derived from user stories at hand, and the initial user stories gave a very single-dimensional view of what would necessarily become a complex system. You can push these users stories all the way through to code for a couple of sprints. But at the time of the third sprint the demands outgrew the structure that had been put in place, and the evolution slices tended to cut across the existing code in the worst possible way. They found they couldn\u2019t implement new user stories without cutting across many existing class boundaries.<\/p>\n

Refactoring hell
\n<\/strong> The problem, according to Coplien, was that the system lacked an overall structure that anticipated the general user stories that even the most basic version of the system had to support. TDD forced them to build one method at a time (\u201dThat\u2019s all you can test!\u201d) in a methodology that gives no place to big-picture thinking, architects, architecture, domain expertise, or knowledge of how past systems had been structured. Further, TDD caused them to focus on methods (\u201dThat\u2019s what you write tests for, and those are the focus of coding under TDD!\u201d) which in turn led to a bottom-up procedural architecture. They had written bottom-up FORTRAN in Java syntax, wrapped in some classes whose identity and partitioning came from somewhat arbitrary customer whims.
\n\u2013 True to the XP mantra, the team told management that they needed to undertake a re-factoringexercise \u2026 though they presumably had been doing continuous refactoring all along \u2013 hey, that\u2019s what it means to do XP, right? says Coplien. Management gave them leeway to do a refactoring sprint. And the project was able to pull itself up by its bootstraps and deliver to the market. That was over a year ago. The last I heard, they were again in the middle of another three-month re-factoring exercise. This was just one of several projects where we observed this problem. I\u2019ve polled quite a few well-known ScrumMasters in the industry who have seen similar failures in or around Sprint 3 of a project using XP practices.<\/p>\n

GUI problems
\n<\/strong> The other problem Coplien wants to address is unusable human\/ computer interfaces.
\n\u2013 I first saw this in GUI-intensive projects I was working closely with, and which were also using TDD and XP. The interfaces had many surprises in them. The problems appeared as modal screens, as screens that just left users puzzled, and in growing numbers of user input errors. According to Coplien, the problems can again be traced back to the procedural nature of the design and the lack of sound consideration for the domain objects that live in the user\u2019s mental model of the world. TDD fails to create objects that shine through to the interface and match up with the user\u2019s conceptual model of the world.
\n\u2013 Kent Beck used to say that a good interface cannot hide bad code, and that\u2019s what\u2019s going on here: the code is bad because it doesn\u2019t reflect the user worldview, and it comes to be bad because it was created one method at a time at the mercy of low-level tests.<\/p>\n

Universal mistakes
\n<\/strong> In spite of all their advanced knowledge and professional skill, software developers tend to make the same simple mistakes as people have done through all ages:
\n\u2013 I think a lot of Computer Science history follows a litany of old proverbs: the newer, the better; the grass is greener over on the other side; I don\u2019t know where I\u2019m going, but it\u2019s better than where I\u2019ve been. Such reasoning can have and has had serious consequences. I think we too easily ignore these consequences, and certainly their causes. If we are to learn as a community, we need better to understand them.<\/p>\n","protected":false},"excerpt":{"rendered":"

The attendees of the 2007 QCon and the \u00d8resund Agile 2007 conference could see how XP in general, and Test-Driven Development in particular came under heavy bombardment by the well known Agile profile Jim Coplien. Lean Magazine contacted the nowadays Elsinore-based software professor, currently working as an Agile Coach for […]<\/p>\n","protected":false},"author":32,"featured_media":164,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,13,83,55],"tags":[18,34,6,21,33],"_links":{"self":[{"href":"https:\/\/leanmagazine.net\/wp-json\/wp\/v2\/posts\/131"}],"collection":[{"href":"https:\/\/leanmagazine.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/leanmagazine.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/leanmagazine.net\/wp-json\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/leanmagazine.net\/wp-json\/wp\/v2\/comments?post=131"}],"version-history":[{"count":11,"href":"https:\/\/leanmagazine.net\/wp-json\/wp\/v2\/posts\/131\/revisions"}],"predecessor-version":[{"id":527,"href":"https:\/\/leanmagazine.net\/wp-json\/wp\/v2\/posts\/131\/revisions\/527"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/leanmagazine.net\/wp-json\/wp\/v2\/media\/164"}],"wp:attachment":[{"href":"https:\/\/leanmagazine.net\/wp-json\/wp\/v2\/media?parent=131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/leanmagazine.net\/wp-json\/wp\/v2\/categories?post=131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/leanmagazine.net\/wp-json\/wp\/v2\/tags?post=131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}