This is a discussion on If statement trouble within the PHP Language forums, part of the PHP Programming Forums category; Tony wrote: > Jerry Stuckle wrote: >> AceX wrote: >>> >>> Thank you all. I ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Tony wrote:
> Jerry Stuckle wrote: >> AceX wrote: >>> >>> Thank you all. I don't know if anyone else has this problem, but >>> sometimes I just have brain lapses. I appreciate all the help guys >>> (and gals?) >>> >> >> Ace, >> >> I don't know how many times I've done that - stretching all the way >> back to the mid 80's when I was writing C code :-) >> >> Also C++, Java, PHP... >> >> It's also a common error in many of my classes - students will look >> and look at the code and don't see what the problem is. When I point >> it out in about 2 seconds, they feel embarrassed - until I tell them I >> spotted it so quickly just because I HAVE made that mistake so many >> times. :-) > > I don't know how often I've simply asked someone to take a look at some > code - because sometimes you get too close to the code, and you just > don't see those sort of simple errors. Someone else's fresh perspective > is all it takes. I spent nearly half an hour beating my brains out till I realised the variable I was comparing had a subtle spelling error. In C you get an undeclared variable type error..not (necessarily) in PHP.. |
|
|||
|
On Wed, 27 Feb 2008 00:06:43 +0100, The Natural Philosopher <a@b.c> wrote:
> Tony wrote: >> Jerry Stuckle wrote: >>> AceX wrote: >>>> >>>> Thank you all. I don't know if anyone else has this problem, but >>>> sometimes I just have brain lapses. I appreciate all the help guys >>>> (and gals?) >>>> >>> >>> Ace, >>> >>> I don't know how many times I've done that - stretching all the way >>> back to the mid 80's when I was writing C code :-) >>> >>> Also C++, Java, PHP... >>> >>> It's also a common error in many of my classes - students will look >>> and look at the code and don't see what the problem is. When I point >>> it out in about 2 seconds, they feel embarrassed - until I tell them I >>> spotted it so quickly just because I HAVE made that mistake so many >>> times. :-) >> I don't know how often I've simply asked someone to take a look at >> some code - because sometimes you get too close to the code, and you >> just don't see those sort of simple errors. Someone else's fresh >> perspective is all it takes. > I spent nearly half an hour beating my brains out till I realised the > variable I was comparing had a subtle spelling error. > > In C you get an undeclared variable type error..not (necessarily) in > PHP.. .... which is why you should control the error_reporting level in a development environment. -- Rik Wasmus |
|
|||
|
On Tue, 26 Feb 2008 19:16:11 +0100, Tony <nospam@example.com> wrote:
> Jerry Stuckle wrote: >> AceX wrote: >>> >>> Thank you all. I don't know if anyone else has this problem, but >>> sometimes I just have brain lapses. I appreciate all the help guys >>> (and gals?) >>> >> Ace, >> I don't know how many times I've done that - stretching all the way >> back to the mid 80's when I was writing C code :-) >> Also C++, Java, PHP... >> It's also a common error in many of my classes - students will look >> and look at the code and don't see what the problem is. When I point >> it out in about 2 seconds, they feel embarrassed - until I tell them I >> spotted it so quickly just because I HAVE made that mistake so many >> times. :-) > > I don't know how often I've simply asked someone to take a look at some > code - because sometimes you get too close to the code, and you just > don't see those sort of simple errors. Someone else's fresh perspective > is all it takes. Hehe, the numner of times way back when I started out to ask this group something, tried to boil it down to it's essentials, and the answer allready became clear to me. Asking oneself how to ask another efficiently for help with a particular problem often yields the result without having to actually ask :). It's kept the number of embarrassments quite low, spending a good half hour on a question, and then just discarding it :). Offcourse, the mistake in this case is one we all make/made, and less easily spotted with aforementioned method. -- Rik Wasmus |
![]() |
| Thread Tools | |
| Display Modes | |
|
|