Skip to content

Software Development· 8 min read

Common Software Bugs and How Developers Fix Them

The bug patterns that show up in business web applications — wrong state, bad queries, duplicate actions, permission holes — and the fix that actually holds.

By Muhammad Luqman, Founder, Web3NextAIPublished

Most production bugs are not exotic. They are a small set of mistakes about state, data and trust, wearing a new ticket title. Recognising the pattern shortens the investigation. The method is in how to debug a web application. This article is the catalogue.

Patterns worth naming

Recurring defects in business web applications
PatternHow it shows upThe fix that holds
Stale or derived stateThe screen shows an old total after a save.One source of truth, and a re-read after the write.
Missing server checkThe button is hidden, but the API still allows the action.Authorise on the server. The UI is a convenience.
Wrong query boundaryA list includes another account’s rows, or misses valid ones.The filter is part of the query, covered by a test with two accounts.
Double submitTwo charges, two emails, two bookings.Idempotency keys or a unique constraint, not only a disabled button.
Swallowed errorThe user sees success, the job failed.Return the failure, log the cause, and do not render a green state on a 500.
Environment driftIt works locally and fails after deploy.The config, the migration, or the data volume — compare them before rewriting the feature.

A fix is smaller than a cleanup

Developers make bugs last longer by “fixing” them with a refactor. The change that removes the cause should be readable in one diff. Cleanup can follow. Debugging engagements are scoped this way so a production incident does not become a rewrite.

After the cause is gone, a regression test is the part that distinguishes a fix from a lucky afternoon. If the area has no tests, say so and add one around the bug, not fifty around untouched code.

The bugs that are also security bugs

An identifier in the URL that loads any record, a role taken from the client, a stack trace that includes a connection string: these are defects with a narrower audience for the details. The repair is the same shape as any other bug — reproduce, constrain, test — plus not publishing the steps. We do not put exploit write-ups on a marketing site.

When the same bug keeps returning

A class of bug that returns is no longer a ticket. It is a missing constraint or a missing owner. That is maintenance if the system is otherwise sound, and modernization if the structure cannot express the rule. Adding another conditional is how the file becomes unreadable without becoming correct.

Key takeaways

  • 01Name the pattern before you name the file you suspect.
  • 02Trust checks and uniqueness belong on the server and in the database.
  • 03A fix without a regression check is unfinished.

Frequently asked questions

Are these only JavaScript bugs?

The symptoms are language-agnostic. Our day-to-day fixes are in TypeScript, React, Node.js and PostgreSQL, which is where we can be specific.

Should we rewrite a module that has many bugs?

Only after you know the bugs share a structural cause. A rewrite of a module you do not understand reproduces the bugs with new line numbers.

About the author

Muhammad Luqman

Founder, Web3NextAI

Muhammad Luqman is the founder of Web3NextAI (WNAI), a software development company. He has designed and shipped production platforms across healthcare, SaaS, e-commerce and Web3, and writes about the engineering decisions behind software that actually runs a business.

Related services and industries

All insights

Next steps

Want this applied to a real project?

Describe the product, the defect or the decision. We reply with questions and a suggested direction.

Start a Project Explore Our Work

Every inquiry is carefully reviewed by our team.

Working with companies across Europe, the Gulf, North America and Asia-Pacific — remotely, in English, in overlapping hours.