- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I can't get my head around comments
Admin
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
Admin
Well? What was the book?
Admin
"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...
Admin
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.
Admin
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.)
Admin
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...
Admin
This book?
From the reviews "Then I got confused with inadequate explanation ofarrays"
BTW I have no idea what
could possibly be there for. Literally no idea.Admin
Anyway, echo what exactly? You could rewrite it as follows:
...which doesn't make a lot of sense.
Also, using isset() on an expression is... rather unusual.
Admin
Wanna go camping? There's an app for that.
I'll get my coat.
Admin
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).
Admin
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.
Admin
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.
Admin
As a PHP developer I can verify that the statement
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.)Admin
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?
Admin
Obviously Gary is one of those "real coders" who use XML for everything. Arrays are so last year!
Admin
Two syntax errors in a one-liner is a bit too much for such a guru...
Admin
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..."
Admin
How can a programmer fail to understand arrays?
Its like a baker not getting yeast, or a politician not understanding lies.
Admin
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.
Admin
I have lost all faith in tech books now
Admin
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/
Admin
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.
Admin
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.
Admin
It's not like anybody is going to need arrays anyway.
Admin
If I could feature this one twice, I would. Now I have the voice of PHP in my head.
Admin
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)
Admin
just by any chance -- http://www.amazon.com/o/ASIN/0764557440
Admin
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
Admin
I have that book... I feel cheated now.
Admin
I like that he was also photo-shopped out of the cover. Not that they could leave him in there...
Admin
Priceless, especially since he's the only one that isn't in the new edition so there's no doubt which one he is.
Admin
TDWTF usually anonymizes the articles. Are you sure 'Gary' is really called 'Gary'?
Admin
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:
Admin
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.
Admin
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.
Admin
We're the internet. We'll find you a Steve to mock as well, if you want - just give us a bit.
Admin
I'd like to have a Nepomuk, please.
Admin
Let's hope so, then we can work out which firm he worked for: -- http://uk.linkedin.com/in/garymailer
Admin
As requested: hxxp://commons.wikimedia.org/wiki/Johann_Nepomuk_Geiger
Warning: This one is kinda raunchy
Admin
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.
Admin
Did you notice Gary isn't listed in the newer version of the book.
Admin
I was there a LONG time ago. More often than not, books are the result of those who can't do anything else.
Admin
That's not so bad. I like his style.
Admin
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
Admin
Please do. The Gary hunt is getting a bit out of hand.
Admin
I think Remy is getting really worried about the anonymisation in this article now...
Admin
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.
Admin
That is particularly true when it comes to Wrox books. Irish Girl could author one.
Admin
If that first linked book is any indication of Gary's involvement... the one-star review certainly seals the deal, IMO.