Peter Scott presented an excellent talk at OSCON entitled Mind Like Water: The Path to Perl Bliss. One insight he gave that had never occurred to me and I feel is important to pass far and wide:
We know that there's an exchange rate of lines of C or Java code to lines of Perl code (say) 10 to 1. So a 100 line Perl program can acchieve the same task as a 1000 line C program. If we're presented with a 1000 line program, we know what to do with it something of that size - what source control, documentation and other TLC that it needs, likewise for a 10K program. But we're thinking in terms of 10000 lines, 10000 lines, idependant of language or complexity.
Stop
Start treating 100 line Perl programs like you would treat 1000 line C programs. Treat your 10K lines of Perl with the same engineering rigour that you'd treat 100K lines of C or Java. It's the complexity of the program that matters, not the raw line count. Think this way, work with the correct discipline for the equivalent size, and it should pay off in the long run, in scalability and maintainability.
Re:one-liners
Dom2 on 2006-07-27T11:35:54
That's not such an insane idea...% ls ~/bin | wc -l
203-Dom