It depends on what I'm working on. If I have to do something quick and I already know all the possible cases that could go wrong, I either write them at the end or not at all. Otherwise:
1. Write Test
2. Test Fails
3. Write Code
4. Test Passes
5. Go To 1
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.