P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I write unit tests first. Since I know what the code must do, it's easy to write tests that will verify that it does exactly that.
I'm not a good enough programmer yet that the code and the tests are always completely accurate with regards to what must be done, but if the test fails after I've written the code, I know something's definitely wrong. It's a lot faster, too, especially when adding a new feature. Chalk that up to debugging avoidance -- planning ahead and proving your code correct is how I reduce debugging time. (It's especially nice if you can whittle down the error to the last two lines of code you added.) In reply to Re: Are debugging skills atrophying?
by chromatic
|
|