Data-driven testing

Max M maxm at mxm.dk
Fri Apr 25 06:30:18 EDT 2003


Peter Hansen wrote:

> I'm asserting that I have actually seen "throwaway" scripts, even predicted 
> their imminent development, and subsequently have actually thrown them away.
> I'm not asserting I do this with 100% accuracy.  I'm asserting that
> I very infrequently do decide that a script will be throwaway, and
> that in those rare cases I often turn out to be right, and often 
> enough that it seems worth continuing to make such predictions in
> order to save myself some time.


Actually I write a LOT of "throwaway" scripts, that I know I will not 
need again, or that if I will use them again, I will just rewrite them.

It is far more important for me that these scripts are up and running 
fast than that they are correct.

I use them for massaging large amount of text. If ie. I need to make a 
website for a customer, and I have a large amount of similar texts. It 
could be something like a list of employees that is keept in a flat 
file, text document, excell sheet or similar.

Or it could be the texts from an older website.

Usually these files are pretty similar, but I know they are full of 
errors, misspellings etc. So I have to edit them manually anyway.

I write a small script that can save me a lot of copy-pasting, adding 
files etc. by automating most of the process. These scripts only have to 
be "good enough" as it is faster to manually edit minor errors in the 
resulting output than to rewrite the script.

I think testing would be absolutely useless in these cases.

Doing these scripts has saved me countless hours in the world of editing 
messy human managed data.

Actually this kind of usage turned me on to Perl, and later to Python.

-- 

hilsen/regards Max M Rasmussen, Denmark

http://www.futureport.dk/
Fremtiden, videnskab, skeptiscisme og transhumanisme





More information about the Python-list mailing list