4 ms·
> I think the author is taking general advice Not just general advice, but advice that is meant to be applied to TDD specifically. The principals of clean code
by randomdata 4y ago
> I think the author is taking general advice
Not just general advice, but advice that is meant to be applied to TDD specifically. The principals of clean code are meant to help with certain challenges that arise out of TDD. It is often going to seem strange and out of place if you have rejected TDD. Remember, clean code comes from Robert C. Martin, who is a member of the XP/Agile gang.
The author cherry-picking one small piece out of what Uncle Bob promotes and criticizing it in isolation without even mentioning why it is suggested with respect to the bigger picture seemed disingenuous. It does highlight that testable code may not be the most performant code, but was anyone believing otherwise? There are always tradeoffs to be made.
- larsonnn 4y agoBut is this trade off not a little bit to much? It reminds me of Twitter or other companies which starting to change programming languages for performance reasons.
- randomdata 4y agoIs testable code a tradeoff too much? That cannot be answered globally, only locally. That's why we have engineers, after all. You could eliminate the entire profession of engineering if "which tradeoff is best" could be answered broadly without deep understanding of specific circumstances.