How to program your Mac

NOTE: This page has not been updated in several years. The information herein probably has little to do with OS X.

Development Environments
Other Resources
My Conclusions


In September 1998, I asked the 44,000 members of the Apple EvangeList to help me start to program on my Macintosh. If you're haven't heard of the Evangelistas, it's a mailing list of pro-Mac info, software discounts, programming jobs and Windows nightmares (*snicker*) that we 4% never have to deal with. And as this page illustrates, those Mac nuts can be ever so helpful. To wit:

I received 184 responses, including programmers from Canada, England, Japan, New Zealand(!) and Vietnam(!!) (Wow, does EarthLink have a POP there??) My favorite was the Windows programmer who wants to write for Mac in his free time (you go, Matt! Woof, woof, woof!!)

Two initial pieces of advice became apparent:

1. Learn a language first, then learn the Mac Toolbox (the Mac-specific routines like the grow box in the corner of the window, etc.)

2. Get the latest documentation and books that you can. The Mac OS is a moving target; Apple is always tweaking and improving. A BIG case-in-point is OS X; Jobs asked for the elimination of the least-used 30% of the Toolbox "calls" to make the OS run faster and smoother.

Now, onward in our education!


Well, I guess I asked for it; I had forgotten how many different programming languages were out there! (There are actually over 100.) As one respondent said, "The more I learned about programming, the more my language of choice changed." Like anything, each one has its benefits and each its concerns.

BASIC (74 responses)
Far and away the most popular response, for 3 reasons:
  1. It's easy to learn.
  2. It's been mentioned on the EvangeList many times.
  3. I mentioned using (AppleSoft) BASIC myself 15 years ago.
Remember though, as the name implies, the language is somewhat rudimentary. You won't be able to access all of the Mac Toolbox calls, and therefore may not be able to program everything you want.

C / C++ (~40 responses; it was sort of assumed in my post)
Fast and ubiquitous (that means "it's everywhere"), but much more complex and difficult to learn. Some even said "frustrating" and "hate it", but it is essentially the de facto standard that Mac AND Windows apps are being programmed in today. Because of its complexity, you'll have a steeper learning curve, but you can create quick, professional quality software. One writer suggested that C was easy, it was learning the 4000 Mac Toolbox routines that was difficult.

C is a subset of C++; more than one source suggested starting with C++. Yet another claimed you must have a foundation in C before starting to learn the object-oriented approach of C++, because most books' examples are in C. *sigh*

AppleScript (9 responses)
AppleScript is the Mac's "built-in" programming language. It's slower than the high-tech C, there's a lot you cannot do with it, and there's less documentation, but "for smaller tasks, it can be a true gem". One interesting example is cgi scripts for a webpage. Another advantage is the use of common English commands.

There is no user interface, but a complimentary piece of software exists called FaceSpan that adds graphical elements to your AppleScript applications, such as menus and dialog boxes.

And there is a new editor for AppleScript, called Smile. It claims to make AppleScript even more friendly. "Even children" can use it, say the creators.

MacPerl (3 responses)
This is another scripting language like AppleScript, but it is based on Unix. It is used extensively in designing websites.

These languages all received mention by one or two members:

