|
|
Darren New wrote:
> Warp wrote:
>> if(10 < money*money && money*12 < 100)
>>
>> Now it becomes much harder to understand quickly what's going on.
>
> If money squared is more than ten or money times twelve is less than a
> hundred. Makes sense to me. :-) But then, I'm used to it.
To be clear, I think it's harder to understand because it's nonsensical,
not because the comparisons are in the wrong order. Is it any harder to
understand that than
if(money*money > 10 && money*12 < 100)
?? I'd say the failure here is naming the "money" variable incorrectly
and not abstracting out the meaning.
interest_basis = money * money;
total_interest = money * 12;
if (10 < interest_basis && total_interest < 100) ...
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
|