Ever Feel Like You’re Wasting Your Time?
Lately I’ve found myself spending many hours attempting to improve the code in a couple projects. In both cases I am just moving functions around, splitting up functions, extracting interfaces and such. These operations are common refactorings.
My goal is to make the code more testable, more flexible, and overall easier to work with. Problem is that there isn’t much visible improvement for the clients and sometimes functions are broken in the process. These clients have pressing bug reports and feature requests that I am trying to address and I almost feel like my time would be better spent just patching up the code.
Both of these projects have expanded greatly since their inception. Features were added, large chunks of the infrastructure have to be changed every now and then. The codebases are really inflexible so changing anything is painful and it takes a while to shake out all the bugs. Once the bugs are taken care of it works alright; at least until the next change request.
I really want to believe I am making progress and my time is being spent in the right areas. I know if I don’t do this it will only get worse. Still, I question every hour not spent working directly on a bugfix or feature. (I do try to make improvements while changing related code, but that only gets me so far.)
10:32pm grrr, sonofa, stupid… Fixed stupid mistake in the title. Can’t believe I did that…
Yep, I hear ya. Every time I have to go back to projects from a year or more past, the “refactoring” time feels…..well, not wasted, but I feel almost “guilty” spending the extra time to make it more maintainable, flexible, etc…
Every once in a while, however, I run across a project that I’ve already done that on and *poof*, the rewards are realized.
Hey! I new someone would find this place eventually.
Yeah, it is nice once the code is cleaned up. It probably does save time in the long run. It’s just those cases where they want it now that I’m tempted to layer another hack on top of the existing code just to get things working.