Let me give a counter example to the SevenPlusOrMinusTwo rule. Consider a street map of a city. There are 2 types: book-style, where you have to keep turning pages to follow your route, and full-sheet, where you need a large piece of floor to see the whole thing. Personally, I prefer the large sheet. My brain is quite capable of filtering out the irrelevant details and concentrating on just those areas that I'm interested in.
I was reading an article recently (I forget where) which pointed out that the 7+-2 rule is generally misunderstood. The Human brain is only able to focus on a small number of independent concepts. For example, if I give you a list of random words and ask you to repeat them, then most people can manage to repeat 7+-2. However, if I give you a sentence that contains a much larger number of words, such as this one, then there's a pretty good chance that you'll be able to repeat it without too many errors.
When I first learned the Shlaer-Mellor method, about 5 years ago, one of the first things that we learned was that the number of objects in a model is a property of the problem. If a problem contains 40 objects, then so does the model. Just as in the Map example, the human brain can cope with a large 2-dimensional diagram more easily than a set of smaller diagrams of the same problem. So draw 1 diagram with 40 spacially positioned objects instead of 6 diagrams, containing 7 objects each, linked together by invented concepts. SoftwareHasShape! But its difficult to see it when you cut it up into pieces.
-- DaveWhipp.
Dave, it is my considered opinion that you invent the 40 objects in dialog with the real world and those objects are not there without you present to divide up the world in that way. I will accept shades of grey: some objects are more there than others. My personal experience is that finding a few objects (top down) or chunking together a few objects (bottom up) is useful for my own understanding of a problem area. Nine is way too many (but this may reveal my personal limitations and not be a universal fact).
On the other hand, I agree with you about the value of putting as many of the classes, objects, and relationships on one giant piece of paper (or my office floor). For one thing, some purposes require dividing up the world in a different way than I did in my top-down explorations. For another, I sometimes need to verify that the indirect relationships implied by the direct relationships are valid.
Therefore the ideal case tool would have a feature for inlining and extracting structures for different presentations of the problem/solution and for maintaining those presentations as changes occur.
I'd contend that based on other brain research, that the reason you'd be able to repeat back a sentence like the above is that your brain has retained a VERY small number of key elements (let's say 7+-2) and that your language center is interpolating the rest of the sentence from those elements using known rules of grammar and sentence construction.
I completely disagree that the human brain can cope better with a large 2-d diagram rather than a set of smaller diagrams. One of great things about patterns is that they aid people in what cognitive scientists call "Chunking". In this context, this means they can look at a complex diagram and completely disregard most of it, instead remembering the small set of concepts that they need to know to understand (and repeat).
-- KyleBrown
You make my point for me. People can, indeed, "look at a complex diagram and completely disregard most of it". Look back at the 40+ word sentence I gave above. Do you think it would be easier to remember if I had grouped it into chunks of 7 words, and placed each group on a separate page? (OK, I know you didn't suggest that, but the 7+-2 rule often results in that type of fragmentation of software models). The brain sees a big sentence (or diagram) and internalizes it using an appropriate set of concepts. With diagrams, location can be one of those concepts.
(Interesting aside: when I moved from England to America, I had to learn to drive on the right-hand side of the road. This transition is not difficult: "I'm sitting on the left, so I drive on the right". But when someone says "turn left", some part of my brain still wants to turn to the passenger side. The associations that a brain makes are not always obvious. And different parts of the brain associate things differently)
Next to our printer, we have have an A0 plotter. We use this for plotting all sorts of big diagrams, from chip-layouts to project plans. These big diagrams are easy to use, because the brain can continually change its focus without needing to internalize a new diagram (from a different sheet of paper). The worst diagrams I have ever tried to use are hierarchical DFDs, where you have to leaf through many sheets of paper to follow a single dataflow. (Note: I'm objecting to the abuse of hierarchy, not the DFD).
If you know anyone taking a psychology class, this might make an interesting subject for a student project.
-- DaveWhipp
Also, I've (based on a conversation with RalphJohnson at PLoP'99) updated the LayeredComponentFramework pattern to include discussion about this. I think part of what complicates architecture or development is when there are too many moving parts at any given level of abstraction, and much of it could be based on The Magic Number SevenPlusOrMinusTwo.
My impression of the 7 +- 2 is it's for context-free information only; what's more context-free than a bunch of digits floating in the wind with little-to-no relationship to anything?
One old trick people used to use to contextualize is to build a memory house. Look it up on the net for more info, but it's a clever way of remembering stuff. In real life, the context of information provides more support than most people think possible, though it varies from person to person. When I was a hardcore developer, I never used a debugger except for reverse engineering, because the program topology and model was in my head, and it was substantially bigger than 7+-2. If your context model is good enough, you can bypass 7+-2 with no problems.
There is so much rubbish talked about the 7+-2 rule I am embarrassed to read them.
Firstly, lets assume we all agree on what is being considered; context free etc. 7+-2 implies that 50% of the people will remember it. So If you are writing for just 50% use 7 things. If on the other hand you want 67% to undestand it, try using only about 5. For 97% understanding, then only use 3. Those who say that 9 is therefore probably OK can expect a 33% understanding.
Maps are distinctly different. No-one ever expects to remember a map; well at least not straight off. They find a point they know about, find 3 or 4 things of ionterest attached to it and then select one, then they do the same with this one. If the journey starts to become too long (more that 3 or 4 steps, they tend to write down what they have learnt. In other words, maps are reference materials from which we can derrive the simple facts we want, but still probably using the 7+-2 rule.
One should never take this too literally, because different display of different information for different audiences can make differences in the numbers. However, in general I believe it tells me to stick to displaying, working with 3 or 4 things at once and only differ from this if you have good reason.
-- Gil Rooke
The motorola 68k has eight data and eight address registers (although one is reserved for the stack pointer, so it's really seven). Thus, computers based on it have a similar attention span to humans! RISC machines typically have loads of registers - we've obsoleted ourselves :(.