Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #10530

Re: AND and OR

From The Natural Philosopher <tnp@invalid.invalid>
Newsgroups comp.lang.php
Subject Re: AND and OR
Date 2013-08-16 17:35 +0100
Organization albasani.net
Message-ID <kulkcc$39s$1@news.albasani.net> (permalink)
References <kujr9n$il7$1@speranza.aioe.org> <kukun7$l54$4@news.albasani.net> <kul02j$qos$1@dont-email.me> <kul25k$tl9$1@news.albasani.net> <kuliu3$n2b$1@speranza.aioe.org>

Show all headers | View raw


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.

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

AND and OR Twayne <nobody@spamcop.net> - 2013-08-15 20:21 -0400
  Re: AND and OR Paul Herber <paul@pherber.com> - 2013-08-16 01:30 +0100
    Re: AND and OR Christoph Michael Becker <cmbecker69@arcor.de> - 2013-08-16 13:08 +0200
    Re: AND and OR Twayne <nobody@spamcop.net> - 2013-08-16 12:14 -0400
  Re: AND and OR "Peter H. Coffin" <hellsop@ninehells.com> - 2013-08-15 20:08 -0500
  Re: AND and OR Tim Streater <timstreater@greenbee.net> - 2013-08-16 08:52 +0100
    Re: AND and OR Twayne <nobody@spamcop.net> - 2013-08-16 11:19 -0400
  Re: AND and OR The Natural Philosopher <tnp@invalid.invalid> - 2013-08-16 11:25 +0100
    Re: AND and OR Norman Peelman <npeelman@cfl.rr.com> - 2013-08-16 06:48 -0400
      Re: AND and OR The Natural Philosopher <tnp@invalid.invalid> - 2013-08-16 12:24 +0100
        Re: AND and OR Twayne <nobody@spamcop.net> - 2013-08-16 12:10 -0400
          Re: AND and OR The Natural Philosopher <tnp@invalid.invalid> - 2013-08-16 17:35 +0100
            Re: AND and OR Tim Streater <timstreater@greenbee.net> - 2013-08-16 17:47 +0100
              Re: AND and OR The Natural Philosopher <tnp@invalid.invalid> - 2013-08-16 18:13 +0100
                Re: AND and OR Richard Yates <richard@yatesguitar.com> - 2013-08-17 07:20 -0700
                Re: AND and OR The Natural Philosopher <tnp@invalid.invalid> - 2013-08-17 15:36 +0100
                Re: AND and OR Richard Yates <richard@yatesguitar.com> - 2013-08-17 10:47 -0700
                Re: AND and OR Twayne <nobody@spamcop.net> - 2013-08-17 14:05 -0400
                Re: AND and OR The Natural Philosopher <tnp@invalid.invalid> - 2013-08-17 19:40 +0100
              Re: AND and OR Twayne <nobody@spamcop.net> - 2013-08-17 13:27 -0400
            Re: AND and OR Twayne <nobody@spamcop.net> - 2013-08-17 13:22 -0400
          Re: AND and OR Richard Yates <richard@yatesguitar.com> - 2013-08-17 07:19 -0700
      Re: AND and OR Twayne <nobody@spamcop.net> - 2013-08-16 11:53 -0400
    Re: AND and OR Twayne <nobody@spamcop.net> - 2013-08-16 11:42 -0400

csiph-web