Type: Article -> Category: AI Development

Why Testing Should Always Be at the Top of Your Development List
Publish Date: Last Updated: 20th February 2026
Author: nick smith- With the help of CHATGPT
“Bugs do not have compassion, they do not forgive and they are only ever one change away”
View as a YouTube short video
I have been writing code for over 20 years, and if there is one thing experience teaches you, it is this: bad habits creep in quietly.
One of the worst habits a developer can fall back into is lazy testing.
Not because we do not understand its importance.
Not because we were not taught better.
But because things appear to be working… until they very suddenly are not.
And recently, I paid dearly for forgetting that lesson.
The Bug That Waited Months to Strike
A few months ago, I made what I believed to be a small, harmless change.
Nothing dramatic.
No major refactor.
Just a minor adjustment to my page regeneration logic.
Fast forward several months and over half of my website pages began returning 404 errors.
The twist?
The pages were still physically there on the server.
Yes. The content existed.
Yes. The system was running.
No. The users could not access them.
From an SEO perspective, this is the digital equivalent of locking the front door of a library while insisting all the books are still inside.
Why I Built My Own CMS (And Walked Into My Own Trap)
Like many developers who have worked extensively with WordPress, I eventually reached the point of frustration.
Too many dynamic calls.
Too much overhead.
Too many moving parts for pages that rarely change.
So I moved to a custom stack:
Node, MongoDB, and a CMS designed to generate real HTML pages stored on the server.
My logic was simple and, frankly, still sound.
Most pages on a website do not change often.
So why dynamically rebuild them on every request?
Dynamic rendering:
- Hits CPU repeatedly
- Requires multiple database calls
- Invokes plugins and caching layers
- Scales poorly under traffic spikes
Static pre-rendered pages, on the other hand, are fast, lightweight, and predictable.
Especially when you are thinking long-term about server costs, scalability, and infrastructure efficiency — something I have seen spiral from tens of pounds to thousands per month in poorly optimised environments.
The “Smart” Menu System That Bit Me Back
To handle updates like menus, adverts, and layout changes, I built a templating logic:
- Pages store a last updated timestamp
- Menu templates are pre-rendered HTML
- When a page is requested, the system checks:
- If the page is older than the menu
- It automatically regenerates itself
Elegant. Efficient. Logical.
And almost perfect.
Almost.
My Very Own Tinkerbell – How AI Changed the Way I Code
About a year ago, I began integrating AI into my development workflow.
Not as a replacement.
As a co-pilot.
AI helped:
- Identify security gaps
- Refactor inefficient code
- Maintain consistent coding style
- Accelerate development output dramatically
Tasks that would have taken me months were reduced to minutes.
Was it perfect? No.
Was it transformative? Absolutely.
My productivity effectively doubled overnight — but here is the hidden danger:
Faster development can quietly reduce disciplined testing if you are not careful.
Run Fast, Release Often… and Break Things
University teaches structured development lifecycles.
Startups teach survival.
In the real world, stakeholders want results yesterday.
Budgets are tight.
Deadlines are tighter.
So what happens?
You:
- Ship fast
- Test quickly
- Fix on the fly
- Roll back
- Re-release
And repeat.
It is exhilarating.
It is educational.
It is also a perfect breeding ground for hidden bugs.
Especially when you are a solo developer wearing multiple hats — server admin, coder, tester, and architect all at once (a situation I know very well running a bespoke CMS for my own platform).
The One-Character Mistake That Broke 160 Pages
Here is the painful truth.
The issue was caused by a single misspelled variable.
One character missing.
That typo only triggered under one specific condition:
- When the menu updated
- And I did NOT run a global article rebuild (which I usually did)
The result?
Pages failed to regenerate.
The system threw a 404.
Even though an older valid version still existed on the server.
Over time, approximately 160 pages became inaccessible.
And because they were older articles I rarely visited, the bug went unnoticed.
The consequences:
- SEO damage
- Lost traffic
- Poor user experience
- Silent technical debt compounding in the background
All from one unchecked change.
The Dangerous Myth of “Kicking the Tyres”
My testing process at the time was… let’s call it optimistic.
I checked:
- Homepage ✔
- A few random pages ✔
- Login system ✔
Everything “looked fine.”
This is not testing.
This is kicking the tyres and hoping the engine works.
And hope is not a testing strategy.
The Wake-Up Call: Testing Should Come First, Not Last
Here is the uncomfortable truth most developers learn the hard way:
Testing is not a luxury phase.
It is a foundational system component.
If you do not design a testing strategy at the start, you are effectively coding blindfolded and hoping for the best.
Or, to use a more visual analogy:
You are the Titanic.
And the iceberg already exists.
You just have not hit it yet.
AI to the Rescue (Again)
After fixing the bug, I finally did what I should have done from day one.
I designed a proper testing system.
With AI’s assistance, I implemented:
- Automated browser testing (Selenium-style logic)
- A custom cron script to crawl site pages
- Scheduled checks for page accessibility
- Automated alerts for failures
What would normally take days (or weeks) to architect manually was scaffolded in minutes.
Implementation still required half a day of integration and validation — but that half day bought something priceless:
Peace of mind.
The Irony Developers Must Accept
Writing test infrastructure always feels like time stolen from “real development.”
Until the day a hidden bug costs you:
- Traffic
- Revenue
- Rankings
- Reputation
Then suddenly, testing becomes the most valuable code you ever write.
Final Advice From an “Old Dog”
Take it from someone who has built systems, broken systems, and rebuilt them again:
Bugs do not care how experienced you are.
They do not care how clever your architecture is.
And they are always one unnoticed change away.
With modern AI tools, there has never been an easier time to implement robust, scalable testing routines tailored to your exact codebase and coding style.
So if you take one lesson from this article, let it be this:
Design a testing system that grows with your project.
Document it.
Maintain it.
Expand it alongside every new feature.
Because the moment testing becomes an afterthought…
That is usually the moment your iceberg is already in the water.
Latest AI Development Articles
AI Questions and Answers section for Why Testing Should Always Be at the Top of Your Development List
Welcome to a new feature where you can interact with our AI called Jeannie. You can ask her anything relating to this article. If this feature is available, you should see a small genie lamp above this text. Click on the lamp to start a chat or view the following questions that Jeannie has answered relating to Why Testing Should Always Be at the Top of Your Development List.
Be the first to ask our Jeannie AI a question about this article
Look for the gold latern at the bottom right of your screen and click on it to enable Jeannie AI Chat.
Type: Article -> Category: AI Development






