1
A coworker swore my old code was 'fine' until it crashed the whole test environment
My teammate Dave kept telling me to stop refactoring the legacy SQL query because it 'worked well enough.' Last Tuesday it locked up our staging server in Seattle for 6 hours straight. Now I'm stuck rebuilding it from scratch while he acts like nothing happened. Has anyone else had a coworker insist their buggy code is totally good to go?
3 comments
Log in to join the discussion
Log In3 Comments
laurabennett3mo ago
@noahclark but staging still costs time and trust... why wait for worse?
6
abbyr961mo ago
Your coworker sounds annoying but maybe he has a point that the old code was fine for what it needed to do" - that part really stuck with me. Do you think "fine for what it needed to do" is actually a good enough standard for production code though? Like sure the old code works most of the time, but when it breaks doesn't it usually break in a way that takes forever to fix? I've seen teams spend way more time fighting bad legacy code than they would have if they just refactored in smaller pieces over time. Staging failures happening because someone tried to improve things just feels different than production going down because nobody wanted to touch the messy code.
6
noahclark3mo ago
Oh come on, are we really acting like a 6 hour staging crash is a disaster? Staging is literally the environment where stuff is supposed to break. I've seen production databases go down for whole weekends and the company still survived. Your coworker sounds annoying but maybe he has a point that the old code was fine for what it needed to do. How many times has your "refactored" code actually made things better vs introducing new problems? Sometimes working with the messy legacy stuff is just part of the job, not a moral failing.
2