7

I know methodologies, like Extreme Programming (XP), which specifies its own specific practices for developing software. However, unlike Scrum where it focuses more on management aspects, XP specifies software practices that are required to be followed. From reading this article, these steps eliminate the explicit modeling phase using tools such as BPMN and UML. In another article from Martin Fowler, he further explains such discouragement.

Personally, I prefer the model-driven methodologies I guess it's up to the preference of companies and people. One of Agile goal is to "free developers from document works". Methodology like XP seems to easily lead to under documentation. I think to achieve that goal, the solution is to implement the tool to help developer reduce the workload on writing document, not by writing less documents, by gathering information from existing diagrams and automatically generate reports (in RTF, PDF, HTML in the case of Enterprise Architect of Sparx System).

Some software engineers also complain about drawing diagrams consuming their time. In my opinion, the solution is not to draw diagram, but using the tool. Modeling tools today support round-trip engineering, where you can synchronize between your code and your diagrams, thus eliminates the extra effort to manually correct the diagrams if the code base changes (specifically, class diagram).

How does modeling fit into a team that is using Extreme Programming?

Christophe
  • 74,672
  • 10
  • 115
  • 187
Amumu
  • 824
  • 2
  • 8
  • 14
  • 2
    Where did you read that "XP specifies software practices and requires you to follow, and eliminate the modeling process"? I can find no such information. – Thomas Owens Jan 26 '12 at 10:59
  • @Thomas Owens here is the link: http://xprogramming.com/articles/fussaboutdocumentation/ – Amumu Jan 26 '12 at 11:10
  • @Oded what's wrong with this question? The main question is one the title. The supplementary question is in the content. What's not constructive about this question? I don't want to start a flamewar or troll, I just want to question and discuss the effectiveness of various development methodologies. – Amumu Jan 26 '12 at 11:12
  • 1
    @Amumu I don't see where it says to not use UML. In fact, quoting that link: `You may well need some nicely formatted UML for your project...If and when you really need these things, then by all means you should do them. But inside your collocated Whole Team, you most probably will not need them, because the information you need will be communicated through the more effective medium of conversation.` – Thomas Owens Jan 26 '12 at 11:12
  • Moved to Thomas's answer. – Amumu Jan 26 '12 at 11:23
  • 2
    Honestly Amumu, if you prefer model-driven methodologies I would definitely continue using them. Don't feel pressured to switch to a methodology where that approach is de-emphasized just because it is the latest fad. – Antonio2011a Jan 26 '12 at 21:23
  • 2
    I think people like Beck, Fowler have a lot of success with XP, because they have so much experience with programming and architecture that they can use a more light-weight approach. It is a mistake to generalize this to assume that XP is the best for everyone. Depending on the nature of the project, the team, and your own personal style, XP may not be the best approach. Most of the empirical evidence I have seen is not that persuasive, and it is a shame that the software engineering industry is so driven by fads and hype. – Antonio2011a Jan 26 '12 at 21:26

1 Answers1

10

XP doesn't explicitly call for the creation of a model, but it doesn't say that one should never be produced. If developing a model helps you to build and then document your system, it should absolutely be done. The difference is that Agile Modeling has a different focus than system modeling in a plan-driven environment. In fact, the Agile Modeling site even addresses specifically how you model in an Extreme environment.

Agile environments take a more Lean (in the same sense of Lean engineering or Lean manufacturing) approach. Some of the key tenants include reducing waste, deciding late, and delivering fast. In order to eliminate waste, only the required documentation is delivered at the appropriate granularity. If you produce a work product, that work product is expected to ultimately add value to the customer - waste is considered anything that doesn't help add value to the person paying for it.

In fact, the XProgramming blog article you linked to supports this:

You may well need some nicely formatted UML for your project...If and when you really need these things, then by all means you should do them. But inside your collocated Whole Team, you most probably will not need them, because the information you need will be communicated through the more effective medium of conversation.

The Martin Fowler article that you linked to also supports this:

Certainly XP de-emphasizes diagrams to a great extent. Although the official position is along the lines of "use them if they are useful", there is a strong subtext of "real XPers don't do diagrams".

A central idea of the agile methods is "individuals and interactions over processes and tools". You don't follow a process or use a tool for the sake of following the process or using a tool. If the task that you are working on does not add value or if it doesn't produce something that is useful to someone (either the customer or another engineer), then you don't do it.

Martin Fowler goes on to say:

The primary value is communication. Effective communication means selecting important things and neglecting the less important. This selectivity is the key to using the UML well. ... A common problem with the common use of diagrams is that people try to make them comprehensive.

Again, same idea. The purpose of any documentation is communication. If you are producing things that don't help you communicate the system, why are you doing it? Don't focus on every little detail, but focus on communicating a message that provides useful, value-adding information to someone else.

Even later in the article, Fowler goes on to note that one of the problems with CASE tools is that they can fall out-of-sync. As soon as the code and the documentation fall out of sync, the document adds no value. I'd even take this a step further and say that it adds negative value, as it provides false and misleading information to anyone who tries to use it to make a decision. If you have a process to maintain synchronization, that's good. However, if you don't and you do let your documents fall out of sync, this brings up another question: why do you have them? They clearly aren't being used, or else they would be maintained.

Rather than some other model-driven methodologies requiring the models, even if they don't necessarily add any value, XP calls for spending time and resources on things that actually help you deliver value to the customer/client. If you can justify that certain models actually do add value to your project, then by all means you should produce them. However, you shouldn't be producing models that duplicate other information or don't add value.

