Sorta agree
I think the important point is to preface examples with the right sort of disclaimer like 'this is not the proper way to do it, but I'll do for now' and that sort of thing.
I've set up a few PHP projects where, when I got to the "here's how you setup the database" part, I've thought "oh, no, that's not how I'm going to do it".
When a writer points out that he knows that it's not the 'correct' way to do something that I know something about, it makes me more confident that he'd do the same for the stuff I don't know about.