Frans Bouma's blog

Generator.CreateCoolTool();

Syndication

News



    Visit LLBLGen Pro's website

    Follow me on Twitter

    Add to Technorati Favorites

About me

Fun stuff I created

My work

Is BDUF really BDUF?

Justing Etheredge posted a great article about that Design Up Front (DUF) is something else than Big Design Up Front (BDUF). He discusses the misunderstanding that just because BDUF is considered harmful in a lot of projects, it's not said that DUF is too and one should just jump in, start hammering in code and hope for the best. As an example of BDUF, Justin uses the example of a car manufacturer and asks himself why a car manufacturer uses BDUF (according to Justin) and we in software land often don't or at least try to avoid it.

One of the arguments he uses is that software is easily changeable, or at least easier changeable. I beg to differ. Sure you can change text in an editor, use some refactoring tool to get very low level refactorings on your code, but that's similar to hammering the drive train which doesn't fit till it does: it doesn't change a design. It changes the result of the design. One of the biggest problems in software land is that clients / customers think software is easy to change and that they can ask for changes right in the middle of a project or even at the end. Ever saw a large building which was almost completed to be transformed into something else with the swimming pool at the top instead of the basement right before it was done? No, because every human knows that changing a building when it's finished is very hard to do.

But software has the same restrictions.

Software parts represent functionality. This functionality is consumed by other parts so those parts can deliver their functionality and so on. This is a functional dependency, not necessarily a technical. I'm not talking about code, I'm talking about functionality and the design of the functionality elements inside the total system and subsystems, data flows between them etc. etc. Code is created from these functionality elements, so the programmer knows what to write and the architect knows what that piece of code does. That's Software Design 101, and for the hard-boiled 'code == design' visionairs: think again why you wrote class ABC the way you wrote it and not differently.

It's these functional dependencies which make it hard to change a design after code has been written. The reason is simple: changing the functional elements often leads to a lot of changes in the code (which is nothing more than the executable form of the functional elements). Changes which aren't made from the code's Point of View (POV), but from the functionality's POV. This means that refactoring code isn't a technical matter anymore, but a functional one: the basis of the code, the sole reason the code is there has changed.

So, Justin has a good point in stressing the fact that DUF is required. What's left untouched is when a design becomes 'Big'. I think what's meant with BDUF is that the design is completely done up front and not changed. DUF is more of a design where the borders are known, the general goals are known but the details in a lot of areas are filled in along the way. There are two things important to make this work:

  • Know the goals of the project. A comment by Glenn Block has a good point: often the goals are unclear so what a project should become is unclear, so doing design up front is a task which can't be completed as what to design is unclear. I think that the acknowledgement of not having a clear set of goals is something which should lead to a quest to get these goals defined properly before anything is done further. Remember: this doesn't mean you've to define details. It means you have to analyze and determine what the core problems are the software is trying to solve and what the possible solutions are to these problems.
  • Details shouldn't be able to change the design. To be able to fill in details during a project, you shouldn't run the risk of having a required detail forcing a significant change in the project, which for example could change a lot of the rest of the project already written.

Agilists will now say that by following Kent Beck's rules their software automatically evolves into something a customer / client wants. Though the engineers at BMW as described in Justin's example also are able to provide a car which works, drives well and a lot of customers are willing to buy it. If BDUF is so bad, why are BMW able to produce cars which work well, using BDUF? Justin uses the argument of 'costs' to illustrate that within software we simply can't do BDUF. Though I think costs have nothing to do with it. One of the reasons is that building cars also costs a lot of money, millions if not billions. Although BMW's cost a reasonable amount of money, small European cars are often very inexpensive and are build with the same principle. Having 1 billion in development cost is a big hurdle to overcome when a company wants to make money in the end.

If you consider the fact that large software projects also cost a lot of money (here in the Netherlands we have had some terrible government project failures recently which added up to more than a billion Euros), and in general are meant to bring other costs down, it's first-grade math to conclude that a software project has the same restrictions: to make a profit, costs shouldn't be too high. That costs shouldn't be too high isn't an argument that costs are relevant or a reason BDUF doesn't work: a failure is much more expensive: having to throw away a lot of the work done because an important part of the design has to change is very costly, so the path followed by BMW and other car makers is simply to avoid having to do that. But, isn't that also true in software land? Can we affort to throw away a lot of work because the design has to change? No.

