Saturday, January 29, 2011

Before we start

If you are reading from my first port you should be thinking "When the hell do I start coding?", at least that was what i thought when reading some tutorials.
Before we put our fingers on the keyboard and writing some code it is important that we understand how the IDE works.

There are two tools that you need to get familiar with: Xcode and Interface Builder.

Very briefly, Xcode is where you write your code and Interface Builder allows you to design the interface of you application. We will get into more detail on these tools later.

These tools work together in order to define how the interface will be linked to your code.
Basically, Interface Builder provides two things to you application, actions, for instance, when you press a button you are invoking a action, and outlets. The outlets are objects with which your program can interact to provide feedback.

Take this example, if you were writing a program that woud execute a task when you press a button updating a progress bar to indicate the amount of the task that has been completed. In this example, the button provides an action (when you press it) and the progress bas is the outlet that gives you feedback on the completion of the task.

First things first

So, one of the first things that some one asks when learning a new programming language is perhaps, "What should I already know before I start?".
Something that you should already know before starting is C.
Other thing that it would be useful is to have some knowledge about object oriented programming.

The language that we will use is called "Objective-C", it is a language that is derived from C but if you look at programs written on Objective-C you will find very little resemblances with C.

Maybe the second question you will ask is "What tools do I need?".
If you are learning to program for Mac OSX you probably already have all the tools you need.
You will need a Mac (obviously) and and IDE (Integrated Development Environment) called Xcode.

I'm not sure if the Xcode already comes installed when you buy a Mac but it is available on the installation DVD although I recommend that you download the latest version from the Apple website. (You will have to register as a developer)
At the time I'm writing this post the latest version is 3.2.5 but there are already announcements for the upcoming version 4, from what I've read, this version brings major improvements compared with the current version.

Welcome to my blog

Hi.
My name is Bruno and first I want to explain you why I decided to create this Blog.
For many years I've heard that everyone who buys a Mac never goes back to the PC again.
I always was a bit sceptic about this and kept working on my PC, until, last year I decided to buy one. My goal was to develop applications for my iPhone.
I've already programmed on several languages, so I thought that shouldn't be hard to learn a new programming language.

I've searched for simple tutorials to get me started and was on the YouTube that I could find a tutorial for my first program. Despite being able to write a working program, I could not understand most of what I have done, so I tried to get the knowledge I needed to understand what was going on.
I found out that it was easier to understand the concepts os the language if I try to write some Mac OSX programs first. So I'm not yet able to write an iPhone program, I'm first trying to understand the language itself.

I'm still learning so it's very likely that you will find errors on my posts.
The main idea behind this blog is to exchange and clarify doubts from programmers who are giving the first steps on Mac OSX programming. Here I will post my discoveries, and my own doubts as I learn.

Feel free to post comments regarding the subjet or just to tell me that my grammar sucks (I'm not a native english speaker so be patient).