Software Engineering - Code Review
Scenario: Junior Developer Code Review
A junior developer submitted this Python function for code review. You need to review the code review comments and identify which criticisms are INVALID or INCORRECT and should be eliminated from the review.
def process_user_data(users): results = [] for user in users: if user['age'] > 18: results.append(user['name'].upper()) return results
Which code review comments should be ELIMINATED because they are INVALID or INCORRECT criticisms? (Select ALL invalid comments to eliminate)
šŸ”„ Reverse Logic: This format flips the cognitive task! Instead of selecting correct answers, you must identify and eliminate INCORRECT criticisms. This tests your ability to find flaws in reasoning.
A. "Function doesn't handle None or missing 'age' key - will raise KeyError"
B. "Using .upper() is deprecated in Python 3.x"
C. "No input validation - fails if 'users' is not iterable"
D. "List comprehension is always slower than for loops in Python"
E. "Function mutates the original list"
F. "The function should use recursion instead of iteration for better performance"
G. "Magic number 18 should be a named constant (LEGAL_AGE)"
H. "Appending to lists is O(n²) complexity in Python"

Scoring Method: Successful Elimination

Should ELIMINATE (Invalid): B, D, F, H (4 incorrect criticisms)
Should KEEP (Valid): A, C, E, G (4 valid criticisms)
Scoring: +1 for each correctly eliminated invalid criticism, -1 for eliminating a valid one
Why This Works: Shifts cognitive mode from confirming correctness to finding flaws in reasoning