Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^6: seeds...

by Anonymous Monk
on Oct 25, 2005 at 15:29 UTC ( #502754=note: print w/replies, xml ) Need Help??


in reply to Re^5: seeds...
in thread seeds...

To me, more idiomatic is what you said

Hmm... I was using "idiomatic" in the sense of a rarely used word that's only used or understood in the right circles; just as more "advanced" perl features like typeglob tricks or XS code might be.

Granted, it can also be used to mean "the way people commonly talk"; and this usage is from the standpoint of the small group of idiomatic speakers.

Since I try to code using the simplest expressions that convey my meaning clearly and concisely, I tend to mentally associate myself as being outside the circle of "perl experts"; I really *don't* want to fall into the habit of (ab)using typeglobs for everything if I don't need to. My ex-boss is a cautionary example for me now, I guess...

One day, many years ago, while feeling "clever", I wrote a single regular expression that would reformat text paragraphs to any given line length. And then I gave it to my co-workers as an amusement. None of them could guess what it did at a glance. Then I carefully documented how the regular expression actually worked, and came back with a full fifteen lines of documentation for a single line of code.

And then I went back, and re-wrote it in the boring, obvious way, in ten lines of simple perl. All of my co-workers could understand it at a glance. It wasn't "clever", but it was better code, because it was easier to maintain.

That's the usage of clever I meant; cleverness for it's own sake, not for the sake of good code. Good code is often bland, just as good documentation is often bland. Both should quickly convey the intended information, with a minimum of fuss or wasted time.

Granted, convincing your boss of that is an entirely different story.

Fortunately, he's not my boss anymore! :-) Unfortunately, I have to maintain thousands of lines of incomprehensible code. :-( It's win/lose, I guess...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://502754]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2021-01-25 12:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?