Big ball of mud

From Wikipedia, the free encyclopedia

Jump to: navigation, search

In computer programming, a big ball of mud is a system or computer program that appears to have no distinguishable architecture. It usually features other anti-patterns.

Contents

[edit] In computer programs

The term was popularized in Brian Foote and Joseph Yoder's 1999 paper of the same name, which defines the term thus:

A Big Ball of Mud is a haphazardly structured, sprawling, sloppy, duct-tape-and-baling-wire, spaghetti-code jungle. These systems show unmistakable signs of unregulated growth, and repeated, expedient repair. Information is shared promiscuously among distant elements of the system, often to the point where nearly all the important information becomes global or duplicated. The overall structure of the system may never have been well defined. If it was, it may have eroded beyond recognition. Programmers with a shred of architectural sensibility shun these quagmires. Only those who are unconcerned about architecture, and, perhaps, are comfortable with the inertia of the day-to-day chore of patching the holes in these failing dikes, are content to work on such systems.

"Big ball of mud" systems have usually been developed over a long period of time, with different individuals working on various pieces and parts. Systems developed by people with no formal architecture or programming training often fall into this pattern.

Foote and Yoder do not universally condemn "big ball of mud" programming, pointing out that this pattern is most prevalent because it works — at least at the moment it is developed. However, programs of this pattern become maintenance nightmares.

Programmers in control of a big ball of mud project are strongly encouraged to study it and to understand what it accomplishes, and to use this as a loose basis for a formal set of requirements for a well-designed system that could replace it. Technology shifts – such as client-server to web-based or file-based to database-based – may provide good reasons to start over from scratch.

[edit] In programming languages

In discussion of the Lisp programming language the term big ball of mud is used differently, in this case to describe the malleability of a Lisp system. In Lisp, it is generally possible to:

  • Easily write macros that give you control over the language syntax, so that the notation looks closer to the problem's domain
  • Use a data-directed programming style
  • Execute parts of a program at compile time rather than runtime
  • Save a system image of a modified Lisp implementation for future use

The programming language Forth has also been described as a ball of mud because it too has many of these properties.

Joel Moses may have coined the phrase in the 1970s:[1]

"APL is like a diamond. It has a beautiful crystal structure; all of its parts are related in a uniform and elegant way. But if you try to extend this structure in any way — even by adding another diamond — you get an ugly kludge. LISP, on the other hand, is like a ball of mud. You can add any amount of mud to it and it still looks like a ball of mud."

There is controversy[2] over whether Moses in fact said this, and if he did whether he intended it to be derogatory, explanatory, or laudatory.

[edit] See also

[edit] Notes

  1. ^ "Quotes about programming languages — ADA to BASIC". http://www.sysprog.net/quotada.html. Retrieved on 2006-11-17. 
  2. ^ Richard P. Gabriel and Guy L. Steele (1996). "The Evolution of Lisp". ACM History of programming languages—II: 233–330. 

[edit] References

  • Guy L. Steele, Jr. & Richard P. Gabriel The Evolution of Lisp [1], note on reference 128
  • Brian Foote and Joseph Yoder, Big Ball of Mud Fourth Conference on Patterns Languages of Programs (PLoP '97/EuroPLoP '97) Monticello, Illinois, September 1997
Personal tools
Languages