PDA

View Full Version : I have never coded before, but I want to for iPhone. Where do I start?




Vegeta-san
Mar 7, 2008, 02:05 PM
I have never coded before a day in my life, but after seeing the keynote and all the things they were able to do and knowing that I can get good at anything I put time into, I want to try and code for iPhone. What are some good beginner documents that can help a complete newb out? I also need to start thinking about what kind of applications I want to make...:) Thanks guys.



rockstarjoe
Mar 7, 2008, 02:12 PM
I'm interested also, but my only coding experience was with BASIC waaaay back in the day. I have a good idea for a mac / iphone product but I have a feeling that learning objective-c might be too big of a project for me to take on. I might just be better off hiring someone to do it. Can anyone comment on the difficulty of learning to code from scratch like this?

Eraserhead
Mar 7, 2008, 02:16 PM
See http://forums.macrumors.com/showthread.php?t=449590 in the programming forum.

Vegeta-san
Mar 7, 2008, 02:28 PM
See http://forums.macrumors.com/showthread.php?t=449590 in the programming forum.
Thanks so much for that dude. So I'm guessing I can learn everything I need to from the iPhone SDK page then huh? Ahhh well, better get to it.

jav6454
Mar 7, 2008, 05:47 PM
I have never coded before a day in my life, but after seeing the keynote and all the things they were able to do and knowing that I can get good at anything I put time into, I want to try and code for iPhone. What are some good beginner documents that can help a complete newb out? I also need to start thinking about what kind of applications I want to make...:) Thanks guys.

Learn the basics in another programming language like C++. Then learning the new code will be easy :)

sourcery
Mar 7, 2008, 09:54 PM
Learn the basics in another programming language like C++. Then learning the new code will be easy :)

C++ is the last language a new programmer should learn. Especially when the language actually needed is Objective-C. Smalltalk would be a better choice, unless one simply starts with Objective-C itself.

Here are some references:

Beginner Programming Tutorial: http://showmedo.com/videos/beginner_programming
Python: http://programming-crash-course.com/
Smalltalk: http://www.chronos-st.org/Smalltalk-Getting-the-Message.html
Objective-C: http://www.otierney.net/objective-c.html

jav6454
Mar 7, 2008, 10:02 PM
C++ is the last language a new programmer should learn. Especially when the language actually needed is Objective-C. Smalltalk would be a better choice, unless one simply starts with Objective-C itself.

Here are some references:

Beginner Programming Tutorial: http://showmedo.com/videos/beginner_programming
Python: http://programming-crash-course.com/
Smalltalk: http://www.chronos-st.org/Smalltalk-Getting-the-Message.html
Objective-C: http://www.otierney.net/objective-c.html

Well, I found it easy to learn C++, I learned it 2 semesters ago and I am still learning it. Well, long story short, I have found C++ a very easy programming language to learn and implement.

Vegeta-san
Mar 7, 2008, 10:11 PM
C++ is the last language a new programmer should learn. Especially when the language actually needed is Objective-C. Smalltalk would be a better choice, unless one simply starts with Objective-C itself.

Here are some references:

Beginner Programming Tutorial: http://showmedo.com/videos/beginner_programming
Python: http://programming-crash-course.com/
Smalltalk: http://www.chronos-st.org/Smalltalk-Getting-the-Message.html
Objective-C: http://www.otierney.net/objective-c.html
Hey thanks for encouraging the discussion man....So even if I find a Cocoa beginners guide, you think I should start with 'Smalltalk" instead?

sourcery
Mar 7, 2008, 10:19 PM
Hey thanks for encouraging the discussion man....So even if I find a Cocoa beginners guide, you think I should start with 'Smalltalk" instead?

That depends. Smalltalk is the best way to learn object oriented programming--which is central to Cocoa and Objective-C. Objective-C is the most Smalltalk-like language other than Smalltalk itself. Some have plausibly argued that Objective-C is, in fact, just another Smalltalk variant.

But unlike other Smalltalks, Objective-C is also (and undeniably) some kind of C-like language. That dual nature adds complexity. On the other hand, Objective-C is the language you ultimately must learn.

