principles:principle_of_separate_understandability
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
principles:principle_of_separate_understandability [2013-08-10 10:59] – [Context] christian | principles: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: | * [[contexts: | ||
- | * [[contexts: | + | |
===== 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