By Kelsey Brown
I write code with AI every day. I'm not precious about it. It's quicker than me at the boring parts, it's good at tests, and it'll happily read the file I can't face. There's a short list of things it doesn't get to touch, though. Four rules, and I thought I'd write them down.
It never sees a secret. Keys, passwords and customer data never go into a chat window. It sounds too obvious to say. It's also the first thing people do at five o'clock when something's broken and they're tired, with the chat window already open and the answer right there. So I don't rely on remembering. Keys live somewhere the editor can't read them, and real customer data stays out of anything I'm testing with. If the only thing between a secret and a chat window is my being careful at five o'clock, that isn't a control.
It doesn't decide who gets in, either. Login, permissions, payments, anything that decides who's allowed to do what, I write myself and read every line twice, because that's where one small mistake becomes somebody's very bad week. AI can suggest, and sometimes its suggestion is good. The trouble is that it writes these parts plausibly. A login that's nearly right looks the same as one that's right, and it passes the same tests, until someone tries the one thing nobody thought to test.
Nothing ships if I can't explain it. AI makes it very easy to ship code nobody understands. That's how you get the server nobody owns, the one I wrote about in April, only this time you've built it brand new. My test is dull, and it's whether I could explain the code to whoever gets woken up when it breaks. If not, I ask the AI to walk me through it, and then I check its explanation against the code. It's often right. I check anyway.
And AI doesn't get the last word on whether something's safe. Ask it whether the code is secure and it'll say yes with total confidence. It says that about everything, so the answer tells you nothing. So the thing gets attacked before it goes anywhere, by me or by a tool built for the job. Asking the thing that wrote the code to mark it is like asking me to proofread my own writing. I see what I meant to put. A second pair of eyes has to belong to someone else.
The short version is that I use it a lot and trust it less, and both at once is fine. That's my list, anyway. Nobody hands you one, so write your own before the first time it matters.