I would start with Objective-C. If you find it too confusing, then get a basic understanding of both Smalltalk and C. Then, when you return to Objective-C, you should find learning it much easier [Note: Objective-C makes heavy use of both C-like and Smalltalk-like syntax, and uses both computational models.]

wizard
Mar 7, 2008, 10:31 PM
I have never coded before a day in my life, but after seeing the keynote and all the things they were able to do and knowing that I can get good at anything I put time into, I want to try and code for iPhone.

If you have not been exposed to programming at all do not assume that you can come to grips with it. The wash out rate for first year computer science students is pretty high. On the other hand don't let me stop you, all I'm trying to say is that it might take more time than you think to become good at it. It takes a long time to learn and develop the skills need to correctly structure a program. Laying down a line of code is relatively easy, it is the design effort that takes some effort.

What are some good beginner documents that can help a complete newb out? I also need to start thinking about what kind of applications I want to make...:) Thanks guys.
This opinion is a little different than what has been published here so far, but what I'm going to tell you is to do this: take a few night classes in computer science. It will do you a world of good to learn to do things the right way from the beginning. Learn on your own and you end up with difficult to understand and manage programs.

The alternative is a good book. I can't recommend an objective C book right now but feel free to look around.

Dave

mason.kramer
Mar 8, 2008, 09:29 AM
Watching a trained and experienced programmer writing code and then thinking "Yea, I could do that, all I need is a tutorial and an IDE" is kind of like watching a pro basketball player slam dunking and then thinking "Hey, that looks like fun! I guess I should go get a ball and a hoop."

I'm not saying don't try, all I'm saying is that you have to commit to a long road of practice and discipline before you will be any good at it.

Also, the lack of respect for the skill required is a little annoying. You'll understand once you get started.

Edit: and my pick for a first language is Ruby.

admanimal
Mar 8, 2008, 10:12 AM
Well, I found it easy to learn C++, I learned it 2 semesters ago and I am still learning it. Well, long story short, I have found C++ a very easy programming language to learn and implement.

If you think C++ is a very easy language to learn you are either brilliant or you don't really understand C++ as well as you think you do.

Masna
Mar 10, 2008, 08:08 AM
http://www.vimeo.com/768453

Above is a link to a great video tutorial for new iPhone programmers. Enjoy!

krye
Mar 10, 2008, 08:30 AM
I'm learning too. So far, I have found this book, http://www.amazon.com/Programming-Objective-C-Developers-Library-Stephen/dp/0672325861/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1205155717&sr=8-1 to be great. It assumes you have no previous programming knowledge and what's great is the author believes that it is not neccessary to learn C before learning Objective C.

Jeremy1026
Mar 10, 2008, 09:06 AM
http://www.vimeo.com/768453

Above is a link to a great video tutorial for new iPhone programmers. Enjoy!

That definately was a GREAT video. Thanks for posting the link.

yeroen
Mar 10, 2008, 09:23 AM
Well, I found it easy to learn C++, I learned it 2 semesters ago and I am still learning it. Well, long story short, I have found C++ a very easy programming language to learn and implement.

