Computer Science 223 Discussion Questions

Riel, Chapter 10

Discussion Questions submitted for Chapter 10 of Riel

Design Patterns

  1. Can you give some insight into why the author waited until Chapter 10 to introduce these patterns? It seems that they would help explicate the heuristics. -Jim Finnessy
  2. Does a good pattern have to follow all the design heuristics? Not necessarily, right? (Raz Magar)
  3. Do you know of any design tools that might help a designer apply these patterns? Todd li> What is the role of motivation heuristics?
  4. How exactly do developers identify patterns from different people's coding? ~yasir.
  5. At what stage of the project development phase is it important to identify patterns? taha
  6. Since heuristics and patterns are found by examining programming after the fact, (i.e. they are descriptive), should they really be treated as PROscriptive? Shouldn't a programmer rather write his/her own code, and then perhaps compare it to the patterns found in other code? It seems like this could lead to more new innovations required for improving hueristics. (Nick Wagner)
  7. If a design pattern takes the other pattern's target as its source, does that mean the other pattern's target is not a good pattern by itself? (Raz Magar)
  8. Might it be said that if a pattern can not be found for a heuristic, that that heuristic might need to be rethought as being a general truth? Todd
  9. What is the difference in terms of implementation between a heuristic and a patern? ~yasir.
  10. The text discusses heuristics engines, to be included in software development tools. Have you seen any such? How successful are they? Judging from my experiences with similar tools for grammar, I wouldn't think them that accurate, but then again, programming languages are generally simpler than english. --Ben Kaiser
  11. Can these patterns be found for all heuristics violations? some? most? What are good ways to spot those that don't fit into easily defined patterns? --Ben Kaiser

Transitivity

  1. Can you go over Transitivity in more detail?
  2. Could you explain the transitivity relationship? Dessislava Dimova

Interrupt Pattern

  1. What is the Interrupt Pattern suggesting? - Elias Vafiadis
  2. Target pattern of the interrupt pattern suggests making outside class so that contained objects and containing objects can communicate effectively. However, it seemsthat it is creating more messages sent in the system that implies the violation of one of the heuristics. Or is it not true? --Hisako Watanabe
  3. In the interupt pattern, how does the target pattern solve the problem? Why is it okay to send to a base class of a containing class and not the containing class? Steve F
  4. How does the interrupt-polling solution create a more complex design? Steve F
  5. Can you explain process when the interrupt pattern is in effect?

Other Questions

  1. In his section on further research, Riel mentions grammars. What are they and what does this have to do with his heuristics? -Peter Likarish
  2. Can you more clearly define an inverted pattern language? Patrick Dowd
  3. Could you elaborate more on the rationale behind the motivating heuristic: "The state of an object should not be modified through a message sent to its poublic interface" -George <
  4. Could you clarify more on the one-instance pattern?
  5. Can you go over how the inverted inheritance pattern works?
  6. How do these patterns differ from what we learned about the heuristics the first time around? -Jim Finnessy
  7. What is wrong with having a contained object interrupt the object containing it? -Peter Likarish
  8. Reading section 10.3, it's not clear to me which of the two patters is a better choice. The Generalization Pattern seems to be the right choice according to the Heuristics in previous chapters. - Elias Vafiadis
  9. What further developments have there been in mapping grammars into object-oriented designs? Patrick Dowd
  10. A diferent example to explain the heuristic: contained objects should never send a message to the objects that contain them, would be nice. -George
  11. As a target pattern, he suggests to eliminate the abstract class, knowing that it is a violation of a heuristic. Although it might lead to a proliferation of a class (but only by one extra class), I still think it is worth keeping the base class abstract for later maintenance. am I wrong? --Hisako Watanabe
  12. What is an inverted inheritance? Dessislava Dimova
  13. Does UML facilitate identifying patterns? taha
  14. I'm confused: on page 185, isn't Riel talking about a containment relationship? I though he said that contained objects should never know about the objects that contain them. But here he's saying that the contained objects should send messages to the objects that contain them. Are we to assume we should use abstraction as he outlines in the next example? Or is he here talking about a different type of exampel? (Nick Wagner)
  15. why shouldn't we override base class methods in one or more derived classes with a NOP method?


This document is available on the World Wide Web as

http://www.walker.cs.grinnell.edu/courses/223.sp02/read-riel-10.html

created April 26, 2002
last revised May 6, 2002
Valid HTML 3.2!
For more information, please contact Henry M. Walker at walker@cs.grinnell.edu.