|There's more than one way to do things|
Re^6: Perl for big projectsby spiritway (Vicar)
|on Jul 14, 2006 at 06:27 UTC||Need Help??|
The point of programming isn't to "think creatively", or to excercise "linguistic freedoms". If you want those things, join a poetry group instead!
I found this statement surprising and disturbing. I disagree. Note, however, that I am a rank amateur, not a professional. Reality might well be different for a professional programmer. YMMV
It seems to me that programming has many language metaphors because writing a program is very much like creative writing. You have a certain "thing" you need to say. It should be said effectively, efficiently, and - if possible - eloquently.
First and most important, it must be effective. There is no use writing an efficient program if it doesn't do what you want it. As you stated it, it must get the job done.
Next, it should be efficient. Here you have a less definite goal, because "efficient" can have different measures. Sometimes it's important to make things happen as quickly as possible, in real time - and this could result in highly optimized code that is almost illegible to humans. OTOH, you might value programmer time (both developers and maintainers), and opt for a slower program that is easier to write and maintain. It might even include making it efficient for the user to use. These three goals often are in direct conflict with one another.
Finally, and this is probably a luxury only amateurs could afford, is "eloquence" - the vaguest of the three terms. To me, the one-liners that people often write, that do things for which I wrote a whole script - that's eloquence.
Even omitting eloquence, it still requires creativity to write effective and efficient code. There are decisions to be made, conflicting goals to resolve, unanticitated obstacles to be overcome, all making programming something a bit more than writing obituaries. This requires creativity, IMNSHO. It's not "artistry", not writing obscure code, but it's creatively seeking the optimum solution for the given problem set, within the allowed time.
Finally, though clarity and usefulness shouldn't be sacrificed, there is nothing wrong with enjoying your work. Cranking out line after line of dull, uninspired code may be what bosses are looking for, but that's likely to drive away the most creative people. You'll get your code, but probably no more than that. For many purposes, that's all you need - but that's not where innovation comes from.
I think that some excitement is needed, some fun, "power", "freedom", all that kind of good stuff. Creativity and playfulness seem to be where new ideas are nurtured and developed. You probably don't need new ideas when writing a payroll program... but certainly programming and programs have not yet reached such a state of perfection that we can say, "everything is finished, no need for new ideas".
Oh, and BTW - Perl Monks *is* something like a poetry group. Often a solution is offered here that is both effective and efficient, and occasionally even beautiful - eloquent, as I say. For the working programmer who just wants a solution, there are solutions. For those who want the extra icing on the cake, freedom and creativity and such - well, they can find that here, too.