5 ms·
No, he is exactly against covering simple code by tests. It's explained below first sentence. It is funny how things turn around. For fifteen years I ha
by EugeneOZ 9y ago
No, he is exactly against covering simple code by tests. It's explained below first sentence.
It is funny how things turn around. For fifteen years I
have been preaching TDD (Test-driven development, or as it
used to be called: test-first approach), or at least for
developers to write some unit tests. However, in recent
times I have found myself saying more often, "Why did you
write that test?" instead of, "You should write a test."
Answer to that "funny turn around" sentence is simple - he is getting older and more lazy. Each of us will, each of us should fight with it.
And after that, example of what I'm talking about:
It seems that he had trouble using Mockito to test the
following piece of code:
...
I think he was very surprised with my response: "You
don't need to test that."
- JoeAltmaier 9y agoA concise word for 'older and lazy' might be 'experienced'
- EugeneOZ 9y agoNot always, not in this case definitely.
- JoeAltmaier 9y agoI don't know; disagreement over whether everything must be tested isn't enough to call it 'lazy'? Its an easy dart to throw. But remember, everything you don't do leaves room for more progress elsewhere. Its an optimization problem.