Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Design Testable Feed Ranking Interface

MediumCoding00:00
Practice interviewer
In session
5 left
00:00

Your question is Design Testable Feed Ranking Interface. Take a moment with it on the right.

Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).

You need to log in / sign up to chat or submit.

Problem

Context

A feed ranking component often depends on feature providers, scorers, clocks, loggers, and fallback policies. Interviewers use this question to evaluate whether you can design code that is modular, testable, and resilient.

Core Question

Design an interface for ranking feed items and explain how you would structure dependency injection, test seams, and error handling.

Your answer should address:

  1. How the ranker depends on external components without hard-coding implementations.
  2. Where you would introduce seams for unit tests, integration tests, and failure simulation.
  3. How the system should behave when dependencies fail, return partial data, or violate contracts.

Scope Guidance

Focus on code-level design rather than large-scale distributed architecture. The interviewer expects clear interfaces, sensible abstractions, examples of injectable dependencies, and practical handling of recoverable vs non-recoverable errors. You should discuss trade-offs, not just list patterns.