Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^4: if statement confusion

by BrowserUk (Patriarch)
on Jun 15, 2012 at 18:00 UTC ( [id://976473]=note: print w/replies, xml ) Need Help??


in reply to Re^3: if statement confusion
in thread if statement confusion

but rather about someone writing a contract to be clear rather than to be opaque and full of gotchas.

Here's the rub. Life isn't like that. If all contracts were fair, we wouldn't need them, or lawyers to prepare them or vet them.

I want a lawyer who doesn't take the contracts I ask him to vet before I sign them at face value. Who doesn't judge the correctness of the contract on the basis of it containing short sentences and few polysyllabic words.

I want a lawyer that understands the Terms of Art, and the significance of the presence or absence in a contract. I want him or her to know what they are doing; to understand the importance and significance of the terminology (or lack thereof) in the contract and advise me accordingly; and I want a lawyer that will take full responsibility for their advise should the contract be (or need to be) challenged in court.

And I want programmers to recognise that restricting themselves to a "simple" subset of their programing languages, doesn't make their programs "clear"; it makes them verbose. And the more lines of code you write; the more bugs you will generate.

And all your use of words like "clever", "tricks" & "golf" are convenient but meaningless screens for the lazy and incompetent to hide behind.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?

Replies are listed 'Best First'.
Re^5: if statement confusion
by apotheon (Deacon) on Jun 15, 2012 at 18:09 UTC

    My point was not to suggest that life is fair, or that one should always take contracts at face value. It was to point out that the preceding person's point (while poorly presented) was about the fact that the guy writing the code should try to make the code clear. Your analogy to contractual law is looking at the wrong side of the transaction, talking about the behavior of the reader rather than that of the writer.

    Obviously, code should be correct, first and foremost -- but within that constraint, it should also be as clear as reasonably possible. There's no necessity to limit oneself to a simplistic subset of a language to achieve that (and I agree with the entire paragraph in which you mentioned opposition to that notion), in the general case, and I even agree that in this case it makes sense to use a clarified and correct ternary operator, but I disagree with your approach of disputing the statement that one should strive to write clear code.

    I also think you're now manufacturing disagreement with me where it does not actually exist, when denigrating my character (apparently on the basis of the fact that you're feeling defensive).

    In the end, the lawyer analogy is a poor one for this situation, no matter what point you're trying to make. The motives, incentives, and circumstances surrounding contracts and software applications are simply too different, and I should have avoided using your analogy to try to make my point. I also should have said that I thought you were creating disagreement where none essentially existed, rather than a problem. Here we see that clarity in English is important, just as it is in Perl.

    print substr("Just another Perl hacker", 0, -2);
    - apotheon
    Licensed OWL by Chad Perrin

      So basically, you didn't join this thread in support of sundialsvc4's contention; nor even in support of my counter argument; but simply for the sake of having an argument.

      Discussion ends.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

      The start of some sanity?

        Incorrect. I joined to point out that the specific point you decided to address with disagreement was something with which you probably wouldn't actually disagree, if it were better presented.

        What I was not joining to do is solicit insults. Thanks anyway.

        print substr("Just another Perl hacker", 0, -2);
        - apotheon
        Licensed OWL by Chad Perrin

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-16 07:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found