0
0
LLDsystem_design~20 mins

YAGNI (You Aren't Gonna Need It) in LLD - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
YAGNI Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Identifying YAGNI Violations in Feature Planning

You are designing a simple note-taking app. The team suggests adding a complex tagging system with nested tags and tag analytics before the app's first release. Which statement best reflects the YAGNI principle?

AImplement the tagging system now to avoid rework later.
BDesign the app assuming the tagging system will be needed soon.
CAdd the tagging system partially to test user interest.
DSkip the tagging system until users request it or it becomes necessary.
Attempts:
2 left
💡 Hint

YAGNI encourages avoiding building features before they are truly needed.

Architecture
intermediate
2:00remaining
Applying YAGNI in System Architecture Decisions

You are designing a web service expected to handle 100 requests per second initially. The team suggests building a microservices architecture with complex service discovery and load balancing from the start. According to YAGNI, what is the best approach?

ABuild the microservices architecture now to prepare for future growth.
BImplement microservices but disable service discovery until needed.
CStart with a simple monolithic design and refactor if scaling is needed.
DDesign the system with microservices but use a single database for simplicity.
Attempts:
2 left
💡 Hint

Consider starting simple and only adding complexity when justified.

scaling
advanced
2:00remaining
Estimating Capacity Without Over-Engineering

Your team plans to build a chat application. They want to provision servers to handle 1 million concurrent users immediately, but current projections estimate only 10,000 users in the first year. How does YAGNI guide your capacity planning?

AProvision servers for 500,000 users as a compromise.
BProvision capacity for 10,000 users and scale up as demand grows.
CProvision servers for 1 million users now to avoid downtime later.
DUse cloud auto-scaling but configure it for maximum capacity upfront.
Attempts:
2 left
💡 Hint

Think about starting with what is needed, not what might be needed.

tradeoff
advanced
2:00remaining
Balancing YAGNI with Future-Proofing

You are designing a payment processing system. The team debates whether to support multiple currencies now or add it later. Supporting multiple currencies adds complexity but may attract more users in the future. How should YAGNI influence this decision?

ADesign the system with multi-currency in mind but implement only one currency initially.
BBuild the system for one currency and add multi-currency support only if needed.
CImplement multi-currency support now to avoid costly refactoring later.
DIgnore multi-currency support entirely as it is not needed now.
Attempts:
2 left
💡 Hint

Consider designing for flexibility without adding unnecessary features immediately.

component
expert
3:00remaining
Identifying YAGNI Violations in Low-Level Design

Examine the following class design for a user profile component. Which part violates YAGNI?

class UserProfile {
  String username;
  String email;
  String phoneNumber;
  String address;
  Map socialMediaLinks; // planned for future use
  List favoriteGenres; // planned for future use

  void updateEmail(String newEmail) { /* ... */ }
  void updatePhoneNumber(String newPhone) { /* ... */ }
  // Methods for socialMediaLinks and favoriteGenres not implemented yet
}
LLD
class UserProfile {
  String username;
  String email;
  String phoneNumber;
  String address;
  Map<String, String> socialMediaLinks; // planned for future use
  List<String> favoriteGenres; // planned for future use

  void updateEmail(String newEmail) { /* ... */ }
  void updatePhoneNumber(String newPhone) { /* ... */ }
  // Methods for socialMediaLinks and favoriteGenres not implemented yet
}
AIncluding socialMediaLinks and favoriteGenres fields before they are needed.
BNot implementing update methods for socialMediaLinks and favoriteGenres yet.
CHaving updateEmail and updatePhoneNumber methods implemented.
DIncluding username, email, phoneNumber, and address fields.
Attempts:
2 left
💡 Hint

YAGNI warns against adding unused features or data structures prematurely.