[lug] can't make this stuff up, folks... My 2 lines of code, errr, I mean, my 2 cents....

Bear Giles bgiles at coyotesong.com
Tue Oct 20 15:35:04 MDT 2009


On Tue, Oct 20, 2009 at 3:03 PM, Rob Nagler <nagler at bivio.biz> wrote:

> On 10/20/09, Bear Giles wrote:
> >  The Sun PetStore application were the canonical example of how NOT to do
> > it.  A lot of people got misled by it.
>
> > it's somewhat common for new
> > frameworks to show how to do the same thing using their framework and
> that
> > 10x reduction is fairly common.
>

10x on Sun, not the prior framework. :-)


> I've found it useful to replace "unit test" with "regression test" in my

>
> A "unit test" is something which tests a module at the API level.
>

Yes but calling something a 'unit test' implies that you're testing for
correct behavior now.  That's important of course.  Calling it a 'regression
test' implies that you're testing for a change in behavior from the past.
It's more important that it's changed than that it's now broken (or fixed).
Hmm, maybe it should really be called a progression test. :-)

I remember reading a book by a guy who was a Microsoft manager years ago.
"Writing Solid Code", perhaps.  He said that they had a HUGE problem since
some of the lowest-level code had bugs that people wrote around, then people
wrote around the bugs in that code, then people wrote around the bugs in
THAT code.  Fixing one bug would actually create new bugs because the
calling code was still trying to work around bad behavior.  This might have
been the main C library... it was definitely the reason why MS had a
well-deserved reputation for shitty software at the time.

It's a huge mess.  I don't recall what he did but I think a good place to
start is this type of tests so you can see what breaks when you fix one
thing.  You can then eliminate the workarounds there and see what breaks
next, etc.

That's the motivation, or anti-motivation, for this type of test now.  Code
rarely stands in isolation and changing A may also change B's behavior.  To
me 'unit test' implies that you're only testing 'B', vs. regression testing
allows that other things may have affected 'B'.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20091020/f1909474/attachment.html>


More information about the LUG mailing list