I've been using
Test Driven Development for my latest project and, honestly, I've never had more fun writing code.

Write a test. Run and fail. Write some code to make that test pass. Then check to see if you can improve things. Write the next test...
Each test tends to be really small but they add up quickly. Normally I can write a test and the code to make it pass in less than a minute. And if my "fix" breaks something, all the other tests catch it.