Unfortunately DIRE is a 4 letter acronym. I know the fashion nowadays is for TLA's but this was the best I could do.
SPACE vs TIME
JIT is an example of not isolating related activities in time. I guess in that case DIRE actually stands for Don't Isolate Related Events.
There are also many examples of not isolating related things physically (ie in space) - from the order of lines in source code to the seating arrangements of developers.
a few months ago (see Change).
is an example
is an example
by splitting the project into phases. This contravention of DIRE is the reason for all the problems with the Waterfall methodology and the main reason for the invention of Agile (as explained below).
the Layer Anti-Pattern in design is analogous to the Waterfall model of development
Unit Tests avoid this problem. Using Unit Tests as a substitute for design documentation allows you to take advantage of the DIRE principle. As documentation Unit Tests are directly connected to the code they are designed to document and test.
Disadvantages of DIRE
There are no inherent disadvantages of DIRE that occur to me. The main problem is that it may be a matter of opinion the best way to split up a task or problem, such as the design of some software.
For a large problem, we necessarily have to split it up to reduce complexity. Using divide and conquer we can usually isolate and solve sub-problems one at a time until the whole problem is solved. This is the most fundamental principle in software design, and in most technical problems. See my first post.
As an example, consider the Waterfall development methodology, which splits the process of creating software into phases (design, coding, etc). There are obvious advantages into doing the design of all the parts of the software at the same time, then all the coding together, etc. Doing all the testing at the end should avoid a lot of regression testing. However, experience (and awareness of DIRE) tells us that isolating the design of particular part of the software from the coding, and isolating the coding from the testing causes many problems.
Waterfall MethodologyThe Agile approach is to divide the problem up in a very different way. First, quickly get a minimal working version of the software, then add to it over time. I have previously discussed the advantages of this evolutionary approach, ad nauseum, so I won't repeat them here.
Agile MethodologyThe disadvantage of the Agile approach is the separation of related activities that occurs.
It's easier to design all the features at the same time since when you go back to design the next part you may have forgotten a lot of the original design. Similarly, most programmers will tell you that it is faster to implement Features 1a and 1b (of the above diagram) together. Finally, there will be a great deal of testing rework, since testing Feature 1b will probably entail retesting feature 1a and the core system again.
Unit TestingFortunately Agile techniques, particularly Unit Testing, come to the rescue in alleviating all these disadvantages:
- Unit Tests act as design documentation making it easy to do design and re-design at any time
- Unit Tests make it is easy to add new features without fear of breaking existing behaviour
- Much testing is automated with Unit Tests which means the re-testing is automated
However, by careful application of the DIRE principle it is often possible to reduce the "isolating" effects of the division. Further, Layer Anti-Pattern.