 |
 |
is apple the place to start?
|
 |
|
 |
|
Junior Member
Join Date: Aug 2002
Status:
Offline
|
|
I bought my first mac about a month ago, Tibook 800. I really like OSX and would like to start doing some programming on it. The problem is I have very little programming knowledge. My only programming to date was VB and it was few versions back, never any C, C++, or anything. Is carbon, or cocoa and good place to start? Easy enough for a newbie? Can you recommend some good resources to start with?
|
|
|
| |
|
|
|
 |
|
 |
|
Admin Emeritus 
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
Cocoa's nice and easy. With Cocoa you can concentrate on programming rather than worrying about hassling with the system. Of course, it's good to know about how the system works but the details can be saved till later.
First, though, I recommend you pick up a book on C/C++ and learn it using the shell. C++ isn't necessary but it's a useful language to know.
As for resources, I don't have any on me right now -- I used to keep a list of stuff people could refer to. Sorry.
|
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Feb 2001
Location: Rochester, uk
Status:
Offline
|
|
C is a useful start, but don't worry about C++. Don't worry about the minor details of C either. Just get a nice thin friendly "Get started with C in 21.3 milliseconds" book and work through it, to get your brain in gear.
Then skip over C++ entirely and move onto a proper language like Objective-C or Java.
|
|
All words are lies. Including these ones.
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status:
Offline
|
|
Java is a very simple and well documented language.
|
|
signatures are a waste of bandwidth
especially ones with political tripe in them.
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jan 2001
Location: Meida, PA USA
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2002
Status:
Offline
|
|
To summarise:
Cocoa is good, but Java is better. However, Cocoa is better than Java. You should learn one of C or C++ but not both, and which one is undefined; however, you should learn the other one first.
|
|
[vash:~] banana% killall killall
Terminated
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Nov 2001
Status:
Offline
|
|
My advice: Cocoa. Carbon is rather difficult, and has some very obscure APIs. Java's well...Java. Cocoa's APIs are simple, logical and elegant, while Java's are an ugly mishmash. You can create a functional Mac OS X application in Cocoa in an amazingly short time. I would recommend that you start with a fairly basic C book then move up to something like Objective-C (which is so easy and powerful it will make your eyes water) and Cocoa. If you're ever planning to use your development skills in a "mainstream" job, it may (unfortunately) be a good idea to learn C++. This language, will, however teach you some nasty habits. So...in summary: learn C and Cocoa!
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Oct 2000
Status:
Offline
|
|
No newbie programmer who values their sanity should ever touch Carbon... EVER.
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Nov 1999
Location: Madison, WI
Status:
Offline
|
|
Originally posted by Chaaaosss:
No newbie programmer who values their sanity should ever touch Carbon... EVER.
EVER!
-Owl
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jan 2001
Status:
Offline
|
|
As a newbie hoping to accomplish the ultimate goal of understanding Cocoa, I'll echo the sentiments of those suggesting you learn C first. It really does provide insight into the inner workings of the Cocoa, I promise. But do take the time to learn C. It makes sense out of a lot of things. Install Developer Tools, play with interface builder (it's very fun). But learn C. Learn it in the terminal (I've learned a lot about using the terminal from doing so). I use BBEdit Lite to actually create the source. Anyway, that's my opinion, for what it's worth.
Kevin
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2001
Location: Seattle, WA
Status:
Offline
|
|
Get this book. And read the books that come with the dev tools.
If you have the dev CD install the tools and in
/Developer/Documentation/
you will find tons of resources. If you don't have the dev CD look in
/Applications/Installers/
for the dev tools installer.
Learn C first, C++ and Obj-C are both super sets of C so they will clash and it will be confusing (I know I made the C++ -> Obj-C switch this summer, it was harder then it had to be)
Good luck.
|
|
The spirit of resistance to government is so valuable on certain occasions, that I wish it always to be kept alive.
- Thomas Jefferson, 1787
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2001
Location: London
Status:
Offline
|
|
1 - learn C - It's just useful - a lot of open source and unix software is written in C. Also C++ and Cocoa are built "on top of" C and you often use C in Cocoa objects.
2 - if you want to develop just for mac OS X - use cocoa - it's great.
3 - if you want to develop an app that will run on any computer - use pure Java.
4 - Don't ever use CocoaJava. Aaron says so in *the book*.
5 - as far as I can tell C++ is useful if your are writing Drivers for hardware in OS X.
Basically - Learn either Cocoa and C - or Java.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 1999
Location: Ottawa, ON, Canada
Status:
Offline
|
|
Originally posted by juanvaldes:
Get this book. And read the books that come with the dev tools.
I agree. Go get Aaron's book now. I've programmed in Classic MacOS, a little Java, and a lot of C but Cocoa is much different than other environments so I wanted a book to help me make the transition. I'm working through it - it's fabulous.
It assumes a little knowledge of programming and objects, but not much.
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Feb 2001
Location: Pittsburgh
Status:
Offline
|
|
Java: marketable skill but messy
C: marketable but doesn't have high level tools and APIs
C++: marketable, powerful, but not a good language to learn OO programming with since it is too flexible and doesn't force you into proper design
Cocoa/Obj-C: Absolutely beautiful and my favorite but not a marketble skill.
Cocoa/Java: Horrible. Never use this combination, ever!
Carbon: Full featured and OS X native yet not as elegant as cocoa. Marketable skill for most commercial mac development work.
---------------------------------
Without hesitation, I would suggest that you learn cocoa and objective-C. They exemplify how programming should be done. Learning with this combination will teach you the 'right-way' of doing things. C++ lets you do pretty much whatever you want. However, with that power comes a likelyhood of learning, and relying on, poor development techniques. Java encourages the formation of a proper OO mindset or philosophy. However, its higher level APIs are so messy, bloated, and error ridden that you'll often find yourself wondering why it is the way it is. The answer is: it wasn't properly thought out and went through a series of messy iterations. In comparison, Cocoa will spoil you and make obvious the inneficiencies of other APIs. Until recently, I would have suggested java as a viable alternative. It was a high-level OO language that you could actually get employment with. However, things have changed drastically in the past two years. Microsoft is doing everything possible to neglect and/or destroy java. They are largely succeeding. Fewer and fewer windows machines actually have java installed.
To reiterate, learn Obj-C and Cocoa. The differences in syntax between languages is almost trivial. Thus, all the learning you do about progromatic flow structures (loops, conditions, etc) will be directly transferable to any other language. Once a programmer, always a programmer. Object oriented design philosophy is also largely language agnostic. However, obj-C is better at encourage proper OO mental models and has some other advantages which you probably wouldn't care about at this point. (dynamic everything) Don't worry that objective C isn't as popular as C or C++. Once you know how to program, switching between any of these languages will be simple. The higher level APIs is where you spend most of your time when learning a 2nd, 3rd... or 20th language. Unfortunately, your Cocoa skills won't be transferable to Java, VB, .net, etc. Yet C and C++ don't have equivalent standard APIs and Java is messy enough that it can hamper the learning process. You can waste countless hours learning Java's bloated object libraries and spend much of your time baffled, not realizing that, yes, its that complicated and you have to do it the hard way. In contrast, cocoa offers the same or better high level tool-set but uses far fewer and simpler objects.
In summary: Learn Obj-C and Cocoa.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status:
Offline
|
|
One thing to keep in mind is that you need to learn a couple of different things. - You need to learn how to think like a programmer - how to take a task and break it up into a step-by-step algorithm. I think there are many general programming books dealing with this - you don't need anything language-specific.
- You need to learn the syntax of the 'C' language. You don't need to know every little bit to begin with, but you should be able to write and understand a small, console-based program. (console-based meaning no GUI, just text input and output).
- You need to be familiar with the C (and maybe C++) API. C includes lots of library functions that you may want to make use of. You can find these in any general C book. Don't memorize 'em all, just be aware of the broad outlines so that you can say, "Oh, I need to take the sine of an angle, I think the C library had something like that" and then go look it up.
- You need to be familiar with the Cocoa API. You can get familiar from Apple's Cocoa documentation or Hildewhatever's book. Again, don't memorize it, just get an idea of the broad areas that are available and how things relate to one another.
Good luck!
|
Geekspiff - generating spiffdiddlee software since before you began paying attention.
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Aug 2002
Location: Oxford, England
Status:
Offline
|
|
I started with RealBasic with no programming ability and now I'm programming in cocoa. If you've got quite a good programming background start straight in with cocoa (like most people will say) but if you know nothing, RealBasic is very easy ( www.realbasic.com) plus with RealBasic you can make applications for Windows & Mac OS 9/X.
Cocoa is really good and great for programming for Mac OS X!!!
|
|
Luke
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: May 2001
Location: Austin, TX, USA
Status:
Offline
|
|
Originally posted by S|ntax:
I bought my first mac about a month ago, Tibook 800. I really like OSX and would like to start doing some programming on it. The problem is I have very little programming knowledge. My only programming to date was VB and it was few versions back, never any C, C++, or anything. Is carbon, or cocoa and good place to start? Easy enough for a newbie? Can you recommend some good resources to start with?
If you've never done any C or Java, but you have done some VB, REALbasic is a great choice. Check out all the books about REALbasic .
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: May 2001
Location: Portland, OR
Status:
Offline
|
|
I suggest you start with REALBasic and use it as your "sandbox". Play around in it to learn programming skills and concepts. For heavy OS X development, use Cocoa. Cocoa seems to run much faster and cleaner for OS X specific tasks (and it seems to run faster overall).
|
|
8 Core 2.8 ghz Mac Pro/GF8800/2 23" Cinema Displays, 3.06 ghz Macbook Pro
Once you wanted revolution, now you're the institution, how's it feel to be the man?
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Nov 2001
Location: New Jersey, USA
Status:
Offline
|
|
I would go with Java, hands down.
1. Everything in Java is a class. This really lays the concepts of object-oriented design out on the table for you; it forces you to think with the object-oriented mind.
2. Java is portable. Slow? Maybe, but you can get started learning GUI stuff with Swing right away to try and get down some general concepts. You can also make simple apps that you can use across multiple platforms.
3. The Cocoa-Java bridge allows you to program MacOS X native apps. Yet again, some say it's buggy and not as fast, but the option to eventually learn Objective-C is always there. The point is you can learn Cocoa right away without having to deal with learning the little tidbits of the new languages.
That's my .02, for what it's worth.
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: May 2001
Location: Portland, OR
Status:
Offline
|
|
I'll just add something...
imo don't use Java. Its pretty worthless. Its very slow. The Cocoa bridge is nice but C still works better. Java's portability is also overrated.
|
|
8 Core 2.8 ghz Mac Pro/GF8800/2 23" Cinema Displays, 3.06 ghz Macbook Pro
Once you wanted revolution, now you're the institution, how's it feel to be the man?
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Apr 2001
Location: 127.0.0.1
Status:
Offline
|
|
Seems to be a recurring theme in this forum to bash Java. I gotta disagree with this. Learning Java is a very smart thing to do. It is an incredibly versatile language which will not only let you build cool apps for your Mac, but for other platforms and devices (cell phones, PDAs, etc) as well. Throw in WebObjects (Java-based) or JSPs and you'll be able to create killer web apps as well, all from one language. The "everything is an object" approach definitely makes learning easier and I find the syntax to be far less cryptic than ObjC. The Cocoa frameworks are accessible from Java and are far less crappy than some people would have you believe. Also, as some have already mentioned, Java is a much more marketable a skill than ObjC.
Go with Java. That's my opinion, although I know many here disagree with it.
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Feb 2001
Location: Pittsburgh
Status:
Offline
|
|
Originally posted by joltguy:
The "everything is an object" approach definitely makes learning [Java] easier and I find the syntax to be far less cryptic than ObjC.
I hate to say it but:
If you find ObjC cryptic, then you should probably be listening rather than teaching ;-)
You would do an incredible diservice to a begginer by suggesting that they learn the Cocoa-java bridge. Your other points about portability are quite good though. Just be prepared to reevaluate them after Microsoft's abandonment of Java has run its course.
Both Java and Obj-C/Cocoa would be fairly good languages to start with. However, the Java-Cocoa interface should be avoided at all costs!
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Apr 2001
Location: 127.0.0.1
Status:
Offline
|
|
Originally posted by dfiler:
I hate to say it but:
If you find ObjC cryptic, then you should probably be listening rather than teaching ;-)
On it's own, I wouldn't neccessarily call it cryptic, but if you were to place ObjC source side by side with an equivalent Java source, I would wager that a complete newbie would have an easier time understanding what was going on by looking at the Java version.
You would do an incredible diservice to a begginer by suggesting that they learn the Cocoa-java bridge...
Heheh... agreed, that might be a bit frustrating for a newcomer, especially when you consider the lack of documentation/examples that are available for the bridge.
Your other points about portability are quite good though. Just be prepared to reevaluate them after Microsoft's abandonment of Java has run its course.
I use a Macintosh. I could care less what Microsoft puts their little (read: very big) stamp on. 
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 1999
Location: Ottawa, ON, Canada
Status:
Offline
|
|
Originally posted by joltguy:
On it's own, I wouldn't neccessarily call it cryptic, but if you were to place ObjC source side by side with an equivalent Java source, I would wager that a complete newbie would have an easier time understanding what was going on by looking at the Java version.
I think it would only be cryptic if the user has previous experience with programming.
The only really different part is calling the methods
[object method:param1 withParam2:param2 andParam3: param3]
If someone has never used a procedural language before, their mind is a clean slate. I don't think they'd find it cryptic at all.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 2000
Status:
Offline
|
|
I can't believe all the Java bashing going on here. Java is a better than C/ObjC for beginners for two reasons: No pointers to muck up and builtin garbage collection. Pointers and memory management are huge pitfalls for novice programmers. You'll also find more tutorials, articles, and snippets of example code for Java.
As far as the guy bashing on Java's portability, you do realize that most Java apps spend their lifecyle in one environment, the environment they were designed to run in. Most often this is on a fat Sun server, using Oracle as a data store, and frequently using Weblogic for EJBs.
To the Doomsayer: MS pulled their support for Java long ago and Java has INCREASED in mindshare/marketshare since then. Not shipping a VM with IE by default will do little to affect Java's standing. Applets are dead. They were stillborn for all intensive purposes. Java enjoys dominance on the serverside.
In short:
If you're interested in writing applications for a platform with 5% marketshare, go with ObjC/Cocoa. If you'd like something nice to put on your resume, and possibly make a bundle, learn Java. Even better, learn Java first, and then learn ObjC/Cocoa. The two are remarkably similiar. You might even consider going w/ none of the above. Python and Scheme are both better languages to start out with.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 2000
Status:
Offline
|
|
Originally posted by goMac:
<snip>
imo don't use Java. Its pretty worthless. Its very slow.
</snip>
[/B]
Oops, forgot to refute this one.
In some cases Java bytecode is far faster than native code. There are far more optimization opportunities available at runtime than there are at compile time. Do you have any computer science training?
I can't believe that you bash on Java, yet reccomend the turd of a language that is REALBasic.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jan 2001
Status:
Offline
|
|
Originally posted by int69h:
I can't believe that you bash on Java, yet reccomend the turd of a language that is REALBasic.
How about you both agree that Java AND REALBasic suck monkey-nuts.
Objective-C is awesome... and if you want to learn cocoa, I concur... get "the book" (Hillegass)
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 2000
Status:
Offline
|
|
Originally posted by 00101001:
How about you both agree that Java AND REALBasic suck monkey-nuts.
Objective-C is awesome... and if you want to learn cocoa, I concur... get "the book" (Hillegass)
Objective-C is indeed awesome, in fact it's one of my favorite programming languages. I'm just not convinced it's the best tool for a budding programmer. A stroked, blown, nitrous huffing 351W is awesome, but I wouldn't recommend it in an auto for a 16 year old who just got a drivers license.
I've been writing code in C for more than a decade, and it still bites me in the rump occasionaly. One of the best things about Objective-C is that it's a superset of C w/ OO done "The Right Way." That's also the worst thing about Objective-C.
A lot of companies around the world would disagree with your assertation that Java sucks monkey nuts. Fortune 500 companies aren't in the habit of standardizing on worthless technologies. Even our beloved Apple sees the value in Java. Where is the Objective-C support in current versions of WebObjects?
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jan 2001
Status:
Offline
|
|
Good points
I guess I forgot to mention that java was my first language -- and a good one to start with, I guess (just programming applets and such, not cocoa-java bridge).
But once I went C, I could never go back... Programming C and objC is like being god of the computer  Java really pales in comparison.
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Oct 2002
Status:
Offline
|
|
Hi,
I decided that I want to learn Cocoa. So I'll go and see whether I manage to find that book here in Italy.. if not, I'll get it from Amazon.
Also.. wanting to learn more unix (and linux) ... so it looks i'll start to hang here to find ideas 
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Feb 2001
Location: Pittsburgh
Status:
Offline
|
|
Originally posted by Mulattabianca:
Hi,
I decided that I want to learn Cocoa. So I'll go and see whether I manage to find that book here in Italy.. if not, I'll get it from Amazon.
Also.. wanting to learn more unix (and linux) ... so it looks i'll start to hang here to find ideas
You should definately check out apple's developer mailing lists. They are the most compreshensive place to read about and get assistance on Mac programming topics. The mailing lists are free and invaluable to any cocoa developer. (sorry I don't know the url)
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Oct 2002
Location: Bend, OR U.S.A.
Status:
Offline
|
|
Originally posted by S|ntax:
I bought my first mac about a month ago, Tibook 800. I really like OSX and would like to start doing some programming on it. The problem is I have very little programming knowledge. My only programming to date was VB and it was few versions back, never any C, C++, or anything. Is carbon, or cocoa and good place to start? Easy enough for a newbie? Can you recommend some good resources to start with?
First, welcome to the world o' the Macintosh! Guidelines on how to properly rant and rave about your new-found OS/hardware should be in your e-mail in-box. :-)
Seriously,might I suggest that you check with your local CC, and see if they offer an Intro to C course on-line? Many do, and I believe it could be an invaluable experience. You will gain basic knowledge in programming techniques and theory, while having access to a real live professor as well as other class-mates. I took one not too long ago; loved it. Check into Intro to Java and Intro to UNIX as well; both would offer you marvelous insights into the workings of your new OS, particularly the Intro to UNIX.
Anyways, that my iddy-biddy opinion on the subject.
(tig)
|
|
"We do not inherit the land from our ancestors"
"We borrow it from our children"
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Oct 2002
Status:
Offline
|
|
Ok having still a search for good lists etc.
I found also that book on amazon uk, they would send it to italy so probably i will order that next week... but found a lot of material to start online as well 
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Jun 2001
Location: Merry Land
Status:
Offline
|
|
Originally posted by Gul Banana:
To summarise:
Cocoa is good, but Java is better. However, Cocoa is better than Java. You should learn one of C or C++ but not both, and which one is undefined; however, you should learn the other one first.
I love circular logic... 
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|