iPhone Applications Tune-Up by Loyal Moses

Summary: Good idea went bad

Short story

I would strongly consider buying this book. It has almost no examples. Topics are covered very generally. After finishing it you don’t feel that you know how to approach your own issues at all. There are errors in the text (PDF, Kindle). Some topics are pointless. There are just few really interesting and well explained ideas (e.g. memory management, instruments, static analyzer, application life cycle). I wouldn’t suggest it to a friend.

Full review

In the preface it is stated that this book is addressed to iOS developers who want to make their applications better in terms of efficiency, stability and maintainability. However, I am not sure whether this is good description of target audience. In fact it is very hard for me to say, who is this book addressed to. It is not for advanced developers, because it covers topics that are obvious if you are experienced developer. On the other hand, it is not for the beginners, because it covers topic so generally, that beginners will find it hard to apply the recipes presented in the book. But let’s start with the beginning.

First chapter will guide you through all the iPhone specifics (different versions and different releases of the product) as well as embedded development peculiarities. You will be told that you have to slightly change your approach to the development (assuming that you are desktop developer).

Second chapter covers topics related to XCode and project’s structure. I agree here with Loyal. If you prepare the structure of the project, pay attention to grouping files correctly (in terms of logical location). It will help you to navigate through all the files and will let you manage the structure easily. Mentioning Test Driven Development is a plus as well.

Maintainability related chapter is simply a place where you can discuss with the author. For example, I have slightly different naming conventions and syntax related habits. Another issue here is that (practically) it is almost impossible to introduce the one and only syntax convention. Everybody had different teachers and we simply work slightly different, thus, I think that naming conventions are not that important (at least sticking to it). If you stick to syntax related issues too much you simply waste your energy on thinking why others write “dbConnection” instead of “DBConnection”.

Reliability is a topic for itself. There are whole books covering this single topic. It is nice that Loyal tries to mention that but I think this is an example of how good idea went bad. First of all he mentions the importance of exception handling – and this is good. But he doesn’t mention that exceptions in Objective-C have really nasty implementation. In general, Objective-C is not a Java and you should avoid exceptions whenever possible. They simply leave the stack in a “mess”. You should use NSError instead. But here, the author forgets to tell the readers how should they deal with NSError. There are no examples of how to create NSError objects, how to pass them, how to handle the result. No nothing. The only good section in this chapter is devoted to Unit Testing. But still. Is it possible to execute single test in XCode, what are the limitations here? How and when should we update unit tests? What are the drawbacks of having the set of incorrect tests? How to test database related objects? And so on. Good thing here is that Unit Testing is mentioned at all.

Fifth chapter covers topics related to measurement and benchmarking. For sure you will be left with lots of question of how to perform the measurement correctly and how can you perform tasks other than checking for memory leaks. Loyal discusses only memory leaks and issues related to this particular topic. Good point here is, that he mentions Static analyzer and Instruments at all. From my experience I can tell that even experienced developers tend not to use these tools. If you had no idea that something like static analyzer existed in XCode you will at least run it once.

Syntax and performance related chapter didn’t fit me at all. Examples related to syntax are so obvious and simple that I have no idea who would be a target audience here. It looks like these would be people who have never ever developed before. Describing sorting and various sorting algorithms in this kind of books is definitely not a good idea. First of all, use framework for that purpose. Unless you seek for trouble or you want to increase the level of self-esteem. Secondly, go and get Knuth’s “The Art of Computer Programming” if you want to get familiar with sorting algorithms the right way. When it comes to Timers and Semaphores topics are covered really badly. If you say A, say B. If I read how to create Timer, please tell me how the signature off called method should look like. If I am told that semaphores are cool but I am not shown how to develop them – come on!

Network related chapter covers strange topics as well. First of all, I don’t know a single person who works on the socket level these days. In time of Web Services, HTTP, FTP, RESTful no one actually does socket development. Unless you develop server for your own. In my opinion, there is too much place devoted to sockets, while HTTP related topics are not covered at all. Telling readers that compression exists and that it is really nice feature but not telling how can you compress efficiently for iOS is simply a joke. Another question is, why Fasade pattern is covered here and not together with other design patterns.

Memory related issues are covered in chapter 9. This is a chapter I have no objections to. You get the basics of how management is done and it is really good that Loyal mentions Apple’s Object Ownership Policy. You will greatly benefit from following it. For sure.

Application and object related chapter is also quite well. It will guide you through all the odds and ends of object management.This is the first chapter in the book, that is (at least in my opinion) written quite well.

Data storage related section will left you with only the question. What should I choose after all? Core Data is not covered at all. It is only mentioned that Core Data exists and is hard to maintain. Which, in fact is not quite true. If you know how to do it well, it is not that complicated after all. SQLite also lefts lot to fish for. There is almost nothing regarding this robust (in embedded world) database. SQLite is de facto standard and you have to know it and you should use it. Unless you want to reinvent the wheel. One remark here, that is not mentioned by Loyal. If you target iOS only, go for Core Data. It will save your life. If you tend to develop for other embedded devices (for example Android based), go for SQLite. This way you will be able to maintain data storage fairly easy across all the platforms.

Design Patterns are also the imperfect part of the book. I will just say that. If you want to get familiar with Design Patters a proper way, spend some money and buy “Design Patterns: Elements of Reusable Object-Oriented Software“.

Last chapter is a praise for XCode and it’s advanced features. In fact, I don’t agree with author here because you can think that XCode is really good IDE after reading this chapter. And it is not. It lacks lots of the features of other IDEs (e.g. plugin system) it is terribly slow and makes your headache when it comes to working with LLDB. And, what is most important here there is an obvious mistake in the book as the Summary of this chapter contains explicitly copy-pasted paragraphs from the previous chapter. At least in PDF and Kindle editions.

If you want me to summarize this book with one sentence only it would be. Don’t by it. At least don’t buy this edition. Maybe next one will cover topics better, in more convenient way.

Product page:

Packt: http://www.packtpub.com/iphone-applications-tune-up/book
Amazon (in Books): iPhone Applications Tune-Up
Amazon (Kindle): iPhone Applications Tune-Up