Thoughtworks breakfast - Emergent Design & Evolutionary Architecture
Posted on February 16th, 2010 by Stephen Hurn – 10 CommentsThis morning I was the most casually dressed person at a Thoughtworks run seminar called “Emergent Design and Evolutionary Architecture”. The seminar itself was extremely well planned and executed, despite the lack of effective air conditioning. The speaker was an American named Neal Ford, who Thoughtworks had flown out to Australia to speak at these events (there are two more, which you can catch for free in Sydney and Melbourne).”
Neal has previously written a series of articles on this topic for IBM, which can be found here: http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=evolutionary+architecture+emergent+design:
One thing that Neal said that really stood out to me so much that I wrote it down was this “Requirements gathering is a lossy compression algorithm”. This comes down to a philosophy of software engineering most famously articulated in the Fall 1992 “C++ Journal” by Jack Reeves, who said that every engineering discipline produced a document as a deliverable and with software engineering this document is the source code. What this means is that when I, as the product manager, go out on site and visit clients and gather requirements I do not produce the final design. The design is not final until the last line of source code has been written.
Neal warned of a number of mistakes that are made by many software development teams. There is this idea that software architecture needs to be thought through before coding begins. This unfortunately leads to a number of problems because of the tendency to abstract things too early in the process, which increases the “accidental complexity” of software. Accidental complexity is the complexity of a solution over and above the complexity necessary to solve the actual problem. This is often caused when a developer says or thinks “we should do this thing now because we might want it later”.
Instead of up front design, Neal talked about architecture based on extracting idiomatic patterns from source code. This is different from Design Patterns in that idiomatic patterns are solution-specific architectures, while Design Patterns are generalised problem solutions. One example that Neal gave on extracting idiomatic patterns from code involved analysing an open source Java project. He worked out which areas of the code were both highly used and highly complex by analysing cyclomatic complexity (highly complex) and afferent coupling (how much other code uses this code). Simply doing this analysis showed that the most complex and highly used parts of the code in this project did similar things, which made it obvious what had to be done to improve the code.
The final concept that I wish to discuss (this is by no means an exhaustive list of what was covered - for that, attend one of the Sydney or Melbourne meetings or read the linked articles) is that of the concept of “technical debt”. Technical debt is a metaphor used to describe the difference between perfectly clean code and the code that you have. In many ways it works like credit card debt. The faster that code is created the messier it tends to be. This messiness causes future work on the code to take longer. The extra time that it takes to develop new features in the code is the “interest payment” on the technical debt. Some level of messiness is usually ok and it is up to each individual company to decide how much technical debt they wish to incur. In some cases the only factor is speed to market, in which case it is probably best to ignore technical debt. In other cases (in the case of us) the code that we write has a very long lifespan which means that addressing technical debt is something that we wish to reduce as much as possible.
In all I was extremely impressed with the whole presentation and would recommend it to anyone who is involved in software development. This was one of the best presentations that I have ever been to on software development. If you’re in Sydney or Melbourne, make sure you get along to the next one!
Thanks Stephen,
Sounds like an interesting presentation.
When I get some time, I would like to check out the materials referenced on the IBM site - though it is more important that those in our Division for DDD WCW (a.k.a. Products Division) do this. Certainly when our General Manager for DDD WCW is onboard, I would expect that they would be leading this kind of ongoing learning for our growing team.
I will contact Neal Ford directly, as I am unclear on whether something was the intent of his message, or whether it was just lost in translation. This has to do with the following:
1) With reference to Software Engineering:
2) With reference to other branches of Engineering:
Hope this makes sense.
We have come a long way in 8 months, but have a long way still to go…
Paul
“You quote Neal Ford quoting Jack Reeves as stating that “every engineering discipline produced a document as a deliverable …” - with the implication being that the design (in other disciplines) as “done” (and all uncertainties addressed) when the document is drawn up, whereas it is not in software.”
I am unsure of what you mean by this statement. I was trying to state that in software, the final design document is the source code itself. It is the document which describes to the “builders” (compiler) where to put “all their nuts and bolts” (machine or interpreter level instructions).
In the empire state building example, the final deliverable for the engineers was not the building itself, but the plans for the completed building. Just because the plans were delivered in parallel with construction doesn’t change the fact that the plans were the engineers’ deliverable.
Perhaps I am misunderstanding your point.
Good article Stephen. Sound’s like you enjoyed the seminar.
I’d be careful with how you think about technical debt. Maybe I’ve taken what you are saying the wrong way but I don’t think you should consider there being 2 different cases here (speed to market and long lived code) that need to be treated differently. It is not something that you either ignore or don’t ignore. You will always have some tech debt. The comparison with financial debt is based on the assumption that you would take on debt for short term gain with the intention of paying it off at some later point. If you never pay it off then things get worse and worse (much like financial debt).
The important thing is that you’re not trying and keep your debt at zero at anytime. There are always going to be things in your code base that you don’t like but it doesn’t mean that you should change them immediately when you notice them to keep your tech debt down. Keep track of them and pay them off by treating them like any other chunk of work (prioritise it relative to other upcoming things in terms of importance etc.).
Regarding your discussion about the document being a deliverable and what that means. It sounds a bit like you guys are discussing different kind of things so don’t get your wires crossed. I think that Stephen is talking about the act of actually writing the software (a developer concern) and Paul more about the entire process of delivering it (the concern of the whole team). The point is I think you might be arguing about slightly different things.
Thanks Justin,
You make some good points:
1) re Technical Debt
2) re Crossed Wires
Hope the snows are enjoyable!
Cheers
Paul
My apologies if I sounded like I was refereeing an argument. I didn’t mean it that way and completely agree that this sort of thing is healthy!
Also while I think it’s very important to take pointers from other disciplines like you’re saying, it’s also important to realise that software has it’s own unique qualities as well. I think the big difference for me comes because very often software can be changed without the cost of it being prohibitive. Or at least that’s the perception everyone has.
For example, you can’t go changing the way the foundation’s of the Empire State Building are designed when the top floor is in place (unless you’re spending a whole lot of money). Software tends to not be like that. The fact is, because it’s (perceived as) able to change, techniques that enable it to change more rapidly that minimise the cost make a lot more sense. While change still does cost (and too often people think it’s free) it is no where near as much if it’s done right.
On a related point, i.e. “design is not finished when a spec is written”. I’d be thinking about why you would even need a spec in the first place. If the design is never complete until the completion of the release then that spec and the time spent on it become a big waste of money. A big formal spec document will tend to get ignored when the project is in development anyway.
A design spec is useful for some purposes. The primary use for a design spec is to assist the developer(s) get their head around the high level problems. It should only ever be done by the people who are going to be writing the code and only ever to assist them getting started on what they are doing. And is in many cases not really necessary.
A design spec is an aid, not a holy book.
Regarding written specifications I think the key point here is, as Stephen says, that its purpose is “to assist the developer(s) get their head around the high level problems “.
As we have been working through a business planning process for a spin-off business recently, something I said with reference to that debate is relevant here:
For more of my view, see my post “Why do we document”.
The conventional view of a spec as a bible, or as a record, does not figure for me. A stapled group of User Stories, and properly commented code, would be much more effective.
To avoid future confusion, I would much prefer we did not even use the term “spec”, because of the conventional view it conveys.
[...] by Stephen’s glowing recommendation of the Thoughtworks presentation “Emergent Design & Evolutionary Architecture”, I [...]
What “Technical Debt” is, and is not
Thanks also, Justin, for pointing us (offline) to this explanation of why “A Mess is not a Technical Debt”.
I note that the comments in this article reference this YouTube clip in which Ward Cunningham discusses why he came up with the metaphor of “Technical Debt” in the first place
Makes it easier to understand than before.
One more example of how we all have much still to learn…
Well I would disagree with that blog post. A mess is a type of technical debt (credit card debt instead of home loan debt). Time still needs to be spent repaying it. In this case it is “bad debt” (e.g. borrowing money to pay for a big night out) and not good debt (e.g. borrowing money to finance an appreciating asset, like a business or property).
What is being advocated is that businesses should only try and acquire good debt. When a better understanding of the problem is apparent after the development work has been done, that good debt may be paid off. The bad debt should never be acquired in the first place.