Thomas Owens
  • 79,623
  • 18
  • 192
  • 283
  • If you read the whole article, pretty much the author encourages the absence of documentation. An example is his opinion about maintenance documents. He said if it is missing, it won't hurt anyone. Sure everyone can dig into the source code, but it will cost extra time rather than reading the comments to quickly grasp the purpose of a function. Yes, he mentioned the use of UML occasionally, but the above bold advices strongly discourages its usage. – Amumu Jan 26 '12 at 11:25
  • Martin Fowler in his artical, "Is design dead?" http://martinfowler.com/articles/designDead.html , you can read about UML and XP to see how XP discourages modeling. However, in my original post, I mentioned about architect and mechanical engineer. People in those fields can produce very complicated drawing, and we are stucking with the UML? I also mentioned that tools help reduce the workload spent on the aspect like documentation. In fact, with round-trip engineering, I find it more productive. – Amumu Jan 26 '12 at 11:31
  • 3
    @Amumu I don't see anything, in either article, encouraging an absence of documentation. I'm seeing the idea that less concrete and more fluid, more just-in-time, and more value-adding documentation is better. It's still documentation, it's just captured differently. If you can say that UML adds value to your project, then you should do it. However, the argument is that on many projects, it doesn't add value, therefore it isn't necessary and shouldn't be done. – Thomas Owens Jan 26 '12 at 11:59
  • @Amumu I just added more information to my answer, quoting areas in both articles that show that XP does not discourage modeling, but discourages modeling **that doesn't add value**. – Thomas Owens Jan 26 '12 at 12:09
  • 1
    @Amumu Read [Agile Modeling and eXtreme Programming (XP)](http://www.agilemodeling.com/essays/agileModelingXP.htm#ModelingAndXP), it largely supports Thomas answer (and mine, if Thomas wasn't so quick). Also, if you are interested in XP, you should really get a copy of Kent Beck's [Extreme Programming Explained: Embrace Change](http://www.amazon.com/exec/obidos/ASIN/0321278658/ambysoftinc), Kent's hand drawn diagrams are amazing! - Thomas feel free to include those references in your answer. – yannis Jan 26 '12 at 12:25
  • @YannisRizos You should add an answer as your own take on this. I'm coming from a background where things like Lean, Six Sigma, CMMI, and Earned Value Management prevail, so I tend to focus on cost versus value, least waste, and so on. More answers never hurt anyone, especially from a different perspective. – Thomas Owens Jan 26 '12 at 12:32
  • @ThomasOwens In a sense I did add an answer, by upvoting yours. I would write an answer only if I felt I could significantly add to the discussion and modeling and design in general is not my cup of tea, I have been very careful to avoid any related responsibility in my professional career. And in this instance, the "Agile Modeling and eXtreme Programming (XP)" essay is a far better summary of my views on the topic than I could ever write. – yannis Jan 26 '12 at 12:46
  • @Thomas I remember someone said the line "Plan is useless, but planning is indispensable". XP seems to encourage get right into the programming job and produce the working product asap. That's a good thing, however, I don't think cutting down the planning phase help. First of all, what's is the modeling that doesn't add value? In my time in university, when I try to design up front before coding, I can see how my initial design become obsolete because my software keep on evolving and refining itself. (to be continued...) – Amumu Jan 26 '12 at 14:14
  • @ThomasOwens Thus, having to manually sync between the design and the real source code is an uncomfortable and tedious task. I can see the problem, and I used to doubt the whole UML thing. Despite, I still value the ideas of planning through the mean of modeling. Upon finding a decent UML tool for Linux (which most of them are not usable), I discovered the modeling tool like Enterprise Architect. It helped me to realize it's not UML is the problem. It's management the problem. (to be continued...) – Amumu Jan 26 '12 at 14:22
  • @ThomasOwens The point of CASE tools is that it helps software engineers manage all the artifacts, from requirement to source code. Without such modeling tool, I have to manually sync my refactored source code with every other artifacts (such as requirement, design, testing, deployment documents) to make it consistent. Otherwise, the other artifacts becomes obsolete and useless. With CASE tools, it helps you to automatically synchronize between the source code and the design (such as class diagram). (to be continued...) – Amumu Jan 26 '12 at 14:27
  • @ThoamsOwens Therefore, with CASE Tools, we can design upfront and during the implementation, changes made will be reflected back to the design document. With CASE Tools, the out of sync issue will be less relevant. Planning and designing up front brings more value than writing code immediately. – Amumu Jan 26 '12 at 14:34
  • @Amumu No agile methods discourage planning. Instead, they distribute the planning, architecture, and design throughout the project and enable you to plan a small portion (a single iteration) at a given moment in time. So rather than taking a baselined requirements specification, creating an architecture, and modeling it, you realize that requirements are going to change and you only design and model a subset of the functionality of the whole system at any given moment in time. (to be continued) – Thomas Owens Jan 26 '12 at 14:45
  • @Amumu Each iteration is, in and of itself, a complete project that undergoes project planning, requirements engineering, system architecture, detailed design, implementation, testing, and release. Over the life of a complete system development project, you will have many, many short (2-4 week, usually) projects. At any given moment in time, you realize that you have a limited understanding of the system, and you only model what you know. Then, as you progress through your iterations, you continually revise your models and your implementation. (to be continued) – Thomas Owens Jan 26 '12 at 14:48
  • @Amumu So if you realize that you don't know everything about the system, you realize that modeling the unknown is a waste of time. From a PMs perspective, time is money, and therefore is a waste of money since, in the future, the models become useless and need to be revised anyway. Rework is more expensive than work. – Thomas Owens Jan 26 '12 at 14:50
  • let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/2300/discussion-between-amumu-and-thomas-owens) – Amumu Jan 26 '12 at 14:55