View Single Post
  #3 (permalink)  
Old March 30th, 2011, 04:55 PM
mangel mangel is offline
Registered User
 
Join Date: Mar 2011
Posts: 17
Thanks: 4
Thanked 1 Time in 1 Post
Default Improving Code Samples from WROX

Quote:
Originally Posted by jminatel View Post
Can you tell us what book, what chapter this is about?
The book is "Professional Visual Basic 2010 and .NET 4", Chapter 10 "ADO .NET and LINQ", page 424. There are two issues: one is fixed in the explanation right after but I didn't know that and so I wasted a lot of time trying to type in the code without errors.

The second issue is the undefined variable "item" which should have been followed by "As title"; this is not fixed in the explanation.

The author should also alert the reader to references and imports that are necessary for the code to work. This is done in the explanation that follows but it would have saved a lot if the alert is provided before the reader enters the code. It seems that authors try to add a little suspense for interest sake. But readers of computer books are not looking for suspense; they just want to learn the subject. When they want suspense, they'll read a mystery novel instead.

I would not be surprised if there are similar issues throughout the rest of the book; I went straight to Chapter 10 in order to learn about LINQ. That's why I say that good coding examples should be an enforced WROX policy.

The bottom line is that the authors of WROX books need to be more considerate of their readers, whose skill level will range all over the spectrum.