Reviews have become expensive, rewrites have become cheap
The New Economics of Code: Expensive Reviews vs. Cheap Rewrites
"LLMs aren't lazy."
Contrary to popular belief, AI doesn't cut corners to find the "easy way out." It doesn't avoid existing libraries because of ignorance—it often knows they exist. Rather, the issue is that for an LLM, the cognitive load of writing a 200-line custom implementation is identical to writing a 2-line import statement.
The Path of Least Resistance
For a model, the shortest path to a "correct" answer is often to build the entire logic from scratch. This results in code that is technically functional but fundamentally over-engineered.
The Reviewer's Dilemma
As a human reviewer, you are left to decide: Do I accept this unnecessary complexity, or do I push back? Because this pattern repeats, you find yourself trapped in a loop of identical conversations.
| Metric | Traditional Coding | AI-Generated Coding |
|---|---|---|
| Writing Cost | High (Manual Effort) | (Instant) |
| Review Cost | Moderate | Very High (Complexity Audit) |
| Rewrite Cost | High (Sunk Cost) | (Prompt-based) |
A New Workflow Strategy
To combat this, I have shifted my focus. Instead of fighting the output during the review, I change the input and the process:
- Heavy Upfront Planning: Define the scope, select libraries, and set boundaries before a single line is written.
- Rapid Deployment: Push to a test environment quickly to see the actual footprint.
- Aggressive Simplification: Identify what is redundant and prune it.
If a block of code feels like "too much," I don't manually edit it. I simply ask the AI to:
- Simplify the logic.
- Use a specific library.
Include the featureCut the feature (if not yet required).
Example: The Shift in Logic
Old mindset: "I spent three hours on this, I can't delete it." New mindset: "The AI wrote this in seconds; I can delete it in seconds."
# Over-engineered AI output
def complex_sum(data):
result = 0
for i in range(len(data)):
result += data[i]
return result
# Simplified rewrite
def simple_sum(data):
return sum(data)
Conclusion
The "sunk cost" of code has vanished. When the model that created the complexity is also the fastest tool to resolve it, the equation changes:
If it feels like too much during review, just rewrite it. It's cheap now.