An AI Coding Cautionary Story – O’Reilly

Once I was eight years outdated, I watched a mountaineering documentary whereas ready for the cricket match to start out. I bear in mind being extremely pissed off watching these climbers inch their approach up an enormous rock face, stopping each few toes to hammer what appeared like large nails into the mountain.
“Why don’t they simply climb quicker?” I requested my father. “They’re losing a lot time with these steel issues!”
“These are security anchors, son. In the event that they fall, they don’t wish to tumble all the way in which again to the underside.”
I discovered this logic deeply unsatisfying. Clearly, the answer was easy: don’t fall. Simply climb quicker and extra rigorously.
Thirty years later, debugging AI-generated code at 2 AM in my Chennai workplace, I lastly understood what these mountaineers had been doing.
The Intoxicating Rush of AI-Powered Move
Final month, I used to be engaged on a income evaluation challenge for my supervisor—the form of perfectionist who notices when PowerPoint slides have inconsistent font sizes. The duty appeared simple: slice and cube our quarterly income throughout a number of dimensions. Usually, this might have been a three-day slog of SQL queries, CSV exports, and combating with chart libraries.
However this time, I had my AI assistant. And it was like having an information visualization superhero as my private coding buddy.
”Create a stacked bar chart exhibiting quarterly income by contract sort,” I typed. Thirty seconds later: a stupendous, publication-quality chart.
I used to be in what psychologists name “circulate state,” supercharged by AI help. Chart after chart materialized on my display. For 3 superb hours, I used to be utterly absorbed. I generated seventeen completely different visualizations, created an interactive dashboard, and even added animated transitions that made the information dance.
I used to be so caught up within the momentum that the considered stopping to commit modifications by no means even crossed my thoughts. Why interrupt this lovely circulate?
That ought to have been my first clue that I used to be about to be taught a really costly lesson in regards to the worth of security anchors.
When the Mountain Crumbles
At 1:47 AM, catastrophe struck. I requested my AI assistant to ”optimize the colour palette for color-blind accessibility” throughout all my charts. It was an inexpensive request—the form of considerate enhancement that makes software program higher.
What occurred subsequent was like watching a managed demolition, besides there was nothing managed about it.
The AI didn’t simply change colours. It restructured my complete charting library. It modified the information processing pipeline. It altered the part structure. It even modified the CSS framework ”for higher accessibility compliance.”
Out of the blue, my lovely dashboard appeared prefer it had been designed by somebody having a heated argument with their laptop. Charts overlapped, knowledge disappeared, and the colour scheme now resembled a medical diagram of varied inside organs.
”No drawback,” I assumed. ”I’ll simply ask it to undo these modifications.”
That is the place I discovered that AI assistants, regardless of their spectacular capabilities, have the rollback expertise of a three-year-old attempting to unscramble an egg.
I spent the following two hours in what can solely be described as a negotiation with a well-meaning however totally confused digital assistant. By 4 AM, I had given up and reverted to the final dedicated model of my code—from six hours earlier. Three hours of sensible AI-generated visualizations vanished into the digital equal of that mountainside I’d have tumbled down as an impatient eight-year-old.
The Knowledge of Sluggish Climbing
The following morning, over espresso and the actual form of knowledge that comes from watching your colleague’s spectacular failure, my teammate Mohan delivered his verdict.
”You recognize what you probably did incorrect?” he mentioned. ”You forgot to make use of pitons.”
”Pitons?”
”Like mountain climbers. They hammer these steel spikes into the rock each few toes and fix their security rope. In the event that they fall, they solely drop again to the final piton, not all the way in which to the underside.”
”Your pitons are your commits, your assessments, your model management. Each time you get a working function, you hammer in a piton. Take a look at it, commit it, ensure you can get again to that precise spot if one thing goes incorrect.”
”However the AI was so quick,” I protested. ”Stopping to commit felt like it will break my circulate.”
”Move is nice till you circulate proper off a cliff,” Mohan replied. ”The AI doesn’t perceive your security rope. It simply retains climbing increased and better, making larger and greater modifications. You’re the one who has to determine when to cease and safe your place.”
As a lot as I hated to confess it, Mohan was proper. I had been so mesmerized by the AI’s velocity that I had deserted each good software program engineering follow I knew. No incremental commits, no systematic testing, no architectural planning—simply pure, reckless velocity.
The Artwork of Strategic Impatience
However this isn’t nearly my late-night coding catastrophe. This problem is baked into how AI assistants work.
AI assistants are extremely good at making us really feel productive. They generate code so shortly and confidently that it’s straightforward to mistake output for outcomes. However productiveness with out sustainability is only a fancy approach of making technical debt.
This isn’t an argument in opposition to AI-assisted growth—it’s an argument for getting higher at it. The mountaineers in that documentary weren’t sluggish as a result of they had been incompetent; they had been methodical as a result of they understood the results of failure.
The AI doesn’t care about your codebase both. It doesn’t perceive your structure, your online business constraints, or your technical debt. It’s a strong instrument, however it’s not an alternative choice to engineering judgment. And engineering judgment, it seems, is essentially about figuring out when to decelerate.
Which brings us again to these mountaineers and their methodical strategy. In my income dashboard catastrophe, I used to be going extremely quick, however I ended up arriving on the similar place I began, six hours later and considerably extra exhausted. The irony is that if I had spent quarter-hour each hour committing working code and operating assessments, I’d have completed the challenge quicker, not slower.
My expertise isn’t distinctive. Throughout the business, builders are discovering that AI-powered productiveness comes with hidden prices.
The Future Is Methodical
We’re residing by way of essentially the most vital shift in software program growth productiveness because the invention of high-level programming languages. AI assistants are genuinely transformative instruments that may speed up growth in ways in which appeared unimaginable only a few years in the past.
However they don’t remove the necessity for good engineering practices; they make these practices extra vital. The quicker you’ll be able to generate code, the extra essential it turns into to have dependable methods of validating, testing, and versioning that code. This may disappoint the eight-year-old in all of us who simply needs to climb quicker. However it ought to encourage the a part of us that desires to really attain the summit. Constructing software program with AI help is a high-risk exercise. You’re producing code quicker than you’ll be able to absolutely perceive it, integrating libraries you didn’t select, and implementing patterns you may not have had time to completely vet.
In that setting, security anchors aren’t overhead—they’re important infrastructure. The way forward for AI-assisted growth isn’t about eliminating the methodical practices that make software program engineering work. It’s about getting higher at them, as a result of we’re going to wish them greater than ever.
Now should you’ll excuse me, I’ve some commits to compensate for. And this time, I’m setting a timer.