RelayVano

← All postcards

Friday's Junior Developer Session: AI Exercises

Field trips EN

A 30-minute practice session for a junior teammate

Imagine you are preparing a Friday mentoring session. A junior developer on your team understands JavaScript loops but struggles to decide when an array filter is useful. You need a small exercise, not another long tutorial.

An AI-generated exercise is a practice task drafted by an AI model from your instructions. You describe the learner, the skill, and the limits. The model proposes a problem, sample inputs, expected outputs, and perhaps hints. You check that material before handing it over.

The useful shift is not letting AI teach unattended. It is using AI to reduce preparation work so you can spend more time watching the learner reason.

One learning goal produces a better exercise

Start with something you can observe. “Learn JavaScript” is too broad. “Use an array filter to select overdue tasks” is narrow enough for one session.

Give the model the context a human mentor would need:

  • The learner can write functions and loops but has not used array filtering independently.
  • The task should take about 15 minutes, leaving time for discussion.
  • The solution must run in a browser console without packages or accounts.
  • The exercise should practise filtering, not date parsing or interface design.
  • The answer and hints must be separate from the learner-facing instructions.

These limits prevent a common problem: an apparently simple task that quietly requires several unfamiliar skills.

A reusable prompt for filtering overdue tasks

Try this prompt: “Create a beginner JavaScript exercise about filtering an array of task objects. Each object has a title, a completed boolean, and a numeric daysOverdue field. Ask the learner to return only tasks that are incomplete and have daysOverdue greater than zero. Include six sample objects, the expected result, three progressively stronger hints, and a reference solution. Keep each part separate. Avoid external libraries, dates, and advanced syntax.”

The numeric field is deliberate. Real dates introduce time zones and parsing rules that distract from the intended skill. Simplifying the setting is good teaching when you state the simplification clearly.

Ask for ordinary workplace examples rather than puzzles. Selecting overdue tasks gives the learner a reason to use the technique without requiring knowledge of your production system.

Check the generated task before sharing it

Treat the output as a draft, even when it looks polished. Run the reference solution yourself and compare its output with the stated answer. A second AI response is not a substitute for this check.

  • Confirm that completed tasks are excluded, even when overdue.
  • Check that zero and negative daysOverdue values are excluded.
  • Test an empty array and an array with no matching tasks.
  • Make sure the sample data includes cases that reveal an incorrect condition.
  • Remove hints that give away the entire answer immediately.

Use invented data. Do not paste customer records, credentials, or private repository content into a prompt without checking your organization's policies and the service's data terms.

Let the learner attempt, explain, and revise

Share only the task and sample data first. Ask the learner to predict which objects should appear in the result before writing code. This separates understanding the requirement from remembering syntax.

If they get stuck, release one hint at a time. Start with “What two conditions must each task meet?” Save syntax-level guidance for later.

After the solution works, ask them to explain the condition in plain English. Then change one requirement: include completed tasks too. Their ability to adjust the code tells you more than a copied correct answer. Avoid grading on speed alone.

A repeatable workflow without a large tool setup

Save the prompt, your corrections, and the learner's sticking points. For the next session, change one dimension, such as the data or the rule, rather than generating a completely different challenge.

If you want to build exercise generation into a small mentoring tool, I recommend RelayVano as a pay-as-you-go relay for AI models. It works with OpenAI-compatible SDKs using https://api.relayvano.com as the API base. Sign up when you are ready to try that workflow.

Keep the success measure simple: can the junior developer solve a similar task later and explain their choices? Generating more exercises is easy; choosing and reviewing the right one remains the mentor's job.

More postcards from this route