GeneralTable-stakes
Singleton Pattern
Also written as Singleton
A design pattern that restricts a class to having only one instance for the entire application, with a single global point of access to it.
Think of it like
Like a single office printer shared by the whole floor — everyone accesses the same one, instead of everyone getting their own.
Junior or senior?
Junior sounds like
Can recite the Singleton pattern's textbook definition.
Senior sounds like
Can describe a real downside they hit from it — hidden global state making tests unpredictable.
Ask them
“Have you seen a Singleton cause a problem — for testing, concurrency, or hidden shared state? What happened?”