Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!decvax!ucbvax!pasteur!ames!sri-spam!rutgers!im4u!ut-sally!ut-emx!auscso!mentat From: mentat@auscso.UUCP (Robert Dorsett) Newsgroups: comp.sys.mac.programmer Subject: Re: Beginning Mac Programming Message-ID: <2565@auscso.UUCP> Date: 24 Feb 88 08:31:03 GMT References: <8W8QYby00Xc5AFE04R@andrew.cmu.edu> Reply-To: mentat@auscso.UUCP (Robert Dorsett) Organization: Austin UNIX Users' Group, Austin, TX Lines: 191 Summary: You'd better appreciate this... :-) In article <8W8QYby00Xc5AFE04R@andrew.cmu.edu> mw2k+@andrew.cmu.edu (Miles Asher Weissman) writes: > > A few people on the net have mentioned that they would like to >start programing with there Macs. First a word of warning: > > IT IS GOING TO COST A RESPECTABLE AMOUNT OF MONEY > > The above should read ( about $200 + ). The first thing all >Mac programmers need is Inside Macintosh I-V ( yep that's right, all >FIVE volumes costing between $20 and $27 each ) These tomes will in >NO way teach you to program the Mac, it will simply tell you the routines >and how to access them. > To actually learn programing on the Mac, there is a new book... I've been programming the Mac since shortly after it was introduced, and have, on occasion, helped/watched other people learn the Mac. The following are some observations: 1. It WILL take a lot of money. Depending on your language of choice, plus documentation, at least $250, probably more. More importantly, it will also take TIME. 2. You IDEALLY should already know a programming language before attacking the Macintosh. However, many of the newer Mac compilers (Turbo Pascal, Light- speed Pascal, Lightspeed C, etc) support a "vanilla" interface that separate the "formal" implementation from the Mac-level programming. You can thus use the Mac to learn how to program, without bothering with the fact that what you're learning to program on is actually a Macintosh. From there, most compilers will provide a stepping stone to get "deeper." Many easy- to-use compilers also provide very powerful development capabilities (the last two sentences aren't mutually inclusive: there are programming environ- ments which let the user use some Mac concepts, while preventing them from using others). If you are a total novice at computers, and have no real computer background, you might wish to forget all about it, and look at Hypercard, instead. I know a number of people who have fiddled around with programming for years, finally obtaining Hypercard, and being able to do exactly what they wanted to, with a minimum of effort. As for the question of "what language is best", that's up to you. For novices, the Pascals are more useful, since the specifications and examples in Inside Macintosh (see below) are in "pascal." I personally find C (Lightspeed) more useful, but I know people (all beginning C programmers) that find C's way of passing parameters and dealing with data structures a wee bit too difficult to resolve with the "Pascal" definitions in all the references. C has an advantage in that it's a systems programming language, and brings the user closer to the computer. I don't have nearly as many "inexplicable" bombs since I switched to C, mainly due to the fact that one thinks in terms of the machine representation of what one's working with, rather than abstract concepts. Other people might find that a disadvantage. I do not recommend purchasing any of the BASIC's, unless you must. BASIC is an anachronism, and has no place on the Mac. (in my humble opinion) If you buy a BASIC, odds are that you'll find it unusable within days (if you plan on doing anything fancy), and will be out another couple hundred dollars for a Pascal or C compiler. My apologies to those who have already developed a language preference... 3. The "core" Macintosh reference is Inside Macintosh. Inside Mac is the definitive reference to the computer, the Toolbox, and the operating system. The ToolBox and most of the OS is located on ROM chips in the computer. I do not agree that all five volumes are "essential" for programming. That would be approximately 2000 pages of information, and would relate to all four computers (64K ROM Mac's, 128K ROM Mac's, SE's, and II's). Approximately, each is: Volume I: User Interface stuff, applicable to all Mac's. Essential. Volume II: OS support stuff, applicable to all Mac's. Useful, but later on. Volume III: A summary of all the information in Volumes I and II. It's pretty worthless, all told, but contains the INDEX for I and II. Volume IV: Additional stuff in the 128K ROM's: Mac Plus. It applies to the SE and II as well. Has its own index. Volume V: The SE and II. Obviously, an "old Mac" owner need not bother with information about the Mac Plus, SE, or II, and can easily get by with Volume I to begin with; Volume II as he gets more fancy (which could be days or months) ; and Volume III as he gets serious. Programs written to the guidelines of Volumes I through III will run (supposedly) on all Macintosh's. If you wish to buy volumes I-III at once, be aware that there's a bound hardcover version, containing all three volumes, out there somewhere. You might have to special-order from Addison-Wesley, but it exists. The cost in 1985 was $75 or so. It has no structural advantage: it's literally volumes I-III, bound in sequence, merely in one package. It's slightly more convenient having everything in that one package, but my three-year-old, well-used copy is starting to show its age (the spine is sagging, but pages aren't coming out). 4. The main source of ongoing information about the Macintosh are the Macintosh Technical Notes, which used to be distributed by Apple. They are now published by the Apple Programmer's and Developer's Exchange (see below). There are 200 or so Tech Notes, of varying quality. Many describe pro- gramming techniques; other detail bugs. A few quite condescendingly teach how to program. They're quite useful, all told, and a hardcopy of each should be obtained and bound in some manner. 5. "Books" have varying appeal to people. I know many people who buy books like they're going out of style, start them, give up or find them inap- propriate, and stick them on a shelf, to form a really impressive-looking library. If you must buy a book, by all means, borrow it from someone, or check it out from a library first. Computer books cost $30 a shot these days (or more), and there are some real stinkers out there. A lot of them misrepresent themselves; most suffer from being "really really basic." Many of the "basic" books are not very well written, or take a "make it up as we go along" attitude. I know someone who is learning from a tutorial for Turbo Pascal, which purports to teach how to program the Macintosh while teaching Pascal, and never mentions how to initialize the Toolbox! The same book also has glaring typographical and conceptual errors in the simple program solutions students are supposed to compare their work with. There are not very many "advanced" books. My personal (hacker) attitude is that nothing beats a good old reference manual. Many people will disagree. It's impossible to caution good judgement without sounding condescend- ing, but I've seen a lot of money wasted on garbage. One inevitable tendency is for authors to "pad" books, print them on heavy-quality paper (usually with cheap glue), present a relatively small amount of original information, then go off on some tangent which isn't really related to the subject matter. Do not expect to buy a book instead of Inside Macintosh. Inside Mac, while intimidating for many people, supplies a certain "structure" to the task of learning how to program the Mac, and is certainly handy as an absolute authority for the inevitable typos. Do not expect to buy a book as a "manual" for a pirated development system, and be able to advance to the "systems programming" level of the Mac. Spend the money for the real thing; if you choose your language/compiler carefully, you'll get a good level of support and/or documentation. 6. In the Good Old Days, Apple sold an "information package" to developers, which (memory tells me) was $200 for Inside Mac, as it was being developed, a bunch of utilities, etc, and a "published" version of Inside Mac when it was released in 1985. Apple took a bath on this, and pawned off the "infor- mation distribution" to a branch of the Apple Puget Program Library Exchange, one of the largest Apple user groups on the planet. The company thus formed was APDA, the Apple Programmer's and Developer's Association, which ostensibly is the easiest way to get Mac-related information. The net has reported varying quality of support from APDA over the past year or so, but we don't really seem to have a choice in using it if we need current information. To utilize their services (to buy from them), you have to be a "member", which is $20/year. The address to write is: Apple Programmer's and Developer's Association 290 SW 43rd Street Renton, WA 98055 They'll send you a fat catalog with all the goodies (some useful, some not), if you ask nicely. Beside Apple-originated products, they also try to sell as many third-party packages as possible. In many cases, you can get a better deal on these third-party packages mail order or through the Univer- sity Consortium. My overall recommendations in programming the Mac: 1. Be sure you really want to. Learn about the subject before spending any money. Decide what you want to do. Resolve yourself to the fact that, if you're a total novice, you won't be making professional-quality software for a long time. 2. Avoid interpreters (BASIC, MacPascal) like the plague. 3. Buy at least Inside Mac I-III IF you intend on doing any systems program- ming. If you own a Plus, buy v. IV. If you own a II or an SE, buy I-V. 4. Be skeptical with books that presume to "teach" how to "program" the Mac. There ARE some good ones out there, but most are garbage. Keep in mind that if you don't want to do any systems programming on the mac, but just wish to "learn" a language (Pascal, C, BASIC, etc), there are books written about the language proper, which are of *no* relevance to the Mac, and which are entirely suitable (and probably better-written) for learning. 5. If you're experienced, go straight to Inside Mac, get the APDA catalog, and make your own decisions from there on how you want to learn. -- Robert Dorsett {allegra,ihnp4}!ut-emx!walt.cc.utexas.edu!mentat University of Texas {allegra, ihnp4}!ut-emx!auscso!mentat at Austin mentat@walt.cc.utexas.edu