Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

krye

macrumors 68000
Original poster
Aug 21, 2007
1,606
1
USA
I'm so lost I don't know where to begin.

I want to develop applications for the Mac so bad. I just can't seem to understand anything. I started reading a C book, but was having trouble "getting it". (The book was learn C in 24 hours. Maybe too broad and high level?) The book was PC-centric and all the examples ran in a DOS prompt. So it's not like I could follow along on a Mac. I read told that I shouldn't waist my time learning C because I'm going to have to unlearn some stuff when I learn Objective-C. With that, I started to read an Objective-C book. I got half way through it and though, "I have no idea what the hell this guy is talking about." I then picked up a Cocoa Book. I got through to chapter 2 and thought, "I have no idea what the hell this guy is talking about either."

So where do I begin? What am I missing. I know nothing about any programming language. Should I start with a C book? How do you write apps on the Mac with C? I thought it was Cocoa? Anyone have any links to Xcode tutorials using C? I'm so confused.
 

Sayer

macrumors 6502a
Jan 4, 2002
981
0
Austin, TX
Find a new hobby, doesn't sound like you have the "bug" for programming.

Nice avatar tho, I loved playing Beyond Dark Castle on a Mac 512KE upgraded to a Mac Plus with a hand-soldered-on SCSI port.
 

Spraystarch

macrumors newbie
Jul 23, 2008
3
0
Hey there,

Not too long ago I was in a very similar position. Every piece of Apple documentation, every book about Cocoa I tried to pick up, would just confuse me more. Now I've got the basics more or less figured out.

It sounds from your post like you've got no programming experience at all; don't worry about it. I had taken an intro level course at college about C++, and that helped a lot, but most of it you have to learn as you go along. I'd start by trying to learn some basic C or C++; enough so you can understand structs or objects and write solid command line utilities, anyway.

Most Apple software these days is written in the Objective-C language. If you know C or C++, then it's just a short hop over to Objective-C. Cocoa isn't a language; it's an API, which is basically a set of tools for you to use in your programs. Once you feel like you have a grasp on the basics of C, I'd pick up "Cocoa Programming for Mac OS X" by Aaron Hillegass. It's currently in its 3rd edition and retails for about $50.
 

yoavcs

macrumors regular
Apr 7, 2004
220
96
Israel
Find a new hobby, doesn't sound like you have the "bug" for programming.

Nice avatar tho, I loved playing Beyond Dark Castle on a Mac 512KE upgraded to a Mac Plus with a hand-soldered-on SCSI port.

Got to agree here. If you can't "get" the 'C for Dummies' type books, you should go for liberal arts type stuff. You'll be happier. You'll live up to your potential.
 

iShater

macrumors 604
Aug 13, 2002
7,027
470
Chicagoland
Got to agree here. If you can't "get" the 'C for Dummies' type books, you should go for liberal arts type stuff. You'll be happier. You'll live up to your potential.
I've got a liberal arts degree in computer science ;)

I think you have to have a certain mind set for programming, which is basically being able to follow a logical path and making decisions based on specific criteria.

The stuff you had issues with in the C book, was it technical issues? terms? simply not being able to follow logic? Have you ever considered taking an intro to programming course in a local community college?
 

krye

macrumors 68000
Original poster
Aug 21, 2007
1,606
1
USA
Hey there,

I'd pick up "Cocoa Programming for Mac OS X" by Aaron Hillegass. It's currently in its 3rd edition and retails for about $50.

That's one of the books I picked up and I have no idea what the guy is talking about. He jumps right into the specifics of Cocoa. I don't know Objective C or C. So I guess I am trying to jump on the Cocoa wagon too fast. I figured I could read a book, get up to speed, and start programming. But that's just not the case. I need to go back to basics and learn C first. I guess some patience in my part is in order.

I just can't help feel that I'm 33 and I feel like I'm running out of time. I wish I was one of those 18 years old that knew this stuff inside and out. I just don't want to spend the next 5 years trying to figure crap out before I can write something marketable. I guess that's the way it is, or people wouldn't spend years in school learning to program. I don't have that luxury of school since I have 3 small kids and no time to go to school. So be it.

I've got a liberal arts degree in computer science ;)

