Encapsulation often comes up in the context of Object Oriented Programming, but is actually an important tool when it comes to programming in general, in any paradigm, and it can be applied at all scales - functions, objects, collaborations of objects, components, modules, services, systems.

The problem is, the way people tend to talk about it can easily leave you with a wrong impression of the core ideas, which leads to designs that feature what I call A Magical Black BoxTM.