DEV Community

Medea
Medea

Posted on

5 Dumb Bugs That Wasted Hours of My Life (And Might Waste Yours Too)

As devs, we all hit bugs that feel impossible — until we fix them and realise it was one tiny, stupid thing.

Here are a few real ones that burned hours (or days) of my life


🐛 1. Forgot to .await a setTimeout wrapper

Tried using a Promise with setTimeout inside an async function, and forgot to await it.

Time lost: 2 hours

Fix: Added await — everything worked


🐛 2. Typo in NODE_ENV

Wrote process.env.NDE_ENV by accident. Everything silently failed in production.

Time lost: 3 hours
Fix: Eye strain, then fixing one missing letter.


🐛 3. Mutated a React state object directly

I had:

const [formData, setFormData] = useState({ name: "" });
Enter fullscreen mode Exit fullscreen mode

Then I did formData.name = "John" instead of using setFormData.
Couldn’t figure out why nothing updated.

Time lost: 1 hour
Fix: Realised I was mutating state directly. Used setFormData({ ...formData, name: "John" }) instead.


🐛 4. Calling a function directly inside useEffect

It executed on every render. Classic mistake. Caused an infinite loop.

Time lost: 2 hours
Fix: Wrapped it in another function or used the right deps.


🐛5. Missing dependency in Next.js [slug].js file

Was naming my file slug.js and wondering why it didn’t work.

Time lost: 2 hours
Fix: Rename to [slug].js. Boom.


Want more like this?

I'm building StupidBugs — a paid directory of the dumbest bugs that wasted devs hours.

It includes:

  • Real bugs from real devs
  • Time wasted
  • Fixes and context
  • Tags by stack (React, Node, etc.)

It’s £5 one-time for lifetime access.

If even one person buys, I’ll build it.

👉 Check it out / Pay to validate


Got a bug like this? Drop it in the comments — I might add it in

Top comments (0)