コードの品質のスカウターをどうにか作れないかと考えていて、ソフトウェアメトリクスについて調べている。 古い記事ですが、読んだのでメモ書きする。 Robert Martin, OO Design Quality Metrics. An Analysis of Dependencies https://linux.ime.usp.br/~joaomm/mac499/arquivos/referencias/oodmetrics.pdf Instability パッケージ*1の不安定性 (Instability) I は I = Ce / (Ca + Ce) で定義される。ここで、Ca は被依存数 (Afferent Couplings) でパッケージ内のクラス*2に依存しているパッケージ外のクラスの数である。また、Ce は依存数 (Efferent Couplings) でパッケージ内のクラス
![Martinのオブジェクト指向設計メトリクス - 超ウィザード級ハッカーのたのしみ](https://cdn-ak-scissors.b.st-hatena.com/image/square/7d640c5c08d3a411f442d4b27166e4965b406610/height=288;version=1;width=512/http%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Ff%2Ffjkz%2F20160410%2F20160410021038.png)