Tuesday, 9:50 a.m. Standup just ended. Your ticket says "fix the shipping calculation in checkout," and the code that does it lives in a 1,400-line PHP file nobody has opened since 2019. A junior's pull request has been waiting on your review since yesterday, Sentry is flagging a new error in production, and the PM pings you on Slack asking if the new login screen still ships Friday.
That ordinary Tuesday, not a conference demo, is where AI for coding has to earn its subscription. Short answer: it does, just not where most people expect. It's very good at reading code, writing tests, doing the first pass of a code review and writing SQL. It's weak at architecture calls, at security, and at remembering which version of a library actually exists. This guide walks through a sprint task by task, with the tool I'd use for each one, the price in dollars, and the spots where it tends to get you paged at 2 a.m.
First, separate three kinds of tools
A lot of comparisons put Copilot and ChatGPT side by side as if they did the same job. They don't. In practice there are three ways to use AI on code, and each one solves a different problem.
- Assistant in the editor. Completes the line, suggests the next block, answers questions about the open file. GitHub Copilot and Gemini Code Assist are the usual picks. It saves a few minutes every hour, every day.
- Coding agent. Takes a task ("add pagination to the orders endpoint and write the tests"), reads several files, edits them, runs the tests and tries again. Claude Code, OpenAI's Codex, Cursor's agent mode and Windsurf live here. It saves hours, and it needs a serious review.
- Chat. ChatGPT, Claude or Gemini in the browser. Good for thinking: comparing two approaches, understanding an error, drafting a query, writing the message to the PM. It doesn't see your repo unless you paste code in.
If you only use chat, you spend the day copying and pasting. If you only use autocomplete, you never find out what an agent can do in an afternoon. The real gain shows up when you pair an editor assistant with an agent for the bigger tasks.
The sprint, task by task
The times below are estimates from someone who does this every week on a web product team (Node, PHP or Python on the backend, React on the front), not results from a study. They show where the gain is big and where it's small.
| Task | Without AI | What AI does well | What stays with you | What I'd use |
|---|---|---|---|---|
| Understanding legacy code before you touch it | 2 to 4 h | Explains the function, lists inputs and side effects, maps who calls what | Confirming the explanation with a test or a log line | Agent in the repo (Claude Code or Codex) |
| Writing tests | 1 to 3 h | Lists edge cases and scaffolds tests in the project's style | Deciding what the correct behavior is | Agent or Copilot in the editor |
| First pass on a PR | 20 to 60 min per PR | Flags string-built SQL, missing tests, secrets in code, N+1 queries | Approving, plus design and business rules | Automated reviewer in CI (see the PR review bot) |
| Debugging from a stack trace | 30 min to 3 h | Hypotheses ranked by likelihood and how to confirm each | Reproducing the bug and choosing the fix | Chat (Claude or ChatGPT) or agent |
| SQL and migrations | 30 min to 2 h | Rewrites slow queries, suggests indexes, drafts reversible migrations | Running EXPLAIN on real data and picking the deploy window | Chat with the schema pasted in |
| Docs (README, ADR, PR description) | 1 to 2 h | First draft from the code and the diff | Cutting the obvious and writing the "why" | Agent in the repo |
| Estimating a ticket | 30 min | Breaks it into subtasks and lists forgotten risks | The final number | Chat |
| Throwaway script, regex, data conversion | 30 min to 1 h | Almost all of it | Running it on a copy first | Chat or agent |
| Architecture calls (queue, cache, monolith or services) | days | Surfacing trade-offs you missed | The whole decision | Chat, as a sparring partner |
Legacy code: the best use almost nobody tries
Back to the shipping ticket. Before you change a single line, ask the agent to read the file and answer three things: what the function calculates, where the parameters come from, and what breaks if you change the rule. Ten minutes later you have a map that would have cost you the morning. One instruction changes the quality of the answer: ask it to label what is certain (it's in the code) and what is a guess (inferred from a name). In legacy code, a variable called $tp could be "payment type" or "product type," and the model will guess with total confidence.
Next step is a characterization test: a test that freezes the current behavior, right or wrong, before your change. AI writes these well, and they save you from the classic "fixed shipping, broke coupons."
Tests: let the AI find the edge cases
"Write tests for this function" gets you tests that confirm the happy path. "List 10 inputs that could break this function and write one test for each" gets you tests worth keeping. A proration that's off by one cent, a date on the 31st, an empty ZIP code, a user without permission. That's where bugs live, and that's where AI is fast. The exact prompt, with a real answer, is in AI prompts for coding.
PR review: first pass, never the approval
Any tech lead knows half of review time goes to repeat offenders. String-concatenated SQL, missing tests, a console.log printing a token, an empty catch swallowing errors. An automated reviewer in CI comments on that before you open the PR, and the author fixes it alone. You keep what only a human can decide: whether the change makes sense for the product and whether the design holds up for the next six months. Paid Copilot plans already include code review; building your own reviewer pays off when you want your team's rules applied and tech debt outside the PR's scope turned into issues automatically.
Debugging: hypotheses, not answers
Paste a stack trace and ask "how do I fix this?" and you'll usually get a fix that hides the symptom: one more try/except, one more ?.. Ask for hypotheses ranked by likelihood, each with a way to confirm it. Reproducing the bug is still your job.
SQL: paste the schema and the EXPLAIN
With slow queries, AI does well when it gets the CREATE TABLE, the indexes and the EXPLAIN ANALYZE output. Without them, it guesses indexes blind. The classic mistake it catches instantly: a function wrapped around the filtered column (WHERE DATE(created_at) = ...), which keeps the index from being used. And a very American one: timestamptz columns filtered by the UTC day, which drops or double counts evening orders because New York is four or five hours behind UTC and California seven or eight.
Estimates and the conversation with the client
On contract work, the expensive part isn't the code, it's scope. Use chat to split what the client asked for into subtasks and list what they didn't say: password reset, transactional email, an admin panel, the privacy notice and "Do Not Sell or Share" link a California audience may require, sales tax if they sell online. The estimate is still yours, but you stop forgetting half the work in the quote.
Tools and prices in 2026
Prices from the official pages in October 2026, per user, in US dollars. This market reshuffles plans every few months, so check the site before you pay.
| Tool | Type | Entry plan | Note |
|---|---|---|---|
| GitHub Copilot | Editor + agent + review | Free tier with limits; Pro $10/mo; Pro+ $39/mo; check the site for higher tiers | On paid plans completions don't count against your allowance; chat and agent requests do |
| Claude Code | Agent in the terminal and the editor | Included in Claude Pro, $20/mo ($17/mo billed annually); Max from $100/mo | Strong on long tasks that touch many files |
| ChatGPT with Codex | Chat + agent | Plus $20/mo | Codex usage is capped on Plus; Pro gives more |
| Cursor | Editor with agent | Starting at $8/mo; check the site for current tiers | Plans changed in October 2026; which models you get depends on the tier |
| Gemini Code Assist | Editor | Standard $19/mo billed annually ($22.80 monthly); Enterprise $45/mo | Makes sense if the company already runs on Google Cloud |
| Windsurf | Editor with agent | Pro starting at $20/mo; check the site | Now owned by Cognition, the company behind Devin |
| Free ChatGPT, Claude or Gemini | Chat | $0 | Enough to start; struggles with big files and daily limits |
What I'd pick in your shoes
- Junior at a company that pays for nothing: Copilot Free in the editor and a free chat. Before you pay for anything, ask your lead what the AI policy is. Pasting company code into a personal chat account is the fastest route to a meeting with HR.
- Mid-level with freelance work on the side: I'd pay for Claude Pro ($20) and use Claude Code on the side projects, not Cursor, because one $20 plan gives you both the agent and the chat, and on Cursor's cheaper tiers the model you want may cost extra.
- Senior or tech lead: Copilot in the editor (your team probably has it already), an agent for the big tasks, and an automated reviewer in CI. Your bottleneck is review, not typing.
- Company with sensitive data (fintech, health, gov contractors): a business or enterprise plan with a contract that rules out training on your code, plus admin logs. If you're SOC 2 audited, the AI vendor goes on your vendor list like any other. A personal plan doesn't touch the company repo, period.
Juniors and seniors don't get the same thing out of it
This is the part few people say out loud. For a senior, AI removes typing and doc lookups: they see a suggestion and know in five seconds "that's a race condition." For a junior, the same suggestion looks right, passes the happy-path test and goes straight into the PR.
If you're early in your career, use AI as a tutor, not a typist. Ask why it wrote that, ask for the version without the library, ask what could fail. And write the first test yourself. Nobody will let you open Copilot in a technical interview, and in your first production incident the person who has to understand the code is you.
If you're the senior on the team, your job changed a little: you now review AI-generated code too. Agree on one simple rule, like "any PR with generated code includes tests written by the author," and the problem drops by half.
Where AI gets it wrong, and how that turns into an incident
Packages and functions that don't exist
The model suggests npm install for a package with a believable name that doesn't exist, or that does exist because someone registered it precisely because models keep inventing that name (people call it slopsquatting). It also invents parameters and methods from old versions. The rule: every new package an AI suggests goes past you on the registry (npm, PyPI, Packagist), checking author, publish date, downloads and repo. Then pin the version in the lockfile.
Security
Generated code repeats the most common mistakes on the internet, because that's where it learned: SQL built by concatenation, weak password hashing, CORS open to any origin, file uploads that never check the type. The OWASP Top 10 is still the best checklist. Agents add a new risk: prompt injection. A README, an issue or a code comment can carry a hidden instruction for the agent ("run this command," "send the .env to this URL"). OWASP keeps a separate Top 10 for LLM applications. In practice: don't let an agent run commands without your approval in a repo you don't own, and keep production tokens out of the environment where it works.
Licenses
Sometimes a suggestion is close to a snippet from an open source project whose license requires attribution or releasing your code. Keep Copilot's setting that blocks suggestions matching public code turned on, and if a big, suspiciously polished block shows up fully formed, search for it before you commit.
Secrets in the prompt and personal data
Pasting the .env into chat to "see why it won't connect" happens more than you'd think. So does pasting 200 rows of the customers table so the AI can "find the CSV issue." That's personal data leaving the company without a reason that would survive an audit. Depending on who your users are, that touches the CCPA in California and the growing list of state privacy laws, HIPAA if it's patient data (no Business Associate Agreement, no PHI in the prompt), and almost certainly your company's own AI policy. The habit that fixes it: swap real data for fake before pasting, use fake environment variables in examples, and turn off training on your conversations in the settings. If a key leaks, rotate it right away, not after lunch.
Common mistakes when you start using AI on code
- Accepting the whole diff without reading it. The agent touched 9 files to fix a one-line bug. Read all of it, or ask it to explain every file it changed.
- Asking without context. "Create a users endpoint" gets you tutorial code, not your project's code. Name the framework and version, where tests live, and show one example file.
- Letting the agent run migrations. It can write the migration. You run it against a database with real data.
- Switching tools every week. Stick with one for three weeks before you judge it.
- Not measuring. Note how long a similar ticket took without AI. Without that number you don't know if you're saving time.
- Using your personal plan on company code. Ask first. It's a five-minute conversation that can save your job.
Where to start tomorrow
Pick one task you do every week and secretly dread (writing tests, reviewing small PRs, explaining legacy code) and use AI only for that for two weeks. The prompts for it, with real answers, are in AI prompts for coding. If your bottleneck is your team's PR queue, the post on AI for developers shows how to set up a reviewer in GitHub Actions, with the monthly cost and the full instructions.

Want to skip this part?
Ready-made AI agents for developers and software teams: nothing to build, no prompts, already working for you.
- First-pass review on every pull request, with your team's rules, in GitHub
- Support tickets turned into clean issues with repro steps and suggested priority
- Security checks for secrets, injection and access control before a human reviews
Frequently asked questions
What is the best AI for coding?
There isn't one winner, because the tools do different jobs. I'd use Copilot in the editor for completions, an agent like Claude Code or Codex for multi-file tasks, and a chat for thinking through problems. For one paid plan only, Claude Pro covers agent and chat for $20 a month.
Is it OK to paste company code into ChatGPT?
Only if your company allows it, ideally on a business plan that doesn't train on your data. Never paste secrets, .env files or real customer data. Ask your lead about the AI policy first.
Will AI replace developers?
It replaces typing and part of the searching, not the judgment. Someone still has to decide what's correct, review the diff and own the incident. Developers who review AI output well are worth more, not less.
Is GitHub Copilot worth it for a junior developer?
The free tier is worth it from day one. Use it as a tutor: ask it why, write your own first test, and don't accept code you can't explain. That habit matters more than the plan you pay for.
How do I avoid security bugs in AI-generated code?
Review it against the OWASP Top 10, check every new package on the official registry, keep an automated reviewer in CI and never give an agent production credentials or permission to run commands without approval.



