General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Ton Bong
ThePrimeTime
comments
Comments by "Ton Bong" (@tongobong1) on "Why Would Anyone Hate TDD? | Prime Reacts" video.
@Jak132619 Most people including you think that unit tests should be small and integration tests are of medium size. This is a total nonsense. Unit tests can be large and larger than integration test. The difference is not in size. The difference is in what they test. Unit tests shouldn't go beyond the process boundaries to outside processes like database, filesystem or network. The main job of integration tests is to test integration of our system with outside systems. So you are not doing TDD with integration tests but with larger unit tests and this is better than TDD with tiny unit tests. You should actually delete unit tests that are too small when they are properly tested as part of larger unit tests.
3
Great videos! We live in a crazy world where critical thinking like this is rare. Never trust anyone or anything that only lists the pros without the cons. I believe TDD is good BUT only in some specific cases like when you know exactly the inputs and outputs to a rather complex function. In many cases where you don't know what exactly you want and so you are exploring the possibilities or when output is random or when building GUI in code or when applying a boilerplate code you shouldn't waste your time on a silly unit test because usually there is no benefit of having such a test and even less of writing it before the production code.
3
You should know that TDD doesn't produce good designs only mediocre. To get to good designs you should redesign after every large increase of code size. Beside many "small" unit tests created by TDD are just useless and you should delete them.
2
I would love to see ThePrime debate Dave on mockist style unit tests. Mockist style unit tests are the biggest nonsense ever invented and quite often used on many projects.
1
@markonovakovic3838 The most overlooked advice about how to properly do the TDD is advice on deleting useless tests and I believe this is the main reason why TDD is just not that great in practice. Look what inventor of TDD Kent Beck did in his famous book. He deleted the testFrancMultiplication test because he wrote larger tests that fully covered the functionality of this smaller test. There is no proper TDD without deleting useless tests.
1
NO NO NO! Unit is NOT one function nor one class. Unit is not a piece of code. Unit is a unit of functionality (1 functionality) that can be implemented by one or many functions or one or many classes. We test private methods by calling public methods that call those private methods. Most people are wrong because they think unit tests should be small. Usually small unit tests are bad because they don't test much. Medium and large unit tests are much more useful and the code they test is much easier to refactor. Now go to your projects and delete those tiny unit tests that test less than 5 lines of code.
1