When I did it the biggest problem is writing the spec. It was longer and more complicated than the code itself.
If you have bugs in the spec you have bugs in the code.