So what's the secret? Why is BMW pulling it off with BDUF and we poor software developers aren't? It's simple: BMW actually doesn't use BDUF. They use roughly this route:

  • Defining the goals of what the car should meet: which category it should fit it (so they know their competitors and the target price), should it be a family car, sports car etc.
  • Make a rough design within boundaries which are well known. This has nothing to do with details like the thickness of the steering wheel. It has everything to do with the areas they have previously experience with: an engine up front with front wheel drive gives different characteristics than an back wheel drive, etc. etc.
  • Make a prototype. Often these prototypes are build with existing, proven parts, like the base of a different model. Subsystems which are new, are filled in with surrogates
  • Test the prototype in a wind tunnel and with a computer model
  • Build the subsystems they need and design the assembly lines
  • Test the final version and tweak here and there some things, like car height etc.. This phase, it's impossible to change a lot of the car, as that would make a lot of things change with it, effectively going back to an early stage in development. In software, this is the same thing

Don't let the word prototype make you go blind and ditch this path as stupid or not applicable to software. The lesson to learn isn't in the word 'prototype'. The lesson to learn is in the second step and the third step: design within known boundaries and re-use proven parts. This isn't at the level of code, if we project this onto software development. It's at the level of functionality elements: if you need authentication, pick the authentication subsystem which worked the last time and use that and move on, as that's already solved. After you've decided that, you can check whether the implementation you have of that functionality still works or you have to refactor it. Though it's not at the level of 'I have this class, it will work'. That class represents functionality, that functionality should fit into the design. If not, don't use that class. A simple matter of what comes first and what follows.

I know, someone will come up with 'but... BMW is creating a product, we're creating software for a client who doesn't know what he wants/needs'. Think! You're not in a different position than BMW is. In fact, you're in a better position, because you know your client, your customer, you can even ask questions. BMW can't, they can only research what a potential customer might look for. Though if you think a person who buys a car is a person who knows what s/he wants and a person who buys software is a person who has no clue, you're wrong: both think they know what they want and both turn out to have no clue what they want. That's ok, that's why they hired you to analyse what they need and give that to them.

Yes, Software Engineering is hard, deal with it. Don't use the excuse that because goals are unknown, because the client changes his mind every day the design therefore has to be done in the code editor. If those are your problems, solve them, deal with them. Because after all, software isn't written for the sake of writing software, it's written to solve a problem, to make things easier, better handleable and controllable and understandable. What your client needs therefore should fit in that criteria and it's your job to figure out if that's the case and in what form, not your client's.

Published Sunday, September 14, 2008 11:53 AM by FransBouma

Comments

# re: Is BDUF really BDUF?@ Sunday, September 14, 2008 10:07 AM

I think that our disagreement falls into the land of "it depends". The points that you are arguing, and the points that I am arguing, vary depending on the size and scope of the project. Admittedly, most of the projects that I have to deal with on a day to day basis are not huge billion dollar projects. So, doing a BDUF in order to iron out the details and prototype what we are building would represent a significant portion of the total cost of designing the system. This is the part that I define as "Big".

I know that you are probably going to disagree with this, and that is fine. But I think that the agile approach of creating and refining many parts of the application's design during construction can really offset a lot of the upfront planning and design costs. And sometimes can even result is better design decisions being made. That isn't to say though that someone should just build an application without knowing the purpose of what they are building.

Justin Etheredge

# re: Is BDUF really BDUF?@ Sunday, September 14, 2008 10:45 AM

Justin: I'm not in disagreement with you that in general for a software project a BDUF is probably not the approach one should opt for (and often never will be an option).

I hope that I have expressed that if you fill in details (refinement as you call it) along the way is what I see as a right approach to overcome the problem that it's impossible to know all details up front, but I think that's true for a car as well: not all details are known up front nor are they designed up front as well. I therefore think that your second paragraph in your reply is what I said as well, so no disagreement there. (if that's agile or not, I don't really care though)

