AI can write the code. You still have to own it.
AI writes more of our code every month, including the simple stuff. That's not going away, and it shouldn't. But if we stop solving problems ourselves, we lose the judgment that tells us when the code is wrong, and the next generation of developers may never build it at all.
I use AI to write code every day. So do most developers I know. It's fast, it's getting better every few months, and it's not going anywhere. This isn't a post telling you to stop.
It's a post about what happens to us when we let it do all of the thinking, not just the typing. Because there's a difference between using a tool to go faster on a problem you understand, and handing the problem over and accepting whatever comes back. The first makes you better. The second slowly makes you worse, and you don't notice until the day you need the skill and it isn't there.
Let's start with code, because that's where this actually shows up.
Code that looks right
Ask an assistant for "a method that gets all the orders for a customer from the orders API" and you'll get something like this:
public async Task<List<Order>> GetOrdersAsync(string customerId)
{
using var client = new HttpClient();
client.BaseAddress = new Uri(_settings.OrdersApiUrl);
var response = await client.GetAsync($"orders?customerId={customerId}");
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
return JsonSerializer.Deserialize<List<Order>>(json) ?? new List<Order>();
}
It compiles. It reads well. It works in the demo, and a unit test with a mocked response passes. Plenty of people would approve that pull request.
Now read it the way someone who has been burned would:
- It creates a new
HttpClienton every call. Under load that exhausts sockets, and it also ignores DNS changes if you fix it the wrong way. Stop newing up HttpClient. - It only gets the first page. The API says "all the orders," but almost every real API pages its results. This returns the first 50 and silently drops the rest. Paging through APIs correctly.
- The JSON probably won't bind.
JsonSerializer.Deserializeis case-sensitive by default. The API sends"id"and"total"; your class hasIdandTotal. You get a list of orders with every property empty, and no error at all. - The customer ID isn't encoded. An ID with a
&or a space in it changes the query. - There's no
CancellationToken. When the caller gives up, this keeps going. Pass your CancellationToken all the way down. - There's no plan for a 429 or a timeout. The first time the orders API is having a bad day, so are you. Handling 429 Too Many Requests.
None of those are exotic. Every one is a bug I've seen in production. And notice that none of them are visible in the code itself. You only see them because you know what isn't there, and you only know that because you've written this kind of code before, watched it fail and fixed it.
Here's a version that came out of asking those questions:
public sealed class OrdersClient(HttpClient http)
{
public async Task<IReadOnlyList<Order>> GetOrdersAsync(
string customerId, CancellationToken cancellationToken)
{
var orders = new List<Order>();
string? next = $"orders?customerId={Uri.EscapeDataString(customerId)}";
while (next is not null)
{
var page = await http.GetFromJsonAsync<OrderPage>(next, cancellationToken)
?? throw new InvalidOperationException("Orders API returned an empty body.");
orders.AddRange(page.Items);
next = page.NextLink;
}
return orders;
}
}
// Program.cs
builder.Services.AddHttpClient<OrdersClient>(client =>
client.BaseAddress = new Uri(builder.Configuration["OrdersApi:Url"]!))
.AddStandardResilienceHandler();
A typed client from IHttpClientFactory, every page, GetFromJsonAsync (which uses the web defaults, so casing isn't a problem), an encoded ID, a token passed through, and retries with backoff from Microsoft.Extensions.Http.Resilience.
The second version isn't really the point. An assistant will happily write it if you ask for it. The point is that somebody had to know to ask. The questions are the skill. The code is just what the questions produce.
The slippery slope
Reviewing code is easier than writing it. That's why handing over the writing feels so efficient. But you can only review well the kind of code you could have written yourself. Without that, reviewing turns into skimming for anything that looks off, and the bugs above don't look off.
The muscle that catches them is built one way: by solving problems. Writing the paging loop yourself and getting the last page wrong. Chasing the null properties for an hour before realizing it's the casing. Every one of those leaves something behind, and over time they add up to the instinct that makes you stop and say "wait, what happens on page two?"
When AI writes all of the code, including the simple code, you stop collecting those lessons. For a while you don't notice, because you're still living on what you already learned. But the problems keep changing, and you're not learning the new ones. The upper hand goes slowly, and then all at once: a production incident, an unfamiliar codebase, a bug the assistant keeps "fixing" in circles, and you realize you're waiting for a suggestion instead of thinking it through.
Newer developers have the most to lose
If that's a risk for experienced developers, it's a much bigger one for people early in their careers. They never had the experience to live on in the first place.
A developer who starts out with an assistant that writes everything can ship features quickly. What they may never get is the struggle that turns into judgment: the afternoon stuck on a bug that teaches them how the framework really works. Those afternoons feel like wasted time. They're actually where the skill comes from.
And the tools will keep improving, which makes this harder to see, not easier. The better the AI gets, the less often it's wrong, and the less practice anyone gets at noticing when it is. The times it is wrong will be the subtle, expensive ones, and they'll land on someone who has never had to work a problem through without help.
That's how you get a generation of developers who are very productive right up until the problem is new.
Mentoring is quietly disappearing
There's a second half to this that I think gets less attention.
Junior developers used to learn on the small, well-understood tasks: the CRUD endpoint, the export job, the validation rules. An experienced developer would hand one over, check in, review it and explain why something mattered. It was slower than doing it yourself. That was the deal, and everyone understood it was an investment.
Now those small tasks are exactly what AI does fastest. When a team is expected to deliver more and use AI to do it, handing a ticket to a junior and spending an hour pairing with them looks like a cost. The experienced developer can prompt it and be done in ten minutes. So the ticket never goes to the junior, the pairing session never happens, and nobody decides that on purpose. It just stops.
Multiply that across a few years and you have teams full of people who can describe what they want to an assistant, and very few who can tell when what came back is wrong. The experienced developers who could have passed that on are busy, and they're measured on output, not on who they taught.
Keeping your own thinking switched on
None of this means giving up the tools. It means using them in a way that keeps you doing the part that matters. A few habits that help, all of them about code:
Decide the shape before you prompt. Write the method signature yourself: what it takes, what it returns, whether it takes a CancellationToken, whether it can fail. That's where most of the design lives. Let the assistant fill in the body.
Predict before you read. Before you look at what came back, think about how you would have written it. Then compare. Where they differ, one of you missed something, and it's worth finding out who.
Ask "what happens when...?" The second page. An empty response. A 429. A null. Cancellation. Two calls at once. A customer ID with a space in it. You don't need the assistant to answer these. You need to be the one asking.
Write the test that would have caught it. A test with realistic data is worth more than any amount of reading. This one fails against the first version in two ways, the missing second page and the empty properties:
[Fact]
public async Task Returns_orders_from_every_page()
{
var handler = new StubHandler(
"""{ "items": [{ "id": "1" }], "nextLink": "orders?page=2" }""",
"""{ "items": [{ "id": "2" }], "nextLink": null }""");
var client = new OrdersClient(new HttpClient(handler)
{
BaseAddress = new Uri("https://orders.test/")
});
var orders = await client.GetOrdersAsync("c-1", CancellationToken.None);
orders.Select(o => o.Id).ShouldBe(new[] { "1", "2" });
}
(StubHandler is a few lines: an HttpMessageHandler that returns the given responses in order.) Notice the test data is lowercase, like a real API. A test that uses the same casing as your C# class will pass against broken code.
Write some of it by hand on purpose. Not everything, and not forever. But the simple code is where the muscle is built, so do some of it yourself. Turn the completions off for a task now and then and see how it feels. If it feels hard, that's useful to know.
Be able to explain every line. If you can't say why a line is there, it isn't ready to merge, no matter who wrote it. That's also what makes a pull request easy to review.
If you lead or mentor anyone
Give them the problem before the prompt. Ask how they'd approach it before anyone opens an assistant. Ten minutes of their own thinking first changes what they learn from whatever comes back.
Review the reasoning, not just the diff. In pull requests, ask "why this and not that?" and "what happens if...?" The goal isn't to catch them out. It's to make thinking about it the normal part of the job.
Pair with the AI together. Let the junior drive, and have them narrate why they're accepting or rejecting each suggestion. It's one of the best teaching tools we've ever had, but only if someone experienced is in the room.
Protect some of the small work. Not every ticket should go to whoever finishes it fastest. Some of them are how the next experienced developer on your team gets made.
Takeaway
AI is here to stay, and it will keep getting better at writing code. That's good. What it can't do is give you the judgment to know whether the code is right, and that judgment only comes from solving problems yourself. Use the tools to go faster on problems you understand, keep asking the questions that turn plausible code into correct code, and make room for the people behind you to build that skill too. The code still has to be yours.