The stuff you had issues with in the C book, was it technical issues? terms? simply not being able to follow logic? Have you ever considered taking an intro to programming course in a local community college?

It's not a problem with understanding, or problem solving. I'm smart, I can do this. I read half way through an Objective-C book and never felt like the light bulb went off. I got discouraged and put the book down. I figured I'd just move ahead to Cocoa and see what happened. I think I'm trying to move too fast. It's just hard to find where to begin. I guess I'm just impatient. I didn't want to learn C, then Objective-C, then Cocoa before I can hop into Xcode and write an app. I wanted to just be able to jump right into Cocoa. But it's not possible. I'm going to have to take the time and start from the beginning.

Thanks all for helping me come to this realization.

OK, I'm off to learn C.....
 

yoavcs

macrumors regular
Apr 7, 2004
220
96
Israel
From my experience people see some app they like, maybe read about some hotshot kid who sold his startup to Microsoft, and suddenly they want to be like that too.

In 3 weeks or less. Microwave-fast popcorn style.

Sadly (actually, thankfully) it doesn't work that way.

Some of the best programmers are people who fell in love with computer-tinkering at a young age.

I program as a hobby, but when I got my first Apple //e at the age of 9, when my friends were busy playing games I was reading Compute! magazine and typing in assembly code from Nibble... (anyone remember those... oh the fun of getting Beach Head to run on my Apple after the magazine misprinted the listing and I debugged it myself. What a thrill).

Now, it is commendable you want to learn this stuff, and 33 is in *no way* too late. Programming can be self taught, like guitar. If you have the talent and perseverance you can get great at it at any age. And you can be better than the 18 year old who just went to college to study CS since he heard it pays good, but in his free time doesn't turn his computer on at all...

But, and this is a big but: it takes time.

A lot of time.

You can't pick up the Hillegass book, which states clearly it is based on prior OOP and C knowledge, and go off and write the next iMovie...

Start from some basic programming books, such as the 'C for Dummies' type books. If you don't get it, read it again. And again. SOLVE the exercises. Always. Don't just look at them and think 'yeah, I can do that.' You learn a ton just typing stuff in, compiling it and then thinking 'hmmmm, what if I change that?! I wonder what will happen...'.

Understand this will take time. All based on your intelligence and your penchant for mathematical-logical type thinking.

The learning curve at first looks so steep it WILL discourage you. You'll throw down those first two books many times and say 'screw it'. But if you persevere in the end you'll pick up the Hillegass book and it'll all click.

And the beauty is that once you pass that learning curve and actually understand the basics and the lingo, the rest is smooth sailing and extremely enjoyable.

Start with 'C for Dummies'. Get an advanced C book after that. Get some OOP book (like the Kochan Objective-C one), and only then Hillegass.

Understand that even after you finish Hillegass you are still a LONG way from writing the next iWork in your free-time... But you will know enough to start.

Good luck on your endeavor. If you really put your self to it I wager you could be reading and enjoying Hillegass in less than a year. Much less if you are logically inclined.
 

iShater

macrumors 604
Aug 13, 2002
7,027
470
Chicagoland
It is never too late to get into programming!

You do have to build a foundation, and I think learning C is probably going to be that foundation. I believe you can still do C in Xcode, and then you can learning Objective-C and Object Oriented principles, and then move on to the Cocoa framework.

Best of luck!
 

Darkroom

Guest
Dec 15, 2006
2,445
0
Montréal, Canada
anyone can learn programming... it's exactly like learning a language like spanish, or russian... and just like learning a new spoken language, programming can take a very long time...

keep going, you'll get it eventually...
 

krye

macrumors 68000
Original poster
Aug 21, 2007
1,606
1
USA
Good luck on your endeavor. If you really put your self to it I wager you could be reading and enjoying Hillegass in less than a year. Much less if you are logically inclined.

It is never too late to get into programming!
You do have to build a foundation, and I think learning C is probably going to be that foundation. I believe you can still do C in Xcode, and then you can learning Objective-C and Object Oriented principles, and then move on to the Cocoa framework.

Best of luck!

anyone can learn programming... it's exactly like learning a language like spanish, or russian... and just like learning a new spoken language, programming can take a very long time...

