P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
> - I *ALWAYS* write unit tests before or at least during writing each function/method. I use the test scripts as test runs to prototype the code I'm writing instead of having a separate script. The test scripts are inherently part of the test suite. I also *ALWAYS* review my unit test suite for each piece of functionality and update it if necessary if patching/updating subs days, weeks or years later. Could you please elaborate a bit more? does it mean you start every project with something like Module::Starter and populate the /t dir first? Even for a simple script.pl ? I often don't have a clear goal and am prototyping different approaches in experimental scripts in an /exp directory. And these scripts are internally littered with tests to proof the concepts. I find jumping between two files for testing and dev cumbersome at first, but refactoring these POCs into distinct code and test parts is cumbersome too. So I'd be interested to know in detail how you do this. I have the impression that what I keep in /exp already starts its life in your /t and once you are happy you just copy the implementation to the main module? Is that it?
Cheers Rolf In reply to Re: How has your coding style changed over the years?
by LanX
|
|