6 ms·
Yes that’s exactly what it is. If you business is selling a game that works, ogres not eating other ogres is a requirement for your game to be considered bug fr
by sudhirj 8y ago
Yes that’s exactly what it is. If you business is selling a game that works, ogres not eating other ogres is a requirement for your game to be considered bug free and sell well. (YMMV, depending on who your audience is ogre cannibal feat might also be fun).
This is as opposed to testing that that the eat method on the ogre only accepts an instance of the Human class. If you do that you’ll have a brittle system on your hands, and when your ogres decide to eat horses (business decision) you’ll have to change a lot of tests and will instead procrastinate by writing a blog post about why TDD sucks.
- domlebo70 8y agoA good type system makes the 2nd change you proposed a joy to make.
- sudhirj 8y agoOh, absolutely. A good type system also makes unnecessary to write tests asserting that your implementation uses exact / concrete types. A good type system would allow you to have a clean and sane 'Eatable' concept (interface / trait / protocol) that you can use and assert instead.