0
0
LLDsystem_design~10 mins

Anti-patterns to avoid in LLD - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to avoid the {{BLANK_1}} anti-pattern in system design.

LLD
def handle_request(request):
    # Avoid [1] by not tightly coupling components
    pass
Drag options to blanks, or click blank then click option'
Ascalability
Bspaghetti_code
Cmodularity
Dperformance
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'performance' instead of the messy code pattern.
2fill in blank
medium

Complete the code to prevent the {{BLANK_1}} anti-pattern by using proper data storage.

LLD
def save_data(data):
    # Avoid [1] by not storing all data in one place
    pass
Drag options to blanks, or click blank then click option'
Acaching
Bload_balancing
Csingle_point_of_failure
Dredundancy
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing with 'load_balancing' which is a solution, not an anti-pattern.
3fill in blank
hard

Fix the error in the code that causes the {{BLANK_1}} anti-pattern by separating concerns.

LLD
class UserManager:
    def __init__(self):
        self.db = Database()
    def process(self, data):
        # This causes [1] by mixing logic and data access
        self.db.save(data)
        self.send_email(data)
Drag options to blanks, or click blank then click option'
Agod_object
Btight_coupling
Ccircular_dependency
Drace_condition
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'tight_coupling' which is related but not the main issue here.
4fill in blank
hard

Fill both blanks to avoid the {{BLANK_1}} and {{BLANK_2}} anti-patterns in system design.

LLD
def process_request(req):
    # Avoid [1] by not blocking main thread
    # Avoid [2] by not duplicating code
    pass
Drag options to blanks, or click blank then click option'
Ablocking_io
Bcode_duplication
Cmemory_leak
Dtight_coupling
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up 'memory_leak' with blocking issues.
5fill in blank
hard

Fill all three blanks to fix the {{BLANK_1}}, {{BLANK_2}}, and {{BLANK_3}} anti-patterns in this code snippet.

LLD
def handle_data(data):
    # Avoid [1] by not sharing mutable state
    # Avoid [2] by not ignoring errors
    # Avoid [3] by not overloading one service
    pass
Drag options to blanks, or click blank then click option'
Ashared_mutable_state
Bsilent_failures
Cservice_monolith
Dover_provisioning
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing 'over_provisioning' with 'service_monolith'.