Extraneous fetching
0-day streakReview

Your progress

Level 1

0 XP100 XP to level 2
0day streak
0best streak
0topics started
0cards reviewed
    Review cards

    Progress is stored only in this browser. No account is required.

    Layer 3 · Go deeper · 8 min

    Go deeper

    Size it, build it, then make the calls an interviewer will push you on.

    Back of the envelope

    Size it up

    Tap through each step of the arithmetic.

    What does the unpaged order history cost one user?

      What does it cost at 250 requests a second?

        At what order count does a 5 s timeout bite on 4G?

          When does bundling extra data beat another round trip?

            Build-up · 6 steps

            Slim the order history, step by step

            The same screen and the same user with 500 orders. Each step moves the decision about what’s needed closer to the data.

            Step 1 of 6

            Today, everything

            SELECT * returns every order the user ever placed, JSON included, as the 40-field object the detail screen uses. 2 MB reaches the phone, 2 seconds on 4G.

            4 interview moments

            You’re the candidate

            The interviewer pushes on the hard parts. Pick an approach and see how it holds up.

            1. Deep dive 1 of 4

              Interviewer

              “Order history returns every order as the 40-field object the detail screen uses, and big accounts time out. What do you change?”

              Your move. Pick an approach:

            2. Deep dive 2 of 4

              Interviewer

              “A seller dashboard calls AsEnumerable() and filters, sorts and pages 24,000 orders in app memory to show 20. What do you do?”

              Your move. Pick an approach:

            3. Deep dive 3 of 4

              Interviewer

              “The mobile app reuses the web admin’s order resource and renders a quarter of it. How do you slim the responses?”

              Your move. Pick an approach:

            4. Deep dive 4 of 4

              Interviewer

              “Half your users tap the first order on the list. Should the list response bundle order details?”

              Your move. Pick an approach: