God Object

conceptual-metaphor ReligionSoftware Programs

Categories: software-engineering

What It Brings

A monotheistic deity is omniscient (knows everything), omnipotent (can do everything), and omnipresent (is involved in everything). The god object is a class or module with exactly these properties: it knows too much state, performs too many operations, and is depended upon by everything else in the system. The theological metaphor is structurally precise — it maps the divine attributes onto the specific ways a class can violate the single responsibility principle.

Key structural parallels:

Where It Breaks

Expressions

Origin Story

The term “god object” appears in object-oriented programming discourse from the early 1990s, as OOP moved from academic curiosity to mainstream practice. It was popularized by Arthur Riel in Object-Oriented Design Heuristics (1996), where he articulated the heuristic “Distribute system intelligence horizontally as uniformly as possible” — in other words, do not concentrate knowledge in a single object. The theological framing was natural: if your design has one object that knows and does everything, you have created a deity, and deities make for bad software architecture.

The anti-pattern became one of the most recognized OOP code smells, appearing in catalogs alongside related pathologies like the blob (Fowler’s variant) and the Swiss Army knife class. The god object remains especially common in codebases that began as small projects with a single “main” or “app” class that was never refactored as the system grew.

References

Related Mappings