Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^14: What to test in a new module

by choroba (Cardinal)
on Mar 15, 2023 at 23:08 UTC ( [id://11151004] : note . print w/replies, xml ) Need Help??

in reply to Re^13: What to test in a new module
in thread What to test in a new module

I have an anecdote about writing tests.

At my $job-2, my "dotted-line manager" got angry at me because I was spending time writing tests instead of implementing the feature he wanted me to implement. I completed both the tests and the feature one day before the deadline, and you've probably already guessed what happened on the deadline day: the specification changed. Without the tests, I would have been lost. It was pretty easy to fix the tests, and with the tests for the new specification, I was able to fix the code, too, and be confident that the change was correct. YMMV, but for me it was eye-opening.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]