Learn Objective-C on the Mac (Learn Series)

Learn Objective-C on the Mac (Learn Series)
by Mark Dalrymple, Scott Knaster

Learn Objective-C on the Mac (Learn Series)
List Price: $39.99
Our Price: $12.64
You Save: $27.35 (68%)
Availability: Usually ships in 1-2 business days
Buy Used: from $8.95 (click here)
Category: Book
See more book details and other editions


or

Book Summary Information

Author: Mark Dalrymple, Scott Knaster
Brand: Apress
Edition: Paperback
Audio: English (Unknown); English (Original Language); English (Published)
Published: 2009-01-07
ISBN: 1430218150
Number of pages: 360
Publisher: Apress
Product features:
  • Apress Learn ObjectiveC on the Mac
  • Take your coding skills to the next level with this extensive guide to ObjectiveC, the native programming language for developing sophisticated software applications for Mac OS X.

Book Reviews of Learn Objective-C on the Mac (Learn Series)

Book Review: Worst programming book I've ever read
Summary: 1 Stars

Over the past three decades I've collected about fifty programming books, most of which deal with Unix, C and C++. I have read them all, and there are only two or three among them that I regard as poorly written. "Learn Objective-C on the Mac" is the very worst programming book I've ever encountered.

The best programming books are distinguished partly by the fact that the authors are meticulous with each and every sentence. This book is littered with sentences that do not quite make sense or that imply something contrary to the facts. On page 46, where they are discussing method declarations in the @interface section, they write, "The type of the argument is specified ... The name that follows, fillColor, is the parameter name. You use this name to refer to the parameter in the body of the method." This is incorrect. The name given to the parameter in the method definition, in the @implementation section, is used within the method to refer to the parameter, and this name is not required to match the name given to the parameter in the declaration in the @interface. Here's another example: "Although the draw method doesn't do anything, we define it anyway so that all of Shape's subclasses can implement their versions." This implies that you are not permitted to define a method in a subclass except for when that method overrides a method in the parent class. How about this pearl of wisdom: "You can make your code easier to read by choosing meaningful parameter names, rather than naming them after your pets or favorite superheroes."

The final five pages of Chapter 2 are spent discussing the type BOOL, which is implemented in a familiar way, using the C preprocessor. Several worthwhile things are covered in this discussion, the most pertinent of which is that it is generally a bad idea to perform a Boolean test via explicit comparison to 1, or equivalently, to a defined constant such as YES, which equates to 1. This is a worthwhile thing to discuss, but to spend as much as one full page on this is superfluous and tedious.

Chapter 3, which is titled "Introduction to Object-Oriented Programming", begins by asserting that indirection is a key concept of OOP. They spend several pages on an utterly sophomoric and incoherent discussion of indirection, after which they spend several more pages lecturing on how it is best not to embed, directly within a program, the data that a program operates on. Ten pages into the chapter, the large bold heading "Using Indirection in Object-Oriented Programming" appears. Two very short paragraphs into this section, the sub-heading "Procedural Programming" appears. Under this sub-heading, they devote no fewer than seven pages to the presentation of some C code for operating with graphical shapes. This C implementation is not realistic, because it avoids the use of pointers entirely, which contrasts with the normal practice in C of embedding function pointers within structures and passing around pointers to the structures. They then spend several pages on a parallel implementation in Objective-C, and at the very end of the chapter, they revisit the C implementation.

The premise of all this is that by contrasting the Objective-C implementation with the C implementation, they will demonstrate how indirection is a pivotal difference between procedural programming and OOP. The entire discussion amounts to a muddled contrivance. It does not remotely give a useful perspective on the difference between procedural programming and OOP. Indirection plays a role in OOP, but the notion that you could expose the essential difference by focusing on indirection is ludicrous. Their C implementation is contrived to facilitate their point of view. Their parallel implementation in Objective-C does not reflect a proper OOP implementation, because even though the various shape-specific classes have a great deal in common, they each descend immediately from NSObject. This is distracting, because if you have the slightest clue about OOP, you are aware that there is something inherently wrong with this implementation. They do it correctly in the next chapter, but in this chapter that is supposed to introduce OOP, the code they present confounds the true essence of object-oriented programming, under the guise of demonstrating that indirection is a key concept in OOP. The whole chapter is horrifically contrived and sophomoric.

