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
-
OMFG.
O.o
Another idiot Senior dev? how did this guy made it to senior?
Also, testing the refactored class should not be a problem at all. -
@Krokoklemme prob protocol.
But I'm sure he would have seen it was a roll back if you did roll back on version control and didn't just re write and copy paste them again. The senior prob swamped. Annoying for you I'm sure though :) -
@CogInTheWheel Well if there were unit tests it wouldn't even take 5 minutes to test it...
-
The whole point of tests is that you can refactor without worrying about breaking things...
-
mt3o19137y@bittersweet sure, it you keep interfaces and structure the same.
After I refactored the app in tracking care of, amount of code reduced by half. Whole structure is now different. Test cases had to be rewritten from scratch. Only external API has survived. But I had no integration tests before starting ;-) -
mt3o19137yYou can use TDD when you create new code. If you have an 5 year old app written by two separate team, one in India one in USA. At first they had no contact except sharing xml. In single app. Between the app and its dependency. A jar library.
In that app each object was a dependency for each other object. Some were just injected as a parameter to be passed deeper thru the call stack only to discover that the code is obsolete and never used.
You can effectively use TTD during rf if the app has rather loose coupling. That wasn't the case. I had to refactor just to be able to write unit tests...
Related Rants
-
FelisPhasma17Today Facebook reveled that they stored millions of people’s passwords in plaintext in a database accessible...
-
caramelCase8Fucking crunchyroll hardcodes their access tokens in a Constants Class in their APK, technically that is a se...
-
pesakitan222Are you !important ? Because you always override my priority
Senior: Why did you refactor those ten files?
Junior: There was a method copy-pasted in every one of them, so I moved it to a utils class.
Senior: Don't you know we will have to test all of those changed classes again? Please, rollback!
Junior: ok.
... two days later ...
Senior: Why did you just copy-paste that method? Don't you know it's bad practice?
undefined
thanks for your constructive criticism
bad practice