You can win and you can lose. It's gambling.
If I could just "write the answer" and do it perfectly, it would be faster than doing TDD and this is what that old Left Brain Interpreter likes to tell us we can do. Data suggests we cannot. Experience also suggests that our mental plan may often not be the right thing to do ultimately. Unit testing after-the-fact adds some safety, but with a lot of effort.
TDD is of course going to give us the best blend of safety, speed, and opportunity to steer.
But when a friend and I decided to race to see who could write a word-counter faster, I didn't TDD it. It struck me as strange that I didn't, but the deal was "fast and I win" and "errors are forgivable here; worse case I lose and nothing is on the line".
So I did an experiment. I had people do an exercise with TDD and without. They could try either one first.
If they did non-TDD and got it right, it was up to 40% faster. However, if they made any mistakes along the way, it easily took double the time that the TDD code took.
Assuming a whopping 40% faster completion when perfect, and only 200% slower when failed, in order to break even on 10 simple 2-hour tasks, I have to be perfect without TDD 60% of the time. That sounds reachable (that darned LBI again!).
OTOH, all of those cases build without testing are not "naked" code, and will give no indication of failure if they are broken by subsequent changes. This perpetually reduces the chances of me being able to make a perfect, fast change in the future. The game is a clear loser. The worse
But what if there is no future, and I'm pretty certain of my solution, and my success does not really totally hinge on the success of this piece of code (i get partial credit for thinking well, coding pretty, trying hard, etc)?
I think that it's not an ethical failure, it is just a statement on the operation of chance-taking part of the human process. We sometimes go for the risky win instead of the safe bet.
Tim