Learning guides / AI coding courses
Coding practice · about 25 minutes
Map an unfamiliar repository before using an AI agent
Trace a tiny repository from entry point to tests and save a runnable code map before asking an assistant to edit.
Is this the next skill you need?
Choose this task if you can write a function but lose track of where an application starts. A codebase-navigation lesson is a better next step than another prompt collection.
Preparation: You can open a folder and run Node.js 20 or newer. No framework, API account or agent subscription is required.
The time is our planning estimate for this small exercise, not a measured course completion time. If setup takes your whole session, save the command and error, then return after practicing the basics.
Your task and starter files
A fictional receipt tool has a command-line entry, a calculation module and a test. Your job is to explain which file owns each behavior. The starter code is correct: this is an investigation task, not a bug hunt.
Download the original exercise ZIP
2,076 bytes · README, source, checks and reference answer. Extract the ZIP into one folder. Run the commands from that folder. No npm install or paid tool is needed.
node --test task.test.mjsExpected initial result: All supplied code tests pass; complete the separate JSON worksheet.
The examples are invented for learning. They are independent of provider courses and can be attempted without an AI assistant. If you use one, keep the requirement and supplied checks visible, then review its actual changes.
Work through it
- Read task.mjs, cli.mjs and task.test.mjs. Draw the import direction before running anything.
- Run node cli.mjs. Trace the printed 12 to the input [4, 8] and the imported function.
- Write map.json with entry, implementation, test and command fields. Keep paths relative to the extracted folder.
- Run the map checker. Then explain which file you would edit to change addition behavior, and which file you would use to verify it.
Check your result
Open the worked answer after your attempt
The entry is cli.mjs, implementation task.mjs, test task.test.mjs, and command node --test task.test.mjs. cli imports task; the test imports task independently. A passing test alone does not prove that every caller uses the intended input.
The ZIP includes a reference implementation or reference JSON. Use it to compare your reasoning after an attempt; a copied answer does not show that you can perform the task independently.
Keep as evidence: the original observation, your changed code or completed worksheet, the exact command and output, and a short explanation of the decision. When tests begin with one failure, the same unchanged tests should all pass after the repair. For the refactor, checks should pass both before and after.
Scope: This fixture has one module and no build step. A real repository may have generated files, multiple services or setup requirements; verify its actual scripts rather than copying these paths.
Choose a lesson from the gap you found
If the exercise was hard because you could not run the code, work on language and command-line basics first. If running it was easy but explaining the change was hard, focus on the matching workflow lesson and repeat with fresh inputs.
Cursor Learn has official material on understanding code, developing changes, debugging, and reviewing work. Claude Code 101 covers agent context and a structured coding workflow. Use those lessons for instruction and this independent fixture to check your own result.
Public lesson access and tool usage are separate. Check current pricing, account requirements and usage limits before using either tool. A paid course is most useful when its assignments address the specific step you could not complete.
Find courses for a coding-assistant workflow →
Check the starting skills · Check free and paid access · Choose Claude Code or Cursor first