Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Voxera686812dTo bad, testing is very helpful but I know that many working with legacy code has a hard time seeing it as the code requires a major rewrite to be testable.
I hope he comes around and realize the potential some day.
C0D44703812d@Voxera i too have this problem with a couple of legacy code basis.
Rewrite to make testable, well more to make usable by a dev and break up 1000's of lines of code, or trust it works, seeing as its worked as intended for years.
Business's won't see the benefit in a rewrite just for the sake of sanity.
Cero612dTesting is a powerful tool that helps building cleaner code with less dependencies. I am sure there are great, experienced devs out there that can do that by default. Just put out wonderful, readable code that is working from scratch without tests.
But frankly, my bet is they are less than 1 in a million. I do not know your senior, but from the chances given I wouldn't bet he is one of those prodigies.
I wish you best of luck trying to turn his opinion around.
don-rager28212dThe argument that it's Not worthwhile to rewrite Lots of legacy Code die testing is valid to a certain degree. But this doesn't mean New Features can't be tested! Tell him to at least write tests for new features as this will increase stability when working on top of legacy code.
From Business perspective: the risc of "wasting time" and therefore money with a rewrite is way Higher than the risk of potential future problems with an untestable Code base. Depends on the Type of Project though