Thursday, October 4, 2018

Should Order of Changes Affect Design?

Two paths. Both start by introducing a Search class. The first one adds a "filter" class used by search and the second adds a "sort" class used by search at the same time. The third phase adds "sort" as a dependency of "filter" in path one and "filter" as a dependency of "sort" in the second path.

Let's say you have to add three behaviors to your system, A, B, and C. They could be done in any order. In this hypothetical, you will learn exactly the same set of things as you implement them, regardless of order. So your understanding at the end of those three stories will be the same no matter what.

There are six paths you might take...
  • A, B, C
  • A, C, B
  • B, A, C
  • B, C, A
  • C, A, B
  • C, B, A
Should the choice of order affect the final design of the system?

Note: I'm not asking if it will or can, the way things are, now. I'm asking if it should.

I don't think it should. I think that the point of software design is to attend to the forces in your problem space. I can't see why the order of introduction should matter.