Analiz...ctions(3pm)

πŸ“¦
version 1.25.5 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

✨ NAME ✨

Analizo::Metric::AfferentConnections β€” the Afferent Connections per Class (ACC) metric, bestie πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so first thing, this metric? it doesn't just spawn out of nowhere. it's based on an actual article, and what it does is calculate the class connectivity β€” that's the whole vibe ✨

Here's the source material, no cap:

PhD Thesis: Monitoramento de metricas de codigo-fonte em projetos de software livre by Paulo Roberto Miranda Meirelles πŸŽ€

And then there's the adaptation of the paragraph about Afferent Connections per Class in that article, which goes like this:

It measures the connectivity of a class. So if a class "Ci" accesses a method or an attribute of a class "Cj", then consider "Ci" a client of the supplier class "Cj", and we denote that "Ci => Cj". 😌

Now consider the following function:

client(Ci, Cj) = 1, if (Ci => Cj) and (Ci != Cj)
client(Ci, Cj) = 0, otherwise.

and therefore:

"ACC(Cj) = (sum(client(Ci, Cj)), i = 1 to N)", where "N" is the total number of system classes. πŸ‘‘

🚨 vibe check warning: if the value of this metric is large, a change in the class has substantially more side effects, which makes maintenance more difficult. it's giving "touch one thing, break five things" 😭

🌈 REFERENCES 🌈


okay bestie that's the whole page, you ate that πŸ’– this one's running on perl v5.40.1, dated 2025-12-13, and it's part of the User Contributed Perl Documentation β€” go forth and count those connections, periodt 🫢🌸

πŸ“¦ where this page comes from