DEV Community

Discussion on: Do you have any bad “sunk cost fallacy” stories?

Collapse
 
patricktingen profile image
Patrick Tingen

I once worked on some code that imported product definitions from central office to local factories. I was assigned to fix the bugs on this program since they needed to be fixed fast, otherwise product definitions could not be imported and the factory would not run.

I received bug reports once or twice a week but I quickly saw a pattern; the program was set up poorly. It had been created when there was one factory and two products, but at the time I worked on it there were 20+ factories and hundreds of products. The way the program had been expanded was by using copy/paste. Off course.

So I asked if I could rewrite it. Negative. It would take about a week to rewrite it and fixing the bug would take a few hours, so do the math. But I grew sick of fixing the same sh*t over and over again and started to rewrite it bit by bit. Management must have noticed that my fixes took significantly longer, but if they did, they didn't say anything. Over the coarse of a few months I had done the rewrite as a separate project in the hours of fixing the bugs and when I finally put it in place I really crossed my fingers. But it worked out fine; it came back only once or twice for some small things, but after that I never had to fix it again.

Unfortunately, management still think they made the right decision....