views:

710

answers:

9

I've heard a few debates in the past over which is more mature: RubyCocoa or Obj-C/Cocoa... but I have felt that the answers jet right over the "newbie" that would truly appreciate an answer.

So the question is: for a total beginner, with little-to-no programming experience, is it easier to learn Ruby and explore Cocoa via the bridge (then possibly tackle Obj-C) or to straight up jump right into Objective-C and Cocoa.

Both communities are strong and have a plethora of resources, but as many people have pointed out the syntax of Obj-C is just daunting. Perhaps for a true beginner it would be easier to learn Ruby then tackle Objective-C?

Update: I apologize, but when I said "learn Ruby and explore Cocoa" I did not mean to learn programming via RubyCocoa, but rather to learn Ruby (and once one feels confident enough) begin to explore Cocoa with the possibility of leveraging their growing skill-set to tackle Obj-C.

A: 

I would suggest to start with an oo language such as c++ or java. After understanding the basic comcepts of oo it should not be to hard to learn objective-c.

The problem with ruby cocoa is that there is no guarantee apple will support this in the future. They have dropped the cocoa-java bridge in the past.

Christian Stade-Schuldt
RubyCocoa wasn't Apple supported initially (it's an open source project) so I don't know that Apple dropping support for it should necessarily be a concern.
Logan Capaldo
Why start with C++ or Java? He's already named two OO languages (and simpler ones than C++ or Java to boot), so why recommend two more?
Chuck
+2  A: 

The problem with starting with RubyCocoa is that you end up learning both ruby and cocoa and the interaction between the two at the same time. I would say learn ruby, or learn Objective-C/Cocoa. Jumping right into RubyCocoa is going to throw you off.

Logan Capaldo
I'm sorry, that is the approach that I was attempting to convey. Learn Ruby, and then (when you are confident) explore Cocoa.
DarthNerdus
+10  A: 

I would not recommend learning to program with RubyCocoa.

I love Ruby and think it's a great language to learn programming, but the RubyCocoa bridge isn't documented well enough that I'd recommend it as a learning environment. You'd be learning general programming concepts, the Cocoa frameworks and the quirks of RubyCocoa all at the same time. That's a lot of stuff to shove into your head.

If you're bound and determined to start with Cocoa, start by learning Objective-C. Otherwise, you could learn Ruby to begin with and then transition to Objective-C once you feel a little more comfortable as a programmer. And once you've done all that, you can use RubyCocoa, but then you'll know enough that it won't make you go crazy.

Chuck
I agreed. Each programming language has its strengths and weaknesses, especially if you include the entire toolset that follows the language (frameworks, IDEs, operating systems, etc). Objective-C's strengths is by far in Cocoa for programming Apple GUI platforms. I'm not a Ruby programmer, but it seems that Ruby is better suited for server-side web programming. True you can write server-side web applications with Objective-C and Cocoa and you can write Mac OS X GUI applications with Ruby and RubyCocoa (or even via one of the X11 Unix GUI toolkits), but its not the best tool for the job.
adib
+2  A: 

Writing Code is the Easy Part

No point really in:

  1. Try to see which is easy, if you are opting for the easy way, you will always get it wrong.. fear not what is hard, for hard is to fear not.

  2. Trying to compare languages/approaches that way, as per the post I added, thinking what's easy/nice/hard in this case is a question of syntax, which ultimately boils down to interpretation, beauty is in the eye of the beholder.

  3. Depending on what they will ultimately attempt to do with the technology you will find somethings are "easier" than others in one approach or the other..easy is a hard thing to define

  4. Only one question matters: What does one know before being exposed to any of the two approaches? -- you said:

    for a total beginner, with little-to-no programming experience

My answer:

Often near where I live tourists ask:

"How do I get to placename X from here?"

People here usually answer:

"If I were you, and I was trying to get to placename X, I wouldn't start from here.."

So.. the answer to your question is:

Neither

Total beginners should always study the basics of programming as per what @Tafkas said.. (not necessarily needing to study OOP languages.. but programming...) before making any kind of decision on what to study and/or implement. (This + requirements gathering)

..Otherwise the people learning these language/technology skills will be just another set of script kiddies on their way to becoming copy paste code monkeys

Ric Tokyo
+2  A: 

It sounds like your goal is to learn to program in Cocoa, using either Ruby or Objective-C as the language.

While I've never used Ruby (or RubyCocoa, for that matter), my understanding is that Cocoa is written with Objective-C as the primary language, and the bridges (Python and Ruby) come in second. While they generally work well, there are some rough edges that aren't there when using Cocoa from Objective-C.

I would say that you should go the Objective-C/Cocoa route. It might not be bad to start with another language first - C if you want to learn it (which would be useful, since Objective-C is a superset of C), or something like Java if you want to go the OO route.

That's not to say that RubyCocoa doesn't work or isn't useful. It's great for what it does, but I don't think that it is the place to start with Cocoa programming.

Andy
A: 

I think this depends on how much the beginner already knows. If you already know object oriented programming, you should definitely learn objective-c. Thinking in paradigms like messaging, delegation, and categories will help a lot to understand the Cocoa system. If you've got a few languages under your belt, but no object oriented programming, then you probably also have enough experience to learn OOP through Cocoa, but understand that it handles things differently from languages like C++. If you have very little programming experience, then ruby may be better in the short term.

One other advantage of objective-c to keep in mind is the manual reference counting memory management paradigm. It can be much easier to deal with than malloc/free, but it doesn't allow the laziness that Java and scripting languages engender.

+1  A: 

I think you're in for a harder road by going with RubyCocoa if you want to build serious applications for either OS X or especially later for the iPhone.

The main reason is simply being able to find answers to common programming questions that you might have. There is a burgeoning community around Objective-C/Cocoa with a lot of forum support, code snippets, samples, etc. It will be infinitely easier for you to rapidly learn how to you use Cocoa if you understand Objective-C. It will also be easier for your peers to troubleshoot your code and help you out when you get stuck. Objective-C is really not that hard to learn, especially if you have some kind of grounding in OO concepts.

Ish
+5  A: 

I would start with what Apple is preaching: Objective-C/Cocoa

NTulip
+2  A: 

I would suggest that if your going to be serious about writing Applications for OSX and/or the iPhone I would highly suggest you get your feet wet with Objective-C and Cocoa.

The reason are simple:

  • The Documentation from Apple on Objective-C is excellent.
  • You're going to get more help from the community here at Stack Overflow because there are more Objective-C/Cocoa developers than RubyCocoa. (from what I've seen so far).
  • The Objective-C Developers are very good at helping each other out and I could not find a better group of developers with open arms to new people learning the language.
  • Great Developer books are available as well as outside training if you want it.
  • The big one that I see is that you can NOT develop for the iPhone using RubyCocoa. But if you learn Objective-C/Cocoa you can pretty much dive right into Cocoa Touch.

There is no guarantee that Apple will keep RubyCocoa updated as much as they do with Cocoa.

Don't get me wrong, learning Ruby is a great language and I don't think you can go wrong learning it. However right now if you have the option right now to learn either or, go with Objective-C/Cocoa.

Niels Hansen