To go left-brained for a minute, copying and pasting can be a good thing if it means you're not "re-inventing the wheel" to quote a popular phrase from one of the monks. I would hasten to add that the utility of cutting and pasting varies indirectly with the size of the piece of code involved.
If it's ten lines that you want to re-use, but the second use is different enough that it doesn't make sense to build a common subroutine, go ahead. If it's 80 lines from someone else's script, but you're not sure how it works (and what're all these modules!), that's cargo cult.
The corollary to that is, if you're doing a lot of copying and pasting while writing a script or a module, you should really stop yourself and ask why. Couldn't that be put into a subroutine? Are you sure? Really, really sure?
--t. alex
"Excellent. Release the hounds." -- Monty Burns.
In reply to Re: The first cargo cults
by talexb
in thread The first cargo cults
by jepri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |