Say you’re writing a function or method. What does it do? It takes some input, returns some output based on some computation – or maybe changes some state. Are the inputs and outputs related? Do they make sense together? If not they should be separate.1

This happens at all scales: within functions (separating by blank lines), within a group of functions (should they be together or apart), within a file, within a class, module, subsystem, and so on.

Separating things means making decisions about who gets to access what – call a function, read or write some state – and even more subtle, who gets to know that some other part even exists.

This has significant effect on the quality of software – how easy it is to understand and to change and how well it allows to keep complexity in check.