All posts

Help at the right moment, and no answer key

An assistant that writes your code teaches you very little. An assistant that never speaks leaves you alone at the worst moment. The tutor in MargaretAI Learning sits between the two, and most of the work went into the question of when it speaks and what it is not allowed to say.

Noticing that you are stuck

A small program on your own computer watches how the work is going: test runs that keep failing, long pauses, changes that lead nowhere. It talks only to the extension. From those signals it decides whether you are in flow or stuck.

Being stuck is not the same as having stopped. A learner who runs the tests again and again and gets the same failures is struggling without ever pausing, so a series of failing runs counts too.

An offer, never an interruption

When the course thinks help would be useful, a small notification appears with two buttons, and an item in the status bar keeps the offer once the notification has gone. Nothing blocks your editor. You can ignore it and keep typing.

How much of this you want is your setting. "On request" means the tutor waits until you ask. "Off" means off: in that case your code is not even sent for a review whose answer would then be thrown away.

  1. Signals

    Failing test runs, long pauses, changes that lead nowhere. Measured on your computer.

  2. Stuck

    The signals add up to a state: in flow, or stuck.

  3. Offer

    A small notification and an item in the status bar. Nothing blocks the editor.

  4. Hint

    Only if you accept. It starts small and gets more specific when you ask again.

From a signal on your computer to a hint you chose to take.

Hints in steps

An accepted hint starts small. It points at the place or names the idea. Only if you ask again does it become more specific. Help has a price that is stated openly: a pass that needed hints counts for less as evidence that you can do it alone.

The second reason for the tutor to speak comes after your tests pass. If your working code could be clearer, you may get an offer to improve it: an explanation and exactly one change, which is written only after you have seen it and confirmed it.

What the tutor cannot say

Every answer of the model is checked by ordinary code before you see it. If it contains the reference solution of your task, or names the right option of a quiz question you have not answered, the answer is discarded and you read a sentence saying that the tutor cannot help with this.

The tutor also changes nothing about your record. It cannot mark an objective as mastered or overrule a test. Passing tests on your machine are what completes a task, not a friendly chat.