Lesson 1233 of 1455
Asking AI to Rename Variables That Suck
Give Claude your function and ask it to suggest clearer names for every variable.
Builders · AI-Assisted Coding · ~4 min read
The big idea
naming is hard for humans, easy for AI when given context
Some examples
- Sharing a function full of x, y, tmp
- Asking for names that match the domain
- Picking the best 3 suggestions and applying them
Try it!
Open your favorite AI tool and try one of the examples above. Pick the one that matches what you are actually working on this week. Spend 10 minutes, no more. Notice what worked and what did not — that's the real lesson.
Key terms in this lesson
Practice this safely
Try this with a school, hobby, or family example where the stakes are low. Use the AI output as a draft you can question, not as the final answer.
- 1Ask AI to explain naming in plain language, then underline anything that sounds uncertain or too broad.
- 2Give it one detail from "Asking AI to Rename Variables That Suck" and ask for two possible next steps plus one reason each step might be wrong.
- 3Check domain language against a trusted source, teacher, adult, expert, or original document before you use it.
End-of-lesson quiz
Check what stuck
8 questions · Score saves to your progress.
Lesson help
Questions are best handled with a grown-up here.
For this age range, Tendril keeps freeform AI chat paused until parent/guardian consent and child-safe moderation are fully verified. Use the quiz, notes, and related lessons below, or ask a parent, guardian, teacher, or librarian to work through the question with you.
Progress saved locally in this browser. Sign in to sync across devices.
Related lessons
Keep going
Builders · 35 min
Tests as Prompts — an Unexpected Superpower
Writing a test first is not just good engineering. It is the clearest possible prompt for an AI. Let's use tests to make AI code reliable.
Builders · 30 min
Reading Existing Code With AI Help
Most of a developer's life is reading code someone else wrote. AI is astonishing at this. Here's how to get fast, honest explanations of unfamiliar code.
Builders · 40 min
Pair Programming With AI: How Teens Learn Coding Faster
Pair programming with AI means coding alongside a partner that explains, suggests, and never gets tired. Here is how to use it to actually learn faster, not slower.
