CSC 223 Grinnell College Fall, 2005
 
Software Design
 

Discussion Questions for Riel, Chapter 10

The Interrupt Pattern and Interrupt-Polling Pattern

  1. Could you give us some "Interrupt Pattern " examples with working codes? Maybe we want to apply it in our project. (Sheng)
  2. How do the examples in the source pattern for the interrupt pattern differ from the examples of those in the interrupt-polling pattern? (monica)
  3. Under 'Target Pattern' on page 187 Riel argues that a contained class should interrupt an abstract version of its containing class so it is easier to reuse. However, in the next section Riel argues that the contained class should interrupt its containing class in order to reduce dependences. Is there anyway to avoid this trade off? (Jonathan)
  4. The rationale for the motivating heuristic of the Interrupt Pattern (pg.186) says that "if a contained object is dependent of the class that contains it, then it is not reusable". In the example of ATM, why should its card reader be reusable for a security door? It makes sense to think that the card reader should function only for that specific purpose and that no one should take it out to use it for something else. (Saugar)

Generalization and Specialization

  1. Riel says that modelling objects as classes leads to class proliferation. He suggests that the designer should generalize the objects into a new class. However the solution is more complicated when the behavior of each object is different. I dont get how his solution to it solves the problem of class proliferation? (Gaurav)
  2. Can you give an example of the specialization pattern? (David D) I'm confused about the last Motivating Heuristic in chapter 10. Can you explain? (Dave V)
  3. Why is it on pg. 191 that for the Specialization Pattern we should eliminate the abstract base class if one of the derived classes inherits all of its data. Why not get rid of the derived class and keep the base class as abstract? (Mike C)
  4. What is the solution to designers who find themselves in a situation where they are required to override base class methods in a derived class with a NOP method? (Gaurav)
  5. What's wrong with using NOP methods to override base classes? (Alex)

Inverted Inheritance

  1. Could you explain the inverted inheritance pattern better? (Mike L.)
  2. Could you give us an example where using the Inverted Inheritance Pattern is critical? (Dave V)

Heuristics, Patterns, and Their Use

  1. Patterns are a widely recognized and used tool in software design. Heuristics, on the other hand, seem to be basically exclusive to Riel. Are there any other software design theorists who support Riel-style heuristics (possibly under another name, such as 'idioms')? (John)
  2. Weren't the Heuristics created to eliminate bad patterns in design? Why does he raise the question "What is the relationship between Heuristics and patterns"? The chapter seems more like a summary of everything that has hapened. (David D)
  3. In what phase of design should transformation patterns be considered? (Mike L.)
  4. How do programmers detect the flaw in their design and able to apply recognized patterns into their software early on? How cautious should the programmer be in following the already exist patterns? When should the designers start looking for newer solution because of changes in requirements of the newer software and hardware? (chayapan)

Other Patterns

  1. Can you give another example of how to improve the one-instance pattern that riel talks about on page 194? (monica)
  2. In his 'Lexical Scope Pattern' Riel argues that classes inside another class should not interact between themselves. Wouldn't following this result in centralized control instead of distributed control? (Jonathan)
  3. I don't understand this sentence "If an object outside the lexical scope of another object can change the second object's state, then the cost of maintaining the system is increased" Could you explain? (Sheng)

Other Questions

  1. Riel mentions the possibility of a software package that would automatically detect and correct heuristic violating code. Does such software exist, at this time? (John)
  2. How reliable can we expect the automated design and coding systems can be? How efficient can the automated system help the design process while still providing the optimal solution to the problem? How programmers can integrate automated and manual approaches into the production process? (chayapan)
  3. -- A Class should support strict data hiding of its implementation -- Are the design transformation patterns more like documentation of design flaws rather than something that a designer would use during design phase of a software development process to correct his work? (Saugar)
  4. Why are only two arrows dotted arrows drawn in the target pattern section on pg. 185 instead of an arrow to each of its three containing objects? (Mike C)
  5. Multiple classes might need the same public variable. Are there cases where it's okay for a class to not have strict data hiding of its implementation? (Alex)


This document is available on the World Wide Web as

http://www.cs.grinnell.edu/~walker/courses/223.fa05/readings/riel-10.shtml

created 8 November 2005
last revised 8 November 2005
Valid HTML 4.01! Valid CSS!
For more information, please contact Henry M. Walker at walker@cs.grinnell.edu.