Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Well, I think that your accusations are somewhat unfounded.. I have some sympathy to your point of view, especially if you're relatively new to Perl and shell script like languages... but here are some thoughts on this...

Firstly, read perlstyle.. As in arhuman's sig, "Only Bad Coders code badly in Perl"... For the most part, I have found Perl to be a very concise and intuitively appealing language.. why I say this is because it has lots of constructs that are similar to natural language..and furthermore, you'll find the reference above gives an explanation for when "an if after the code" is appropriate....

One of my coworkers *always* laughs when he sees "or die" and "carp" :o), but they accurately describe what the function is supposed to do, and that sounds like a good thing to me...

Next, have you heard of the obfuscated C contest ? Look here for frightful examples of C code... its not just Perl, its any language you can think of, *every* language has the potential for bad code..

Readability is a big big win, I don't dispute that.. but sometimes, what may not seem readable to you may well be easy to someone who has actually taken the time out to understand the construct...Perhaps you need to know a little bit more Perl ? things may suddenly become easier to read and understand when you've been exposed to the language a bit more.. I certainly found that to be the case for me...

However, just so you don't get the impression that I'm dismissing your concerns, this is an article I think a lot of Perl programmers should read..especially if you write Perl code for a living...

Finally, TIMTOWTDI applies to Perl code.. perhaps you can learn a more efficient way of doing something by looking at someone elses code.. I know I have...
Update:Attributed sig to arhuman


In reply to Re: Perverse Unreadable Code by tinman
in thread Perverse Unreadable Code by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2024-04-18 11:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found