FransBouma

# re: Is BDUF really BDUF?@ Sunday, September 14, 2008 6:56 PM

"Don't let the word prototype make you go blind and ditch this path as stupid or not applicable to software"

We actually use prototyping a lot (part of our first stage) when developing software. Most of our customers are european small/medium sized companies who don't have clear workfows or don't have a full (or documented) understanding of their own processes.

So prototyping (visual not functional) combined with refactoring/small delivery cycles with feedback/spikes and tdd have solved many of the isseus we had with developing for fast changing small companies (and definitely not knowing all the details up front).

My point is: I don't think that prototyping should always be associated with a bduf and can even find its place in a somewhat agile process. Personally I believe that you should do a duf and should apply agile practices but without exagerating.

koen

# re: Is BDUF really BDUF?@ Monday, September 15, 2008 4:33 AM

I have encountered several times developers who indeed assimilate a half day discussion to flesh out technical details of something that will need developing over a couple of weeks/months as waste of time because :

- We ought doing the bare minimum at each SCRUM iteration

- Doing any technical discussion is BDUF

I attended a talk with Scott Ambler and he was quite cynical about the ostrich attitude of the agile community and I quite agree with this.

I find it quite funny that the term "spiking" has emerged lately too!

Daniel Fernandes

# re: Is BDUF really BDUF?@ Tuesday, September 16, 2008 2:07 PM

Oh Frans Bouma, you just gets it don't ya? True insight is such a valuable quality and so severely lacking in this industry

Christian

# re: Is BDUF really BDUF?@ Tuesday, September 16, 2008 4:02 PM

I agree that software cannot be created without some sort of design. Even agile developers need to undertake design before diving into the code. The difference is that the design is focused and the scope will cover small areas (functional components as you call them).

Designing this way is often much easier and productive as the complexity of trying to understand too much too soon is removed. Just In Time design (JIT) if you like... Some will argue that without a wholistic design or one that takes in the big picture development of smaller parts is too risky and in some cases impossible.

This is where sound software engineering best practise and principles come into play. It is the developers job to manage dependencies within the application to ensure low coupling but high cohesion and minimise the affect of change within the system.

Change is something we should embrace as software developers, it is not something we should be scared of, it is a sign of a bad software architecture when a change is too costly to accept (and yes of course there are exceptions).

I think the analogy or comparison to car manufacture is way off the mark...

BDUF works for them sure but I don't believe any other way would even be possible. You see agile and BDUF in software because both are possible of achieving success, you do not see it in manufacturing/construction projects as it is not feasible or possible...I have certainly never heard of one???

StuartC

# re: Is BDUF really BDUF?@ Thursday, September 18, 2008 3:32 PM

design up front is pivotal.  You need an architecture to build a solid, standing, structurally integral house, building, or sky scraper.  Without this you have a shoddy, crappy, hacked together building.

The same is true for software.  However there is an underlying difference.

In building we know what does or doesn't work, we (society) rarely allow innovative or new construction techniques to be used, and only stick with the tried and true in most circumstances.

In software nobody does this, the newest and latest is usually better than what was good and standard just a few years ago.  In such a competitive industry one HAS to move past the tried and true and try new things.  Innovation is pivotal.

With that said (written), software just can't do the BDUF that an old industry like that does.  But at the same time we can't ignore the fact that we DO NEED design up front.  Otherwise developers run off into ostrich land and bury themselves.  This however, if done properly, should be mitigated by thorough communication.  This is the reason for daily scrums.

If the communication fades, the daily chats, scrums, and discussions don't take place, the architecture and design up front fails.

This really, in the end is more of an indicator of the older approaches than an ostrich approach of agile.  If someone follows the MAIN tenets of agile, communication, continuous communication is fundamental to the success of the project, the architecture, and the sprints.

Adron

# re: Is BDUF really BDUF?@ Thursday, September 18, 2008 3:34 PM

oh yeah, btw.

"Though the engineers at BMW as described in Justin's example also are able to provide a car which works, drives well and a lot of customers are willing to buy it. If BDUF is so bad, why are BMW able to produce cars which work well, using BDUF?"

