Wrox Programmer Forums
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
This is the forum to discuss the Wrox book Beginning PHP4 by Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman; ISBN: 9780764543647
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 8th, 2003, 04:37 PM
Authorized User
Join Date: Oct 2003
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts

I believe this is what makes learning something new very difficult.

For example, on the Sun.com site under Learning Java, I was taking their little learn java course about writing an app. Well, a year or so goes by after each lesson. After two years, finally a lesson comes out but the author decides to rewrite the code to make it more effective. I dont know why because I was still learning what we were doing originally.

Same with php. Its hard if the authors do not teach the reader properly (global variables OFF), and its even harder if the code is written incorrectly or could be written easier using something different.

As for this looping, Im just glad it works now.

Old November 8th, 2003, 04:51 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts

The problem, in my opinion, is that authors that write books (I've ranted about this before, so I'll keep it short) are often NOT expert programmers or writers or both.

If a programmer wants to teach you about looping, they have to come up with some sort of toy example that allows them to USE a loop. The beginning programmer is only supposed to come away with the knowledge of various loops, and how to use them.

Unfortunately, if the example itself doesn't really look like it lends (no pun intended) itself to the concept being taught, the whole thing just looks unwieldy and silly.

In the authors' defence, in regard to register_globals, NO ONE turned register_globals off in their code because PHP had it ON by default. It allowed a really slick and elegant approach to solving problems. A programmer only had to know if $logged_in was set, he didn't care where, because he was under the assumption that it came from an appropriate source.

These kinds of assumptions led a lot of programmers to write really ambiguous and security-hole-prone applications.

As with any language, PHP is evolving, and it's understandably difficult for a new programmer just learning to learn the language as it existed when most PHP4 books were written when things are so different now.

But it's not impossible. The more you stick with your learning, the more you learn about the language in it's "faulty" stages, the more the fixes and changes will make sense to you. As an experienced PHP3 programmer, learning to write code with register_globals off was immediate, because the reasons behind the change were so clear and obvious (once I read them!).

So what's the point? I guess what I'm trying to get at is DON'T let your frustrations with the evolution of a language or it's "common practices" get in the way of your learning it. When a language evolves, EVERYONE (beginning to expert) is learning it at the same time. People with a head start pick up new concepts relatively quickly, but they have the DISadvantage of breaking old bad habits, whereas newer programmers are given the benefit of learning things the "right" way from the start.

Okay, rant over.

Take care,


Similar Threads
Thread Thread Starter Forum Replies Last Post
break for-each loops, or limit amount of loops warhero XSLT 2 July 4th, 2007 02:18 AM
More than 150 Ajax links ajax JSP Basics 2 January 20th, 2007 02:46 AM
Ch5 : Form4.php pg 156-8 ... Not stepping iamdaniel BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 January 27th, 2006 12:58 PM
While loops and For loops in XSLT spencer.clark XSLT 1 August 5th, 2005 09:50 AM
Chapter 5 page 150 - Wondering why.... potassium Beginning PHP 3 July 27th, 2003 12:05 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.