User Tools

Site Tools


principles:principle_of_separate_understandability

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
principles:principle_of_separate_understandability [2013-08-10 10:59] – [Context] christianprinciples:principle_of_separate_understandability [2021-09-02 12:49] – old revision restored (2021-05-28 04:00) 65.21.179.175
Line 7: Line 7:
 /* fill in contexts here: */ /* fill in contexts here: */
   * [[contexts:Object-Oriented Design]]    * [[contexts:Object-Oriented Design]] 
-  * [[contexts:Implementation]]+
  
 ===== Principle Statement ===== ===== Principle Statement =====
Line 17: Line 17:
  
 PSU means that: PSU means that:
-  * By looking at a class its purpose should be clear. 
   * By looking at the public methods of a class it should be clear why they are there. That means there should be no method that is only there because a specific other module needs it.   * By looking at the public methods of a class it should be clear why they are there. That means there should be no method that is only there because a specific other module needs it.
   * By looking at the implementation of a module it should be clear how it works and why it was done that way. That means there should be no code that is solely there in order to make another module work.   * By looking at the implementation of a module it should be clear how it works and why it was done that way. That means there should be no code that is solely there in order to make another module work.
   * By looking at a private method it should be clear what it does. That means there should be no (private) method that is only meaningful in the context of another method.   * By looking at a private method it should be clear what it does. That means there should be no (private) method that is only meaningful in the context of another method.
-  * By looking at a method invocation it should be clear what happens, why the parameters are there, and what they specify. It should not be necessary to look up the method implementation. +
-  * By looking at a single line of code it should be clear what it does without having to look up other code.+
  
 ===== Rationale ===== ===== Rationale =====
principles/principle_of_separate_understandability.txt · Last modified: 2021-10-18 22:13 by christian