Thursday, May 14, 2009

Let's Get Started

Well, lets start off with the most basic of questions, why do we need to learn a computer language to program a computer?  Well, from what I read so far, a computer only speaks in 1 and 0's..like this 0100101001010101110.  Humans have a really hard time speaking like that, though there are some people who can actually interpret those 1's and 0's.  There for, we need an intermediary, which is where programming language comes in.  The language that you decided to work with will translate what you type or want the computer to do, to those 1's and 0's.  

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

Wednesday, May 13, 2009

Day 1. Gathering the resources

I decided to make a blog chronicling my adventures in making an iphone app.  

First: A little background, I have no programming experience what so ever.  I did enroll in a beginning programming course in college but had to drop it due to conflicts with other classes.  I find this task quite daunting, since the programming language is as foreign to me as a language from another country.  My career is in the medical field.  I love my Iphone and love all the applications for it.  I wanted to make an app and put it in the app store, not only for the monetary gains, but mainly I wanted to expand my horizons.  I always wanted to make video games, since that is one of my main hobbies.  Learning to make an iphone app, will be a means to that end.

What I have gather so far.
I suggest those that want to dip their toes into programming, you should check out a website call Tilestack.com.  I program one stack called Mr.Sage.  That was my first programming effort of any kind.  Tilestack lets you play around in a environment that is more friendly to someone who knows nothing of programming.  It takes most of the intimidating coding out of it.  Infact if you make a stack good enough, they would even publish it in the iphone app store.  There are draw backs, since if you publish onto Tilestack there are chance people can steal your idea, as I found out.  And often times what you think is a good stack does not correspond with others, and your stack may not be publish.  But as a start, I find it a great tool to know the basic of programming.

Books:  I bought these books since I did a quick google search, and they seem to be the most recommended.

1)Learn C on the MAC by Dave Mark, publish by Apress
I find this book pretty easy to understand and it was written with people who have no experience in mind.  I have read this book through and was able to accomplish so of the simple programming.  The book becomes harder to read about half way through, but stick with it.  I had to reread it several times already.

2)Learn Objective-C on the Mac by Mark Dalrymple / Scott Knaster, publish by Apress
I only started to read this book, since it just came in the mail from amazon.
So far, some of the the things, I learned from the first book, carries over to this, but it is a bit more difficult to follow.  Probably will have to take it slow....really slow.

3)Beginning iPhone Development: Exploring the iPhone SDK by Dave Mark/ Jeff LaMarche, publish by APress.  
I have read only the first two chapters, from what I know this will probably be difficult to follow if I do not understand objective-c (which I don't yet).  This seems quite a bit different from C language, but we'll know more once I go through the book in more detail. 

WebSites:
So far the best website I found is iPhone development Central.  They have video tutorials, though I find most of them difficult to follow from a non programmer perspective.  I decided to join their forums since they appear to be a community of programmers from different level of expertise.  Some of the members are friendly and would gladly give a helping hand to newbies. 

Another great website is called Masters of the Void.  This is essentially learning C, but in a more truncated form.  If you do not want to buy the book, this would be the first step I recommend.  

Well, That's it for now, back to reading and programming.