Content deleted Content added
Escape curly brackets |
Adding short description: "Attribute of a software system" |
||
(16 intermediate revisions by 13 users not shown) | |||
Line 1:
{{Short description|Attribute of a software system}}
{{Distinguish|Computational complexity theory}}'''Programming complexity''' (or '''software complexity''') is a term that
The idea of linking software complexity to software maintainability has been explored extensively by [[Meir M. Lehman|Professor Manny Lehman]], who developed his [[Lehman's laws of software evolution|Laws of Software Evolution]]. He and his co-author [[Les Belady]] explored numerous [[software metrics]] that could be used to measure the state of software, eventually concluding that the only practical solution is to use deterministic complexity models.<ref>MM Lehmam LA Belady; Program Evolution - Processes of Software Change 1985</ref>
==Types==▼
#'''Accidental complexity
#'''Essential complexity
==Measures==
* [[cyclomatic complexity|McCabe's cyclomatic complexity metric]]
* [[Halstead complexity measures|
* Henry and Kafura introduced "Software Structure Metrics Based on Information Flow" in 1981,<ref>Henry, S.; Kafura, D. IEEE Transactions on Software Engineering Volume SE-7, Issue 5, Sept. 1981 Page(s): 510 - 518</ref> which measures complexity as a function of "fan
* Chidamber and Kemerer introduced "A Metrics Suite for Object
* Branching complexity (Sneed Metric)
* Data access complexity (Card Metric)
Line 14 ⟶ 22:
* Data flow complexity (Elshof Metric)
* Decisional complexity (McClure Metric)
*Path Complexity (Bang Metric)
[[Law of conservation of complexity|Tesler's Law]] is an [[adage]] in [[human–computer interaction]] stating that every [[Application software|application]] has an inherent amount of complexity that cannot be removed or hidden.
▲==Types==
▲Associated with, and dependent on the complexity of an existing program, is the complexity associated with changing the program. The complexity of a problem can be divided into two parts:<ref>[https://academia.edu.documents.s3.amazonaws.com/1811257/SHSM2011.pdf In software engineering, a problem can be divided into its accidental and essential complexity [1<nowiki>]</nowiki>.]</ref>
▲#Accidental complexity: Relates to difficulties a programmer faces due to the chosen software engineering tools. A better fitting set of tools or a more high-level programming language may reduce it. Accidental complexity is often also a consequence of the lack of using the ___domain to frame the form of the solution i.e. the code.{{Citation needed|date=September 2015}} One practice that can help in avoiding accidental complexity is [[___domain-driven design]].
▲#Essential complexity: Is caused by the characteristics of the problem to be solved and cannot be reduced.
==Chidamber and Kemerer Metrics==
{{Prose|date=August 2017}}
Chidamber and
*
** <math>WMC = \sum_{i=1}^nc_i</math>
** n is the number of methods on the class
** <math>c_i</math> is the complexity of the method
*
** number of other class which is coupled (using or being used)
*
** <math>RFC = |RS|</math> where
** <math>RS = \{M\}\cup_{all\ i} \{R_i\}</math>
** <math>R_i</math> is set of methods called by method i
** <math>M</math> is the set of methods in the class
*
** sum of all classes that inherit this class or a
*
** maximum depth of the inheritance tree for this class
*
** Measures the intersection of the attributes used in common by the class methods
** <math>LCOM = \begin{cases} |P| - |Q|, & \text{if } |P| > |Q|
Line 44 ⟶ 50:
** Where <math>P = \{ (I_i,I_j)|I_i\cap I_j = \emptyset\}</math>
** And <math>Q = \{(I_i, I_j)|I_i \cap I_j \neq \emptyset\}</math>
** With <math>I_i</math> is the set of
==See also==▼
*[[Programming paradigm]]
*[[Software crisis]]
==References==
{{Reflist}}
▲==See also==
[[Category:Software metrics]]
[[Category:Complex systems theory]]
|