Measuring Software Modularity — Part 1: Cohesion

Eliran Turgeman
Level Up Coding
Published in
5 min readNov 6, 2022

--

Photo by Kojirou Sasaki on Unsplash

Modularity is a must for good software design. It helps with extensibility, readability, maintainability, and more. It certainly isn’t easy to make your code modular, but what exactly is modularity, and how do we measure it?

Definition

Modularity describes a logical grouping of related code, which could be a group of classes or functions. [1]

--

--