Timeline for Is it bad practice to code the solution, then redo in TDD?
Current License: CC BY-SA 4.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 8, 2018 at 14:46 | comment | added | Timothy Truckle | @TehShrike "commenting out the code and writing the test does accomplish something"`- Yes, but it is missing the main line of TDD: *Code exists to provide behavior required by a test. What the OP does is the opposite: A test exists to cover some code. I'd argue that this tests tend to be code centric and not behavior centric and that they tend to step in your way while refactoring. | |
| Jul 7, 2018 at 15:15 | comment | added | TehShrike | This answer isn't entirely accurate - commenting out the code and writing the test does accomplish something: it proves that the test fails without that code. If you don't comment out the code to verify that the test fails without it, you could write a test that doesn't actually test anything. | |
| Jul 7, 2018 at 15:09 | comment | added | svidgen | Wait. Is it really a"bad practice?" Or is it just "not really TDD?" | |
| Jul 7, 2018 at 9:23 | history | answered | Ewan | CC BY-SA 4.0 |