4 ms·
> But if the toilet is already dirty, you’re not going to be the one cleaning other people’s pee, so you just add your own and leave. Good analogy, but in code
by gerbilly 7y ago
> But if the toilet is already dirty, you’re not going to be the one cleaning other people’s pee, so you just add your own and leave.
Good analogy, but in code it's more than just disgusting to clean up after others. Changing code that was poorly written by someone else may cause bugs, bugs that now become your problem.
The goal of every programmer faced with such a codebase—as in the dirty bathroom analogy—is to get in, do his business as quickly as possible, and get out. Iterate this over time and the problem just keeps getting worse.
It's like the tragedy of the commons, where each programmer pollutes a common resource because the incentives are set up to reward that kind of behaviour.
This leads the codebase to become a 'Big Ball of Mud', the most popular architectural pattern in the world: http://laputan.org/mud/ http://laputan.org/mud/