This is one reason why the market share of Japanese auto makers has been beating down the doors of BMW, Merc, and others.  The Japanese cars are proving to be just as good of quality, at much lower prices, that last as long or longer than those cars.

The Japanese makers do NOT do BDUF.  The do design, build, design, build... i.e. JIT.  They're change a door or an interface a month before release because they can.  Agile came from this type of practice and mentality.

So in the end, that's not an apples to apples comparison, and I'd argue that in what it can compare, it favors the methods of agile just by evidence in the market.

Adron

# re: Is BDUF really BDUF?@ Friday, September 19, 2008 10:33 AM

I once read that we are all philosophers, and that if we didn't think we were, we were just bad philosophers.  In the same way, we all do design; when we deny our own internal dialog and mental shuffling as design, we are simply bad designers.

We go through miniature development cycle many times a day in some cases, a microcosm of larger project cycles.  Given a small feature to implement or a bug to fix, we design in our head how exactly to implement the nitty gritty details, we plan our work (serialize micro-tasks through time), and write or modify the code according to that plan.  Then we build, deploy, test, and repeat the cycle throughout our day until that feature is complete or the bug is fixed, and move on to the next task.

Developing solutions is a series of nested cycles, large ones made up of smaller ones.  To ignore or deny that, to presume that everything in linear and proceeds in a completely ad hoc manner is short-sighted and inefficient, as it sweeps global, holistic considerations under the rug and pretends they're not important.  The larger the project, the more the larger picture needs to be envisioned, and that vision somehow must be shared across the team.  That's what architecture is really about, IMO: communication and sharing of vision.  What are the critical points?  What are the difficulties?  How do you make an ecosystem of components communicate and collaborate in a consistent way?

Software SYSTEMS are about more than individual pieces or a string of ad hoc tasks.  They exist at multiple levels, and must be designed differently at each level.

It's common, when we err, to overcompensate.  When first learning to drive, we turned a little too far to the left, and then we swerved wildly to the right to compensate... until we learned how to control the vehicle.  The software industry was faced with great complexity early on, so it attempted to design everything up front for a while.  When that proved infeasible, an "agile" crowd formed around the idea of minimizing or "eliminating" up-front design, which was movement in the right direction but clearly an over-compensation.

The software industry is still young, and we're still trying to learn how to control our projects.  Until we do, developers are likely to jump to extremes in the amount of up-front design they do.  I think it's a matter of testing our boundaries, learning what works and what doesn't, and eventually we'll get it.  At some point, we'll find the sweet spot: the Just Enough Design principle.

Dan Vanderboom

# re: Is BDUF really BDUF?@ Monday, September 29, 2008 11:45 AM

The most of the project failures are caused by problems with the requirements. Getting the requirements clear, educate the customer and distribute the requirements to project participants is necessary before the development effort starts. There is no shortcut or software development approach that will save you from bad requirements. Even more, in the case you didn’t clarify the major requirements up-front, agile (scrum) approach will help you fail gracefully. If this happens, blame the programmers for the bad outcome and you can proceed to your next scrum(agile) project...

Japanese manufacturers do not use agile. More than 7 employees involved is not agile by definition. They don’t have scrum meetings. What they have are blue-prints and documentation – up-front. If you manage to design, test and build a car with 7 employees without the upfront blue-print I'd be glad to attend the course, university or book which teaches such skills.

Producing the several designs and prototypes upfront, in the car industry is a must. This applies to European and Japanese manufacturers as well. The blue-prints, several prototypes and tests are finished _before_ the manufacturing line has been constructed.

Every change in requirements has its price and agile approach does not provide the means to mitigate those costs. Even worse you're than stuck with rework overhead which is a clear advantage of Unified Method or other BDUF approaches.

Comparing the present software requirements and projecting them to car industry we can imagine the car-industry requirements like:

Requirement 1: The vehicle must have four wheels

Requirement 2: The vehicle must have two wheels on the narrow roads

Requirement 3: The driver may make selection between four wheels vehicle and two wheels vehicle before he starts the engine.

Requirement 4: The car must be foldable to pocket size.

Nexo