Affiliate disclosure
Book titles on this page link to Amazon. As an Amazon Associate, DataField.Dev earns from qualifying purchases — at no additional cost to you.
Further Reading: OOP Design: Patterns and Principles
Design Principles
-
Martin, R. C. (2018). Clean Architecture: A Craftsman's Guide to Software Structure and Design. Prentice Hall. (Tier 1) Robert "Uncle Bob" Martin's book-length treatment of SOLID principles and software architecture. Chapters 7-11 cover the SOLID principles in detail with excellent examples. More accessible than his earlier Agile Software Development, though both are valuable.
-
Metz, S. (2018). Practical Object-Oriented Design: An Agile Primer Using Ruby, 2nd Edition. Addison-Wesley. (Tier 1) Don't let "Ruby" in the title scare you — this is one of the clearest books on OOP design ever written. Metz explains coupling, cohesion, and dependency management with a clarity that transcends any single language. The chapter on managing dependencies is worth the entire book.
Design Patterns
-
Gamma, E., Helm, R., Johnson, R., & Vlissides, J. (1994). Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley. (Tier 1) The original "Gang of Four" (GoF) book that cataloged 23 design patterns. Dense and formal, but still the definitive reference. You don't need to read it cover-to-cover — use it as a reference when you encounter a pattern name. Examples are in C++ and Smalltalk, but the concepts are universal.
-
Bader, D. (2017). Python Tricks: A Buffet of Awesome Python Features. Dan Bader. (Tier 1) Its Chapter 4, "Classes & OOP," is a set of short, practical lessons on Pythonic class design:
isvs.==, why every class needs a__repr__, abstract base classes, namedtuples (a lightweight cousin of dataclasses), and class vs. instance variables. It doesn't cover design patterns, but it sharpens exactly the class-writing skills this chapter assumes. -
Refactoring Guru — Design Patterns (https://refactoring.guru/design-patterns) (Tier 1) An outstanding free online resource by Alexander Shvets, with visual explanations, pseudocode, and implementations in multiple languages (including Python) for 22 of the 23 GoF patterns (Interpreter is the one left out). The visualizations are particularly helpful for understanding pattern structure.
Refactoring
-
Fowler, M. (2019). Refactoring: Improving the Design of Existing Code, 2nd Edition. Addison-Wesley. (Tier 1) The definitive guide to refactoring. The second edition uses JavaScript examples (the first used Java), but the catalog of refactoring techniques is language-agnostic. Chapters 3 ("Bad Smells in Code") and 6-12 (the refactoring catalog) are essential reading for any serious programmer.
-
Refactoring Guru — Code Smells catalog (https://refactoring.guru/refactoring/smells) (Tier 1) A free online catalog by Alexander Shvets (from the same site as the design patterns guide above), built on the smells and refactorings from Fowler's book. Each smell gets a description, examples, and recommended fixes. Bookmark this for reference.
-
Fowler, M. "CodeSmell" (https://martinfowler.com/bliki/CodeSmell.html) (Tier 1) A short essay from Fowler himself on what a code smell is (and isn't), including the story of Kent Beck coining the term. Takes two minutes to read.
Dataclasses and Python-Specific Design
-
Python Documentation:
dataclassesmodule (https://docs.python.org/3/library/dataclasses.html) (Tier 1) The official documentation covers all parameters and options for@dataclass,field(), and related functions. The "Frozen instances," "Default factory functions," and "Mutable default values" sections are particularly useful, and the description of theorderparameter under "Module contents" explains exactly how comparisons work. -
Hettinger, R. "Dataclasses: The code generator to end all code generators" (PyCon 2018 talk, available on YouTube). (Tier 1) Raymond Hettinger (a longtime Python core developer) places dataclasses in a progression of data-holding tools (tuples, dicts, plain classes, named tuples, and more), and walks through the key design decisions and practical usage. Entertaining and informative — Hettinger is one of the best Python presenters.
When Not to Use OOP
-
Norvig, P. "Design Patterns in Dynamic Languages" (1996 talk; slides at https://norvig.com/design-patterns/). (Tier 2) Peter Norvig (later Google's Director of Research, and co-author of the textbook Artificial Intelligence: A Modern Approach) argues that 16 of the 23 GoF patterns are either invisible or simpler in dynamic languages like Lisp and Dylan. Many of the same arguments carry over to Python. A useful counterbalance to pattern enthusiasm.
-
Hickey, R. "Simple Made Easy" (Strange Loop 2011 talk, available on InfoQ). (Tier 2) Rich Hickey (creator of Clojure) makes a compelling case for simplicity over complexity in software design, including a thoughtful critique of unnecessary OOP. Challenges you to think about whether your classes are adding clarity or just adding structure.
For the Curious
-
Hunt, A. & Thomas, D. (2019). The Pragmatic Programmer, 20th Anniversary Edition. Addison-Wesley. (Tier 1) A classic book on software craftsmanship that covers design principles, coupling, and the "Don't Repeat Yourself" (DRY) principle. Practical, opinionated, and highly readable. If you read one book on being a better programmer, make it this one.
-
Percival, H. & Gregory, B. (2020). Architecture Patterns with Python. O'Reilly. (Tier 2) Goes beyond what this chapter covers into domain-driven design, the Repository pattern, and event-driven architecture — all in Python. A natural next step after mastering the patterns in this chapter.