| Next | Automated Testing | 24 |
Tests do not have to be complicated or verbose to be effective
For a class, I had to refactor and rewrite some bio-informatics thingy
Here's my favorite excerpt from that program:
for ($i=0;$i<$scan_chain_length3;$i++){
$chain1[$i] =~ s/X/0/g; $chain2[$i] =~ s/X/0/g;
$chain3[$i] =~ s/X/0/g; $chain4[$i] =~ s/X/0/g;
$chain5[$i] =~ s/X/0/g; $chain6[$i] =~ s/X/0/g;
$chain7[$i] =~ s/X/0/g;
print OUTFILE2 "\n(ct_si $ct_si{tdi}
$chain1[$i]$chain2[$i]$chain3[$i]$chain4[$i]$chain5[$i]$chain6[$i]$chain7[$i]
)";
I wanted to clean this up without breaking it
| Next | ![]() |
Copyright © 2004 Mark Dominus |