I'm learning to program on a mac, with the long term goal of making a iphone app. Therefore I made myself a road map of learning the most basic of language, with is C. Then we'll move on the object-c, and finally to cocoa touch or iphone SDK. Why learn C, first when I can go straight to iphone SDK? Well, it's a lot like learning to run, you first have to take the baby steps, and that is what C is. Once you get a good understanding of C, I'm told you can apply it to multiple languages.
What is C? Well, from what I gather, it is a standard language develop by some really smart programmers. Since it is an establish standard, you can program in C on Mac, PC, or any other computer and the computer will understand you. I will try to write it so that anybody who has no programming experience can follow (like myself). By showing the steps, hopefully I can understand things better myself. I always felt you really do not know something unless you are able to teach it to others.
Since I've read the first book, Learn C on the Mac, I'll tell you what is needed. Obviously, you need a Mac, but more specifically an Intel Mac if you want to program for the iphone. I bought an iMac for this purpose only, but you can actually do this on the mac mini or one of the cheaper mac books. I picked the iMac 24 inch because of the large screen. The large screen area makes having multiple items open and all on one screen a pretty time saving ability. Next you need to download from the apple store the iphone SDK. You can download that for free and it comes with some pretty neat programs. I elected to sign up for the iPhone Developer program for 99 dollars. Why? Well, it allows me to actually put my program on my iPhone and see how it runs and getting an app into the app store will be our long term goal.
The iphone SDK comes with the programming tools you'll need to program. For the Mac the main programming tool you need is Xcode. Some macs have this preinstall already, so check your mac, to see if you have it. It should be in your Hard Drive folder under developer. Then check the applications folder and it should be an icon with a hammer on it with a blue blueprint in the back ground. For C programming that will be where we'll spend most of our time.
Xcode when you click on it, a screen pops up that says Mac os x resources and Mac Dev Center. Play around with this since this a great resource for understanding what the programming language can do and it can direct you to answers of questions you may get later on. You can close that window. Next your your apple icon on the top left screen when you click on the Xcode, You should see File, edit, view, project, build, run design, scm, window, and help. I don't know what all of those are use for just yet. But if you click on File, a window should popup, and you will select new project.
New Project. A window pops up will a list of types of programs you want to make. I do not know 99 percent of those. Hopefully, I will know those someday. In the Mac os X section, I select command line utility, you should see an icon, called Standard tool. That is where, You and I will be writing our first codes. Double click or select that icon and you will see that it brings up a pop-up window and ask you what you want to name this program. So far everywhere I've read, says you'll start out by writing a small program call "hello world". I elected to keep that name and keep the tradition going. It will also ask you where do you want to store your program, I elected to keep it in the documents folder.
So far so good. We learn how to create a program. Next step is learning the ins and outs of this first program

No comments:
Post a Comment