in reply to The Module Mantra

The most fundamental point that I think that programmers need to learn is how to build on existing work. That is, how to build on their own work, how to build on other people's work, how to write work that others can build on. While there are many skills that programmers need, I think that this one, more than any other, is the lesson that I want people around me to know.

This skill leads to better programs with fewer opportunities for bugs that can be written more quickly. And if you are working on the same kinds of problems for a while (which people often do), it leads to ever increasing productivity for the team.

This is the lesson that I want people to learn from using modules. First of all, using modules written by good people requires learning how to use what other people wrote. If you read the documentation you will often get useful programming tips. Furthermore if you think about the API chosen, and how you might do it differently or why it was done like it was, you have excellent examples to learn from and aspire towards for figuring out the APIs that you create. And when you can try to read the source to those modules, you will learn even more.

Now it is true that simple end users will not do all of that. There are definitely people who can accomplish tasks through cut and paste techniques using CPAN. I don't think that such people get the full benefits of the modules. But at least I can console myself with the fact that they produce better programs with less work than they would without the module.

And for people like me, while I might have learned more about, say, http by writing my own version of CGI, I learned more about programming from reading and thinking about the documentation of modules and Perl than I would have ever figured out from handrolling solutions to a million problems which are readily solved by an existing module.

So I don't see the cry of "CPAN" as just encouraging cut and paste and discouraging the emergence of future gurus. Instead I see it as making people more productive now, and shortening the path for motivated ones to aquire real expertise.