Generating matrices...

FILES: ... DENSITY: ...

FILES: ... DENSITY: ...

What does this mean?

These adjacency matrices, sometimes called Design Structure Matrices (DSMs), show direct dependencies between files in a codebase. A dot represents one or more dependencies and is read

file A depends on file B

where A is a file along the left edge and B is a file along the top edge. A module's dependencies are colored distinctly. A square-shaped cluster indicates the density of dependencies within a module.

All the dots to the right and left of a cluster are files that the module depends on. All files above and below it are files that depend on it. In many paradigms, modularity (low coupling, high cohesion) is a desirable quality attribute. Hence, an ideal system has modules that have more intra-module dependencies and fewer inter-module dependencies.

A matrix can show different types of files, which have varying impacts on quality. Although we calculate the values for these four types of files using the visibility matrix, it is still useful to look for them in a first-order matrix. Shared files, also known as utility files, are ones that a lot of other files depend on; a shared file that every other file in a codebase depends on would appear as a solid vertical line in an adjacency matrix. Shared files appear to be a positive predictor of quality.

Control files, conversely, depend on a high number of files. Such files appear to be a negative predictor of quality and are hence undesirable in high numbers. They may appear as horizontal lines in an adjacency matrix.

Two other types of files are core files, which depend on a lot of files and have a lot of files depend on them, and periphery files, which don't depend on a lot of files and don't have a lot of files depend on them. These may be a bit more difficult to spot in a matrix. The collective size of clusters can give a partial sense of the number of core files in a codebase. Core files seem to be a negative predictor of quality whereas periphery files seem to be a positive predictor of quality.