A Little Testing Never Hurt Anybody

chaoticset on 2002-01-05T01:54:45

I wonder if I'm really using testing the way I'm supposed to. What I've fallen into is this:

I'll have an idea to make code that does __blank__. "To do that, first I've got to dump everything into an array."

So I write

ok(@_, "Anon array for __blank__.");
and then write whatever fills the array. Save, run.

not ok: Anon array for __blank__.

Hm. I didn't write it properly, then.

It almost seems as though it provides a framework to code by, forcing you to think one step ahead of yourself.

So, in this way, I'm starting to like it.

My eye's significantly better, but I've taken to washing it in the shower now. (That is, purposefully holding the lids apart and sticking it directly under the shower stream for as long as I can.) Not so much redness. Doesn't feel like an inch-long hair is behind it any more.

Perhaps I can apply my new-found testing methods to the cart-filling routine.

Oh -- in related news, I attempted to install Tk, but I don't know if it worked yet. I used PPM, and it said it couldn't update the table of contents, but it didn't say if it was the last thing to do or something significant. I ran the example .bat file that comes with Tk and it barfed instantly, so I'm guessing something's wrong. It said the error was in a .pm. I'll re-run it and find out where/what the problem is.

Coffee, coffee...