Chapter 4 commences their discussion on inheritance. The diagrams they use to explain how methods are found at run-time are sophomoric. In the highlighted box on page 69 they talk about the memory layout of an object: "These offsets are now hard-coded into the program generated by the compiler. Even if Apple's engineers wanted to add another instance variable to NSObject, they couldn't, because that would change all the instance variable offsets. This is called the fragile base class problem." The problem to which they allude is nothing but the familiar and mundane requirement that if the base class changes, you have to recompile everything. The "fragile base class problem" is more fundamental. The trite example is what can occur if a derived class bypasses accessors to access instance variables defined in the base class. The cost of avoiding this is lots of run-time overhead, especially for Objective-C. The non-trite case is when a method, call it method A, invokes another method, call it method B. If a class that derives from the class where method A is defined extends method B, then the correctness of the behavior of this derived class is predicated on the assumption that when method A is invoked, the enhanced version of method B will be invoked. But if method A is subsequently modified such that it no longer relies on method B to do what it has done all along, the enhanced version of method B is no longer invoked when method A is invoked against the derived class, and the derived class is broken.

Chapter 5 deals with composition, i.e., using other classes as instance variables within a class. They discuss accessors in a cursory fashion toward the end of this chapter, but they do not delve into the semantics of dynamic allocation and deallocation of memory for the contained objects. The more significant problem with this chapter is that they switch to programming examples that are contrived and sophomoric, using cars, wheels and engines. This is so artificial that it is difficult to translate and apply what you the see in the example to real programming.

The book starts to improve with chapter 6, which begins on page 87. But the first five chapters take up more than one-fourth of a book that is just barely 300 pages, and even if what remains after page 87 were enough to justify a book, it would not make up for the dreadful way that the first five chapters are written.

Summary of Learn Objective-C on the Mac (Learn Series)

Take your coding skills to the next level with this extensive guide to Objective?C, the native programming language for developing sophisticated software applications for Mac OS X. Objective?C is a powerful, object?oriented extension of C, making this book the perfect follow?up to Dave Mark?s bestselling Learn C on the Mac, Mac OS X Edition. Whether you?re an experienced C programmer or you?re coming from a different language such as C++ or Java, leading Mac experts Mark Dalrymple and Scott Knaster show you how to harness the powers of Objective?C in your applications!

  • A complete course on the basics of Objective?C using Apple?s free Xcode tools
  • An introduction to object?oriented programming
  • Comprehensive coverage of inheritance, composition, object initialization, categories, protocols, memory management, and organizing source files
  • A brief tour of Cocoa?s foundation framework and AppKit
  • A helpful ?learning curve? guide for non?C developers

What you?ll learn

  • Learn Objective?C programming, the gateway to programming your Mac or iPhone
  • Write applications for the Mac OS X interface, the cleanest user?interface around
  • Understand variables and how to design your own data structures
  • Work with the file system
  • Connect to data sources and the Internet

Who this book is for

For anyone wanting to learn to program native applications in Mac OS X, including developers new to the Mac, developers new to Objective?C, or students entirely new to programming.

Computers & Internet Books

