on 23 July 2013
The Xcode 4 Cookbook (by Stephen F. Daniel) is the most misleadingly named titled that I've read in a while. If you're after an Xcode 4 Cookbook and you're planning a little Mac OS X development then, make no mistake, you're in the wrong place. If you're after an iOS Cookbook (that name is already taken hence, I suppose, this title) then read on - this book might be right up your street.
The start of the book isn't, it must be said, all that promising. There are inaccuracies, and the first sections are just plain confusing. For example, despite what the book says, Xcode is not installed in the /Developer folder anymore and Xcode hasn't been installed in the /Developer folder for some years now.
As for the confusion, I can only conclude that Stephen Daniel wasn't entirely certain how to start his book. I sympathise. I wasn't entirely certain how to start this review, and that's a far smaller undertaking. In the beginning the book is tantalisingly vague and introduces concepts without explaining their purpose.
We are told 'It is worth mentioning that, if you set the StatusBar option to None, it does not mean that our application will start without a status bar.' Sadly, it doesn't seem to be worth explaining why this is the case. It is in instances like these that a little more explanation would be nice, especially with regard to what is going on under the bonnet.
Concepts like 'Strong' and 'Nonatomic' are introduced in the first chapter without actually explaining their purpose. Bizarrely, they are introduced in a 'Hello World' program, a program that I had always understood should be as simple as possible. I appreciate and understand the style of an experienced developer, but a newbie needs to be eased in gently. An overly complex 'Hello World' program may dissuade beginners from exploring further. This mish-mash of advanced (well, advanced for 'Hello World') and simple concepts continues with the next section which goes on to explain Compiler Directives. I can't help thinking that a developer who doesn't understand Compiler Directives or 'Hello World' might be starting in the wrong place with this book. In my view, these sections could be - should be - dropped from the text and the book would be all the richer for it.
After this early false start, the book begins to get into its stride of teaching new Xcode concepts. As a developer used to the 'old ways', I found chapter 3's storyboards genuinely interesting. It is all too easy, I find, to get stuck in the rut of what one knows, so I was grateful to be lead by the hand into pastures new. I tried the example (which worked, as one might expect), and it gives me the confidence that if (when) I use this feature in software of my own I shouldn't have too much difficulty.
Similarly, although Instruments is a tool that I use regularly there are many features that I have ignored or not yet discovered. Instruments is not covered in its entirety here, that would probably take a book in its own right, but enough of a taster is provided to encourage seasoned users to explore further and to ensure that the first steps for a beginner are not too onerous.
I thought that I would skip the section on Core Location, merrily ignoring all that it had to say. Core Location, I thought, is not very interesting or relevant to me. But you know what? I read the Core Location section and felt inspired. It makes it seem so easy, and something well presented in this way will often encourage the good ideas to flow thick and fast.
I could go on, but the truth is that this is a fairly weighty book (or would be, if it was paper). The iCloud APIs are covered, as are Multimedia Resources, the formatting and drawing of text and graphics (Core Image), Core Data is covered (which I've used and I'm happy with), as is Game Kit (which I haven't) and Bluetooth. The Facebook SDK section was briefly diverting but, I suspect, pointless. This isn't the fault of the author, rather it is a function of the mutability of the Facebook APIs. With Facebook, what you read today will be deprecated tomorrow - and if you doubt that then I've got a bunch of Facebook developer books that I'd like to sell you.
I liked the section on setting up a Developer account. I had to work this out for myself and, although not too hard, it took longer than I would have liked and I stumbled over a few obvious obstacles on the way.
The typography and layout, at least for the eBook, is generally good although some of the highlighted code didn't format properly on my iPad. The code works and the downloads available on the net should considerably reduce wear and tear on your finger tips. In fact, with this book, an unscrupulous developer could simply rip off the provided code, include a snazzy icon, and shovel it onto the App Store - picking up a few bob on the way. Alternatively, a good developer could use this book as an inspirational and useful tool to learn new tricks and prompt new ideas.
To sum up, nothing here is covered in hugely great detail - but it provides a useful jumping off point to more focussed and in-depth books. The first sections, about ten percent of the book in total, seem a little pointless to me and the name of the book is just wrong. If you're a seasoned developer and what you're after is an iOS Cookbook, a source of inspiration, and a selection of handy tips on tools and features that you might have ignored up to now then don't waste another moment. Go and buy this book now.