As some philosopher (I don't remember which) famously said: "I do not know what I do not know"

The basic mechanics of the bare C++ language (minus all the C/C++ APIs) aren't too difficult and the learning curve is comparable in difficulty to any other OO imperative programming language. But the devil is in the details, and the language abounds in subtleties that has kept the literature on C++ "gotchas" outputting at a steady clip for 20+ years.

Moreover the language constructs provide for a huge design space (Template Meta-Programming is Turing Complete!.. anyone?) In C++, to a greater degree than any other language I've worked with, there are many different ways to express a solution to a given problem. The differences between can be very nuanced, and only become discernible through hard experience.

ChrisA
Mar 10, 2008, 10:57 AM
Hey thanks for encouraging the discussion man....So even if I find a Cocoa beginners guide, you think I should start with 'Smalltalk" instead?

Yes. So many people think programming is all about learning the syntax specific to some programming language. It isn't. "programming" is all about learning to break a problem into parts and design interfaces between the parts and then break those parts into parts and so onand finally with the smallest parts to write a sequence of instructions, loops and conditional tests and data structures to build a part. You can learn this in Perl, C++, smalltalk or Java the only difference between them is small details of where you place commas and curly brackets. If you can write software in one language you can write in in another after a few days of study.

So learn programming first. Pick a language. An interpeted language is best because of the faster turn around. Smalltalk is not bad but if Objective C is what you want to learn in the end maybe pick one that is closers to Objective C. Maybe Python? Or just start with Objective C and put up with a longer learning curve. Whatever you pick, start small. Write some command line programs. You will need some intro level books. Web sites and forums lack depth. And do NOT fall for books that try to teach the syntax of some language. You need to learn the general concepts

Sbrocket
Mar 10, 2008, 11:24 AM
ChrisA speaks truth. Learning the syntax for a new language and APIs takes time, sure, but that's not what potential programmers (usually) get hung up on. Programming requires a methodical approach to a well-defined problem, a problem that you also define yourself. If you try to jump into a program haphazardly, you'll quickly become lost and not even know where to begin.

Oh, and don't bother with all the memory nastyness once you get to Obj-C and Cocoa...just use the built-in garbage collection. It'll save you a lot of trouble.

kainjow
Mar 10, 2008, 11:33 AM
Oh, and don't bother with all the memory nastyness once you get to Obj-C and Cocoa...just use the built-in garbage collection. It'll save you a lot of trouble.

Not if you're going to want to develop for the iPhone.

Found here (http://www.cimgf.com/2008/02/20/cocoa-coding-practice-old-school-vs-new/):

Note: iPhone OS does not support memory management using the garbage collection feature that is in Mac OS X v10.5 and later.

Sbrocket
Mar 10, 2008, 11:35 AM
Not if going to want to develop for the iPhone.

Found here (http://www.cimgf.com/2008/02/20/cocoa-coding-practice-old-school-vs-new/):

You're breaking my heart, kainjow... :p

So much for taking the easy route.

nokq
Mar 10, 2008, 12:11 PM
Watching a trained and experienced programmer writing code and then thinking "Yea, I could do that, all I need is a tutorial and an IDE" is kind of like watching a pro basketball player slam dunking and then thinking "Hey, that looks like fun! I guess I should go get a ball and a hoop."

I'm not saying don't try, all I'm saying is that you have to commit to a long road of practice and discipline before you will be any good at it.

Also, the lack of respect for the skill required is a little annoying. You'll understand once you get started.

Edit: and my pick for a first language is Ruby.

My email signature reads...

"A Computer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter." -Eric Raymond

In all honesty though, the original poster has a long road ahead of him.

krye
Mar 10, 2008, 12:58 PM
You know what I can't stand? I can't stand these self-important, elitist software programmers that huff on their finger nails as if they walk on water. I work with a ton of them. This building is so full of software programmers that talk to people like their idiots because they aren’t part of the software group. It kills me. And half of them have the personality of a dead fish. Don’t get me started!

Anyway, do everyone a favor once you get into programming: Lose the all-so-common inflated ego problem. Anyone can code, anyone can become a programmer. It all depends on your ability to learn and your determination to do so. Good luck.

elcid
Mar 10, 2008, 01:02 PM
Geez. I have written in depth programs in Java and VB.Net and you guys are freaking me out about picking up Obj-C.

OO is OO, whether it is Java or C++. I found Java easier than C++ so I hope that Obj-C is better.

EnderTW
Mar 10, 2008, 01:21 PM
Instead of taking a book on Cocoa, if you're entirely new or even if you are not. You should learn the language that it's built upon. For instance, people think buying the books about Ruby on Rails will get them started, but Ruby on Rails is a framework for the web just like Cocoa is to the mac. It's Ruby that you want to learn, the language for the RoR Framework. As is Objective-C is the language for the Cocoa framework.

Sure you'll be able to follow the video tutorials or books on Cocoa, but you won't really understand what is going on or how it works. You'll be limited to the solutions the book or the video provides, whereas if you learn the language, you can do whatever you want.

Learn Obj-c then look how Cocoa works. Cocoa isn't really a language, it's a way of programming.

yeroen
Mar 10, 2008, 01:26 PM
You know what I can't stand? I can't stand these self-important, elitist software programmers that huff on their finger nails as if they walk on water. I work with a ton of them. This building is so full of software programmers that talk to people like their idiots because they aren’t part of the software group. It kills me. And half of them have the personality of a dead fish. Don’t get me started!

Anyway, do everyone a favor once you get into programming: Lose the all-so-common inflated ego problem. Anyone can code, anyone can become a programmer. It all depends on your ability to learn and your determination to do so. Good luck.

Don't give him the wrong idea, now. Megalomania and the leeway to indulge in delusions of grandeur are perks of the job! :)

Unless of course you're referring to lumpen Ruby (on Rails) programmers; then you have a valid complaint.

rappr
Mar 10, 2008, 02:39 PM
You know what I can't stand? I can't stand these self-important, elitist software programmers that huff on their finger nails as if they walk on water. I work with a ton of them. This building is so full of software programmers that talk to people like their idiots because they arenít part of the software group. It kills me. And half of them have the personality of a dead fish. Donít get me started!

Anyway, do everyone a favor once you get into programming: Lose the all-so-common inflated ego problem. Anyone can code, anyone can become a programmer. It all depends on your ability to learn and your determination to do so. Good luck.

Amen.

lazydog
Mar 10, 2008, 04:25 PM
Ö(Template Meta-Programming is Turing Complete!.. anyone?)

So is the Game of Life!

b e n

Masna
Mar 10, 2008, 08:27 PM
That definately was a GREAT video. Thanks for posting the link.

Thank you, I made it. :)

Jeremy1026
Mar 11, 2008, 11:48 AM
Thank you, I made it. :)

Prepare for you're inbox to fill up :-P

iSee
Mar 11, 2008, 12:31 PM
You know what I can't stand? I can't stand these self-important, elitist software programmers that huff on their finger nails as if they walk on water. I work with a ton of them. This building is so full of software programmers that talk to people like their idiots because they arenít part of the software group. It kills me. And half of them have the personality of a dead fish. Donít get me started!

Anyway, do everyone a favor once you get into programming: Lose the all-so-common inflated ego problem. Anyone can code, anyone can become a programmer. It all depends on your ability to learn and your determination to do so. Good luck.

LOL! That's a good rant!

If it makes you feel any better, I've found that most of the guys like this aren't actually all that great as programmers. I think the I-know-best attitude can prevent a programmer from thinking openly and creatively about finding good solutions to problems. These guys attain certain domain knowledge and then try to apply it to every problem that pops up.


As you say, to be a programmer, the main thing you need is determination and the ability (and willingness) to learn. You should probably also enjoy abstract problem-solving, since that's mostly what you'll be doing.

A nice thing about programming is that you don't need to be that experienced to do small but useful and interesting things.

dejo
Mar 11, 2008, 12:36 PM
Anyone can code, anyone can become a programmer. It all depends on your ability to learn and your determination to do so. Good luck.
True that. But it takes a certain talent to be really good at it. Having a good balance between left-brain and right-brain thinking will really help.

ChrisA
Mar 11, 2008, 01:16 PM
My email signature reads...

"A Computer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter." -Eric Raymond

In all honesty though, the original poster has a long road ahead of him.

Eric is wrong. If the university is worth anything at all they will NOT wast time teaching computer science students the "technology of the day" Any decent school will only spend maybe two classes on programming. that is 2 out of the 30+ required for a BS degree. Same with the art department, no decent school would waste four years teaching about brushes and pens, that is something the students are expected to figure out on their own. Same with English majors, they don't waste time on spelling and punctuation.

So Eric is right also. Computer science education should teach computing at both the theoretical and practical levels. Programming is one part of computing. Computers and the electronic technology is another part and then there is a large body of mathematics.

Then there is another point. If you are going to write banking software you need to know about banking. Same thing if you are going to work on the flight control software for an airplane or the software inside a radar or even a microwave oven or the engine control in a car. Knowing just programming never enough.

lazydog
Mar 11, 2008, 02:22 PM
LOL! That's a good rant!
If it makes you feel any better, I've found that most of the guys like this aren't actually all that great as programmers. I think the I-know-best attitude can prevent a programmer from thinking openly and creatively about finding good solutions to problems. These guys attain certain domain knowledge and then try to apply it to every problem that pops up.


Well said!

Programmers who elect themselves as judge and jury on coding standards/styles are a bit dodgy too!

b e n

psingh01
Mar 11, 2008, 11:17 PM
Just learn Objective-C. You can get a book or just use the free documentation on the developer.apple.com site. It's what you'll need for the iPhone/Mac anyway. No point in learning C++ or Java first. Though it can't hurt to know those either.

Michael CM1
Mar 12, 2008, 03:55 AM
I'm kind of in the same boat as the thread starter, but I do have mild experience in programming. I took all of a semester of it in college and HATED it. I had never done any before and they threw us into the fire of C in about a week. The lab instructor, while probably a genius, was some grad student who had the thickest Chinese accent on the planet and still didn't grasp a lot of the English language. THAT DOESN'T HELP A FRESHMAN OUT MUCH.

Alas, 5 years later I get out of another university with a journalism degree. I ended up having to take some programming logic and BASIC programming course at a tech school for a degree I got afterward. Now I don't remember a darn thing (aside from drawing Flowcharts in Word is uber-uber stupid and time-wasting) except for I learned a lot more starting with BASIC. It was like being sent down to rookie ball instead of being thrown into AA and told "hit that 90mph curveball!"

So to the point, I'd like to learn some of this stuff if for nothing else to just expand my mind. I have little desire to become a full-time programmer because of how put off I was in that first class. But I would like to design this and that little app for Mac OS X and iPhone just to say "Oooo, neato." I have about zero desire to ever build a Windows app for the reason one of you posted: You have to want to do something to program for it. Windows is a DOS-based POS that is what happens when you try to please everybody and be backward compatible for eternity. Mac OS X is what happens when you try to create new things that people really want and eventually let them know "yah, that was nice 10 years ago. But seriously, we figured out how to do it better since then." Hence my delight at the death of Classic.

So again to the point, I'd like to develop some stuff for Mac and iPhone, but I'm a little lost where to start. After reading some posts, I think I'm going to try C or Object-C (which I had never heard of) since I'm just doing this on my own time. I'm going to have the major issue of freeing up space on my MacBook Pro before I start this. You can't do squat with 6GB free.

So basically if anybody has advice, throw it my way!

Michael CM1
Mar 12, 2008, 04:02 AM
Eric is wrong. If the university is worth anything at all they will NOT wast time teaching computer science students the "technology of the day" Any decent school will only spend maybe two classes on programming. that is 2 out of the 30+ required for a BS degree. Same with the art department, no decent school would waste four years teaching about brushes and pens, that is something the students are expected to figure out on their own. Same with English majors, they don't waste time on spelling and punctuation.


I totally agree with you on the teaching bit. I'm an editor because I am so darn nitpicky at style and spelling stuff. But I didn't learn that from college. They spent most of their time teaching people how to write for whatever you wanted to write for (newspaper, magazines, TV, radio). After surviving all that, the most annoying thing on the planet is seeing people who either didn't pay attention or just didn't learn a darn thing.

Writers should know boring writing when they read it. Artists should know dull art. Programmers should know worthless software. I think my school did a great job in the journalism department, but the experience I had at two different big schools in programming was horrible. It was pretty much a lot of wasted money. Too bad the Internet wasn't as big and bad as it is now. I probably could've learned more from message boards than I ever did from the stuffy books of that day.

Evangelion
Mar 12, 2008, 06:13 AM
I'm in the same boat. I have taken few programming-courses back in the day, but I have forgotten 99% of it. I have a specific need for a simple iPhone-app, and instead of expecting others to write it for me, I decided to see if I could do it myself. I looked around, and found this (http://www.cocoalab.com/BecomeAnXcoder.pdf) excellent tutorial on Objective-C programming. The guide assumes that you have no previous experience in programming.

Hope this helps :)

