HomeProjectsBlogContact

Using AI Coding Assistants Without Getting Worse at Coding

AI assistants can make you dramatically faster or quietly make you dependent. How to prompt with context, review generated code, protect your learning, and know when to switch it off.

Using AI Coding Assistants Without Getting Worse at Coding

AI coding assistants have become part of everyday development. They autocomplete functions, explain unfamiliar code, write tests and scaffold whole features. Used well, they're a huge productivity boost. Used carelessly, they produce code you don't understand, with bugs you can't find, in a codebase that's slowly getting harder to change.

The difference isn't the tool. It's how you use it.

Treat it like a fast, confident junior developer

That framing gets you most of the way there. An AI assistant:

  • Types faster than anyone you've met.
  • Knows a little about everything.
  • Sounds equally confident when it's right and when it's wrong.
  • Doesn't know your codebase, business rules or constraints unless you tell it.

You wouldn't merge a junior developer's pull request without reading it. Apply the same standard here.

Give it context, get better answers

Vague prompts get generic code. Compare:

"Write a function to validate users."

with:

"In our Express app we validate request bodies with Zod. Write a schema for the signup endpoint: email (required, valid format), password (min 12 chars), displayName (optional, max 40). Return 400 with field errors in our standard { error, fields } shape."

The second prompt states the stack, conventions, constraints and expected output. A useful pattern:

  1. What you're building and why.
  2. Relevant existing code: types, a similar function, the conventions to follow.
  3. Constraints: libraries allowed, performance needs, edge cases.
  4. The shape of the answer you want.

Many assistants can read your project files directly. Point them at the right ones instead of hoping they find them.

Review generated code like it's going to production

Because it is. Check every time:

  • Does it actually run? Run it. Test it. Don't eyeball it.
  • Do the APIs exist? Assistants sometimes invent functions, options or packages that sound plausible. Confirm against the official docs.
  • Is it secure? Watch for string-built SQL, missing authorization checks, secrets in code and disabled validation. (Security checklist.)
  • Does it match your codebase? Same patterns, naming, error handling and libraries you already use, not a new style per file.
  • Is it more complex than needed? Generated code tends toward extra abstraction. Simplify freely.
  • Would you be comfortable explaining it in a code review? If not, you don't understand it well enough to own it.

A specific warning on packages: if an assistant suggests installing a library you've never heard of, verify it exists, is maintained and is the one you think it is. Attackers have registered package names that AI tools commonly invent.

Where AI assistants are genuinely great

  • Boilerplate: forms, CRUD endpoints, config files, test scaffolding.
  • Explaining unfamiliar code: "walk me through what this regex / SQL / function does."
  • First drafts of tests, especially edge cases you might not think of.
  • Translating between languages or frameworks when you know the target well enough to check.
  • Rubber-duck debugging: describing the bug to an assistant often clarifies it, and it may spot what you missed.
  • Documentation and commit messages, as long as you edit for accuracy.

Where to be careful

  • Security-critical code: auth, payments, cryptography, permissions. Use established libraries and review line by line.
  • Large refactors across many files: easy to get subtly wrong. Do them in small, reviewable steps with tests.
  • Anything version-sensitive: frameworks change, and models may suggest older APIs. Check current docs.
  • Business logic: the assistant doesn't know your rules. It'll make some up.

Protect your own learning

This matters most for beginners. If the assistant writes everything, you're not building the mental models you need to debug, design or interview.

Some ground rules that help:

  • Try first, then ask. Spend a few minutes on the problem yourself before prompting. Even a wrong attempt makes the answer stick.
  • Ask for explanations, not just code. "Explain why this works" or "what are the trade-offs?"
  • Retype instead of pasting when you're learning something new. It's slower and that's the point.
  • Have AI-free practice sessions. Build small things without assistance regularly so the fundamentals stay sharp.
  • Ask it to review your code instead of writing it. You learn more from critique than from copy.

If you're early in your journey, combine this with a build-first approach: how to escape tutorial hell.

Keep secrets and private data out

  • Don't paste API keys, passwords or production data into prompts.
  • Check your organisation's policy and the tool's data settings for how prompts and code are stored or used.
  • Strip personal data from logs before asking for help with them.

Measure the result, not the feeling

AI tools feel fast. Make sure they are fast for you. If you're spending more time fixing generated code than you'd have spent writing it, adjust: smaller requests, better context, or just write it yourself. Use the tool where it measurably helps.

FAQ

Will AI coding assistants replace developers?

They're changing what developers spend time on, with less typing of boilerplate and more reviewing, designing and integrating. Understanding systems, debugging and making good decisions matter more, not less.

Should beginners use AI coding tools?

Yes, carefully. Use them to explain concepts and review your code, and keep regular practice without assistance so you build real problem-solving skills.

How do I get better code from an AI assistant?

Give it context: your stack, relevant existing code, constraints and the expected output format. Ask for small, focused pieces and verify each one.

Keep reading

More from the workbench

All articles →