Log in

View Full Version : why is w3schools bad?



james438
02-25-2010, 07:50 PM
Why is w3schools bad and if it is what would be a better website (besides php.net)?

traq
02-26-2010, 02:28 AM
it's not necessarily bad, but it does gloss over some stuff that's important. Are you trying to learn php?

This book (http://www.phpreferencebook.com/) by Mario Lurig is one of the coolest references I've found. It focuses less on the "tutorial"-style lessons in favor of introducing lots of functions along with examples of how they're used. The book costs money; the PDF is free to download.

james438
02-26-2010, 03:43 AM
I already have 2 books on PHP that I use, but thanks for the tip. I have often heard that w3schools is bad, but I never really asked why. I am not sure what another better site would be either. The sticky in the php forum mentioned in a note at the bottom that the link to w3schools was removed, which made me wonder why it was so frowned upon.

traq
02-26-2010, 04:19 AM
Websites: I like php101 (http://devzone.zend.com/node/view/id/627) (even though it's more outdated and probably has more mistakes than w3schools). It's engagingly written and was the only tutorial I found that was easy enough to follow when I was starting. I wouldn't recommend it to just anyone, though, you have to be able to problem-solve and pick-and-choose the good parts.

This tutorial (http://www.massassi.com/php/articles/classes/) got me started in OOP.

There's always tizag (http://www.tizag.com/phpT/).

Here are some good PHP security (http://www.addedbytes.com/writing-secure-php/) articles.

Out of curiosity, what PHP books do you have/like?

djr33
02-26-2010, 05:30 AM
To be honest, I don't think there's much point in reading books about PHP, or going through endless tutorials. There are really only three references you need:

1. php.net
This is not a tutorial, but it is the best resource I have ever seen for a programming language (or anything like it). While finding methods is hard, everything else is documented and clear so it's very helpful when coding anything as a reference for checking your work, both for new users and experienced programmers. It also has lots of advanced comments for users who are beyond the basics.
2. Random tutorials on specific subjects to get you started (and that's all). http://php-mysql-tutorial.com is a good resource for learning how to use php and mysql together the first time and then adding a few more approaches. It's direct, to the point, and after going through it once you never really need to read it again, unless just for syntax reference (since unfortunately there is no "mysql.net" in the sense of php.net).
3. Trial and error. This is the best way for me to learn it, and also reading what people here say. Just take time with PHP and eventually it starts to make sense. For some, though, more tutorials will help, but realistically that's just reading what someone else has done: at some point you have to start working it out for yourself.


Also, php security articles are helpful, because those are big picture things that we can't all think of (and can learn from each other).

james438
02-26-2010, 07:17 AM
I have to agree with djr33 here. What he described is pretty much how I learned php and MySQL. The php.net site is quite useful, but I am am rather bummed about their removal of nearly all of their cooments on the PCRE functions. Nearly all of the comments were quite useful and their PCRE documentation was easier (for me anyway) to read when it was all listed on a single page. Well, nearly all of it was listed on a single page.

I have mostly used online tutorials, but early on I did pick up "php for dummies" and "php and mysql for dummies" I found these two books to be well written and a great reference tool that covers many many aspects of php. I don't really use them anymore, but once in a while I may browse through them if I want to read up on some PCRE I hadn't thought of before or about tricks with multidimensional arrays or just to refresh memory of some of the basics that I don't often use or just want to read a book as opposed to something online. Still, php.net is almost always more than adequate though for whatever I am curious about.

I am rather rambling on a bit at this point though. tizag and w3schools are helpful references sometimes, but I was curious why w3schools is rather frowned upon. Pretty much all of the people on this site that I have the highest respect for say it is not very good, but I never really thought to ask why before. Are there a lot of bugs? Is it not very thorough? Is it out of date? Bad reputation? Are most others better? Is it poor in comparison to php.net? Any of those reasons are good enough for me, except possibly the bad reputation reason. That I will always take with a grain of salt.

djr33
02-26-2010, 08:37 AM
My impression of w3schools being considered bad is that they approach programming in a "user friendly" sense, so that the introduction isn't too complex. But this tends toward a very specific style that then, when adjusted, can cause problems. In other words, they don't prepare you for the real world and end up suggesting methods that are not best in a real, full programming environment.
But w3schools is fine for starting, but to move on to an advanced level something else should supplement it-- but that's not unlike most resources.

traq
02-26-2010, 09:14 PM
The "learning method" djr described above is how I learned, also. The book I mentioned is more of a reference source than a tutorial, as well. As djr says, practice is the best (only) way to learn.

w3schools seemed great to me when I was just getting in to html, etc., but the only thing I go back there for now is their html color reference, and sometimes their try-it editor.

james438
02-27-2010, 12:08 AM
That makes sense djr33. w3schools is ok, but if you begin to rely too much on it it will be easy to develop bad coding habits.

As far as books go, I find that they tend to be organized as reference materials, but they also cover php in a more well rounded way. It is hard to explain right now, but books tend to present the material differently than if you were to read it piecemeal online. Both online and books are used as resources while coding, but books are more thorough in my experience. This is coming from someone who predominately spends a lot of time at php.net and many other similar websites.

If it is a matter of money, go with the online resources every time, but next time you are at a bookstore try browsing through the latest php or css or javascript books and you will see the difference. The people who write these books know their stuff and know how to present it in a very intelligent way. There will be some poorly written books, but you should be able to tell if what you are reading is worth your time or not, but it might take a few minutes before you know whether the book is good for you or not.

djr33
02-27-2010, 03:23 AM
...know how to present it in a very intelligent way.That's really questionable. Some, yes, but I find that the majority of books about technical topics are almost unreadable, especially with programming. I remember picking up a copy of "Programming for Dummies" (or was it "C++ for Dummies") a long time ago and having absolutely no idea what the author was trying to say on the first couple pages.

I think that sometimes internet resources will be better, though they are harder to find. Finding a single great article is easy, but finding an entire compehensive site that substitutes for a whole book is almost impossible.

But, yes, if you are lucky enough to find a book that works, that's great, but take some time to find one that is decent because a lot of them won't make anything clearer at all (in my somewhat limited experience with technical books).

Some books I found very helpful were the "Sam's Teach yourself [something] in 24 hours" series. Since they are all written by different authors it can vary by topic but overall they are useful and some are very well written (with others as just reasonably written). (Note: this is different from the "Teach yourself" series that doesn't have a "in X [time]" at the end.)

traq
02-27-2010, 03:37 AM
I'd have to agree about most programming books being really poorly written. I've never found a programming book (aside from Mario's) that I thought was worth buying, or was even written well enough to follow from one page to the next. That's one reason I was interested in which books you've found useful - though I've read a few chapters from the "Dummies" books you mentioned, and, if I didn't already know something about PHP, I wouldn't have been able to follow it.