syzygypl / syzygypl.github.io

https://it.szg.io
Other
1 stars 0 forks source link

TDD is dead and other critique #4

Open mlebkowski opened 5 years ago

mlebkowski commented 5 years ago

http://david.heinemeierhansson.com/2014/tdd-is-dead-long-live-testing.html https://www.reddit.com/r/programming/comments/23rmdw/tdd_is_dead_long_live_testing_dhh/

It’s not so much as TDD is the wrong approach (for example, you can use TDD approach with integration testing also, without it affecting your architecture). It’s more like RoR and other Rapid Application Development frameworks (such as Laravel) aren’t suited for building a complex architecture, often required for unit TDD methodology. The fact that RoR is very opinionated, dynamic and lacking static type checking doesn’t help. And we see how it all ties together with our other topics, such as mentioned static typing (in Angular/TypeScript and PHP), responsiveness (it’s not always only about fast start, but the pace after a few months or years).

So it’s rather „TDD in RoR is dead” or „I used the wrong tool for the job”… :)

Also: there are smart people on Reddit /cc @FrostF0X — or so they seem to be on the surface :D

More: https://martinfowler.com/articles/is-tdd-dead/

FrostF0X commented 5 years ago

In fact, there are some problems not with TDD but with testing in some archetypes of applications. When we doing unit tests, in general, we try to inject stubs instead every uncontrollable module in our software. These uncontrollable modules are everything related to I/O for example, filesystem, database, mailing, request handling. Every code that is coupled with I/O, therefore, is hard to test, because of a need for test doubles. So applications that have not a lot of business logic are just REST API's with database underneath are not good targets for applying any test practices. And it can be that RoR is used mostly for applications described above. Then it is pretty obvious why Author gets such bad TDD development experiences. P.S. that why we not testing Kunstman :)

mlebkowski commented 5 years ago

http://www.reddit.com/r/PHP/comments/9pauzp/recommend_sql_query_builder_library/e80lcam

Podejscie do testow w laravelu