Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Good definition for "coherence" [closed]

Tags:

cohesion

I'm trying to tell someone his code is not "coherent" in the sense that it serves multiple purposes. I don't think I can explain it very well, so I'm looking for a good reference and/or definition.

like image 429
allyourcode Avatar asked Dec 01 '22 08:12

allyourcode


1 Answers

I think the correct term is cohesion.

In computer programming, cohesion is a measure of how strongly-related and focused the various responsibilities of a software module are. Cohesion is an ordinal type of measurement and is usually expressed as "high cohesion" or "low cohesion" when being discussed.

Modules with high cohesion tend to be preferable because high cohesion is associated with several desirable traits of software including robustness, reliability, reusability, and understandability whereas low cohesion is associated with undesirable traits such as being difficult to maintain, difficult to test, difficult to reuse, and even difficult to understand.

like image 64
starblue Avatar answered Jan 22 '23 22:01

starblue