AI coding assistants can write, explain, refactor and review code. Used well, they speed up routine work; used carelessly, they introduce subtle bugs.
Good Uses
- Boilerplate, glue code and repetitive transformations.
- Explaining unfamiliar code or error messages.
- Writing tests, documentation and examples.
- Refactoring and translating between languages or frameworks.
- Exploring an API you haven't used before.
Give Good Context
Share the relevant files, the conventions of the codebase, the exact error, and what you've tried. Describe the desired behaviour and constraints, not just "fix it".
Verify Everything
- Run the code and its tests; ask the assistant for tests too.
- Read the diff as you would a colleague's pull request.
- Check that suggested libraries and functions actually exist and are maintained.
- Watch for security issues: injection, hard-coded secrets, unsafe deserialisation, missing input validation.
Keep Ownership
You are responsible for code you commit. Understand it well enough to maintain it and explain it in review.
Mind Your Data
Check your organisation's policy before sharing proprietary code or secrets with external tools, and prefer tools whose data handling you've reviewed.
Work in Small Steps
Ask for focused changes, test each one, and commit often. Large unreviewed generated changes are hard to trust and harder to debug.