• fw (unregistered)

    I can't get my head around comments

  • SonicLover (unregistered)

    Fir... nah, just kidding.

    I'm not extremely code-savvy... could someone explain why the "echo if" line is so bad?

    CAPTCHA: aptent - a tent Gary definitely has not been camping under

  • Tihrd, Not changing this awesome name. (unregistered)

    Well? What was the book?

  • JayT (unregistered)

    "Steve treated the entire dev team to a round at the local pub to celebrate"

    Sounds like something my manager would do, nothing says "thank you for your efforts" like a pint and maybe a burger...

  • (cs)

    Maybe Steve should have explained to Gary that arrays are like trains of identical cars, or perhaps he should have used the word "choo-choo".

    Nah, forget that, he'd probably still be confused.

  • Mike (unregistered)

    Needless to say, I won't be purchasing any PHP books with "Gary" as a co-author. (A simple Amazon search reveals a prime candidate to avoid.)

  • Remusonline (unregistered)

    Not good enough for the industry? No problem, your lack of skills will be the basis for our future software engineers!

    No wonder why software projects are taking so long these days...

  • SR (unregistered)

    This book?

    From the reviews "Then I got confused with inadequate explanation ofarrays"

    BTW I have no idea what

    echo if (isset($bob +1000)) ;
    could possibly be there for. Literally no idea.

  • (cs) in reply to SonicLover
    SonicLover:
    I'm not extremely code-savvy... could someone explain why the "echo if" line is so bad?
    If you're not code-savvy, what are you doing here? :)

    Anyway, echo what exactly? You could rewrite it as follows:

    if( isset( $bob + 1000 )
    {
            echo;
    }

    ...which doesn't make a lot of sense.

    Also, using isset() on an expression is... rather unusual.

  • SR (unregistered) in reply to SonicLover
    SonicLover:
    CAPTCHA: aptent - a tent Gary definitely has not been camping under

    Wanna go camping? There's an app for that.

    I'll get my coat.

  • (cs)

    Book credits look great on a CV, but given the poor quality of a lot of IT books they shouldn't be taken at face value. My predecessor had a book credit, as he'd edited one chapter of a book for a newer edition. I wasn't surprised that the book was out of print, having been criticised heavily on Amazon, nor that his chapter was hopelessly incorrect (it was a Sams publication, and I managed to find a free online version to check).

  • wintermute (unregistered) in reply to SonicLover
    SonicLover:
    Fir... nah, just kidding.

    I'm not extremely code-savvy... could someone explain why the "echo if" line is so bad?

    Because the isset bombs out with an error when there's more than a simple variable name in there.

    Because (even if you get rid of the "+1000", so that it will actually run), it doesn't output anything.

  • TheAnonCoward (unregistered)

    The only two real WTF's I can spot here are Gary himself and the fact that he actually co-authored a book that was published on the subject.

    The fact that he was sacked is certainly enough to save this story from the true annals of WTFery.

  • Mr H (unregistered)

    As a PHP developer I can verify that the statement

    echo if (isset($bob +1000)) ;
    not only is pointless but also invalid. If the CWTF(Creator of the WTF) was as gifted in php/perl as he claimed he should have been able to write a driver program to traverse the website directory and copy files to a seperate directory. This assumes that there were no WTFs already in the web site creation (absolute paths, URI references, etc.)

  • Drew (unregistered)

    Arrays? Seriously? Can't get your head around arrays?

    Recursion, maybe I could excuse. Certain kinds of trees if you haven't messed with them in a while. But arrays?

  • Tiigon (unregistered)

    Obviously Gary is one of those "real coders" who use XML for everything. Arrays are so last year!

  • Anon (unregistered)

    Two syntax errors in a one-liner is a bit too much for such a guru...

  • Khepra (unregistered) in reply to SR
    SR:
    This book?

    From the reviews "Then I got confused with inadequate explanation ofarrays"

    BTW I have no idea what

    echo if (isset($bob +1000)) ;
    could possibly be there for. Literally no idea.

    Comments on book: "I struggled just getting started with running stuff, but blamed myselfrather than the book. Then I got confused with inadequate explanation ofarrays..."

  • eViLegion (unregistered) in reply to Drew

    How can a programmer fail to understand arrays?

    Its like a baker not getting yeast, or a politician not understanding lies.

  • Crash (unregistered) in reply to SR

    Let's work from left to right to see what's wrong with this simple one-liner. This is narrated in the voice of the PHP while attempting to run the code.

    echo - Okay, we're going to print something to the screen. Got it, we're ready. Let's do this!

    if - Wait, what? 'If' doesn't return anything so how can we echo this? Oh boy.

    isset - alright, so we're inside a conditional apparently. Let's check if this variable is set...that's not a variable, that's an expression! Who let this moron near a computer? Let's try to evaluate the expression anyway. Alright, $bob plus 1000. I really hope $bob is a number of some kind in order for that expression to work. Let's assume it's correct and $bob is, in fact, an integer - we'll pretend $bob = 1. isset(1+1000)...WTF? see below explanation of isset.

    ; (semicolon) - The conditional is done...and we have no instructions to execute after it so it does nothing...this was a waste of time.

    isset is a PHP construct that tests variables to see if they're set to a value. You can pass it multiple variables, each variable as a parameter. You can't pass it an expression or it will vomit up a parse error.

    Captcha: vulputate. Sounds dirty.

  • Robert (unregistered)

    I have lost all faith in tech books now

  • Thg (unregistered) in reply to Drew
    Drew:
    Arrays? Seriously? Can't get your head around arrays?

    Recursion, maybe I could excuse. Certain kinds of trees if you haven't messed with them in a while. But arrays?

    I can't get my head around "else" statements.
    Does anyone know of any good online references?

    Otherwise, I can give links to online "goto" resources in trade.

    goto captcha; /NOTREACHED/

  • highphilosopher (unregistered)

    Unfortunately we tend to hide things in languages. Programmers don't have to use arrays, so the lazy ones won't pick it up. 5-10 years ago a programmer would have said "How can you not know how to do bitwise operations!" yet I find myself explaining it to developers all the time.

  • Your Name (unregistered)

    I find it unbelievable that Gary was that bad of a programmer and nobody noticed.

    I find it really unbelievable that Steve would hire Gary and not at least check on the quality of his work the first few weeks.

    Seriously, before anyone enters the door here for an interview they need to pass a simple programming / debugging test. Candidates also need to bring or be able to show code. We get that stuff out of the way quickly, and then move on to figuring out if someone is a good fit.

    Anyone who claims to be an "expert", though, gets seriously grilled.

  • Jonny (unregistered)

    It's not like anybody is going to need arrays anyway.

  • (cs) in reply to Crash

    If I could feature this one twice, I would. Now I have the voice of PHP in my head.

  • (cs)

    I've described PHP as an array-oriented language before...

    If you don't understand arrays, then you don't understand PHP at all.

    (This isn't a good or bad this... just a very very particular thing about PHP)

  • Niraj (unregistered)

    just by any chance -- http://www.amazon.com/o/ASIN/0764557440

  • Crash (unregistered)

    Guess who's missing from the the updated version of the book...

    http://www.amazon.com/Beginning-Apache-MySQL-Development-Programmer/dp/0764579665/ref=sr_ob_1?ie=UTF8&s=books&qid=1270562131&sr=1-1

  • Socket (unregistered)

    I have that book... I feel cheated now.

  • Dave (unregistered) in reply to Crash
    Crash:
    Guess who's missing from the the updated version of the book...

    http://www.amazon.com/Beginning-Apache-MySQL-Development-Programmer/dp/0764579665/ref=sr_ob_1?ie=UTF8&s=books&qid=1270562131&sr=1-1

    I like that he was also photo-shopped out of the cover. Not that they could leave him in there...

  • Crash (unregistered) in reply to Dave
    Dave:
    I like that he was also photo-shopped out of the cover. Not that they could leave him in there...

    Priceless, especially since he's the only one that isn't in the new edition so there's no doubt which one he is.

  • Gruntled Postal Worker (unregistered) in reply to Niraj
    Niraj:
    just by any chance -- http://www.amazon.com/o/ASIN/0764557440

    TDWTF usually anonymizes the articles. Are you sure 'Gary' is really called 'Gary'?

  • (cs)

    Wow. Gotta say, it must be this guy He seems like a crock. Maybe I'm wrong, but doesn't this seem like a spin on the story:

    http://uk.linkedin.com/in/garymailer:
    # Analyst Developer Aardvark Media

    (Privately Held; 1-10 employees; Internet industry)

    May 2001 — September 2001 (5 months)

    • Identified opportunity and facilitate implementation of improvement of core application for major client.
    • Played a major role in the team that developed an innovative Pan-European Extranet for Siemens Communications.
    • As part of team identified the business and functional requirements.
    • Designed and developed parts of the system that met those requirements within timescale and budget.
    • Facilitated regular project reviews both internally and with client, face to face.

    Analyst Developer Motion Pixels

    (Privately Held; 1-10 employees; Information Technology and Services industry)

    August 2000 — February 2001 (7 months)

    • Management of ongoing systems development and enhancement of large client website.
    • Undertook requirement analysis, systems design and implemented solutions, and provided support for new pieces of development. Including black box and user acceptance testing.
    • Identified opportunities for improvements as well as ensuring they were commercially viable.
  • (cs) in reply to Gruntled Postal Worker
    Gruntled Postal Worker:
    TDWTF usually anonymizes the articles. Are you sure 'Gary' is really called 'Gary'?

    For disclaimer's sake, any resemblance to real PHP authors is purely coincidental. And hilarious.

    Seriously, though, Gary is an absurdly common name, so I wouldn't go drawing any conclusions. The names could have just as easily been flipped around, and you'd all be hunting for an author named Steve.

  • (cs)

    Forgot to mention: his CV looks like a bad movie sequel, "Fired in 60 Seconds":

    Left after 2 years Left after 7 months Left after 5 months Left after 8 months Left after 2 months Left after 5 months Left after 1 month Left after 7 months Left after 2 years, 8 months (getting nitpicky now) Left after 11 months And last, but not least:

    2 years, 7 months That makes 11 jobs in 10.9 years.

  • Crash (unregistered) in reply to Remy Porter
    Remy Porter:
    For disclaimer's sake, any resemblance to real PHP authors is purely coincidental. And hilarious.

    Seriously, though, Gary is an absurdly common name, so I wouldn't go drawing any conclusions. The names could have just as easily been flipped around, and you'd all be hunting for an author named Steve.

    We're the internet. We'll find you a Steve to mock as well, if you want - just give us a bit.

  • grzlbrmft (unregistered) in reply to Crash
    Crash:
    We're the internet. We'll find you a Steve to mock as well, if you want - just give us a bit.

    I'd like to have a Nepomuk, please.

  • anon (unregistered) in reply to Gruntled Postal Worker
    Gruntled Postal Worker:
    Niraj:
    just by any chance -- http://www.amazon.com/o/ASIN/0764557440

    TDWTF usually anonymizes the articles. Are you sure 'Gary' is really called 'Gary'?

    Let's hope so, then we can work out which firm he worked for: -- http://uk.linkedin.com/in/garymailer

  • (cs) in reply to grzlbrmft
    grzlbrmft:
    I'd like to have a Nepomuk, please.

    As requested: hxxp://commons.wikimedia.org/wiki/Johann_Nepomuk_Geiger

    Warning: This one is kinda raunchy

  • JoeB (unregistered)

    Believing that Gary is actually THAT Gary, I find it amusing that the review of the book has an Array topic, and the first (as claimed here - could not check) does not.

  • (cs) in reply to SR

    Did you notice Gary isn't listed in the newer version of the book.

  • Russ (unregistered) in reply to Robert
    Robert:
    I have lost all faith in tech books now

    I was there a LONG time ago. More often than not, books are the result of those who can't do anything else.

  • grzlbrmft (unregistered) in reply to jonsjava
    jonsjava:
    As requested: hxxp://commons.wikimedia.org/wiki/Johann_Nepomuk_Geiger Warning: This one is kinda raunchy

    That's not so bad. I like his style.

  • Anonymous Coward (unregistered)

    I wonder if this is the book in question:

    http://www.amazon.com/Beginning-PHP-Apache-MySQL-Development/dp/0764557440/ref=sr_1_fkmr1_2?ie=UTF8&qid=1270564714&sr=8-2-fkmr1

    It's the only PHP book Amazon threw up that had someone named 'Gary' in the list of authors. And, also, I find it highly suspect that the most recent edition is missing a particular author:

    http://www.amazon.com/Beginning-Apache-MySQL-Development-Programmer/dp/0764579665/ref=dp_ob_image_bk

  • (cs) in reply to Crash
    Crash:
    We're the internet. We'll find you a Steve to mock as well, if you want - just give us a bit.

    Please do. The Gary hunt is getting a bit out of hand.

  • Skilldrick (unregistered)

    I think Remy is getting really worried about the anonymisation in this article now...

  • Doug (unregistered) in reply to Crash
    Crash:
    Let's work from left to right to see what's wrong with this simple one-liner. This is narrated in the voice of the PHP while attempting to run the code.

    echo - Okay, we're going to print something to the screen. Got it, we're ready. Let's do this!

    if - Wait, what? 'If' doesn't return anything so how can we echo this? Oh boy.

    ...

    I don't do PHP, but PERL uses this construct all the time:

    print if (condition);

    But, since this is PERL("timtowtdi"), this is functionally the same as:

    if (condition) { print; }

    Gary probably just got his languages mixed up.

  • (cs) in reply to Russ
    Russ:
    Robert:
    I have lost all faith in tech books now

    I was there a LONG time ago. More often than not, books are the result of those who can't do anything else.

    That is particularly true when it comes to Wrox books. Irish Girl could author one.

  • Nobody (unregistered)

    If that first linked book is any indication of Gary's involvement... the one-star review certainly seals the deal, IMO.

    Worst book of all time, sorry guys and gals but whoever wrote and edited this book should buy a book themselves "Learn to Write and Edit by DUMMIES". To many typo's and script errors which did not work!

    Actually I would give the book a 5 star rating if they changed the name to Trouble Shooting Script Errors, Test Your Skills!

Leave a comment on “It's a Linear Failure Structure”

Log In or post as a guest

Replying to comment #:

« Return to Article