Updated: May 14, 2010 18:07 IST

Building your code cockpit

D. Murali
print   ·   T  T  

The size, complexity, and depth of Xcode are both a blessing and a curse, writes James Bucanek in ‘Professional Xcode 3’ ( “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.’

Ultimate ambition

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.”

Performance principle

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!”


More In: Books | Business

The Hindu presents the all-new Young World
More »



Recent Article in Books

This photo provided by Archie Comics shows Archie in his final moments of life in a scene from the comic book,

Archie to die a hero’s death

He will take a bullet for his best friend »