Re:Extremely disillusioned with technology. Please help
by Aeolun on Monday May 04, 2020 @06:48PM
(#23074288)
But what do you do if your initial codebase is crap. You literally cannot test until you refactor 50% of it into something semi-sensible.
[ Parent
| on HN ]
Re:Extremely disillusioned with technology. Please help
by NortySpock on Monday May 04, 2020 @07:53PM
(#23074777)
Short version: you find very small things that you can write tests around (pulling messy logic out into testable functions, writing tested utilities that replace dirty hacks, etc.) and start building your testing framework starting with that.
Long version: Working Effectively with Legacy Code Book by Michael C. Feathers
Re:Extremely disillusioned with technology. Please help
by brianwawok on Monday May 04, 2020 @09:10PM
(#23075293)
It’s almost always bad as a new guy to come in and start refactoring.
There are lots of weird if checks to deal with a vendor that returns bad data over the api every Sunday night. Your new clean code is going to crash and burn in all of these cases.
Re:Extremely disillusioned with technology. Please help
by Hendrikto on Tuesday May 05, 2020 @08:46AM
(#23079420)
That is not an argument against unit testing. That is an argument for applying it from the beginning…
Re:Extremely disillusioned with technology. Please help
by popinman322 on Monday May 04, 2020 @07:24PM
(#23074560)
Then refactor 50% of it.