keep going, you'll get it eventually...

Thanks guys. This means a lot. I feel good about it now. I'll take it easy; work my way up and stop trying to do it all at once.

I have these books, but the last three are totally out of date (xcode 2, 10.3):

100_7822.jpg


Maybe the "Learn C in 24 hours" is still OK. But I think I need an more indepth book.

I also have:

51sQwKf8ITL._BO2,204,203,200_PIsitb-dp-500-arrow,TopRight,45,-64_OU01_AA240_SH20_.jpg
and
ShowCover.aspx


So I think I'll start in that order. C, Obj-C, then Cocoa.

Thanks again.
 

iShater

macrumors 604
Aug 13, 2002
7,027
470
Chicagoland
The 24-hour books are mainly designed to bring someone up to speed in programming in a specific language, not sure if they are the best to learn programming.

I strongly recommend this book: C Programming Language

But that is my 2c :)

Edit: posters below indicate that it is not a good choice for a beginner :p
 

liptonlover

macrumors 6502a
Mar 13, 2008
989
0
first, I can't believe you guys are discouraging him. If he wants to program then he can. It may take more work like for me, but if you want to you can do it.

second, these are what I used.

http://www.cprogramming.com/ (Do the C tutorials. This will get you started programming.)

http://www.cocoalab.com/ (do their becomeanxcoder tutorial. It's a little outdated, but you'll be able to figure out the slight differences. Just remember that a nib file is now an xib file.)

I have trouble learning things a lot of times, and though I can't say it's hit me TOO hard for programming, it has hindered me a bit. If you want to message me I'm always available. I have plenty of links and information to share that hopefully will be useful!
Nate
 

psingh01

macrumors 68000
Apr 19, 2004
1,586
629
What kind of crappy advice is it to give someone to quit? Might as well not post at all!

Learning to program isn't easy when you have zero experience. It is even harder if you are trying to teach yourself, but don't get discouraged! It is something that will take time but it will gradually become easier to learn new languages and technologies because you can use your experiences to help you.

You don't need to un-learn C to learn Objective-C. Everything you know will still be valid, you'll just have to learn a few more. There are so many languages that use the C style syntax that you will do yourself a great disservice if you think C is not useful.

Eventually you'll get to the point where you want to learn a new language and you'll think: this is how it is done in C, how do I do it in XYZ language? At the very least you'll have terminology and concepts down to help you search out new information.

Anyway back to learning, my first suggestion would be take a class. If your school has it or at a local community college. Just having someone there to guide you through some of the baby steps can be very helpful. If that is not an option then go on the web and see what some colleges are using for their text books on C. I forgot what book on C I used while in school, but for C++ I used "C++ How To Program" by Dietel & Dietel. I know they have a version for C. They are well written and aimed for someone who is learning from scratch.

Good luck and keep trying. Don't forget you can always post noob questions here and someone will answer it.

For your development environment, if you have a Mac (I assume) then just install the dev tools and you have everything you need. I would suggest just using a text editor and compiling from the terminal app.
 

iShater

macrumors 604
Aug 13, 2002
7,027
470
Chicagoland
Have the last two posters READ the all posts before complaining? please do, as you will notice most of us are encouraging him and giving him advice. :rolleyes:

geeeeeez.
 

CaptainZap

macrumors regular
Jan 17, 2007
170
0
The 24-hour books are mainly designed to bring someone up to speed in programming in a specific language, not sure if they are the best to learn programming.

I strongly recommend this books: C Programming Language

But that is my 2c :)

That's a great book but definitely not for someone that doesn't have a lot of experience and is trying to learn.
 

Sam Yikin

macrumors regular
Oct 28, 2007
230
0
That's a great book but definitely not for someone that doesn't have a lot of experience and is trying to learn.
Agreed. DO NOT GET THE C PROGRAMMING LANGUAGE to try to learn the basics. I understand its a fantastic reference book when you know C but it's a bad idea to try to start with it.

