▲ 4 points
back
1 comments
Writing the test before the logic is definitely the way to go. I can't imagine doing it any other way. It seems like most of the time large blocks of can seem as complicated and unruly as a complex calculus equation. In my experience everything is manageable when you break it down into small pieces, think through the problem, and come up with the simplest possible solution for that one piece of the problem. Then you can go through and write your logic; for that one piece of code. It's the best way to both document your work and write solid code. I'm definitely in agreement with the message here.