jargon

Comparison

Circular dependencyvsConnascence

Circular dependency

two modules import each other, and which one is initialised first decides whether it works.

Two or more components that depend on each other, directly or through a chain, so neither can be understood, built, tested or deployed without the other. It shows up as an import error, a null field during initialisation or a constructor that cannot be satisfied. The usual cure is to find the concept both of them actually need and extract it, or to invert one direction with an interface owned by the depender.

Full entry →

Connascence

two pieces of code have to change together, and you can say precisely what kind of agreement binds them.

A vocabulary for grading coupling rather than just naming it: two components are connascent if changing one requires changing the other, and the kinds are ranked from weak — they agree on a name — to strong — they agree on the order of two operations or on a magic value. It is more useful than 'this is coupled' because it says which coupling to attack first, and it gives boolean arguments, positional parameters and timing dependencies a shared explanation. It is a favourite of conference talks and worth knowing for exactly that reason.

Full entry →

Related comparisons