Singleton Modification Leads to Code Quality Issues: Analysis and Improvement Suggestions
A recent change that turned a factory method into a hidden singleton caused callers to unintentionally share mutable state, exposing three core problems—unprotected singleton semantics, unchanged interfaces, and patch‑style fixes—and the author recommends better encapsulation, continuous design improvement, regular code reviews, pair programming, and incentive structures that reward genuine code quality.
