Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

SC68Cal

macrumors 68000
Original poster
Feb 23, 2006
1,642
0
Okay,

I have this book, "Teach Yourself SQL in 21 Days, 4th Edition" and it's driving me nuts. It's just sloppily written overall. The inconsistency between the SQL statements and the MySQL statements is driving me nuts.

An perfect example is when they introduce the Substring function. Rather than using the MySQL substring function, the authors decided to complicate things by using the mid() function and tossing a small disclaimer at the bottom saying "oh, by the way, we used this one instead, even though mid() and substring do the same thing"

Leaving me wondering, "Why are you doing this? please, let's keep things on the same track for the sake of sanity and clarity! If anything mention the mid() function as a bit of trivia!"

I don't want people to get the wrong idea and think I just don't understand it, but I read the book and just wonder aloud why the authors felt compelled to make things more complicated. Did they think it would make them sound smarter?

Avoid this book at all costs, or purchase and read with careful consideration.
 
Yeah, SQL can be a pain. But remember that there are varying "dialects" of SQL out there so that might explain differences that you see between MS-SQL, MySQL, and other versions.

I can't say anything about the book being written poorly or not, but in defense of using mid(), it's a good thing to know that such a function exists since you're likely to encounter code that uses it. But I totally understand what you mean about the approach that they give to explaining alternative functions.

It might be easier to treat this as you would any language by first learning the grammar and then building up your vocabulary. Whatever works though. Good luck.
 
As a general rule, most "Teach yourself <insert something here> in n hours/days/weeks" are more confusing than helpful. Same can be said to those dummies books, although I have to admit some of them are not bad.

The problem with those books are that they only touch the surface and teach you the basics, leaving you to wonder if there's alternatives. Sometimes they will even toss some 'advanced stuffs' there and let you dissect them one by one just to figure out what they meant to accomplish. They're often aimed at beginners who will just take things for granted and not question why something is done their way and not the other.

Personally, I like learning from reference books like those from o'reilly, despite them being very technical (of course, me being from a technical background helps). Pocket references are not too helpful, but those thick books really help.

Otherwise, with the current state of the internet, there are tons of tutorials out there that you can look up, and read at your leisure. Of course, have to be careful not to read on the tutorials written by beginners thinking they have accomplished so much by hacking up a guestbook written in some language they happened to stumble upon.


-stndn.
 
I personally love the "teach yourself..." series. All I really need is to scan the surface. Then again, I'm principally a designer, not a developer. And they're the cheapest. The others are too expensive to just be sitting in a shelf (which is where most of the books go after I'm done with them).


Whenever I had more complicated code, I tended to use another reference: the internet. Lots of great boards/forums out there to help you debug stuff.
 
These are huge huge huge errors in the book though.

For instance, on one page, they try to explain the avg function by doing a baseball example

The SQL code goes something like this (pseudo-code)

SELECT all players with a batting average >= .300

The example for the MySQL example, which is supposed to express the exact same operation, just demonstrate how you do it in MySQL

SELECT all players with a batting average < .300

The book is just godawful, full of mistakes AND IT IS THE 4TH EDITION!
 
Yeah but anybody with common sense would spot such errors. It's the syntax ones that kill the newbies.

I've rarely encountered CS books that were error free. Even expensive ones I bought for a CS class were riddled with errors.

For $20, I just want a decent starting guide. I don't even use them for reference. That's what php.net and the likes are for.
 
I second the mention of O'Reilly books. They have taught me C programming (the cow book), PHP, shell scripting, and all kinds of other stuff. Just about any Perl programmer can tell you about the "Camel book".

I don't even look for other books anymore. If I need to learn something, I look for the O'Reilly book on that topic.
 
Yeah but anybody with common sense would spot such errors. It's the syntax ones that kill the newbies.

I've rarely encountered CS books that were error free. Even expensive ones I bought for a CS class were riddled with errors.

For $20, I just want a decent starting guide. I don't even use them for reference. That's what php.net and the likes are for.

Really? Didn't know errors and typos were widespread. No wonder stuff like windows comes along then.

I like having a fat reference guide like "The Complete Reference" series for stuff like SQL and PHP since it gives me most of the functions that I can page through, rather than having to do searches on the web. Get ideas as I turn the pages.

I also like the "Visual QuickPro Guide" series for "Creating Dynamic Websites with PHP and MySQL" because it is set up like a "case study" where we focus on just one website, that in each chapter gets added functionality on top of what was discussed in the previous chapter.

It gave me the ability to look at the author's code for how he did specific implementations, such as using PHP Sessions rather than cookies, and how to transition your code from one system to another
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.