or Connect
AppleInsider › Forums › General › Genius Bar › Programming advice needed
New Posts  All Forums:Forum Nav:

Programming advice needed

post #1 of 25
Thread Starter 
I'm looking to learn to program apps for OS X. The last time I did programming though was in 1994, and it was Pascal. ...at least it was on a mac... Where can I find books, resources etc. to help me get up to speed. When I was doing programming I was actually a very fast learner. If you can give me book recommendations and other helpful advice, I would really appreciate it.
post #2 of 25
Well, you certainly don't have a lack of possibilities.

Unfortunately, this means that you should probably answer some questions for yourself regarding what you want to do, or get out of it.

1) Are you going to be programming for MacOS X only, or are you looking to use these skills on other platforms?

2) Do you want programs that can be run on MacOS 9? Or is MacOS X what you want to target?

3) Are you looking for casual hobby level programming, or would you like to pursue this seriously?

4) Do you want to create GUI programs, or do the inner guts of the OS call to you? (ew)

Seriously, answer these, get back to us, and then we can all help you a *lot* more.
My brain is hung like a HORSE!
Reply
My brain is hung like a HORSE!
Reply
post #3 of 25
Thread Starter 
[quote]Originally posted by Kickaha:
<strong>Well, you certainly don't have a lack of possibilities.

Unfortunately, this means that you should probably answer some questions for yourself regarding what you want to do, or get out of it.

1) Are you going to be programming for MacOS X only, or are you looking to use these skills on other platforms?

Mac OS X only

2) Do you want programs that can be run on MacOS 9? Or is MacOS X what you want to target?

same as above

3) Are you looking for casual hobby level programming, or would you like to pursue this seriously?

both

4) Do you want to create GUI programs, or do the inner guts of the OS call to you? (ew)

both...mostly GUI

Seriously, answer these, get back to us, and then we can all help you a *lot* more. </strong><hr></blockquote>
post #4 of 25
Thread Starter 
...to simplify my reply

1) I'd like to focus maily on OS X...in other words, Cocoa programming. I wouldn't mind learning some skills that might carry over...it could come in handy at some point.

2) I'm not concerned with OS 9. I'll take Apple at its word that OS 9 is dead. Besides with the time I suspect it could take to get good at this, I'm not counting on anyone programming for OS 9.

3) I'd like to prgram things that I could use myself, but I'm a perfectionist. If I would use it, so would other people. There's no point doing something from scratch if you can't do it better than what you can buy. ...and if you can do it better than what you can buy, why not sell it?

4) I want to be able to do both, but if I have to choose which to start with, I'd rather make something I can see a window of my own...
post #5 of 25
Okay, that vastly simplifies things.

1) Get the Dev Tools/Documentation from Apple's web site.

2) Get a copy of Aaron Hillegass' Cocoa Programming for MacOS X (http://www.amazon.com/exec/obidos/tg/detail/-/0201726831/qid=1029903168/) Other folks may have good recommendations, but I really liked this one. While it's shipping...

3) If you don't know object-oriented methodology, read the supplied document on Objective-C from Apple. Don't worry, it'll take a while to wrap your brain around it, it's significantly different than procedural programming... but once it clicks, you'll probably like it.

4) *NOW* start going through Hillegass' book. You'll end up with working apps at each stage, getting progressively more complex. He doesn't try and show you the entire API system at once, but instead focuses on concepts, one at a time, and shows you a good way to implement it. Each stage is a springboard for your own experimentation.

5) Sign up for Omnigroup's MacOSX-Dev mailing list (http://www.omnigroup.com/developer/mailinglists/) and scan the back archives for specific questions you may have before posting. Helpful people, in general, but even the most patient get tired of seeing the same questions.

6) Ask on here... I'm sure more pointers will pop up soon enough.
My brain is hung like a HORSE!
Reply
My brain is hung like a HORSE!
Reply
post #6 of 25
First thing would probably be to get Cocoa Programming for Mac OS X by Hillegass. It's a pretty good intro book, just starting to skip through and try to learn what I want. The GUI stuff is new to me, cause I just finished my first year of CS and haven't touched GUI stuff at all until this, but it doesn't seem too bad.

