Why so many terrible technical bpooks, e.g. programming reference guides

Caporegime
Joined
18 Oct 2002
Posts
32,650
I am doing a lot of reading from various ebooks, mainly on iphone development and Objective-C at the moment, and I am just astounded at the general poor quality of the all the books.

Im currently going through Objective-C Developer Reference by Jiva DeVoe (I read the amazon reviews too late) and it is just horrible to find errors in the sample code let alone poor english and bad explanations, poor structure of book, etc.

Objective-C is a little confusing for soemone with a C\C++\Java background so I waste a lot of time looking at some of the examples, E.g

Listing 6.3 Serializing a table without KVC.
Code:
-(BOOL)serializeToTable:(Table *)inTable
{
   Row *row = [inTable addRow];
   for(Column *column in row)
   {
      if([[column name] isEqualToString:@”firstName”])
         [column setValue:[self firstName]];
      else if([[column name] isEqualToString:@”lastName”])
         [column setValue:[self lastName]];
      else if([[column name] isEqualToString:@”age”])
         [column setValue:[self lastName]];    // ***Surely should be "age"
      else if([[column name] isEqualToString:@”birthDate”])
         [column setValue:[self lastName]]; // ***Surely should be "birthDate"
      ...
   }
   [row save];
}


This is just 1 example from 1 book.:mad:
 
There are so many useless programming books out there it's unreal. You just have to spend a long time on forums and looking at amazon reviews to find out the good ones!
 
There are so many useless programming books out there it's unreal. You just have to spend a long time on forums and looking at amazon reviews to find out the good ones!

Yeah I didn't have time so I just purchasd a load (I should be able to my company to apy for them).

Another minor bug a couple of pages later:
Code:
-(void)insertObject:(Bar *)inBar inBarsAtIndex:(NSUInteger)inIndex;
{
   [bars insertObject:inBar atIndex:inIndexes]; //***inIndexes != inIndex
}

Just careless writign by the author but also poor editings by the editors. Stuff liekt eh above is easy to pick up but some of the complex code maks it very hard for a relaive begiiner to see the bugs. Begginers should not be debugging sample code!
 
Its not even just the code. A 12 year old could do a better job of editing:

Accessing objects in the set can be done by using the methods -allObjects, which returns an array containing all of the objects in the set, -anyObject which returns a non-deterministic object from the set, or -member: which returns the member of the set that matches the passed in parameter determined by using the method -isEqual:. Finally, the method -anyObject returns a non-deterministic member of the set.

Edit, Next page another:
Each of the collection classes that I’ve introduced you to so far have been immutable. After
you create the collection, you cannot add objects to or remove objects from the collection.
Collections wouldn’t be particularly useful if you were limited to adding or removing objects
from them.
What he means to say is "Collections wouldn’t be particularly useful if you could not add or remove objects". Not very clear even if almost cotrect English.
 
Last edited:
I've seen first hand someone that was pretty incompetent in their topic of choice write and publish a book over a summer. It almost seems too easy nowadays, and I suspect quality suffers as a result. Perhaps some publishers are going soft in their bid to avoid being swallowed by the web, I don't know.
 
Back
Top Bottom