Last month, when I gave a new teammate their first task, they came over to me two hours later: "done, I opened the PR, the tests are green." The code itself really was clean, the naming was right, the function was short. But I asked: "what happens if two requests hit this endpoint at the same time?" Silence. "And what if the third-party service times out?" Silence again. The code worked, it was even correct — but the person who wrote it had never thought about when the code would misbehave. That day I realized that on our team we don't really teach people how to write code; most young engineers already know how to write code, having picked it up at university or in their own projects. What we really teach is how to be suspicious of the code they write — and, more importantly, of code written by someone else, or even by their own past self.
Working doesn't mean correct
We usually explain this distinction with an example during the first week. We hand over a simple discount calculation function that works flawlessly on the happy path: a 20 percent discount on a 100-lira product comes out to 80 lira. Then we ask: what happens if the price is 0? If the discount is greater than 100 percent? If a negative price comes in (yes, one actually did once, thanks to an integration bug)? If it has to process a number with 14 digits after the decimal point because of a currency conversion? Usually, three or four questions in, the expression on the person's face changes; in that moment they internalize that "works" and "correct" aren't actually the same thing. Code isn't trustworthy just because the tests are green — tests verify the scenarios you bothered to think about; they say nothing about the scenarios you didn't.
The three layers of suspicion
Over time I noticed that we had split this kind of teaching into three layers. The first layer is being suspicious of your own code: "what assumption did I make when I wrote this line, and is that assumption always true?" The second layer is being suspicious of other people's code — asking "in what situation does this blow up?" in code review instead of saying "this looks good." The third layer, the one that has become more and more critical over the past year, is being suspicious of AI-generated code. Right now a significant share of the code suggestions on our team come from a language model, and the code the model produces almost always looks tidy, readable, and self-assured — just like a very smart engineer who has just finished an internship but has never been burned in production. Looking confident and being trustworthy are not the same thing; the model will suggest a library function that doesn't exist in exactly the same confident tone as one that really does. We now have a rule on the team: no AI-generated code gets merged until the person who asked for it can fully explain its logic. "The model wrote it that way" isn't a justification; it's a confession.

Concrete ways to teach suspicion
Abstract advice like "be skeptical" doesn't change anyone; we have a few concrete habits that work for us. First, every PR description is required to answer the question "in what situation would this change behave incorrectly?" — a field that can't be left blank. Second, in code review, the person approving has to ask at least one edge case question; for us, a review with no questions is a review that didn't happen. Third, an exercise we call "imaginary outage day": we give a new teammate a working service and ask, "how would you bring this service down today?" Coming up with answers is a much harder exercise than writing code, because breaking things takes a different mindset from building them. Fourth, and my favorite: we read the finalized, anonymized write-up of a real production incident (the post-mortem) line by line together with new joiners. The answer to "who would have written the test that prevents this bug, and why didn't they?" is usually "nobody thought something like this could happen" — and that's exactly why we do this exercise.

Let me recall one incident
One night last year, code suggested by a language model was "improving" our payment retry logic: it automatically retried a failed transaction three times. The code was spotless, its explanation seemed reasonable, the tests passed — because the test scenario used a mock that returned the same fake response on every attempt. Here's what happened in the real world: the first attempt had actually reached the server and charged the money, but the response didn't come back in time because of network latency; the system assumed it had "failed" and triggered a second and a third attempt. A user's card was charged three times for the same order. This wasn't the model's fault — the model had carried out the instruction it was given, "retry the failed transaction," to the letter. The fault was ours, for approving that instruction without questioning it: we had forgotten that without an idempotency key we could never safely tell "failed" apart from "no response received." After that incident a new reflex took hold on the team: when a model says "I automated this, retry," the first question is now "when is it not safe to retry?"

The limit of suspicion: productive, not paralyzing
There's a trap here, and we don't ignore it: an engineer who is suspicious of everything can't ship anything. Our goal isn't to build a paranoid team; it's to build a team that "is suspicious enough, and then decides." For that we have a calibration tool: we evaluate every change by how reversible it is. For a change that is easy to roll back and has limited impact (a button color, a log message), there's no need for a long suspicion session; try it quickly and see. For a change that is hard to roll back and has broad impact (a payment flow, a data schema), the suspicion budget opens up fully. The first reflex we teach new teammates is actually being able to make this distinction: approaching every line of code with the same intensity of suspicion both wastes time and dulls your attention exactly where it matters most. A good engineer is one who knows where to spend their suspicion.
Recently, the teammate who opened that first PR stopped while reviewing a colleague's code and asked: "if this function gets triggered twice at the same time, does it charge the money twice?" The question itself was almost word for word the one I had asked them months earlier. In that moment I knew that what we'd been trying to teach had really sunk in — they already knew how to write code, and now they had learned how to be suspicious of it, too. I always enjoy talking about team culture; my contact page is open.