Apple has a wealth of API docs and other tutorials, so <a href="http://www.developer.apple.com" target="_blank">http://www.developer.apple.com</a> is another place you'll want to check out.

O'Reilly has a Mac developer site at <a href="http://www.macdevcenter.com" target="_blank">http://www.macdevcenter.com</a>

There's other stuff around the net, just Google for it and you'll probably find other places as well.
What the problem is?
Reply
What the problem is?
Reply
post #7 of 25
I would like to add the following as well,by Scott Anguish et.al.- I know of them through their frequent contributions to the Omni-dev list-very knowledgable programmers,I expect this book to be excellent.

<a href="http://www.amazon.com/exec/obidos/tg/detail/-/0672322307/qid=1029905632/sr=8-1/ref=sr_8_1/104-8969446-8044709?s=books&n=507846" target="_blank">http://www.amazon.com/exec/obidos/tg/detail/-/0672322307/qid=1029905632/sr=8-1/ref=sr_8_1/104-8969446-8044709?s=books&n=507846</a>


Also check out <a href="http://www.stepwise.com" target="_blank">www.stepwise.com</a> a lot of resources there,and links to code samples.

[ 08-21-2002: Message edited by: Rick1138 ]</p>
post #8 of 25
Oh duh, yeah, stepwise.com is your friend.

I'd be interested to hear what you think of Scott's book, haven't seen a copy of it first hand yet.
My brain is hung like a HORSE!
Reply
My brain is hung like a HORSE!
Reply
post #9 of 25
I'm waiting for it too.Another place I recommend going is <a href="http://www.spiderland.org" target="_blank">www.spiderland.org</a> ,downloading the Breve a-life enviroment and checking out the code samples that come with it,they are written by Jon Klein,in my opinion a fantastic programmer.
post #10 of 25
The most difficult thing about Cocoa, I think, is where to start. I ended up deciding that it would take too long for what I wanted to do. But it goes something like this.

First learn C.
Then learn Objective C.
Then learn Cocoa.

One builds off the other and it just doesn't work if you start right in with Cocoa. I believe you can also go in through Java and get to Cocoa through there, but I don't know how much Objective C you will have to learn AS WELL. The Cocoa programming book recommended above will probably tell you that.

If you've got a good foundation, you probably won't grow impatient and highball it to RealBASIC as I did.

Alex.
post #11 of 25
[quote]Originally posted by Alexander Wilson:
<strong>One builds off the other and it just doesn't work if you start right in with Cocoa. I believe you can also go in through Java and get to Cocoa through there, but I don't know how much Objective C you will have to learn AS WELL. The Cocoa programming book recommended above will probably tell you that.</strong><hr></blockquote>

i believe that thru java you can get at the entire cocoa shitfarm. i think all classes and shit are dually avail (objective-c, java).
post #12 of 25
[quote]Originally posted by Alexander Wilson:
<strong>The most difficult thing about Cocoa, I think, is where to start. I ended up deciding that it would take too long for what I wanted to do. But it goes something like this.

First learn C.
Then learn Objective C.
Then learn Cocoa.

One builds off the other and it just doesn't work if you start right in with Cocoa. I believe you can also go in through Java and get to Cocoa through there, but I don't know how much Objective C you will have to learn AS WELL. The Cocoa programming book recommended above will probably tell you that.

If you've got a good foundation, you probably won't grow impatient and highball it to RealBASIC as I did.

Alex.</strong><hr></blockquote>

I'm a bit puzzled by al this, but also very interested.

What's actually the difference between C, C++ and Objective C ? Also, is it easier to program in Cocoa than in Carbon ?

Are the developer tools (included w/every OSX copy) 'easy' to use/solid (are they any better in Jag ?), are they f.e. something between Visual Basic and Codewarrior in useability. Or something else maybe ?

I also read that Cocoa apps are easier to port to Windoze. Is this true ?
2x2.7 PowerMac - 1.25 Powerbook - 10.4 Tiger - '65 Mustang
Reply
2x2.7 PowerMac - 1.25 Powerbook - 10.4 Tiger - '65 Mustang
Reply
post #13 of 25
[quote]Originally posted by BigBlue:
<strong>I'm a bit puzzled by al this, but also very interested.

