4 ms·
Other comments are going off on this article because it would require our poor senior programmer to understand in detail every piece of the code. Of course, the
by cjfd 5y ago
Other comments are going off on this article because it would require our poor senior programmer to understand in detail every piece of the code. Of course, they have a point.... However, as a test of CCP it is not that bad. But I would restrict the question to asking about a piece of the code where they have done something in the not to distant past.
The more questionable statement in this post is that the ideas should come from reputable authors. This by itself is not at all enough to avoid CCP. It is quite possible to take the ideas of these authors, interpret them in the most clumsy way possible and go do some CCP with them. One can do TTD by attempting to test every indivdual class separately and mocking everything else. The problem with this is that one is testing implementation details that are very much subject to change and also that testing single methods often ends up very trivial things like 'is the standard library of my language still capable of adding an element to a container'. A more skillful way of doing TDD tests some number of classes together and test for properties of the code that perhaps the client could recognize as something they value.
Actually, avoiding CCP requires sound judgement. If one does not have that but is convinced that one is a smart programmer then one is not going to learn anything and nothing that anyone says can help. Reading good authors might actually not help either..... or perhaps it sometimes does.... YMMV.