Cohesion

Cohesion
Cohesion is the measure of how strongly related each function in a single module of a program is. "High cohesion" is often the goal in developing a program because high cohesion leads to re-usability, reliability, and be relatively easy to understand. Cohesion is often compared to coupling, high cohesion results in loose coupling and vice-versa. Following these practices reduce maintenance and modification costs during development and debugging.

An easy way to practice cohesion is to make every function do only one action and avoid global variables. This may result in many functions, but realize, they are easy to understand and easy to change.