{
  "id": "enwiki-001367462368",
  "slug": "coupling-computer-programming",
  "title": "Coupling (computer programming)",
  "qid": "",
  "lead": "In software engineering, coupling is the degree of interdependence between software modules, a measure of how closely connected two routines or modules are, and the strength of the relationships between modules. Coupling is not binary but multi-dimensional. Coupling is usually contrasted with cohesion. Low coupling often correlates with high cohesion, and vice versa. Low coupling is often thought to be a sign of a well-structured computer system and a good design, and when combined with high cohesion, supports the general goals of high readability and maintainability.",
  "body": "In software engineering, coupling is the degree of interdependence between software modules, a measure of how closely connected two routines or modules are, and the strength of the relationships between modules. Coupling is not binary but multi-dimensional. ]] Coupling is usually contrasted with cohesion. Low coupling often correlates with high cohesion, and vice versa. Low coupling is often thought to be a sign of a well-structured computer system and a good design, and when combined with high cohesion, supports the general goals of high readability and maintainability. ==History== The software quality metrics of coupling and cohesion were invented by Larry Constantine in the late 1960s as part of a structured design, based on characteristics of “good” programming practices that reduced maintenance and modification costs. Structured design, including cohesion and coupling, were published in the article Stevens, Myers & Constantine (1974) and the book Yourdon & Constantine (1979), and the latter subsequently became standard terms. \\mathrm{Coupling}(C) = 1 - \\frac{1}{d_{i} + 2\\times c_{i} + d_{o} + 2\\times c_{o} + g_{d} + 2\\times g_{c} + w + r} Coupling(C) makes the value larger the more coupled the module is. This number ranges from approximately 0.67 (low coupling) to 1.0 (highly coupled) For example, if a module has only a single input and output data parameter C = 1 - \\frac{1}{1+0+1+0+0+0+1+0} = 1 - \\frac{1}{3} = 0.67 If a module has 5 input and output data parameters, an equal number of control parameters, and accesses 10 items of global data, with a fan-in of 3 and a fan-out of 4, C = 1 - \\frac{1}{5 + 2\\times 5 + 5 + 2\\times 5 + 10 + 0 + 3 + 4} = 0.98 ==See also== Connascence (computer science) Coupling (physics) Dead code elimination Dependency hell Efferent coupling Inversion of control List of object-oriented programming terms Loose coupling Make (software) Static code analysis",
  "categories": [
    "22175909",
    "23118434",
    "23603337",
    "24623845",
    "25927622",
    "27899163",
    "31127017",
    "31128806"
  ],
  "license": "CC BY-SA 4.0",
  "source_uri": "https://en.wikipedia.org/w/index.php?oldid=1367462368",
  "content_hash": "",
  "created_at": null,
  "updated_at": 1785730863.0,
  "claims": [
    {
      "id": 29813494,
      "subject_qid": "",
      "subject_slug": "coupling-computer-programming",
      "predicate": "publication date",
      "object_text": "1974",
      "object_num": 19740000.0,
      "object_unit": null,
      "polarity": 1,
      "qualifier": "",
      "source_uri": "https://en.wikipedia.org/w/index.php?oldid=1367462368",
      "source_name": "Wikipedia",
      "source_tier": 3,
      "retrieved_at": 1792486093.7844512,
      "confidence": 0.95,
      "article_slug": "coupling-computer-programming",
      "span_start": 57,
      "span_end": 106
    }
  ],
  "contradictions": [],
  "confidence": 0.95,
  "csl": {
    "id": "enwiki-001367462368",
    "type": "webpage",
    "title": "Coupling (computer programming)",
    "author": [
      {
        "family": "Anticloud FZ LLE",
        "literal": "Anticloud FZ LLE"
      }
    ],
    "container-title": "encyclopegia.org",
    "publisher": "Anticloud FZ LLE",
    "publisher-place": "Dubai, United Arab Emirates",
    "URL": "https://encyclopegia.org/a/coupling-computer-programming",
    "issued": {
      "date-parts": [
        [
          2026,
          11,
          18
        ]
      ]
    },
    "accessed": {
      "date-parts": [
        [
          2026,
          11,
          18
        ]
      ]
    },
    "license": "CC BY-SA 4.0",
    "DOI": "eo1:enwiki-001367462368",
    "isBasedOn": "https://en.wikipedia.org/w/index.php?oldid=1367462368",
    "note": "Immutable snapshot enwiki-001367462368"
  }
}