Newbie Mac Programmer Hints

People occasionally tell me that they want to learn how to program the Mac and ask me where they should start. Well here's my list of things to do, in no particular order:

  1. Read "Macintosh Human Interface Guidelines". This is the first step for anyone attempting to program a Mac simply because it gets you into the spirit of Macintosh.
  2. Discard old ideas. If you've programmed GUIs before this won't be a problem, but if you've been a CLI programmer you will need to completely rethink how your programs are written. There is no stdout on the Mac, everything is event driven, all your programs turn upside down.
  3. Read (new) "Inside Macintosh: Overview". A very good introduction to general Mac applications.
  4. Investigate real high level languages. I've done a lot of Mac programming in HyperCard and, while it's not fast and it limits you HI, it certainly is a big productivity win. At the moment I'm investigating FaceSpan as a replacement but there are lots of other tools around, eg SmallTalk Agents and Prograph.
  5. If you insist on programming in a low-level language, use Pascal (-: If you're not going to use Pascal, make sure you understand the difference between C and Pascal calling conventions and strings because they will haunt you throughout your development.
  6. If you intend to program in Pascal, C or Java, use the Metrowerks CodeWarrior development environment.
  7. If you're working an a full blown Mac application, find and use a class library. Keeping up with all the various aspects is too hard for mere mortals these days. But if you're just working on a simple utility, eschew the class library 'cause the learning curves are pretty steep. If you program enough small utilities you'll eventually generate your own libraries, possibly a better solution all around.
  8. Darko's Maxim: Set your ports and lock your handles.
  9. There is no point 9.
  10. Get a CD ROM drive and a copy of the following CD ROMs:
  11. Make use of new technologies. If you need to do complicated I/O programming, use the Thread Manager 'cause it really does pay off. If you're writing networking code, use Open Transport becasue it's easier. Don't try to support System 6. If you're program needs Colour QuickDraw, compile it for the '020 and above.

Many of these ideas are blatantly plagarised from Peter N Lewis' FAQ entry on this subject. In turn, many of the ideas on this page have been blatantly plagarised by the Apple Developer Support Introduction To Macintosh Programming page, which is OK 'cause I helped write it.


Quinn "The Eskimo!"
20 Jul 1998