4 ms·
my personal style to design a system is to focus on design the domain model, I believe that this is an intuitive way for people to design stuff (not just softwa
by stevesun21 10y ago
my personal style to design a system is to focus on design the domain model, I believe that this is an intuitive way for people to design stuff (not just software, also in math and ML). This is the reason why I am not sold by TDD which start with writing test cases first – how come people can tell what is going to test before they know what they are going to develop.
I tried some projects with TDD, but unfortunately, it is too counter intuitive for me to follow to design a system.
- joshka 10y agoThe last D is design... Write your test as if the perfect domain model existed already, and then make it work. E.g. does it make more sense to write person.Age = 21, or person.Birthday = someDate. Alternatively, taking your math example, your tests are the constraints of an equation that your code solves.
- stevesun21 10y agoBased on what I learnt I am not really see the last D is design. https://en.m.wikipedia.org/wiki/Test-driven_development https://en.m.wikipedia.org/wiki/Test-driven_development http://martinfowler.com/bliki/TestDrivenDevelopment.html http://martinfowler.com/bliki/TestDrivenDevelopment.html