DEV Community

Discussion on: Tell me a bug story

Collapse
 
stevezieglerva profile image
Steve Ziegler

I was managing a really small team (me, 1 dev, 1 tester) and we built a node on our government client's data exchange platform. We traveled to their office for acceptance testing. Everything ran fine locally but only worked the first time when deployed on the server. It drove us crazy and we wasted weeks onsite trying to fix it. I was convinced there was an issue with the other vendor's platform. Finally in frustration, I started reviewing all of the developer's code and saw a variable declared as static. You rarely see those in the wild and questioned him on it. He just thought it might be a good idea to use a static there. It was completely unnecessary and the reason for our run-once issue. He removed it, recompiled and deployed. It worked the 2nd time, and the 3rd, and the 4th ...

Happy Coding!