Skip to content
JavaScript·Intermediate·Scenario based·1 min read

When is reaching for a named design pattern actually a bad sign in a code review?

Short interview answer

When it adds indirection or abstraction for a problem that doesn't actually have the variability or coupling the pattern is meant to solve — a factory with only one possible product, or a singleton with no real reason to forbid multiple instances, are both overhead without benefit.

Key takeaway

Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.

← Back to JavaScript design patterns

Related questions