The metaphor of the “black box” is very common in programming.
It is so general that it’s nearly meaningless; but it summarizes a lot of specialized principles nicely and shows a unifying principle.
A black box is characterized by:
- a boundary
It can be applied to “modules” on all levels of abstraction.
The I/O part is obvious when you write code and design objects or functions. With functions, the parameter list and return value says it on the tin.
Quite a few people stop there.
But the boundary part is even more important: it determines what’s inside, and what’s out.
Why does a parameter list have these and not other parameters?
Is there any logic to the choice? (Indicator of high cohesion)
Is the inside something you can summarize without having to pry open the box?
Receive new posts via email.