Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
devTea24156333dI’ll ++ first
Then I read
muma349333d@devTea "Keeping app integrity is when your freshly hired developer implement something that potentially leads to the whole app failure, but unit test fails and tell you that newly added code is breaking the app. "
That is simply not true. Even if it were true, you know which parts of the code NOT break the app, which in itself is valuable information.
"Catching bugs is pretty much self explanatory. Just think about it – you have to actually write code that describes how to check up another code to catch bugs in it."
What is wrong with that? Also, nobody expects you to write test cases for EVERYTHING at the beginning. You are expected to add a testcase if you know it breaks your code. Its an iterative process.
Also you only write that code ONCE. It is not much overhead with modern testing frameworks to do so, and tdd makes you think more about your actual expectation of a piece of software.
BTW: Unit tests are NEVER the only tests that are running.
thatsnotnice702333d"Keeping app integrity is when your freshly hired developer implement something that potentially leads to the whole app failure, but unit test fails and tell you that newly added code is breaking the app."
It's way more and valuable than that. Unit tests tell you how the new code impacts on the old one, where it's ok and where you breaking the app. By doing so, tests are actually telling you how and where to fix. Then go, fix, unit tests maybe are broken again, fix again, and again till everything it's green. At the end you'll have refactored your codebase the safest way.
Unit tests are far from being the ultimate bugcatcher device. Actually, they really don't have that much to do with bugs.
What is true is that effective unit tests requires certain characteristics in a codebase, and many old school projects (like many in the java1 to 6 era) are simply and unfortunately often not shaped this way.
thatsnotnice702333dSometimes tdd is a religion too
craig9393931922321dIgnoring everything else - imagine this - releasing an app without a knot of worry in your stomache for days in a row. That alone makes proper testing worth it.
Now moving on we can think about how unit testing and the open closed principle work together to help you think about building a product you can have tons of confidence in. You wrote small methods that are well tested. They're closed for modification - you're good! No worries about that code. You extend the service and reuse some existing already tested code? Great! You can be confident that a large chunk of that new code is already tested.
The real question is; why live in fear of a shit storm when you can live happy and watch netflix, scratch your balls and get paid for delivering something that you know works thanks to your integration and acceptance tests?
Your Job Suck?
Take a quick quiz from Triplebyte to skip the job search hassles and jump to final interviews at hot tech firms
Get a Better Job