CSC 223 Grinnell College Fall, 2005
 
Software Design
 

Discussion Questions for Riel, Chapters 1-2

Complexity

  1. Riel says that the object oriented approach avoid accidental complexity. What elements of other programming paradigms cause them have accidental complexity while object oriented programming does not? (Jonathan)
  2. On Page 3, Riel describes how object oriented programming helps eliminate accidental complexity. Does object orineted programming help eliminate essential complexity. If so how? (Gaurav)
  3. If there is no "methodology or tool " to eliminate essential complexity, how does one deal with it? (Saugar)

Prototyping

  1. The author says that same-language prototyping is the most common type. Is this still the case, or has the UML popularized different-language prototyping to the extent that it is now more common than same-language prototyping. (Elijah)
  2. In same-language prototyping, is the idea to write feature-incomplete, but compilable code, or is it simply used as a pseudo code? (Elijah)
  3. How does different-language prototyping prevent "accidentally" shipping garbage code? (Alex)
  4. Why would a team ever want to use two different languages for creating software? The drawback of garbage code, as Riel calls it, should only be an issue if there isn't enough time to properly complete the software. (Jonathan)
  5. Is there a good reason why a software company would use Different-Language Prototyping? It seems counter intuitive to me to write the software in one language for testing and then to re-write it in another language after testing has been finished. Is there any advantage to using this method? (Dave V.)

Language and Organizational Issues

  1. The author talks about "paradigm shift" (pg.2). Are there only two paradigms in the software world,i.e "centralized control of structural approach" and "decentralized fashion"? (Saugar)
  2. What are the advantages of a multiparadigm language? (David D.)
  3. Do we have destructor of the class in Java? (Sheng)
  4. Why has the level of software reuse in object-oriented applications been disappointing for many developers? I thought that object oriented programming languages had always relied on software reuse, so what sparked the sudden excitement with reusing software? (Mike C.)
  5. What do you think about corporate hierachy of great designers? (David D.)

Principles for Class Design

  1. When Riel talked about god classes, I think he implied that they would contain a whole lot of code. Now, I've read about in other places, and had some success myself when using, classes called things like 'BlahBlahBlahSystem' that orchestrate the running of complex processes. The thing is, the 'System' classes I've dealt with have all been fairly small, with fairly concise public interfaces (Run(), Abort(), etc.). They contain a few powerful components which interface with each other simply and themselves contain a small set slightly less powerful and more specific components. This trend continues down for several more levels of granularity without ever resulting in an overly complex or bulky class. Is the kind of 'System' class I'm talking about the same thing as Riel's god class, or is it more permissible? (John)
  2. Heuristic 2.7 says that Classes should only exhibit nil or export coupling with other classes, then in what cases would we use export, covert and overt coupling? would using the other types of coupling affect Class cohesion? (Gaurav)
  3. From Heuristics 2.8, how primitive should the one key abstraction each class represent be? How do we judge that the abstraction is not too general or too specific? What system can be used to keep track of classes created?(other than javadoc) (Chayapan)
  4. I'm a little confused as to the meaning and use of and abstract class. Can you provide an example, or at least a type of class that's considered abstract?? (Dave V.)
  5. Do overt and covert couplings have any practical differences? Although by Heuristic 2.7, both couplings are bad, is there a reason that you'd choose one over the other? (Alex)

Data within Classes

  1. Can you please explain further what riel means by all data should be hidden withing its class. (Monica)
  2. Are there any cases where data should be made public? (Mike L.)
  3. Riel keeps bringing up a 'Point' class when talking about separating data from public interfaces. Now, I think I have at least a decent understanding of why this is important for larger, or less well understood classes, but it seems a little unwieldy for something like a point. PODs don't have public interfaces; they're well understood and you access them directly. It seems reasonable for the purpose of readability to have a library of certain small, well understood classes (such as Points) that expose their data and can be treated more-or-less like PODs. Would Riel object to this? (John)

Class Methods

  1. The reading recommends minimizing the methods of a class, and that some have made the opposite recommendations. Just how minimal is a "minimized" class? Is there a happy medium between simplifying code and providing useful operations? (Lorelei)
  2. "Minimize the number of messages in the protocol of a class." from the textbook cannot convince me, would someone explain that principle to me creatively? (Sheng)
  3. Please clarify dynamic semantics and how one would use local states in a method. (Lorelei)
  4. What is a common-code private function? (Mike L.)

Additional Questions

  1. Can you explain how object-oriented databases work? (Chayapan)
  2. What does it mean for a class to instantiate objects? (Monica)


This document is available on the World Wide Web as

http://www.cs.grinnell.edu/~walker/courses/223.sp05/readings/riel-1-2.shtml

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