principles:more_is_more_complex
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:more_is_more_complex [2021-09-02 10:44] – old revision restored (2021-05-19 09:40) 65.21.179.175 | principles:more_is_more_complex [2021-09-02 14:03] – old revision restored (2021-05-19 09:40) 65.21.179.175 | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Variants and Alternative Names ===== | ===== Variants and Alternative Names ===== | ||
- | * Miller' | ||
===== Context ===== | ===== Context ===== | ||
Line 17: | Line 16: | ||
===== Description ===== | ===== Description ===== | ||
- | Having more lines of code, methods, classes, packages, executables, | + | Having more lines of code, methods, classes, packages, executables, |
- | * seven lines of code per method | + | |
- | * seven methods per class | + | |
- | * seven classes | + | |
- | * etc. | + | |
- | Of course this is not possible in a realistically-sized software system. So more realistic values can be debated. Seven parameters to a method is quite much and can be regarded way too many. On the other hand seven methods per class and seven classes per subsystems are usually too few. Also seven lines of code per method is sometimes not realistically achievable. | + | Note that it is actually not the number of lines, methods, classes, etc. that is relevant but the effective number of items that have to be kept in mind for the purpose of understanding. So reducing the number of lines by placing several statements in one line does not help. Neither the introduction of an additional obvious private method exceeding the limit will do any harm. MIMC is just a rule of thumb stating that the introduction of further modules (and the like) usually has a higher complexity as a drawback. |
- | + | ||
- | This means that given the complexity of the problem is fixed, a suitable compromise for the number of methods, classes, etc. has to be found. Reducing the number of statements per method typically results in the introduction of further methods. Reducing the number of methods per class can be achieved by dividing the class into several smaller classes, etc. | + | |
- | + | ||
- | Furthermore | + | |
===== Rationale ===== | ===== Rationale ===== | ||
- | The human brain can only handle | + | The capabilities of the human mind are certainly limited. If it is necessary to keep a large amount of modules |
- | While the human short-term memory | + | Note that [[Miller' |
===== Strategies ===== | ===== Strategies ===== | ||
- | * Divide a large module | + | * Merge several modules |
- | * Don't introduce a new module | + | * Don't introduce a new module |
===== Origin ===== | ===== Origin ===== | ||
- | * For the short-term memory capacity limit being around "seven plus or minus two" also known as " | + | The phrase "more is more complex" |
- | * The phrase "more is more complex" | + | |
===== Evidence ===== | ===== Evidence ===== | ||
/* Comment out what is not applicable and explain the rest: */ | /* Comment out what is not applicable and explain the rest: */ | ||
- | * [[wiki: | + | * [[wiki: |
/* * [[wiki: | /* * [[wiki: | ||
Line 62: | Line 52: | ||
==== Generalizations ==== | ==== Generalizations ==== | ||
- | * [[principles:Keep It Simple Stupid]] (KISS): MIMC states that having more modules, etc. leads to more complexity. KISS on the other hand is about the avoidance of every form of complexity. | + | * [[Keep It Simple Stupid]] (KISS): MIMC states that having more modules, etc. leads to more complexity. KISS on the other hand is about the avoidance of every form of complexity. |
==== Specializations ==== | ==== Specializations ==== | ||
Line 71: | Line 61: | ||
* **More Is More Complex (MIMC)**: Changing a design to adhere to the MIMC principle may always lead to more complexity concerning another aspect of the system. For example reducing the amount of code in a large method is typically achieved by the introduction of further methods. So there is always a tradeoff between this principle and itself. | * **More Is More Complex (MIMC)**: Changing a design to adhere to the MIMC principle may always lead to more complexity concerning another aspect of the system. For example reducing the amount of code in a large method is typically achieved by the introduction of further methods. So there is always a tradeoff between this principle and itself. | ||
- | * **[[principles:High Cohesion]] (HC)**: Not introducing further modules typically leads to a lower cohesion. | + | * **[[High Cohesion]] (HC)**: Not introducing further modules typically leads to a lower cohesion. |
==== Complementary Principles ==== | ==== Complementary Principles ==== | ||
+ | |||
+ | * [[Miller' | ||
==== Principle Collections ==== | ==== Principle Collections ==== | ||
{{page> | {{page> | ||
+ | |||
===== Example ===== | ===== Example ===== | ||
FIXME | FIXME | ||
+ | |||
===== Description Status ===== | ===== Description Status ===== |
principles/more_is_more_complex.txt · Last modified: 2021-10-20 21:26 by christian