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
-
lungdart3409247dFigure out the behaviors. Write tests to ensure it behaves that way. Start with the easy stuff, end with the important stuff.
Now start refactoring. -
TeachMeCode5175247dStart SMALL! Broken but refactored code is worse than working but shit code lol. And @lungdart said, write tests, get the general behaviors sorted out and test the general behaviors and functionality.
-
Demolishun35057247dWhat happens when the legacy code fails tests it should pass? What if those quirks are relied upon?
-
sjwsjwsjw1568247di've always regretted being born but it's more intense when this is supposed to be a small & easy ticket
-
ars14081247dIf you can find what code gets called on what situation, it starts to become possible to extract code into functions you can unit test. It’s neigh impossible if it relies on thousands of god objects and their state, but it’s a starting point if you can get to the very smallest possible unit of code.
Setting the office on fire is a better alternative as well.
cant figure out how to refactor legacy code in any clean/acceptable way
rant