I really got software testing (after over a year of usage!) when someone asked me why did you write this function this way?. I had written a function that took another function, a cost function, as input. In our programme, that cost function is always the same, so why the extra input. I answered it’s much easier to test than the alternative, so overall, the implementation+test is much more natural.
The interesting thing is that I hadn’t even thought about it that way before. I had just written it like that as the first thing that came to mind.
There it was, testing had changed the way I wrote code even if I wasn’t paying attention to testing.
0 comments ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment