# Only One of Something

Only One of Something: Singleton: Only One, Ever, Why Singleton Is Usually a Trap.

Updated: November 17, 2026

1. [Singleton: Only One, Ever](https://www.ask-codey.com/lessons/dp-singleton) (Apprentice): When two parts of an app each make their own copy of something the whole app should share, such as the shop's settings, they quietly disagree; the Singleton pattern makes a class allow only one object and gives everyone the same one.
2. [Why Singleton Is Usually a Trap](https://www.ask-codey.com/lessons/dp-singleton-trap) (Journeyman): A Singleton fixes two copies that disagree, but it hides what a class needs and lets tests change each other's results; making one object at the start of the app and handing it in keeps one shared object without either problem.

Source: https://www.ask-codey.com/courses/design-patterns/topics/dp-only-one-of-something
