Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
stop68024yits past. you did the best design you could use. over the time you started to like the new design more,
-
Flygger19794yWhen working with an existing codebase, I'd always recommend following whatever practices and style it uses until it makes sense to do a complete rewrite to something that is actually better and not just the latest preference...
A complete rewrite doesn't have to be changing the entire style of the codebase, but just rewriting how you do a single thing in a better way, and take it little by little in that way, but should always be done across the entire codebase if you do it...
If you rewrite everything on every preference change, you'll have little time to do anything else... -
jeeper58094yIs it doing everything it needs to relatively efficiently and you only need to look at it every few years? Leave it alone, match changes to your old style.
Are you going to be editing this code a lot or is something significantly not working anymore? Rewrite. -
Condor323324y@jeeper Good point! I do not think I'll be looking at this code very often, given how little I looked after it in the past (set and forget basically). Perhaps I could gradually replace the code with new stuff, just keep the behavior the same.. well refactoring I guess. But yeah at this point it's probably a better idea to just go with the old designs.
Related Rants
I'm looking at old code that I wrote around half a year ago, and noticed that my coding style changed over time (relying more on arguments to pass messages between commands and functions, rather than sourcing the result of a command). I feel like this old code isn't truly mine anymore. It's thousands upon thousands of lines of code though... Given that, would you rewrite it or just move along with the existing design? I mean in my opinion the current code really sucks.
question
old code
the duck couldn't answer this one