Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^5: Conditional Elimination

by jdrago999 (Pilgrim)
on Aug 31, 2011 at 06:13 UTC ( #923356=note: print w/replies, xml ) Need Help??


in reply to Re^4: Conditional Elimination
in thread Conditional Elimination

Wow - tell me how you really feel.

Really? Are you so high on your ivory tower that you actually believe that?

Am I really coming off like I'm on some kind of "Ivory Tower" head trip?

And even if he does, so what? Do you really think his code with the "complicated" conditions is actually called from a sort routine? Do keep in mind the $a and $b are constant before answering this question.

Sometimes "complicated" conditions emerge over time. Like, after a program has been in-use for a while - and you just need to add one more condition. And one more. And another. (Yeah, I know we should refactor this but it's 4:59pm on Friday and I want to get out of here!)

That's the whipituptitude of Perl - you *can* just go hacking wildly on something and maybe it will work.

The next chunk will have to be broken down into smaller bits:

Well, if you must know. IMO, Perlmonks is filled with mediocre Perl programmers, who think the world of themselves.

Hey, you said it, not me.

Since they can't actually think for themselves very well, they responds like Pavlov dogs, sprouting dogma, usually triggered by things (or the absence of things) that have nothing at all to do with the problem at hand. (As in this thread).

Indeed...

Even while $a and $b are used in sort routines, one actually have to make an effort to create code that goes wrong because a used $a or $b gets overwritten by a sort routine.

Correct, but off-topic. The OP stated that they actually are using variables like $a and $b in the code, and the OP did not include any examples of sorting. It's safe to assume, due to the simplicity of the code in the OP, that there is no sorting going on in the program anywhere.

Oh, and you forgot to point out the OP had not used strict or warnings.

Yeah that's generally a good idea. Thanks for bringing it to the OP's attention.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2020-07-03 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?