FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » AND and OR
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: AND and OR [message #182577 is a reply to message #182575] Fri, 16 August 2013 16:35 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
On 16/08/13 17:10, Twayne wrote:
> On 2013-08-16 7:24 AM, The Natural Philosopher wrote:
>> On 16/08/13 11:48, Norman Peelman wrote:
>>> On 08/16/2013 06:25 AM, The Natural Philosopher wrote:
>>>> On 16/08/13 01:21, Twayne wrote:
>>>> > Hi,
>>>> >
>>>> > Doing code cleanup; something that seemed so simple is giving me lots
>>>> > of trouble for whatever reason.
>>>> >
>
> ...
>
>>>
>>> As well as:
>>>
>>> if (!strlen(var1) || !strlen(var2) || !strlen(var3))
>>>
>>>
>> Yebbut, for twayne, that may be taking things a step too far..
>
> Perhaps, but I don't think so. While many things in PHP are still
> unknown to me, a lot is known to me. I've gained a LOT of knowledge
> over the last few months and have put 99% of it to use. My goal hasn't
> been to learn all there is about PHP and likely never will be since
> IMO learning how/where to find answers, understand the syntax
> properly, error checking, sessions, arrays and the like have been my
> recent goals. I write online PHP forms for websites and that's where
> my attentions are focused until I know them well. The "manual" at
> php.net and w3 schools IMO are the best "bibles" plus a few other
> places like NAS and Tizag are pretty good too, among others.
>

well counting left and right brackets is fundamental programming, and
someone who makes such a basic mistake *and doesn't see it* is pretty
new to the game.

As I said, the ! operator is less intuitive than '==0' to me anyway,
though after years of C its second nature.


>>
>> many many years ago when I was a real noob and learning C without the
>> benefit of any training courses, I had to revisit some code to find two
>> bugs in it. The new person who had taken over asked me why I had never
>> used a particular language construct. I replied 'because at the time, I
>> didn't know it existed'
>>
>> Trainee coders are often dumped into maintenance. One should be kind to
>> them. And with advances in modern compilers, there is no speed or
>> compiled code size penalty in being explicit at the source code level.
>>
>> We were all noobs once.
>>
>
> While I appreciate your attitude toward noobies, I've found over the
> years that words such as this are never understood by over-sized ego's
> or OTOH might draw some flames. I've come across several of that type
> on other newsgroups and forums I participate on. Mostly it's best just
> to ignore their posts. Personally I'll usually respond in kind to such
> a thing one time and then simply ignore them.
>
by definition at this particular game you ARE a noob. or you wouldn't
have missed the unmatched brackets. I ceratyinly d0nt see that as any
reflection on unerlying intelligence...teh first program I wrte in
assembler I copied exactly out of a book. It didnt assemble. Then I took
the line numbers out. It still didn't assemble. Then I removed all
leading spaces from every line. That did work. That took two 4 hour
sessions of frustration.

I wasn't stupid. I simply had no idea, nor did the documentation say,
that line numbers and spaces were tabu.



> I do thank you for your attitude, however,
>
> Twayne`


--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Function Problem
Next Topic: switch with case 0
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 07 00:22:57 GMT 2024

Total time taken to generate the page: 0.06154 seconds