Skip to main content

rzkmak

It’s 2026, Stop Making Excuses to Improve the System

Table of Contents

For decades, software engineering has been governed by a set of cautionary tales and hard-learned dogmas. We were taught that touching legacy code is dangerous, that rewrites are strategic suicide, and that maintaining comprehensive test suites takes more developer time than writing features.

For a long time, those warnings were justified. But in today’s AI-assisted engineering landscape, repeating these old adages has turned from prudent risk management into an invalid excuse.

If your team is still hiding behind the complexity of test maintenance or avoiding system modernization because “it’s too risky,” it is time for a reality check.

1. The Legacy Dogma We Grew Up With

To understand why our current excuses are obsolete, we have to look at where they came from.

In 2000, Joel Spolsky published his famous essay, “Things You Should Never Do, Part I”, where he asserted:

“The single worst strategic mistake that any software company can make is deciding to rewrite the code from scratch.”

Spolsky’s argument was grounded in real pain points of the era (such as Netscape’s infamous rewrite delay):

  1. Code is harder to read than to write. Developers look at legacy code, see messy abstractions, and falsely assume starting from scratch will be cleaner.

  2. Old code contains accumulated real-world bug fixes. Throwing it away discards years of edge-case handling.

A third pain point of the era, not part of Spolsky’s argument: maintaining tests by hand is expensive. We even had plenty of discussions about whether it was feasible to write tests before the code, the core idea of TDD. In practice it was very expensive, and its feasibility is still debated, especially for fast-growing products. Three or four years ago, writing high-fidelity functional test suites by hand was tedious. Setting up mocks, bootstrapping test containers, configuring external service stubs, and asserting asynchronous message flows required immense manual effort. Naturally, teams pushed back on refactoring because the “safety net” was too expensive to build.

That reality no longer exists.

2. The AI Shift: Generating Outer-Surface Safeguards

In the AI era, refactoring and writing test suites are no longer multi-week endeavors - they are routine tasks. AI coding tools excel at generating contextual, multi-layer integration and functional tests in seconds.

When we talk about a proper functional test, we mean a test that hits the outer surface of the system while stubbing or containerizing downstream dependencies:

  • Application Lifecycle: Automatically spawning an embedded web server and executing actual HTTP/gRPC requests.

  • Infrastructure Mocks & Containers: Spinning up ephemeral instances of real databases, Redis caches, Kafka brokers, and S3-compatible storage (e.g., via Testcontainers or local emulators).

  • External Third-Party APIs: Using stubs like WireMock to simulate external vendors, downstream microservices, and edge cases.

  • Comprehensive Assertions: Verifying data persistence in the database layer, checking outbound Kafka messages, and validating exact API schemas.

  • Fault & Resilience Simulation: Simulating network latency, timeouts, rate limits, connection drops, and malformed responses to prove system fault-tolerance.

Setting up this scaffolding manually used to take days of boilerplate configuration. Today, LLMs can inspect your routing table, database schemas, and external API definitions to generate working functional test suites with valid assertions in a fraction of the time.

+-----------------------------------------------------------------------+
|                         AI-Generated Test Suite                       |
|                                                                       |
|  [ HTTP Request ] ---> ( Embedded Web Server / App Boundary )        |
|                                     |                                 |
|          +--------------------------+--------------------------+      |
|          |                          |                          |      |
|    [ Database ]               [ Event Bus ]             [ Vendor API ]|
|  (Testcontainers DB)        (Embedded Kafka)         (WireMock Server)|
+-----------------------------------------------------------------------+

3. The “No Excuses” Red Flag

Because generating these safeguards now requires a small fraction of the effort it used to, maintaining excuses for bad code is no longer acceptable.

The ROI of creating functional test safeguards can be expressed as:

$$ \text{ROI} = \frac{\text{System Safety} + \text{Refactoring Velocity}}{\text{Generation Effort}} $$

With $\text{Generation Effort} \to 0$, the Return on Investment skyrockets.

If an engineer or engineering team claims:

  • “We can’t refactor this service because we might break hidden behavior.”

  • “We don’t have time to write tests for this legacy endpoint.”

  • “We have to live with this tech debt forever.”

It is an immediate red flag.

It indicates a breakdown at one of three levels:

  1. Individual Skill & Mindset: An engineer refusing to adopt modern tools to automate their workflow.

  2. Team Culture: A culture that tolerates fear-driven development and passive tech debt accumulation.

  3. Organizational Inertia: Management that values short-term feature pushes over simple, high-yield system investments.

4. Fearless Refactoring & Language Migrations

Once you establish a comprehensive functional test suite around the outer layer of a service, the underlying implementation detail becomes completely decoupled from its behavior.

You now have a robust safeguard. With this safety net in place, ambitious system improvements become simple:

  • Internal Refactoring: Cleaning up tangled domain logic without breaking external contracts.

  • Performance Optimization: Finding and fixing bottlenecks without changing external behavior.

  • Polyglot Migrations: Rewriting services across language boundaries.

As long as the outer functional tests pass - validating the API contracts, database states, and emitted messages - you can rewrite the internals with complete confidence.

5. Don’t Forget the Performance Safeguard

While functional correctness is critical, functional tests alone are only half of the equation. A refactored service might return 200 OK with perfect data payload fidelity, yet suffer from catastrophic performance regressions due to unintended $O(N^2)$ loops, thread pool exhaustion, or unindexed database queries.

To ensure true safety during system improvements, teams must pair functional tests with synthetic or end-to-end performance tests:

  1. Synthetic Latency & Throughput Baselines: Running automated load tests (e.g., k6, Locust, or wrk) against pre-production environments to establish throughput (RPS) and latency distributions ($p_{50}, p_{95}, p_{99}$).

  2. Regression Assertion Gates: CI/CD pipelines that fail builds if a refactor degrades response time by more than an acceptable threshold (e.g., $> 5\%$).

  3. Resource Consumption Audits: Monitoring CPU, memory allocations, and database connection pool behavior under load.

A refactor is only successful when both functionality and performance are preserved or improved.

6. Conclusion: The New Baseline

We need to stop quoting 20-year-old software engineering constraints to justify present-day inertia.

Writing tests is no longer a grueling manual burden. Refactoring is no longer a blind roll of the dice. Rewriting legacy bottlenecks is no longer a multi-year risk.

By using modern AI tooling to quickly build outer-surface functional test suites and pairing them with automated performance gates, you create an environment where continuous system improvement is the baseline, not the exception.

Stop making excuses. Build the safeguards, refactor the debt, and evolve the system.