in reply to Re^2: Auto-compile checking??? WTF?
in thread Auto-compile checking??? WTF?
Unit testing is one of the most very useful tools of a good developer (any language). Before, or as you code, you simply write code that uses your software just like a user would (while throwing in all the edge cases you can think of) to make sure your code is doing the right thing.
You write these tests as you go, so the more you code, you run your tests to ensure you haven't broken something you coded earlier.
See Test::More. That'll get you well on your way. Then, go to MetaCPAN and browse to the t/ directory of random modules and read the unit tests. Some modules have clear tests with good descriptions, other modules don't have any tests.
The most important thing about writing tests is write them now. Not after you get those two new features added, not next week, they should be part of your coding regimen. Doing it this way helps make sure code you've already written is to the best of your ability not doing something wrong due to future changes.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Auto-compile checking??? WTF?
by nysus (Parson) on Apr 16, 2016 at 11:40 UTC | |
by stevieb (Canon) on Apr 16, 2016 at 11:49 UTC | |
by afoken (Chancellor) on Apr 16, 2016 at 19:48 UTC |