The best way to learn concepts in programming (or anything, really) is to practice.
To practice C under OS X, install developer tools, Open Xcode then go to File
–> New Project, and choose Standard Tool (if you're learning C) under command line utilities.
The space they give you there is perfect for learning the language, though I understand it gets more complicated trying to do some more advanced features.
If you don't understand what a book is trying to tell you, you can come here or any other programming forum and ask for help.
Good luck and have fun!
 

Mr Skills

macrumors 6502a
Nov 21, 2005
803
1
It's simple. You just need some "eye of the tiger" music and a montage, and you'll learn it in 3 minutes. :p


On a serious note, I know zero about programming but from reading this thread it seems a little bit like learning guitar. I don't know a single person who hasn't said "I'm not cut out for it - my hands can't stretch that far" when they've started. These are things where you just have to accept that you've got some frustration ahead of you and get on with learning! :)
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
If the books aren't cutting it, it would be best to have someone with some knowledge to help you. cprogramming.com is a good resource that is geared towards beginners.

There are dozens of threads on these boards, one every 3-4 days I'd wager, about this same topic. I'd go through the archives here and read through some of those threads.

With that said, I will parrot what I always say in these threads when someone has never programmed before:
Do not start with XCode or any other IDE (integrated development environment)

You do not need the hassle of learning a development environment meant to manage large, complex projects when you're just trying to get down the syntax of your first programming language.

Choose whatever you're comfortable with for editing text. TextWrangler, vim, TextMate, whatever, and get a few terminal windows open. Use gcc to compile. Part of learning to program is getting comfortable with the tools of the trade, and if you jump right in to an IDE you won't know where compiling ends and linking begins, where building ends and running begins, etc.

I do think anyone, even those who are not particularly inclined, can learn to program. My sister-in-law had to for a math degree, and she was able to do it even if she didn't enjoy it. It will not make for a fun hobby if you hate it, but you should give it another go.

-Lee
 

iShater

macrumors 604
Aug 13, 2002
7,027
470
Chicagoland
Lee hit the nail on the head about IDEs. It adds a complexity layer as you have to learn another bloody app!

Use your favorite editor, and you will see that most tutorials/books do not cover any specific IDEs.
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,566
Got to agree here. If you can't "get" the 'C for Dummies' type books, you should go for liberal arts type stuff. You'll be happier. You'll live up to your potential.

Well, there is this great set of books "The Art of Computer Programming" by Donald Knuth :D
 

Sam Yikin

macrumors regular
Oct 28, 2007
230
0
If the books aren't cutting it, it would be best to have someone with some knowledge to help you. cprogramming.com is a good resource that is geared towards beginners.

There are dozens of threads on these boards, one every 3-4 days I'd wager, about this same topic. I'd go through the archives here and read through some of those threads.

With that said, I will parrot what I always say in these threads when someone has never programmed before:
Do not start with XCode or any other IDE (integrated development environment)

You do not need the hassle of learning a development environment meant to manage large, complex projects when you're just trying to get down the syntax of your first programming language.

Choose whatever you're comfortable with for editing text. TextWrangler, vim, TextMate, whatever, and get a few terminal windows open. Use gcc to compile. Part of learning to program is getting comfortable with the tools of the trade, and if you jump right in to an IDE you won't know where compiling ends and linking begins, where building ends and running begins, etc.

I do think anyone, even those who are not particularly inclined, can learn to program. My sister-in-law had to for a math degree, and she was able to do it even if she didn't enjoy it. It will not make for a fun hobby if you hate it, but you should give it another go.

-Lee

Just sharing my personal experience here- I find it more convenient having the text editor and compiler all in one interface. Once I figured out how to get there, (which admittedly took a little while) its a simple, nice interface... I never really had to "learn" the IDE, just a few clicks and you're there.
Its a bit like compiling in terminal, but with clicking buttons instead of typing in Unix commands. I'm still learning, though, so there may be some more complicated stuff later on that the terminal is better for.
 

lazydog

macrumors 6502a
Sep 3, 2005
709
6
Cramlington, UK
It's simple. You just need some "eye of the tiger" music and a montage, and you'll learn it in 3 minutes. :p

That made me laugh!

krye, are you typing and trying out code as you read these books? Even typing out example code from chapters isn't enough. You need to experiment and test your understanding of concepts as you go along. It might seem slow at first, and you may be tempted to skip bits that are dull or 'pointless', but it's the only way really. Stephen Kochan's book is a good one to work through I think.

b e n
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.