Cromulent
Mar 12, 2008, 11:09 AM
Alas, 5 years later I get out of another university with a journalism degree. I ended up having to take some programming logic and BASIC programming course at a tech school for a degree I got afterward. Now I don't remember a darn thing (aside from drawing Flowcharts in Word is uber-uber stupid and time-wasting) except for I learned a lot more starting with BASIC. It was like being sent down to rookie ball instead of being thrown into AA and told "hit that 90mph curveball!"

BASIC really is an incredibly poor first language to learn. You pick up some very bad habits that you will just have to unlearn later on anyway.

Don't forget that most of the older generation probably started programming in assembler. C is actually a high level language and is one which just about every other main stream language is based on. Take the time and learn Objective-C.

Eric5h5
Mar 12, 2008, 11:46 AM
You know what I can't stand? I can't stand these self-important, elitist software programmers that huff on their finger nails as if they walk on water.

That's nice, but what does it have to do with this thread? People were basically saying "If you're starting from scratch, learn the basics rather than the syntax, and plan on taking a while before you get good at it." Which is true.

Anyone can code, anyone can become a programmer.

Not, alas, in the real world. I've seen people struggle with programming for two years and they still don't get it. There are self-important jerks in every profession...programmers hardly have a monopoly on that by a long shot....

--Eric

