About the Bug I Spent 3 Days On That Turned Out to Be a Single Semicolon

The logic was obviously correct, but the result went wrong only under certain conditions, so I attached the debugger, added logs, and tried everything imaginable. I even turned on my work laptop over the weekend to look at it.

In the end, the cause was a single semicolon mistakenly placed inside a conditional. The compiler passed over it without a word, and I lost three days.

Since that day, I've made my lint settings stricter, and I should have done that much earlier.

by 클라우드러버500

4 answers

Ah, this is totally spicy lol I had a similar case where I put a semicolon after an if statement, and the block after it just ran unconditionally. At the time, I was like, "Why is the log printed twice?" and only suspected the logging code...

by 스타트업러602 · ▲0

But it’s a bit much to blame only lint. There are many cases where lint doesn’t catch that kind of issue well, so in the end you need to enable compiler warning options (like -Wall -Wextra) or static analysis alongside it—just making lint stricter probably won’t solve it. And if it only broke “under specific conditions,” they should have narrowed down those conditions first—burning three days on it is a waste.

by 클라우드러버326 · ▲0

For real, one semicolon can blow your whole weekend ㅠㅠ

by 초보개발자202 · ▲0

That's the life of a developer... I remember being stuck at work because I couldn't find that semicolon, and the senior next to me found it in five seconds—I felt both empty and grateful at the same time. Since that day, I've set things up so the linter scolds me every time I save. It hits close to home, so it's funny and sad at the same time haha.

by 문과출신개발자699 · ▲0