1 These articles are available in the publications section of www.objectmentor.com. There are four articles. The first three are entitled “Iterative and Incremental Development” (I, II, III). The last is entitled “C.O.D.E Culled Object Development process.”
2 The website http://c2.com/cgi/wiki. contains a vast number of articles on an immense variety of subjects. Its authors number in the hundreds or thousands. It has been said that only Ward Cunningham could instigate a social revolution using only a few lines of Perl.
3 Any credible intellectual work written between 1995 and 2001 must use the term Kuhnian. It refers to the book The Structure of Scientific Revolutions, by Thomas S. Kuhn, University of Chicago Press, 1962.
4 If you mention Kuhn twice in paper, you get extra credit.
5 Kent Beck, Test-Driven Development by Example, Addison-Wesley, 2003.
1 Private communication
1 “Product-Development Practices That Work: How Internet Companies Build Software,” MIT Sloan Management Review, Winter 2001, reprint number 4226.
4 Peter Coad, Eric Lefebvre, and Jeff De Luca, Java Modeling in Color with UML: Enterprise Components and Process, Prentice Hall, 1999.
6 [Beck99], [Newkirk2001]
2 I have seen pairs in which one member controls the keyboard and the other controls the mouse.
3 [Williams2000], [Cockburn2001]
5 I’m not advocating a three-tiered architecture here. I simply chose three common partitions of software technology.
6 Ron Jeffries says, “End to end is farther than you think.”
1 [Beck99], [Newkirk2001]
5 Peter Coad, Eric Lefebvre, and Jeff De Luca, Java Modeling in Color with UML: Enterprise Components and Process, Prentice Hall, 1999.
7 Scientific Wild-Assed Guess
8 Many developers find it helpful to use “perfect programming hours” as their task points.
3 A test that knows and depends on the internal structure of the module being tested.
4 A test that does not know or depend on the internal structure of the module being tested.
6 The manner in which FitNesse calls these API functions is beyond the scope of this book. For more information, consult the FitNesse documentation. Also see [Mugridge2005].
1 [Fowler99], p. xvi
2 I once watched Kent Beck refactor this very same program. He did away with the square root altogether. His rationale was that the square root was difficult to understand and that no test that failed if you iterated right up to the size of the array. I can’t bring myself to give up the efficiency. I guess that shows my assembly language roots.
1 Dave Thomas and Andy Hunt call this programming by coincidence.
2 For those of you who do not have English as your first language, the term fravle the arvadent is composed of nonsense words and is meant to imply some nondescript programming activity.
3 Actually, the practice of test-driven development would very likely force the design to be flexible enough to endure the boss without change. However, in this example, we’ll ignore that.
1 [DeMarco79], p. 310
2 [PageJones88], p. 82
1 [Jacobson92], p. 21
3 In C/C++, changes to enums can cause a change in the size of the variable used to hold the enum. So, great care must be taken if you decide that you don’t need to recompile the other shape declarations.
5 It is possible to solve this problem by using the ACYCLIC VISITOR pattern described in Chapter 35. Showing that solution now would be getting ahead of ourselves a bit. I’ll remind you to come back here at the end of that chapter.
2 On a reasonably fast machine, that overhead is on the order of 1ns per method invocation, so it’s difficult to see Joe’s point.
3 Often, you will find that those reasonable assumptions are asserted in the unit tests written for the base class. This is yet another good reason to practice test-driven development.
4 [Meyer97], p. 331
5 [Meyer97], p. 573
6 The term weaker can be confusing. X is weaker than Y if X does not enforce all the constraints of Y. It does not matter how many new constraints X enforces.
7 The language was C++, long before the standard container library was available.
8 The original code has been translated into C# here to make it easier for .NET programmers to understand.
9 Despite the similarity of this example to the
Rectangle example, it comes from a real application and was subject to the real problems discussed.
10 [Wirfs-Brock90], p. 113
1 [Booch96], p. 54
3 Actually, there are ways around this if you can use strings to create classes. C# allows this. So do several other languages. In such languages, the names of the concrete classes can be passed into the program as configuration data.
4 In dynamic languages such as Smalltalk, Pyrhon, or Ruby, the interface simply wouldn’t exist as an explicit source code entity.
1 Actually, it denotes generalization, but as far as a C# programmer is concerned, the difference is moot.
2 This is called a realizes relationship. There’s more to it than simply inheritance of interface, but the difference is beyond the scope of this book and probably beyond the scope of anyone who writes code for a living.
3 The quotation marks that look like double angle brackets « ». These are not two less-than and two greater-than signs. If you use doubled inequality operators instead of the appropriate and proper guillemet characters, the UML police will find you.
4 [Booch94], p. 186
5 Some of you may remember the Booch notation. One of the nice things about that notation was its convenience. It was truly a whiteboard notation.
6 Exercise: Why was it enough to clone the
itsLines collection? Why didn’t I have to clone the actual
7 [GOF95], pp. 163, 175, 207
1 This problem comes from my first book: [Martin1995], p. 60.
2 That name is particularly appropriate for the kind of coffee that I like to make.
3 OK, I’m having a bit of fun. But what if?
5 [Martin1995], p. 65
1 [GOF95], p. 20
2 [GOF95], p. 127
3 This special form of the FACADE pattern is known as a GATEWAY. For a detailed discussion of GATEWAYs, see [Fowler03].
1 I call this the JUST CREATE ONE pattern.
2 I’ve also got this bridge I’d like to sell you.
1 [PLOPD3], p. 5. This delightful article is full of wit, irony, and quite practical advice.
1 I could use the VISITOR pattern to solve this problem, but that would probably be way overengineered.
2 OK, the customer is me.
4 This is optimistic. In a simple application, such as payroll, the use of an OODBMS would have very little impact on the design of the program. As applications become more and more complicated, the amount of impact that the OODBMS has on the application increases. Still, the impact is far less than what an RDBMS would have.
5 Sometimes, the nature of the database is one of the requirements of the application. RDBMSs provide powerful query and reporting systems that may be listed as application requirements. However, even when such requirements are explicit, the designers should still decouple the application design from the database design. The application design should not have to depend on any particular kind of database.
1 Webster’s Third New International Dictionary
2 The name main sequence was adopted because of my interest in astronomy and HR (Hertzsprung-Russell) diagrams.
1 Again, this isn’t exactly necessary in C#. You might get away without recompiling and redeploying clients of a changed interface. But it’s a risky business.
1 [DeMarco82], p. 3
3 One might think that a better formula for A is the ratio of abstract methods to total methods within the package. However, I have found that this formula weakens the abstraction metric too much. Even one abstract method makes a class abstract, and the power of that abstraction is more significant than the fact that the class may have dozens of concrete methods, especially when DIP is being followed.
4 It is impossible to plot any package outside the unit square on the A versus I graph, because neither A nor I can exceed 1. The main sequence bisects this square from (0,1) to (1,0). Within the square the points that are farthest from the main sequence are the two corners (0,0) and (1,1). Their distance from the main sequence is
5 I spent about 2 hours compiling by hand the statistics and computing the metrics for the payroll example. Had I used one of the commercially available tools, it would have taken virtually no time at all.
6 As a practical solution, I usually ignore couplings from the main program.
1 Note the similarity in structure to the PROXY pattern.
1 [GOF95], p. 293
2 “Push model” observers push data from the subject to the observer by passing it in the
Update methods. “Pull model” observers pass nothing in the
Update methods and depend on the observing object to query the observed object on receiving an update. See [GOF95].
2 All modems used to be dedicated; it is only in recent geological epochs that modems took on the ability to dial. In the early Jurassic period, you rented a breadbox-sized modem from the phone company and connected it to another modem through dedicated lines that you also rented from the phone company. (Life was good for the phone company in the Jurassic.) If you wanted to dial, you rented another breadbox-sized unit called an autodialer.
1 I have to say that I hate the database access systems in today’s major platforms. The idea of building up SQL strings and executing them is messy at best and certainly baroque. It’s a shame that we have to write programs to generate SQL which was meant to be read and written by humans but that instead is parsed and interpreted by the database engine. A more direct mechanism could (and should) be found. Many teams use persistence frameworks, such as NHibernate, to hide the worst of the arcane SQL manipulations, and this is a good thing. However, these frameworks merely hide what ought to be eliminated.
1 [GOF95]. For
Acyclic Visitor and
Extension Object, see [PLOPD3].
2 [PLOPD3], p. 93
1 [GOF95], p. 305
3 [PLOPD1], p. 383
1 Or so it seems to the unwary software architect. In many unfortunate cases, this extra infrastructure provides much more benefit to the vendors than to the users.
1 Jack Reeves, “What Is Software Design?” C++ Journal, 2(2), 1992: Reprinted with permission. ©Jack W. Reeves 1992.