If you're thinking too long then you're doing too much
When Test Driving code with TDD try to get into a short cycle rhythm, 30 seconds write a test, 30 seconds to make it pass, x seconds to refactor. If you're taking much longer for the red/green steps then step back and have a wider look at the problem, maybe it needs breaking down further or perhaps you don't understand it quite as well as you thought you did. Go have a break and give your brain room to breathe, swap with your pair if you are pair programming or do something completely different for a while. Learn to recognise that sometimes struggling is an indication that you have to slow down, back up and reassess, not hunker down and plough on regardless.
Written by Julian Churchill
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Tdd
Authors
Related Tags
#tdd
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#