in reply to On elegant coding...
in thread Just thinking ...
The novice hesitates and then cautiously responds...
Many of your thoughts strike chords with my personal development style (paraphrasing):
However, do you not hold a rather unique position in the community? You are held to a higher standard because your code is often seen as a standard to follow. As a leader, a columnist, and a mentor, you are one of the sources for "how it should be done."
Yes, your code should be elegant as time, energy, and editors will allow.
Yes, our code should as elegant as possible. But, does not the ability for elegance come with experience? I don't expect my daughter's watercolors to match the quality or the simplicity of master artists. So, too, the quality of my perl will not match yours for a period of years (if ever).
As possible is the key. As a leader and mentor, please don't forget that some do not yet have skills that match yours. They have the potential, just not the experience.
In the short time I've been slouching about, I've found perlmonks to be a community interested in helping folks improve their knowledge and skills, as opposed to other communities where knowledge and ideas are hoarded for some questionable tactical advantage. I personally appreciate that very much.
I would ask, though, that "elegance" be gently taught. After all, there are many that need to do their work very quickly, without the luxury of extended research, review, or analysis. A regrettable portion of our positions as programmers is that we're given too little time and resources to do our work properly.
This is, as you well know, why there are so many hacks in "finished" software. One quote that comes to mind, though I confess I cannot properly attribute it, is, "Software is never finished; it's just abandoned."
Also, elegance, to some degree is in the eye of the beholder. For example, I recognize that the standard is to use this:
if (cache_is_good()) {
show_cache_and_ext("current");
}
However, you will almost always find my code expresses it as:
if ( cacheIsGood() )
{
showCacheAndExit( "current" );
}
Does that make my code less elegant? To you, perhaps...however, I find it:
That's just my personal preference. It works for me and I do not claim it works for anyone else.
I would hope that in your quest to improve the elegance of our code, you would recognize that and not vote me down because I format my tokens differently that you do.
In my opinion, good programmers continue to look for ways to improve their skills, even though previous efforts cannot (or will not) be revisited. They also recognize that "coding standards" should be guidelines and not straight-jackets. In my opinion, that's where the artistry comes in.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: On elegant coding...
by PsychoSpunk (Hermit) on Oct 12, 2000 at 23:25 UTC | |
by footpad (Abbot) on Oct 13, 2000 at 00:04 UTC | |
by PsychoSpunk (Hermit) on Oct 13, 2000 at 19:53 UTC | |
by footpad (Abbot) on Oct 13, 2000 at 22:02 UTC | |
by merlyn (Sage) on Oct 14, 2000 at 06:44 UTC | |
by PsychoSpunk (Hermit) on Oct 16, 2000 at 19:59 UTC | |
| |
|
RE: RE: On elegant coding...
by el-moe (Scribe) on Oct 13, 2000 at 00:12 UTC |