Bloaters
Code, methods, and classes that have grown to massive proportions.
Table of Contents
- Long Method: A method that has grown too large (e.g., >10-20 lines). “The longer a procedure is, the more difficult it is to understand.”
- Large Class: A class that does too much. “When a class has too many fields, it results in duplicated code.”
- Primitive Obsession: Using primitives instead of small objects for simple tasks.
- Long Parameter List: “The ideal number of arguments for a function is zero (niladic).”
- Data Clumps: “Bunches of data that hang around together really ought to be made into their own object.”
- Spaghetti Code: Unstructured control flow.