What's actually the difference between C, C++ and Objective C ? Also, is it easier to program in Cocoa than in Carbon ?

Are the developer tools (included w/every OSX copy) 'easy' to use/solid (are they any better in Jag ?), are they f.e. something between Visual Basic and Codewarrior in useability. Or something else maybe ?

I also read that Cocoa apps are easier to port to Windoze. Is this true ?</strong><hr></blockquote>

c is older than c++, and objc. its procedural in nature. c++ was developed to bring Object oriented design ontop of c (with backwards compatibility). objc was also made to do that, but aparently isn't as heavy as c++. (c++ adds more than just OOP). c code will compile in a c++ or objc compiler. (i think gcc can handle all of them so its not really an issue). c is the foundation for c++ and objective-c, so its necessary before fully understanding them.

Apple's dev tools are awesome. i won't pay for codewarrior anymore (save myself 300 or 400 hundred dollars, sweet!). the IDE is basically a text editor, compiler and debugger (like codewarrior's). in jag gcc is v3.1 (opposed to 2.95? 94? in osx.1). 3.1 is supposed to be a lot faster (a lot faster). i dont have jag yet, so i cant comment on that. carbon prog'g should die soon, because its only around for os9 compatibility, which is dying. (i know carbon wont die any time real soon, but it should) i enjoy cocoa programming more than carbon, but never found either to be difficult. i dont know about cocoa making ports easier. the gui shit is always the hardest tough to port, and cocoa's api isn't exactly congruent to ms' &lt;whatever they call their api&gt;.
post #14 of 25
Good basic rundown, but let me expand on it a bit.

C is a pure procedural language, much like Pascal. If you've done Pascal programming, C won't be *too* painful, once you realize that it is essentially a glorified assembler macro system. *grin* C is very close to the silicon... the language was constructed to be fast, fast, fast, when compilers were dumb, dumb, dumb. Ie, you had to program *for* the system, instead of the the system figuring out what you wanted. C is a very strict language as well... your types are concrete, well formed, and thou shalt not deviate. Also, there are several constructs in C that make almost zero sense unless you have an understanding of how the underlying hardware architecture, OS design, and memory mapping subsystems work.

C++ follows this model into the OO realm. It is statically typed, and statically bound (the classes and objects, that is, not the libraries, etc). C++ extends the C model, complete with the calling conventions and pointer oddities, into object oriented programming styles. It's really quite mucky, from an OO point of view, but since it was conceptually closer to what everyone was familiar with in C, it caught on. Woe is us. C++ does offer a lot of other programming styles, such as generic programming (templates), and of course you can always just write straight C (procedural). It's the all-in-one toolkit that doesn't quite do any of the tasks all that well, has way too many buttons and gadgets, and can lop off your arm if you misuse it.

Objective-C took another approach. Instead of taking the C model and running with it to the bitter end, it used the C language as a base to add the OO model from the granddaddy of all dynamic OO languages, Smalltalk. Obj-C's typing is up to the developer: you can have strong or weak typing, and the code is dynamically bound. *Highly* flexible, but it makes some people's brains hurt... it's quite different than C++, or even Java. The Smalltalk extensions are orthogonal to the C base, and the code looks nothing like the C foundation, so it is extremely easy to see what portions are OO in nature, and what portions are more procedural in design.

Of the two, I *VASTLY* prefer Obj-C. It just makes more sense to my brain... but other people prefer C++, or Java.
My brain is hung like a HORSE!
Reply
My brain is hung like a HORSE!
Reply
post #15 of 25
Obj C is the better language,it's conceptually very advanced,much simpler but at the same time far more flexible.
post #16 of 25
Sorry for the (stupid?) newbie questions, but
is everything been done in Projectbuilder ? What's the difference between PB and CodeWarrior ?

[quote] Apple's dev tools are awesome. i won't pay for codewarrior anymore (save myself 300 or 400 hundred dollars, sweet!). the IDE is basically a text editor, compiler and debugger (like codewarrior's). in jag gcc is v3.1 (opposed to 2.95? 94? in osx.1). 3.1 is supposed to be a lot faster (a lot faster).<hr></blockquote>

Does 'faster' mean a faster compiler or is the resulting app running faster than in previous versions?
2x2.7 PowerMac - 1.25 Powerbook - 10.4 Tiger - '65 Mustang
Reply
2x2.7 PowerMac - 1.25 Powerbook - 10.4 Tiger - '65 Mustang
Reply
post #17 of 25
[quote]Originally posted by BigBlue:
<strong>Sorry for the (stupid?) newbie questions, but
is everything been done in Projectbuilder ? What's the difference between PB and CodeWarrior ?

...

Does 'faster' mean a faster compiler or is the resulting app running faster than in previous versions?</strong><hr></blockquote>

(theres no such thing as a stupid question)
i do just about all programming in pb. except when i'm away from a mac, inwhich case i ssh in, and use emacs. pb and codewarrior serve the same function. one is made by apple, the other by metrowerks. codewarrior used to be, by far, the best ide, now i think, pb is the best. i haven't used any osx version of codewarrior tho, so it may be close. pb is free though, codewarrior isn't. within an IDE (integrated development environment; either pb or codewarrior), you have a text editor for the source code (with syntax coloring), a GUI button to compile the source, a button to debug, and a button to run without debugging. those are the most important features of an IDE, and the only ones i really take advantage of. there are other things, like cvs integration (pb has, dont know about codewarrior), but i dont really use it. there are probably a number of things that cw has over pb, but they aren't really necessary for me. i think codewarrior uses its own compiler, while pb uses the free software foundation's gcc.

faster means both in compilation and in running. i dont remember percents or anything, but everything about 3.1 is supposed to be faster, stronger, &lt;insert positive adjectives here&gt;.
post #18 of 25
Thread Starter 
I like the idea of object-oriented programming. Way back in my Pascal days, I'd get F's on my code because the teacher only looked at the code printout and couldn't see how it would work. When I made the teacher run it however, it ran better than anything the class had done. I like flexibility. If gives me more ways to conceive the ideas.
post #19 of 25
Exactly.
post #20 of 25
[quote]Originally posted by jpcrumley:
<strong>I like the idea of object-oriented programming. Way back in my Pascal days, I'd get F's on my code because the teacher only looked at the code printout and couldn't see how it would work. When I made the teacher run it however, it ran better than anything the class had done. I like flexibility. If gives me more ways to conceive the ideas.</strong><hr></blockquote>

First of all jpcrumley, this post freaked me out. I actually did a double take to see if this was a thread I had started a long time about because I'm in the same boat as you. I did some Turbo Pascal programming and I quit around 1994. I've been trying to move into OOP for some time now, without any success. I guess I don't have the time or motivation to look up everything on my own.

How did you write in object-oriented fashion when you were writing in Pascal? I used to write very clean, very procedural Pascal, but it wasn't what's considered object-oriented.
"Hearing a corrupt CEO like Cheney denigrate Edwards for being a trial lawyer is like hearing a child molester complain how Larry Flint is a pervert." -johnq
Reply
"Hearing a corrupt CEO like Cheney denigrate Edwards for being a trial lawyer is like hearing a child molester complain how Larry Flint is a pervert." -johnq
Reply
post #21 of 25
Thread Starter 
It's been so long, I can't remember exactly. It's just the way I think. I broke my own code down into the way I think and made the calls reach around for each other. The advantage was that I could do error handling while making the overall code length shorter than the "book" method. I've never been the type that limits myself to the stuff someone else has already figured out.
post #22 of 25
I just found a great book today-building Cocoa applications from OReilly-the best one on Cocoa that I've read so far,I can't recommend it more highly.
post #23 of 25
Here it is Mac-man.
post #24 of 25
My QUESTION:

what now is the best book?
the one from Hillegass
the one from O'Reilly
yet another one...

If it helps: I know the basics of Java and know my way around Swing (a bit, at least).

I'm asking because these books are about 60 euros each over here, and I don't care to spend a shitload of money on all of them. I want the best...
post #25 of 25
There are several from O'Reilly now-the one I really recommend is Building Cocoa Applications.Aaron Hillegass's book is recommended as well,as well as the book by Scott Anguish et.al which is scheduled to be released today.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Genius Bar
AppleInsider › Forums › General › Genius Bar › Programming advice needed