The size, complexity, and depth of Xcode are both a blessing and a curse, writes James Bucanek in ‘Professional Xcode 3’ (www.wileyindia.com). “In your favour, you have a wealth of development tools, templates, and documentation, but all that comes at a cost; there’s so much to learn and explore that it might take you months – even years – to fully exploit its capabilities,” he adds.
Xcode, for starters, is a suite of tools for developing software on Mac OS X, developed by Apple. “Among the features of the Xcode suite is the technology to distribute the building of source code over multiple computers. The original, now called Shared Workgroup Build, uses the Bonjour protocol to automatically discover computers providing compiler services…” informs Wikipedia.
Xcode (the application) is your cockpit, your command centre, which drives the whole of the rest of your development system, Bucanek describes. Focusing on ‘an Xcode-centric workflow,’ he speaks of how you can use ‘your compilers, debuggers, linkers, data models, source control, documentation, and automation tools – all without ever stepping outside the Xcode application.’
Building projects is Xcode’s ultimate ambition, one learns from a chapter. A ‘clean’ build, you will know, is ‘a build that constructs everything in the product solely from the project’s source files.’ You might think this would be true of every build, but it isn’t, the author clarifies.
“Xcode, like most Make systems, keeps all of the intermediate files that were produced during previous builds. It reuses these intermediate files to reduce the work required for subsequent builds: a C source file is complied into an object file, which is later linked to form an executable.”
A chapter on performance analysis begins by stating that the simplest kind of performance enhancement – getting your application to run faster – can be too narrow as a definition, because performance solutions are sometimes counterintuitive.
The first principle, therefore, is to keep away from optimising things that don’t need optimising. Write your application in a straightforward, well-structured, easily maintained, and robust manner, counsels Bucanek. “This usually means writing your application using the simplest solution, employing high-level routines, objects, and abstractions. Given the choice of using a neatly encapsulated class and a collection of C functions that do the same thing, use the class…”
For the hands-on professional.
“We tweaked the OS in such a way that whenever the machine crashes…”
“It will show a bland error message?”
“No, a neat resignation letter, which you can then choose to accept or reject!”
Keywords: Professional Xcode 3