You have a beginner programmer and you give him to program a solution. You want to know, how much knowledge about a programming language he has. If beginner is working with an IDE, how much knowledge he needs to complete his task?
When we have mutable shared state, written code is harder to understand. We have to know where the state has become shared and where it is modified. Usually those location are on different places. It become worse, when inner state of a class is shared.
Would we get same software solution, if we hired different teams to build the software solution? How team’s knowledge influence software solution?
Does the following method have single responsibility?
Validation of input parameters are at the beginning of the method. If the method has code after validation, then it has not a single responsibility. How can we separate validation code for input parameters and rest of the code?
Let’s create a class that it stores a list of values and it can compute some value based on stored values. Internally elements are stored in a List. When class is created form the list of values, we can create a collector for it. There is no need for public constructor.
Cumulative time is increasing by executing tests through time. Is every lost second important?
Unit test is executed in less than half of the second. When we have an integration test which is using a repository that is connected to a database it will be executed in several seconds. With a repository, that has an implementation in-memory, tests will be executed faster. There are also other benefits.
Can entities have only attributes that are data values and aren’t collections? What is alternative?
You have a test coverage 90% or more but not 100%. You have tests that cover all exceptional cases. What about code that is not covered with tests?