DEV Community

Discussion on: How do you cope with bad code?

Collapse
 
sudiukil profile image
Quentin Sonrel

Thanks for the reply.

I'd usually agree with what you say but here the code isn't "bad" because it's the result of years (it's a few months old) of modifications... but because it was done by someone who isn't a developer. So yeah, it's just bad code. And to be clear I'm not blaming anyone, all things considered the code runs well, but it is absolutely unmaintainable, which is my main issue with it... because I do have to maintain and extend it.

Also sorry but no, my argument about having a deadline isn't "moot". The client basically gave me a week to do something they weren't able to do in over a month... so respecting the deadline is almost impossible even by barely doing the minimum, let alone refactoring any part of the code.

I don't know, maybe I'm at fault here, maybe I should be able to work with such a code, and it's not the first time I have to work with legacy code, but in this case I really can't get anything of it.