Book Subjects
Most talked about in Computers & Internet Books
Learn to Program with Java ImageLearn to Program with Java
by John Smiley
Osborne/McGraw-Hill; Published: 2002-01-02; Paperback; Book
Best price: $29.99
Price in other shops: $39.99
QuickBooks 2000: The Official Guide ImageQuickBooks 2000: The Official Guide
by Kathy Ivens
McGraw-Hill; Published: 2000-01-14; Paperback; Book
Best price: $4.99
Price in other shops: $32.95
HTML: A Beginner's Guide ImageHTML: A Beginner's Guide
by Wendy Willard
Mcgraw-Hill Osborne Media; Published: 2000-11-15; Paperback; Book
Best price: $4.86
Price in other shops: $29.99
Cisco(r) CCIE(tm) Lab Practice Kit ImageCisco(r) CCIE(tm) Lab Practice Kit
by Stephen Hutnik, Michael Satterlee
McGraw-Hill Companies; Published: 2001-02-12; Paperback; Book
Best price: $14.56
Price in other shops: $59.99
Genealogy Online 9/E ImageGenealogy Online 9/ E
by Elizabeth Crowe
McGraw-Hill Osborne Media; Published: 2010-08-27; Paperback; Book
Best price: $11.73
Price in other shops: $24.99
The Musician's Guide to Pro Tools ImageThe Musician's Guide to Pro Tools
by John Keane
McGraw-Hill Osborne Media; Published: 2007-09-25; Paperback; Book
Best price: $18.00
Price in other shops: $42.00
DVD Demystified Third Edition ImageDVD Demystified Third Edition
by Jim Taylor
McGraw-Hill/TAB Electronics; Published: 2006-01-31; Paperback; Book
Best price: $26.81
Price in other shops: $60.00
Strategies for the Electronic Futures Trader ImageStrategies for the Electronic Futures Trader
by Jacob Bernstein, Jake Bernstein
McGraw-Hill; Published: 1999-10; Unbound; Book
Fire in the Valley: The Making of The Personal Computer (Second Edition) ImageFire in the Valley: The Making of The Personal Computer (Second Edition)
by Paul Freiberger, Michael Swaine
McGraw-Hill Companies; Published: 2000-11-29; Paperback; Book
Best price: $139.58
Digital Signal Processing ImageDigital Signal Processing
by Sanjit Mitra
McGraw-Hill Science/Engineering/Math; Published: 2005-01-06; Hardcover; Book
Best price: $126.66
Similar Books and other products
Learn Xcode Tools for Mac OS X and iPhone Development (Learn Series) ImageLearn Xcode Tools for Mac OS X and iPhone Development (Learn Series)
by Ian Piper
Apress; Published: 2010-01-06; Paperback; Book
Best price: $1.71
Price in other shops: $44.99
Beginning Mac Programming: Develop with Objective-C and Cocoa (Pragmatic Programmers) ImageBeginning Mac Programming: Develop with Objective-C and Cocoa (Pragmatic Programmers)
by Tim Isted
Pragmatic Bookshelf; Published: 2010-04-02; Paperback; Book
Best price: $19.95
Price in other shops: $34.95
Beginning iPhone Development: Exploring the iPhone SDK ImageBeginning iPhone Development: Exploring the iPhone SDK
by Jeff LaMarche, Dave Mark
Apress; Apress; Published: 2008-11-21; Paperback; Book
Best price: $0.61
Price in other shops: $39.99
Objective-C for Absolute Beginners: iPhone, iPad and Mac Programming Made Easy ImageObjective-C for Absolute Beginners: iPhone, iPad and Mac Programming Made Easy
by Gary Bennett, Mitchell Fisher, Brad Lees
Apress; Published: 2010-08-25; Paperback; Book
Best price: $22.98
Price in other shops: $39.99
iOS Programming: The Big Nerd Ranch Guide (2nd Edition) (Big Nerd Ranch Guides) ImageiOS Programming: The Big Nerd Ranch Guide (2nd Edition) (Big Nerd Ranch Guides)
by Joe Conway, Aaron Hillegass
Addison-Wesley Professional; Published: 2011-07-02; Paperback; Book
Best price: $25.48
Price in other shops: $49.99
Beginning iOS 5 Development: Exploring the iOS SDK ImageBeginning iOS 5 Development: Exploring the iOS SDK
by David Mark, Jack Nutting, Jeff LaMarche
Apress; Published: 2011-12-07; Paperback; Book
Best price: $24.34
Price in other shops: $39.99
Learn Cocoa on the Mac (Learn Series) ImageLearn Cocoa on the Mac (Learn Series)
by Jack Nutting, Dave Mark, Jeff LaMarche
Apress; Published: 2010-02-24; Paperback; Book
Best price: $3.99
Price in other shops: $39.99
Beginning iPhone 4 Development: Exploring the iOS SDK ImageBeginning iPhone 4 Development: Exploring the iOS SDK
by David Mark, Jack Nutting, Jeff LaMarche
Apress; Published: 2011-01-28; Paperback; Book
Best price: $20.00
Price in other shops: $39.99
Learn C on the Mac (Learn Series) ImageLearn C on the Mac (Learn Series)
by Dave Mark
Apress; Apress; Published: 2008-12-12; Paperback; Book
Best price: $24.50
Price in other shops: $39.99
Programming in Objective-C, Third Edition (Developer's Library) ImageProgramming in Objective-C, Third Edition (Developer's Library)
by Stephen G. Kochan
Addison-Wesley Professional; Published: 2011-06-20; Paperback; Book
Best price: $27.99
Price in other shops: $49.99