nokq
Mar 12, 2008, 01:48 PM
Eric is wrong. If the university is worth anything at all they will NOT wast time teaching computer science students the "technology of the day" Any decent school will only spend maybe two classes on programming. that is 2 out of the 30+ required for a BS degree. Same with the art department, no decent school would waste four years teaching about brushes and pens, that is something the students are expected to figure out on their own. Same with English majors, they don't waste time on spelling and punctuation.

So Eric is right also. Computer science education should teach computing at both the theoretical and practical levels. Programming is one part of computing. Computers and the electronic technology is another part and then there is a large body of mathematics.

Then there is another point. If you are going to write banking software you need to know about banking. Same thing if you are going to work on the flight control software for an airplane or the software inside a radar or even a microwave oven or the engine control in a car. Knowing just programming never enough.

Getting a computer science education gives you a foundation to build on and a very broad one at that! It's meant so that you can enter the field of engineering and start out. With a foundation you can build your experience and skill level up. Just getting a computer science education won't do that for you. After school, it takes hard work, time, determination, and dedication. I think the poster has to realize that.

So the poster is not disqualified if he doesn't have a degree. But he sure as hell better be ready to put forth some serious effort. I laugh at friends my who claim they plan to run a marathon with little or no training. The same applies here. Are you sure you know what your getting into?

