Monday, September 21, 2009

Big Ball of Mud

A big ball of mud is a system that is characterized by lack of structure and conceptual integrity and that contains many ad hoc fixes. The paper argues that this is a pattern and not an anti-pattern as it is likely the most dominant architecture of todays systems. It is argued that a big ball of mud is not necessarily bad. Examples of when it may be warranted is if a system is not complex enough to warrant more architecture, in cases of very strict time to market and in the early phases of the development process before the natural architecture is uncovered.

I liked the many insightful quotes in this article about both architecture and organizations and many of them felt uncomfortably familiar. One of these quotes were that "Sometimes freedom from choice ... is what we really want" and I'd like to reference Barry Schwartz's great Google tech talk "The Paradox of Choice" where he talks about why more choice can be bad.

The pattern Throwaway Code pattern talked about throw away prototypes and why they tend to stick around. They suggest writing such code in another language as a remedy. Another trick to ensure clients/managers doesn't ask for a prototype to be shipped that I learned from a realtime instructor is to ensure every prototype crashes at the very end of the demo. This trick admittedly requires a lot of courage and is a bit sneaky, but is nonetheless interesting and clearly communicates that something is not production code to those that are not initiated to the details behind the user interface.

The final thing that came to mind when reading this article was that I thought it argued a bit too strongly for reconstruction although it did point out that this is not always the best choice. Admittedly, reconstruction is sometimes the only way forward, but the general tendency among programmers seems to lean towards reconstruction more often that I think is warranted. A new implementation will introduce new bugs so in most cases I think refactoring is a better choice as it builds on 'working' code.

No comments:

Post a Comment