McConnell_2004_CH05_Design_in_Construction Flashcards
List four reasons why design is a ‘sloppy’ process…?
- Design is sloppy because you take may false steps and go down many blind alleys you make a lot of mistakes.
- Design is sloppy because a good solution is often only subtly different from a poor one.
- Design is also sloppy because it’s hard to know when your design is “good enough.”
What is Software’s Primary Technical Imperative…?
Managing Complexity
Provide definition for Minimal complexity…?
The primary goal of design should be to minimize complexity for all the reasons just described**. Avoid making “clever” designs. Clever designs are usually hard to understand. Instead make “simple” and “easy-to-understand” designs. If your design doesn’t let you safely ignore most other parts of the program when you’re immersed in one specific part, the design isn’t doing its job.
** A high quality has several general characteristic. If you could achieve all these goals, your design would be very good indeed. Some goals contradict other goals, but that’s the challenge of design-creating a good set of tradeoffs from competing objectives. Some characteristics of design quality are also characteristics of a good program : reliability, performance, and so on. Others are internal characteristics of the design.
Provide definition for Ease of Maintenance…?
Means designing for the maintenance programmer. Continually imagine the questions a maintenance programmer would ask about the code you’re writing. Think of the maintenance programmer as your audience, and then design the system to be self-explanatory.
Provide definition for Loose coupling…?
Means designing so that you hold connections among different parts of a program to a minimum. Use the principles of a good abstractions in class interfaces, encapsulation, and information hiding to design classes with as few interconnections as possible. Minimal connectedness minimizes work during integration, testing, and maintenance.
Providing definition for Extensibility…?
Means that you can enhance a system without causing violence to underlying structure. You can change a piece of a system without affecting other pieces. The most likely changes cause the system the least trauma.
Providing definition for Re-usability…?
Means designing the system so that you can reuse pieces of it in other systems.
Providing definition for High fan-in…?
Refers to having a high number of classes that use a given class. High fan-in implies that a system has been designed to make good use of utility classes at the lower levels in the system.
Providing definition for Low-to-medium fan-out…?
Means having a given class use a low-to-medium number of the other classes. High fan-out (more than about seven) indicates that a class uses a large number of other classes and may therefore be overly complex. Researchers have found that the principles of low fan out is beneficial whether you’re considering the number of routines called from within a routine or the number of classes used within a class.
Providing definition for Portability…?
means designing the system so that you can easily move it to another environment.
Providing definition for Leanness…?
Means designing the system so that it has no extra parts. Voltaire said that a book is finished not when nothing more can be added but when nothing more can be taken away. In software, this is especially true because extra code is modified. Future versions of the software must remain backward-compatible with the extra code. The fatal questions is “It’s easy, so what will we hurt by putting it in?”
Providing definition Stratification…?
Means trying to keep the levels of decomposition stratified so that you can view the system at any single level and get a consistent view. Design the system so that you can view it at one level without dipping into other levels.
Providing definition Standard techniques…?
The more a system relies on exotic pieces, the more intimidating it will be for someone trying to understanding it in the first time. Try to give the whole system a familiar feeling by using standardized, common approaches.
Provide definitions of the four subsystems which appear again and again in different systems…?
- Business rules
They are the laws, regulations, policies, and procedures that you encode into a computer system.
-User Interface
Create a subsystem to isolate user-interface components so that the user interface can evolve without damaging the rest of the program.
- Database access
You can hide the implementation details of accessing a database so that most of the program doesn’t need to worry about the messy details of manipulating low-level structures and can deal with the data in terms of how it’s used at the business-problem level. - System dependencies
Package OS dependencies into a subsystem for the same reason you package hardware dependencies.
What is a heuristic and why is they useful in software construction…?
You might think of heuristics as the guides for the trails in “trial and error.” You undoubtedly have run across some of these before.
Because design is non-deterministic, skillful application of an effective set of heuristics is the core activity in good software design.