Although chapter 23 was ostensibly about reading and writing to files with strings, it introduced to me a concept of dealing with errors during such writes. In my days as a developer I have dealt with files that were unable to be written to disk due to many reasons. In this chapter, Hillegass discusses this at some length. It all goes back to the pointer, which, for the life of me, I will never understand (but must understand if I am to get anywhere with this). In any event, I get that during the write to a file, if there is success, there is no need to create an error object as it will be inefficient. Instead, you can pass an address of a pointer variable. Then if an error does exist, you can get the description of the error through a method of the error object that gets automatically created for you during the firing of the writeToFile method. Well ok then.
As for the rest of the chapter, Hillegass discusses how to read files and write to files while doing some tests of success along the way. It is great that he uses the /tmp folder as I perceive that to be an important folder to use when I start doing real development.
Today I will read about Callbacks which is scary for me. I am now on page 157 so I am well past 60% of the way. As I thumbed through the end of the book to see the last page, I noticed that he makes Next Steps recommendations for future reading. Although it may come across as a plug but to quote If you are learning to develop applications for iOS, I recommend that you work through iOS Programming: The Big Nerd Ranch Guide, but there are several other books on iOS, and you are ready for any of them. Not a fan of platitudes so I hope he is sincere as that book is a big one and could be the crux of my future.
No comments:
Post a Comment