Updates

Latest Tweet



What's New?

Check out for latest innovation, a computer based training video collection


Like this Page

Advanced PHP Programming Review by quagmired

this book is for morons

If you are not a moron, you will put this book down after page 17.
Pages 16 and 17 (in the first chapter!!!) have code examples trying to argue the use of for/foreach loops over while loops. They are absolutely absurd. If the opening pages of a book have bogus examples and completely false arguments for saying "one should use foreach over for over while", then what hope does the book have for someone wanting to learn something "advanced"?

I am only submitting this review because of the absurdity of pages 16/17. I can not get past those pages. I can not believe this book has $49.99 on it. If I were a job recruiter, I would use page 16/17 as an idiot test--it has that much value, which might be worth $49.99 to recruiters fending off idiots.

"For the sake of example" can only be used if the example makes some sense. On page 16, the example presents a function "is_prime" that takes a parameter $number and returns true/false if the number is prime. The function uses a "while" loop. The author argues against the use of while loops (versus for loops), and essentially says: if you have a moron add some completely bogus, moronic, idiotic code to your almost nice, relatively efficient, functional function named "is_prime", then a "for" loop would help make that function into "is_odd" with an extraneous for loop that is completely inefficient. The examples (more than ten lines long!) equate to:
function is_prime($number){ //although this is really is_odd
return $number % 2;
}
which has no loops, is way more efficient, and has nothing to do with using for loops over while loops. In this book, we see a bunch of nonsense about (what ought to be for advanced programmers) a TRIVIAL example of control structures (while/for) that are equivalent in most programming languages.