loading...

re: How To Never Fail At The Fizzbuzz Interview Challenge VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Yes. You can. But will you, really? IMHO alert. In Test-Driven Development, you pass the failing test with the simplest possible solution. And y...
 

Another way to look at this “simplest possible way to make the failing test pass” is to imagine you have a developer on the team, who is removing any code that is not tested.

So that additional if statement is not tested by the test. That means it can be safely removed.

You can apply such radical technique to teams that do TDD rigorously. And if you knew there is a person on your team (and that person – is every member of the team), you are probably going to make sure to have all the production code covered.

You just don’t add any code that is not tested, as simple as that.

code of conduct - report abuse