All guides

Programming & computingBeginner to university5 min read

Learning to code with a tutor that traces the program

Python, JavaScript, data structures: how to get the tutor to walk through code line by line instead of pasting a finished answer.

Code makes sense when you can see the state change: which variable holds what after each line, where the loop turns, why the function returns early. Ask for that explicitly and the tutor writes the trace on the board instead of handing you a block of code.

Requests that work

  • "Teach me for loops in Python by tracing this program line by line."
  • "Explain recursion with a call stack diagram for factorial(4)."
  • "Show how a linked list insert works, drawing the nodes before and after."
  • "Walk me through what this JavaScript does" with a photo or screenshot of the code attached.

Debugging your own code

  1. 1Take a screenshot of the code and the error message together and attach it in the question box.
  2. 2Say what you expected to happen. "It should print 5 but prints 4" gets a better answer than "it's wrong".
  3. 3Ask the tutor to find the line, not to rewrite the program. You learn more fixing one line than copying twenty.

Pick the right level

Beginner explains syntax as it goes. Intermediate assumes you can read the code and focuses on why it works. Advanced adds complexity, edge cases and alternatives. If a lesson feels too fast, start the next one a level lower; it costs nothing to change.

Guides are written by the Santi team and updated as the product changes. Spotted something out of date? Tell us.

Ready to learn anything?

Start a free trial today. Pick the subject that's been giving you trouble and let the board explain it.