3 ms·
TDD is not about the tests, it is about teaching yourself to code better. About forcing yourself to break up your code into small components with well defined i
by eikenberry 10y ago
TDD is not about the tests, it is about teaching yourself to code better. About forcing yourself to break up your code into small components with well defined interfaces. Something we all want to do but which is hard in practice without a tool to guide you. TDD is that tool.
- SatvikBeri 10y agoIn our case, we did that using functional programming & type-driven design (which ironically is also a TDD.)
- devbug 10y agoThis this this! Most often I see TDD used as a couch for a really bad type system.
- AstralStorm 10y agoTypes are just formalised limited contracts. Emphasis on limited. They are not enough.
- eikenberry 10y agoT(est)DD does tend to make your code look more like you used a functional-oriented language. A lot less mutability, heavier use of first-class functions, etc. Though I tend to prefer languages that are at least somewhat functional (eg. python, go).
- AstralStorm 10y agoIt doesn't even help people enough apply SOLID principles. Pure functions help but the principles of generalisation are deeper than this. Tests verify contracts offline. This will miss real issues.
- peruvian 10y ago> Though I tend to prefer languages that are at least somewhat functional (eg. python, go). Can't think of any less functional languages than these.
- eikenberry 10y agoThink of the language features you need to be able to program in a functional way, then think about what these languages have. There is a sizable overlap. If you need a template then think of scheme. It is the best example of a minimal functional language.