Code Room
Code reviewHard
Question
Review this Python memoized renderer used in a long-running service.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
_cache = {} def render(template_id, ctx): key = (template_id, tuple(sorted(ctx.items()))) if key not in _cache: _cache[key] = expensive_render(template_id, ctx) return _cache[key]Run or narrate your approach, then ask the coach.