coding again...
Perl or any language really, just beats me over the head.. I've been working on an auto-indexing routine for internal link on my personal webpage, and have ended up with something rather ugly- it works, but it's ugly. The big problem is the fact that i have so much trouble seeing the big picture when it comes to this sort of work/play. For instance,
my $i = 0;
foreach my $sort (sort(keys(%sort_vals))){
my $s_file = $path . $sort_vals{$sort} . '/sort';
open OUT, "< $s_file";
print OUT $i; #new position in index
$index->[$i] = $sort_vals{$sort}; # page directory
$i++;
close OUT;
}
just confuses the heck out of me- even when it's in context- and i wrote it! It's not just the uglyness of the code either, even when i'm extra careful to keep things readable and consistant i have this trouble. The problem isn't that the code is or is not confusing and badly commented, but that I am nearly incapable of keeping code as a whole in perspective- so I end up losing a sense of the problem i'm working on in the first place.
enough complaining. I still can't stop myself from hacking - i may be entirely incompetent, but I just can't stop.