If you didn’t learn it that way, test-first isn’t the easiest way to program.
But it can be learned.
- Write the code you’re going to write anyway.
- Test your just-written code thoroughly.
- Keep your tests and throw away all your code.
- Now rewrite your code.
It takes extra time, but only the first time.
Given you’re writing test code anyway, test-first will pay you back the second or third time you write the code.
If you’re not writing test code, move along, nothing to see here.