The kid that unlocked the iPhone out on the east coast with a software only solution was barely out of high school. He had guts, smarts, and was methodical. He'll go on to do great things, I'm sure. Best of luck to our original poster. I started programming myself at 13. I've turned something that I loved to do into a career and I'm already 27. Its gonna be a roller coaster of a ride for you. If you love it, you'll easily be able to do it day in and day out. :-)

Michael CM1
Mar 12, 2008, 06:23 PM
BASIC really is an incredibly poor first language to learn. You pick up some very bad habits that you will just have to unlearn later on anyway.

Don't forget that most of the older generation probably started programming in assembler. C is actually a high level language and is one which just about every other main stream language is based on. Take the time and learn Objective-C.

That's what I have realized after looking at a few threads on here. I really remember very little about BASIC or C, so it's not like I have any bad habits to forget. Shoot, I took a Cisco router programming course years later and can't remember the first thing about it.

So what I will ask is:
1) What's the best way to start with Objective-C? I found a little info at Apple's development center.

2) Will Xcode allow me to develop stuff using this language? I remember needing a C compiler, and it would do both C and C++.

3) If someone wants to explain the relationship between programming languages, Xcode, and Cocoa, I'd love to hear it.

admanimal
Mar 12, 2008, 06:31 PM
Anyone can code, anyone can become a programmer. It all depends on your ability to learn and your determination to do so. Good luck.

This is a generic statement that can be said about virtually any field/profession. Given a realistic amount of effort, however, -not- everyone will be good at programming (or any particular job that doesn't come naturally to most people).

As others have pointed out, the fact remains that certain individuals have a way of thinking that predisposes them to being better at programming than others. These are the people who are likely to succeed at it with a normal amount of effort. This is also true for most any profession.

MacsAttack
Mar 15, 2008, 03:54 AM
That's what I have realized after looking at a few threads on here. I really remember very little about BASIC or C, so it's not like I have any bad habits to forget. Shoot, I took a Cisco router programming course years later and can't remember the first thing about it.

So what I will ask is:
1) What's the best way to start with Objective-C? I found a little info at Apple's development center.


You've had some exposure to programming. So even if you remember virtually nothing then at least you still have been exposed to some of the fundamental concepts.

