Kevin Bricknell on ‘Carbon Programming’


What subjects will your book cover? From the table of contents page:
  • System Software, Memory, and Resources
  • The Classic Event Manager
  • Menus
  • Windows
  • Carbon and Universal Procedure Pointers
  • The Appearance Manager
  • Introduction to Controls
  • Dialogs and Alerts
  • The Finder and the Application
  • Apple Events
  • QuickDraw Preliminaries
  • Drawing with QuickDraw
  • Offscreen Graphics Worlds, Pictures, Cursors, and Icons
  • More on Controls
  • Carbon Printing
  • More on Windows
  • The Carbon Event Manager
  • Files and Navigation Services
  • More on Resources
  • Carbon Scrap
  • Text, TextEdit, Dates, Times and Numbers
  • Lists and Custom List Definition Functions
  • Drag and Drop
  • Basic Sound and Speech
  • Miscellany
  • The Multilingual Text Engine
Game programming requires knowledge of many of the topics in your book. Why not include a chapter on programming a simple game to help teach general programming?

Ah, well, it’s not really a game-oriented book. My publisher turned a pale white color when he realized that the first edition was going to require 1,600 or so pages. If I had attempted to add any more pages at that stage, he’d probably have had me shot.

What are the IDE and machine requirements to compile and execute the code in the book?

The IDE assumed is Metrowerks’ CodeWarrior. All demonstration programs were written using that environment. Since the whole idea of Carbon is to facilitate writing programs that will run on both Mac OS 8/9 and Mac OS X, users will need a machine that will run Mac OS X. That means that any Power Macintosh G3 or G4 will do the trick. The book proper is really only one part of a two-part package. The second part consists of the CodeWarrior project files, source code files, Resorcerer resource files, and certain other supporting files for some 32 demonstration programs. All these files are available for download from the Carbon Programming section of the SAMS Publishing website.

Why CodeWarrior and Carbon?

The vast bulk of the demo programs out there-including Apple’s samples-were written in C using Metrowerks’ CodeWarrior. In addition, the majority of professional developers use CodeWarrior and it’s still a sound idea to ensure that your applications are capable of running on both Mac OS 8/9 and Mac OS X.

Do you feel that newbies can start with this book, or is there another text that you would recommend as a prerequisite?

Well, there are newbies and newbies. The first thing to emphasize is that there is no point in getting my book unless you have already learned the C language and the fundamentals of Metrowerks’ CodeWarrior. If you have those two things under your belt, my book may well be the next logical step. I would emphasize that I wrote my book for newbies who have learned the C language and who are just starting out on Macintosh programming.

Can you comment on any other Carbon-related books?

There are really only two other Carbon-oriented books available at the moment. The first is a rather slim volume titled ‘Learning Carbon’, which is really just a collection of stuff that’s already available at Apple’s Developer web site. It assumes the use of Apple’s developer tools (Project Builder and Interface Builder) and is totally oriented to Mac OS X. It seems to be more about learning Project Builder and Interface Builder than it is about the Carbon Application Programming Interface (API). The second is a soon-to-be-available book by Dan Parks Sydow titled ‘Mac OS X Programming’. I have not seen this one yet, so I can’t comment on it.

Do you think developers will still be interested in Carbon with all the Cocoa excitement?

I read a transcript of a developers’ conference the other day in which the general conclusion was that, for the foreseeable future, developers who ignore Mac OS 9 will do so at their peril. I’ve heard other views on this, but the point is that, if you want your application to run native on both Mac OS 8/9 and Mac OS X, Carbon is the only game in town. Another point is that many developers will simply be involved in “Carbonizing” their existing Classic applications, never investing the time and money to completely re-write those applications using Cocoa. (At the top end of town, Microsoft Office X is a case in point. There are also countless others.) So developers in this category have to remain “interested in” Carbon, because that’s their only option. Naturally, developers who have abandoned support for Mac OS 8/9, who are involved in creating brand new applications from scratch, and who are happy to invest the time necessary to learn a new API, will almost certainly opt for Cocoa. As for my own extremely modest endeavors, I’m not about to throw away my hard-won knowledge of the Classic/Carbon API on a whim. I think I’ll wait for a year or so to see which way the wind has really blown.

So for your own programming, you are sticking with Carbon?

Well, I’d like to see the dust settle a little more before investing any effort in learning a new API, language, and IDE. Heck, it takes me most of my spare time just keeping up with the latest developments in Carbon. But I should point out that I am just an amateur programmer, not a professional one, and my attitude should be viewed in that light.

For a long time, publishers seem to have forgotten the Macintosh. With Cocoa and Mac OS X, there seems to be much more interest in our platform. What are your thoughts?

I think there’s some truth in that. Until the middle of this year, the last book I recall being published on Mac programming was published way back in the early 90’s. Then, in June this year, O’Reilly threw ‘Learning Carbon’ into the ring. Then I threw my rather modest Carbon-oriented submission into the ring last month, and now Dan Parks Sydow is about to make his contribution. On top of that there are three new Cocoa-oriented books out there as well. As for my own publisher, it was clearly Mac OS X, rather than Carbon or Cocoa per se, that engaged their interest. So I think it’s fair to say that it’s Mac OS X itself that has stimulated the recovery.

Bio

K. J. Bricknell is a retired officer of the Royal Australian Air Force. An amateur programmer for many years, he is the author of ‘Macintosh C: A Hobbyist’s Guide to Programming the Macintosh in C’, which was published on the Internet in 1996.

kevin,bricknell,carbon,programming

Recent Forum Threads

About iDevGames

Since 1998, iDevGames has been educating, supporting and enhancing the community of game developers that produce video games for the Apple Mac and iPhone platforms. Get the latest game development news by subscribing to our news feed.