Java  ("easy, even fun", but doesn't use the Toolbox)
Pascal  (included in the CodeWarrior development environment, see below)
Objective-C  ("much better than Java"; came to Apple from the NeXT acquisition and may be incorporated into OS X)
Prograph CPX ("A very good first programming language... the only [one] truly visual... my 13-year-old could follow the tutorials.")
LISP  (it's been around for 40 years)
Chipmunk BASIC  (equivalent to AppleSoft BASIC that I worked with in 1982!)
tcl  (cross-platform, "useful in creating graphical user interfaces")
Python  "extremely well-designed and useful"
4th Dimension
Mops  (public domain, "good for beginners... more productive")
Squeak  (free, all platforms, "the only completely object-oriented language")

Personally, I'm really looking for the most common, supported language, especially as a beginner. Once I can whiz around on the standard, THEN I'll look at the tweaky stuff. Even if they are "better", I wouldn't want to learn how to drive in a Lamborghini.

menu at top

Development Environments

RealBASIC (51 responses)
Positive comments abound for the most popular piece of BASIC programming software: "very-Mac like", "much easier to learn" (than C), "one of the best programming tools", "makes programming enjoyable", and simply, "amazing". A few users said they wrote small, running apps within hours. It won't take up lots of space on your hard drive (3 MB!), there's a lot of documentation, it supports Java and the next version will even compile for Win95.

RealBASIC costs $100, students $60, and there's a downloadable free demo that lasts 30 days.

The only downside is the lack of total access to the Mac Toolbox (you CAN use PowerPC shared libraries and HyperCard XCMDs), and the apps you create with the demo are limited to 30 days also.

FutureBASIC (12 responses)
FutureBASIC is a complete Mac development environment - you can use the entire Toolbox. It only compiles to 68K, but there is supposedly a PPC-native version in beta. It has been called "high-powered and fast", with "the look and feel of Mac". It costs $169, and was a 1997 MacTech / Macworld Editors' Choice Finalist.

UPDATE: Now there's a version 3, which generates code that runs 4 times faster than v2. You can download a 30-day demo for free.

Visual MacStandardBasic (9 responses)
Another version of the BASIC drag-and-drop approach. It normally costs $100, but you can download a demo for free. It compiles to 68K, PPC-native or FAT (both).

A recent post from EvangeList moderator John (Digital Guy) Halbig stated that he had received many complaints from list members about either bugs or support. I would do more research.

DiscoverCodeWarrior (38 responses)
Codewarrior is the most popular development environment for the more complex C and C++. As the "compiler of choice", it was called "great", "and definitely the way to go" because "everything else falls short".

CodeWarrior comes in many different flavors:

CodeWarrior Pro ~$390
Full-featured commercial version with plenty of examples included. You can code C, C++, Pascal or Java, for the Mac (PPC-native) or Windows 98, 95 or NT. There are programming examples and online books included.
Metrowerks CodeWarrior Pro page
Buy CodeWarrior Pro  (no obligation)

CodeWarrior Academic ~$99
Almost identical; you can write shareware, but not commercial software and it's discounted for students.
Metrowerks CodeWarrior Academic

Discover Programming for Macintosh ~$49
This is the good value that I first found in my research and mentioned in my post. Others called it "a great starter set", "excellent", and "worth every nickel". An entry-level product, it codes only in 68K (emulated on PowerMacs), you can't print the online books, and you can't sell your programs commercially (shareware is OK). Some people thought the 3 online books were not of much value, but others raved. There is Apple Guide interactive help for each example in the books, and also reusable code.
Metrowerks Discover Programming page
Buy Discover Programming for Mac

Also, be aware that Discover takes up 100 MB itself, and another 100 MB for the books and example code...

CodeWarrior Lite (free)
Included on many CDs that come with various books, this version cannot create projects from scratch. It gives you a taste of programming by letting you play with included code samples.

Was downloadable from the Metrowerks website for free, but I can't find it any more. Anyone?

MPW (Macintosh Programmers' Workshop) (4 responses)
This text-only compiler was called "rather intimidating" and "not the friendliest at all". So why bother? Well, it's from Apple, it's free and it's supported.

HyperCard / SuperCard (5 responses)
"Cheap and easy to use", and even "programming for the rest of us". These are more multimedia authoring tools ala Director than what I consider programming environments. They utilize a "card" metaphor, not unlike writing information on 3x5 index cards. And you can add buttons or popup menus to each card as well. SuperCard is a "more comprehensive version" of HyperCard, while both are somewhat slower than C or REALbasic (not the best with which to write games).

Easy to learn, costs about $96.
Apple's HyperCard Site
Buy HyperCard
SuperCard Site

Other development environments mentioned were ThinkPascal, TransSkel and MachTen's CodeBuilder which includes the same languages as CodeWarrior, plus Objective-C, Fortran and Ada.

menu at top

Other Software

A resource (icon, folder, etc.) editor from Apple. Unsupported, but free, and everyone uses it.

There's an interesting website called ResExcellence which is solely devoted to using ResEdit. It has replacement splash screens, startup screens, over 100 previous ResEdit modifications, and online forums to discuss edits, tips and tricks.

NOTE:  You can completely futz up your whole Mac by using ResEdit improperly. Always work on a copy of whatever you're modifying, and be careful.

The other popular resource editor, Resorcerer, costs $250, but is much more fully-featured. I should hope so!

Acrobat Reader
You will need this free software to read most online books (files that end in ".pdf").

menu at top

Programming Books

Lots and lots of reading material, kids...

Learn C Learn C on the Macintosh by David Mark (20 responses)
This is the most highly recommended book, and not just because I mentioned it. Comments included "excellent beginner's guide", "top notch", "best I've seen", "a handy reference", "a good primer" and "the one book I needed". Be aware, however, that it evidently makes no reference to the Mac Toolbox, and negative comments included "a bit long in the tooth", "others do a better job of explaining" and even "terrible - returned it". (There's always one in the bunch!)

There is a CD included that has code samples. Also, this is one of the free online books that comes with the CodeWarrior Discover package.

David Mark has written other books on Mac programming as well; I included 4 responses for Macintosh C Programming Primer because it's essentially the same thing, but the specific title was written in 1992 (Volume 2 is out of stock). That's why I'd go with Learn C.

Macintosh C: A Hobbyist's Guide by KJ Bricknell (17 responses)
This is an online book, free to download, that is totally Mac-oriented and current (OS 8.5).

It was called "extremely good" and "great", but I must tell you, I got confused within a matter of pages, because it assumes some previous programming experience.

But again, it's freeee!

Mac Programming for Dummies Mac Programming for Dummies by Dan Parks Sydow (12 responses)
This book's title sort of tells it all. It gets high marks for understandability, but caveats for usefulness. "Good, but won't get you far", "decent, but by no means exhaustive" and "great up to a point" were typical comments. It seems to take most of the book with one example of a very simple program, causing one reader to call it "250 pages of Hello World - a waste of time and money".

Perhaps illustrating this point, the chapter entitled "The Moment of Truth: Writing a Mac Program" starts on page 197.

But don't get down on Sydow for his most rudimentary book. He has written many, and some recommended "anything by (him)".

Inside Macintosh by Apple Computer (12 responses)
Understandably, Apple has an entire series of technical manuals on how to program its computers. But the amazing thing is, they're all available for free downloading! In hard copy, they would cost you hundreds of dollars. Amazon has them all on a searchable CD for $70, but if you've got the time, you can get them for nothing. (I've already downloaded 58 MB!)

I would at least take a peek at Human Interface Guidelines. It's over 300 pages on what makes the Mac so wonderful to use, and why Windows users just don't get it.

See also under Other Resources - Apple Developer Site.

Foundations of Mac Programming by Dan Parks Sydow (7 responses)
The intense side of Dan Sydow! Over 700 pages, it goes in depth. "Excellent" and "a good follow-up to Discover Programming" (software) but perhaps "dated" and "a bit dry". Sounds like every textbook I ever owned!

Buuuut.... it's currently out of print. If you click on the title link, you'll go to Amazon's page, where they suggest checking back occasionally to see if it's been reprinted.

Hey, maybe if enough of us clicked there...

Programming Starter Kit by Jim Trudeau (6 responses)
This is another huge book, and also included in the Discover Programming software. While "highly recommended", "terrific" and "explains things well", it can be "intimidating", "confusing" and "far too advanced for beginners". In their Discover package, Metrowerks suggests you start with Learn C, then read Starter Kit. An EvangeLista concurred: "It integrates the specifics of the Mac, but I wanted a better understanding of C first".

Starter Kit The paper version seems to be out of print, but I found the same title as a CD "with an 800 page tutorial" and no author listing. I'm not sure if it's the Trudeau book. (If you know one way or the other, please email me.)

C++ in 21 Days Teach Yourself Mac C++ in 21 Days. (1 response)
This one also appears to be out of print, but you could still try Amazon; they search for stuff, too. Here is a (pay) downloadable version. I flipped through the Windows version at the store and liked what I saw. It's basically 21 chapters designed to be read one a day, with exercises and summaries. That seemed to be a very common-sense method of learning.

REALbasic REALbasic: The Definitive Guide. (1 response)
Hey, it's by a real live PhD. There's more info and tutorials at his website.

Several other books were mentioned by one person each. Visit your local Barnes & Noble, Borders, etc;  there is usually a separate section called Programming or Languages. Be prepared, though, to find only a handful of Mac-specific books amidst the hundreds regarding The Dark Side.

Online, just search using words like "Macintosh C++ programming", etc. You can use this search box now if you'd like:

 Search: Enter keywords... logo

Amazon's good 'cause of their ancillary information, like other books by the same author, and other titles ordered by people who bought the book you're looking at.

menu at top

Other Programming Resources

Apple Developer logoApple Developer Site (12 responses)
Wouldn't ya know it, Apple has a whole giant website devoted to the programmer / developer. My favorite part is the Inside Macintosh series of downloadable books mentioned above, but there are other resources available here as well, such as software, sample code and third-party links. They even have a Beginning Programmer page.

MOST logoThe MOST (6 responses)
This sounds interesting. MOST stands for Macintosh Online Students and Teachers. It's essentially mentored study online, and it's free. It's sort of like the EvangeList meets this summary: a mailing list of volunteers and students learning Mac programming. You might even be able to get the discounted Academic version of CodeWarrior through them.

PencilTake a class (6 responses)
This may be obvious, especially if you live near a college or university. Remember also adult secondary education, they should be inexpensive. But I'm sure the Mac courses are harder to find, what with our supposed "niche" status. I would scan the literature or contact the teacher to verify that the information being taught is either Mac-specific or totally platform-independent.

MacTech logoMacTech Magazine (3 responses)
A monthly developers' magazine, available at the major bookstores. Again, mostly for knowledgeable programmers, but there is a beginners column.

Developer DepotDeveloper Depot (2 responses)
This is a commercial website with all the software mentioned here and much more. Check it out!

And, of course, we have the flip side to the Web: UseNet newsgroups. Subscribe your newsreader to these groups:


If you're just starting out like me, 98% of it will fly right over your head, but once you start to learn, they're good resources for help and information. Metrowerks tech support actually monitors these newsgroups.

Search Engine / Directory
DevSearcher bills itself as a "programmer's search engine". It's a huge, searchable directory of developer and programming sites.

menu at top

pencil My conclusions

Gets confusing, doesn't it? Someone once said "Advice is just common sense that people hear from their friends, and then end up ignoring anyway."

Personally, I downloaded the RealBASIC demo and started the tutorial. Then I got busy with the rest of my life, so the 30 days ran out. I discovered that if you toss the Prefs file, you get another 30 days, but I haven't kept studying. Darn day-job! Someday soon I'll buy Metrowerks' Discover Programming, and see how good the included books are. If I get to the point where I'd like to put my software on the Net and/or charge for it, I'll advance to the Pro version.

And I had to add this little story: As I was searching through all the programming books at the bookstore, I chanced upon an interesting title:
"Microsoft's Techniques for Developing Bug-Free C Programs".
Much to my surprise, there were actual words inside.   : )

menu at top

And finally, a few words from the pulpit...

To all of you who responded to my request, thank you from the bottom of my heart.

We Macintosh fans have weathered some tough times, but we keep the faith in a platform that is sometimes difficult to defend, especially when our most potent argument is often "It's just... nicer." So my heart is filled with joy at the fact that 42 EvangeListas said "Please send me the results, I want to program too!", and another 10 said "If you ever have any programming questions, contact me."

Remember this: Every application, every utility, every great, wild piece of shareware was initiated by one person. One single person who decided "Hey, this would be cool" or "Hey, people might use this" or "Hey, if some huge sacred-cow mainframe company uses my crappy quick-and-dirty rip-off OS, I could become a paper-billionaire and get indicted by the Department of Justice!"

(OK, bad example. How about "Hey, I've always wanted the MacOS to do this whizzy hack." Better?)

So, I truly believe that you may be the one to write or help write the next AppleWorks, Quicken, Up-to-Date, Communicator, StuffIt, Norton Utilities, Quake, Myst, or Kaleidoscope. And it starts with the resources listed here on this little webpage. (The power to publish... to the world! MOO-HOO-HAHAHAHA!!)

So, kick some ass, Mac programmers. We are the ones who make the incredibly technological, rapidly-changing lives all around the world a little... nicer.

Fight the good fight  -  Macintosh.

Kristian Idol
November 1998

(If yer into movies, Kris just directed a cool 35mm short film! Check out "undeserted")
waving computer

"Don't anthropomorphize computers.
They hate that."

Netscape Open Directory A member of
The Programmers Webring

[ Prev | Random | Next ]

The URL of this page is:
Last updated 1 June 2000

home     why     facts     graphics     program     megamall     email