Honestly? The best way to start is with a good book. There are some sources out there on the net (Google is your friend), such as...

http://www.otierney.net/objective-c.html

..but they are a little short on introducing the concepts behind what they are doing and are often aimed at people who know how to program in other languages.

The best book I've found is Programming in Objective-C - Stephen G. Kochan - ISBN 0-672-32586-1

But that will only get you into Objective-C. From there you have to use more books and/or the notes and examples provided by Apple to get a handle on Cocoa (more of that later)


2) Will Xcode allow me to develop stuff using this language? I remember needing a C compiler, and it would do both C and C++.


Just like C++, Objective-C is a Superset of C. That is you can use straight C code and get it to compile because Objective-C (or C++) are built on top of C . However, using just C is missing out many very powerful features of Objective-C, and it is just these features that you will be wanting to use when developing iPhone applications. See 3.


3) If someone wants to explain the relationship between programming languages, Xcode, and Cocoa, I'd love to hear it.

OK...

Programming Languages - These you have met before. C is a programming language. C++ and Objective-C are Supersets of C - they use C, but add some more features. In there simplest form, a programming language is a "dialect" that allows a task (or series of tasks) to be defined in logical and unambiguous form (though some of the weird code i've had to deal with is far from unambiguios :rolleyes: ).

Xcode - This is what they call an IDE - Integrated Development Environment. While it is perfectly possible to run the gcc compiler directly from a terminal command line, the complexity of a modern programming projects and the plethora of tools with which you are expected to deal with have prompted the evolution of shell programs that consolidate things. So the IDE is the one stop shop. You can manage files, debug code, edit files with a context-aware editor. X-code (interface builder) is Apple's answer to MicroSoft's Visual Studio IDE. You use Xcode to write and debug your Objective-C code.

Cocoa - This is an API - Application Programming Interface. It essentially is a library of pre-written Objective-C that "does stuff". For example you want to select a file for your program to open. You could write the code to pop up a dialog and then add more code to navigate the file structure. Or you could use the pre-packaged Cocoa API call that gives you a standard OS X file dialogue. When you look at any application that runs on OS X's graphical interface you are looking at code that was written to use the Cocoa API.

So the three are interconnected. You use Xcode to write Objective-C programs that use the Cocoa API to give you nice fluffy OS X (or iPhone) style interfaces to your applications.

Knowing Objective-C is not enough for OS X software development. You also need to master the Cocoa APIs. Apple provide a lot of documentation, but again the best place to start is another book...

Cocoa Programming for MAC OS X - Arron Hillegass - ISBN 0-321-21314-9

... This book also has an Objective-C crash course, so it may be possible to get away without Kochan (or other similar publications). Note that the revised third edition of Hillegass is apparently due out soon.

May be worth checking out Podcasts. If there isn't one dedicated to Objective-C and/or the iPhone yet it is probably only a matter of time. There will be lots of general podcasts there already. Even if no Objective-C material is available, they are still going to cover some important fundamentals. Getting your head round the concepts of object-orientated programming and memory management is worth while grounding.

MacsAttack
Mar 15, 2008, 04:14 AM
As others have pointed out, the fact remains that certain individuals have a way of thinking that predisposes them to being better at programming than others.

That is because good programming goes beyond science. It is an art. :D

Brutal hard truth is that there is no substitute for experience. College and University education can provide the foundations, but it is only when you start work coding day-in-day-out that you really learn to program :p

I went through the mill - got my degree. But that was some time back. I end up dealing with three types...

1. The snot-nosed punks who think they know everything - and I end up having to clear up their mess after they depart the company.

2. The newbies who are so green that they are still damp. There is usually hope for these if they can stick it out for the first few months and find their feet in the real world. At which stage they are well on the way to becoming bitter and cynical software developers. Weird thing is, it is only when working with them that you realize just what all those years of experience gives you. The 'obvious' solution - isn't. So you go back and talk them through the process of how it is derived. That's one of the ways they learn the job.

3. The hardened professionals. These are the ones who know what they are doing right off the bat. Problem is, you may end up dealing with a snot-nosed punk who bailed from their last post (and the one before that, and the one before that). On paper they look good enough to be mistaken for a hardened professional, but in reality...