Industry guru Dave Taylor answers free tech support questions about a wide variety of business and technical topics, including blogging, Google AdSense, MySpace, Sony PSP, Apple iPod, Mp3 players, management, Linux, SEO, Mac OS X, Facebook, Twitter, LinkedIn and Microsoft Windows.

How do I get started in Mac programming?

I used to program my TRS-80 in BASIC when I was in high school, and took a class in Pascal in college. Now I want to try to write applications for my Mac but don't know where to start. Help!


Dave's Answer:

Don't feel bad about your bewilderment, because Mac programming is nothing like the 10 PRINT "HELLO"; 20 GOTO 10 stuff you did in the early '80s. Back then, programs were much more self-contained: You just started writing, maybe calling in an external file or two, and ended up with a simple text file that was pretty self-explanatory.

But over the years, three things happened.

First, programming become less about telling a linear story and more about putting together components. Second, new technologies (such as the Mac GUI we know and love) appeared, demanding new programming techniques and tools. Third, the field of programming matured, so today's programmers are expected to know about such concepts as objects, inheritance, and garbage collection before they even write a line of code.

The good news? Tools and information about programming are far more abundant and easy to get than they were back then. Apple's programming tools are excellent and free, while the Web hosts millions of pages of documentation and tutorials.

Let's start with the first subject: the tools. If you want to program for the Web, all you need is a text editor and a Web server, and voila! You're off and running in JavaScript. But if you want to write real Mac applications, with windows and menus and such, you need Xcode.

Mac OS X: Apple Xcode: Demo Page

Xcode is a package of development tools that's included on your Leopard installation discs -- we showed you how to install them. However, I'd recommend downloading the latest version from the Apple Developer Connection (ADC), because Apple updates Xcode fairly frequently. (As I write this, the latest update lets you program full-featured apps for your iPhone. Fun!)

The ADC is now broken into two categories: Mac Dev Center and iPhone Dev Center. You'll need to register for one of them, but it doesn't matter which, as both lead to Xcode. ("Online membership" is free; "Student," "Premiere," and "Select" memberships give you additional benefits such as hardware discounts and technical support.) Once you're registered, you'll have access to a wide range of reference and tutorial material as well as the tools you need to make your first Mac application.

Apple Developer Connection (ADC)

But there's a head-spinning array of information there. What will get you up and running fastest? I tried a few tutorials, and like the Cocoa Application Tutorial, which leads you from launching Xcode and related tools through a working (if simple) application. You might find the Mac's native Objective-C language a bit baffling at first, but don't worry: You can also use C, C++, or other languages. The important thing at this point is to learn how it all fits together on Mac OS X's advanced architecture.

It should be mentioned that there are other ways of programming your Mac: For example, the application Thinking Rock is entirely in Java, and features functional menus and windows just like a Mac program. But if you want something that's truly, fundamentally, unmistakably Mac-like, go with Xcode and Objective-C.

Happy programming!

Credit: Tom Geller is a freelance technology and business writer in San Francisco. His book, Save My Home: 10 Steps to Avoiding Foreclosure will be published by Kaplan in May.


Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Simpy.

Subscribe!

Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader.

Comments
Rather amazingly, there are no comments on this article yet.

I have a lot to say, but ...
Starbucks coffee cup I have a lot to say, and questions of my own for that matter, but most of all I'd like to say thank you for all your efforts on this Web site by buying you a chai!

I do have a comment, now that you mention it!









Remember personal info?


Please note that I will never send you any unsolicited commercial email. Ever.

While I'm at it, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site.









Search
Find just the answers you seek from among our 1700+ free tech support articles by using our Lijit search engine.


Help!





Subscribe to
Ask Dave Taylor!

Add to Google Reader
Add to My Yahoo!
Subscribe in NewsGator Online

RDF   XML

Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.


Recent Entries
Join the List!
Join my author info mailing list, where you'll learn about my upcoming books, speaking gigs, and more!


Book Links
© 2002 - 2008 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site.

[whiteboard marker tray]