A small map can get you to the bug faster than a very impressive tour of every folder.
You open an unfamiliar project and immediately start negotiating with yourself. Maybe you should understand the architecture first. Maybe the README explains everything. Maybe opening just a few more files will make the whole thing click.
Now 20 mins later, you know where the icons live, but you still can’t explain what happens when someone presses Submit.
That is the moment I prefer to make the task smaller. Pick the behavior you need to understand and follow it from the user’s action to the result. Let the project reveal itself along that path instead of treating the file tree as a reading list.
This works as a practice routine for a debugging interview, a new team’s service or a side project you have not touched in months. You are building enough understanding to investigate one behavior, with a place to record everything you have not confirmed yet.
Start with something a person can actually do
Imagine a movie review app with almost 50 files. Someone reports that users can submit more reviews than the limit allows. The file count and the rule below are invented for this walkthrough.
For our small exercise, one authenticated user may submit 3 successful reviews in a fixed 1 minute window. A fourth attempt during that window must be rejected without saving another review. The next window starts a fresh allowance.
Before reading implementation details, write that expectation in your notes. It gives you something to compare with the program instead of allowing the current code to define what correct means.
Now locate the review form. Follow its submit handler to the network request, find the server route that receives it, and identify the checks and storage operation on that route.
The map starts as a hypothesis. Perhaps the limiter runs inside the handler rather than before it. Perhaps a gateway rejects the request before the application sees it. Update the drawing when you find evidence; do not squeeze the code into the architecture you expected.
For practice with a similar unfamiliar-project setup, the Amazon-movie review debugging question describes broken rate limiting and comment validation. Try outlining the request path and the questions you need answered before reading the guidance. It is a reported assessment scenario, not an official Amazon question bank, and our three review rule is an illustrative choice rather than a requirement from that listing.
Search for the thing you just observed
Suppose the browser sends POST /reviews. Search for that route or a distinctive part of the request payload. If the address is assembled from several pieces, follow the client helper that constructs it.
Once you find the route registration, trace the handlers it actually attaches. A function named rateLimit elsewhere in the repository does not prove this request uses it. Follow the reference from the entry point rather than admiring a promising filename.
I like keeping a small note beside the editor with three columns. Record what you observed, what might explain it and the next check that could distinguish the possibilities.
For example, the fourth review being accepted is an observation. The limiter never running is a possible explanation. Tracing the route wiring can support or reject that explanation.
If the limiter does run, move on. Check which user key it receives and where its counter comes from. Finding that the counter is always one suggests a different investigation than finding that the limiter is never called.
This is a surprisingly calming way to work because each opened file has a reason to be open. You are answering a question, not hoping familiarity will eventually arrive.
Ask AI for directions you can check
A coding assistant can help locate a route, collect call sites and summarize nearby tests. Give it a bounded navigation task before asking it to repair the entire application.
One useful request is to trace the review submission from its UI entry point to persistence, include file paths and symbols for each step, separate confirmed calls from guesses, and make no edits yet.
Then verify the links in that chain. Does the route registration call the function it named? Is the test importing that implementation? Does the code belong to the active application, or an old example directory nobody runs?
Willy Tarreau’s recent account of AI assisted bug reports at HAProxy describes the burden of reports missing usable reproduction details and even the tested commit. That is a useful reminder for everyday debugging too. A convincing explanation becomes much more helpful when someone else can follow it back to the same code and behavior.
Save the version you inspected and the command you ran. Ask the assistant to identify missing context rather than filling it with a plausible architecture. Sometimes the most valuable answer is that the path crosses a service whose code is not in this repository.
Watch where the state survives
Back in our review app, imagine the route does call the limiter, but creates a fresh counter for every request. Each submission gets a brand-new memory of the world. Naturally, every review looks like the first one.
To investigate that hypothesis, inspect the counter’s initialization and lifetime. In a local development run, observe the user key and count across repeated requests without logging private review text or credentials. Keep the requests inside the same test window so a legitimate reset does not confuse the result.
If the counter is recreated on every call, you have found a concrete lifetime mismatch. Moving it somewhere that survives requests may address the single process exercise, but that does not automatically make it correct across several server instances. Keep those claims separate.
You have also learned something useful about the codebase. You now know where the route is wired, where user identity enters, where state lives and where a review gets stored. That is a meaningful chunk of architecture learned through one actual behavior.
Give yourself permission to leave files unread
The recommendation engine may be beautifully written. The admin dashboard may have fascinating abstractions. Neither deserves your next ten minutes merely because its folder appears above the review API.
Keep a small parking list for questions that matter later. Add an item when you notice a shared dependency or a possible second bug, then return to the current path unless that finding changes your immediate investigation.
This is not permission to ignore dependencies. Follow shared middleware, helpers and downstream calls when the request actually uses them. The boundary is evidence, not a predetermined number of files you are allowed to read.
Leave the next person a smaller mystery
Before considering the task finished, turn your map into a short handoff. Include the entry point, the behavior you expected, the observation that contradicted it, the change you made and the checks you ran.
For our example, verify that the first three valid reviews are saved, the fourth is rejected without a write, a different user has a separate allowance and the next window permits a fresh request. Control time in the test instead of waiting a real minute and hoping the boundary behaves.
Also check the surrounding behavior that your change could affect. Fixing the limiter should not accidentally bypass comment validation or make the success response describe a review that was never stored.
If you cannot run a dependency, say exactly which part remains unverified. A clear limit is more useful to a teammate than a cheerful everything-looks-good summary.
I prefer finishing with one explainable path over a vague sense that I have explored the repository. Tomorrow, another request can teach you another part of the system.
For your next unfamiliar project, find the button, message or command that starts the behavior you care about. Follow it until you can explain where the result comes from. The folders will still be there when you need them.
~ Emily





Top comments (0)