PDA

View Full Version : First Programming Language on a Mac? (Beginner's Question)




cjuggler1984
Feb 23, 2009, 04:16 PM
Hi!

New mac user here (and extremely happy to be one)! and always wanted to learn programming..

I read the previous posts on a first programming language and many recommended C/C++/Java/Python/Apple Script but i'm not sure if the advice is outdated.. think it was a 2004 question

After much consultation and surfing around I figured that I ought to start with C/C++ because of the following reasons

1. Hoping to learn and write good programs in the long term and from what i've read C/C++ is the most common standard for programming?

2. Not too put off by difficulty if it means that I fulfill requirement 1 and am able to build a good foundation for future learning= P ..(heard that C/C++ can be really tough for a first language) hoping to just sit down and really spend time working my way through the process

so... i'm looking for opinions.. given my criteria am i making the right decision? or are there other languages which i ought to look closer at?

also.. where does objective C fit into all this? From reading around... i figured that its a mac related version of C? Should I be starting with that then?

Thank you so much for your help!

Cheers!
:)



mongrol
Feb 23, 2009, 05:14 PM
I'd go straight to Cocoa and Objective-C. It's very straight forward and as long as your doing standard Cocoa stuff it's not very "C-ish". It's also very quick and producing results and you can have a little GUI program up and running with hardly any typing at all. Some will say this is the wrong way to go about it but getting results helps keep up the enthusiasm.

Start here for some introductory tutorials.

www.cocoadevcentral.com

bobriot
Feb 23, 2009, 05:16 PM
I would start with automator just to get a feel for scripting, then try Applescript which is the next level. Then I would try something like Java or Ruby or Pearl to take this one stage further. Use a good IDE that will help with your dev, I use netbeans when I write java and it is excellent.

teddfox
Feb 23, 2009, 09:59 PM
I would seriously look at Ruby. It is easy to learn (I am now) and the language is actually logical for future learning. PLUS MacRuby will let you develop Cocoa Applications. It is an easier road, but of course MacRuby cannot dev for iPhone, but it is a great starting point.

angelwatt
Feb 24, 2009, 07:25 AM
A second recommendation for Ruby. (http://compsci.ca/blog/ruby-best-introductory-programming-language/)
Another decent article on the topic. (http://www.linuxjournal.com/article/5915)

fenton
Feb 27, 2009, 06:16 AM
I'm currently learning to program in Ruby, it's been great. I recommend Chris Pine's 'Learn to Program' which teaches programming in Ruby, he also has a website that has an older version of the text for free. As a plus, if you're having an issue he's very responsive to emails.

http://pine.fm/LearnToProgram/

BravoBug
Mar 1, 2009, 09:56 PM
I personally think your best choice would be to start with vanilla C, learning the most simple low-level stuff you can. Learn to write really simple input/output programs right inside the terminal first, compiling on the command line using GCC.

I learned programming from the top down and I regret it. You can start learning Objective C and Cocoa in XCode first but because they are built on top of some of the core concepts you'll learn in C programming, it's useful to have that foundation first.

Cheers~

GorillaPaws
Mar 2, 2009, 09:56 AM
I learned programming from the top down and I regret it. You can start learning Objective C and Cocoa in XCode first but because they are built on top of some of the core concepts you'll learn in C programming, it's useful to have that foundation first.

I just wanted to mention that Stephen Kochan wrote in his book "Programming in Objective-C 2.0" that learning Objective-C first may be the better route since you'll be developing the object-oriented thought process from the outset [I'm paraphrasing from memory]. I think this viewpoint has merit and is the path I'm personally taking.

HyperSnake
Mar 2, 2009, 10:15 AM
Hi!

New mac user here (and extremely happy to be one)! and always wanted to learn programming..

I read the previous posts on a first programming language and many recommended C/C++/Java/Python/Apple Script but i'm not sure if the advice is outdated.. think it was a 2004 question

After much consultation and surfing around I figured that I ought to start with C/C++ because of the following reasons

1. Hoping to learn and write good programs in the long term and from what i've read C/C++ is the most common standard for programming?

2. Not too put off by difficulty if it means that I fulfill requirement 1 and am able to build a good foundation for future learning= P ..(heard that C/C++ can be really tough for a first language) hoping to just sit down and really spend time working my way through the process

so... i'm looking for opinions.. given my criteria am i making the right decision? or are there other languages which i ought to look closer at?

also.. where does objective C fit into all this? From reading around... i figured that its a mac related version of C? Should I be starting with that then?

Thank you so much for your help!

Cheers!
:)

I started learning to program in October but first really started in January. I got a book on C++ even though I wanted to prog for the mac and iPhone, I just didn't do my research properly and took the most common language I could find. BIG MISTAKE. I learned all basic principles of C++ which has helped me a lot learning Obj-C with Kochan's book(Programming in Objective-C 2.0(second edition)) which I only need to read two chapters more(I could skip the "underlying C features chapter"). So if you plan to prog for the iphone or mac learn obj-C and get Kochan's book since it definately is the best(even though it has some mistakes in the illustrated programs). Only if you want to program for Windows should you consider C++, Java or C#.

Ohh and by the way I chose to spend a lot of time learning a difficult programming language as my first language instead of spending short time on learning an easier lanuage and then "fight my way to the top" as some other people have said is the best. I must say I do not regret this adn Im already wrinting iPhone apps now.

Cromulent
Mar 2, 2009, 10:31 AM
Only if you want to program for Windows should you consider C++, Java or C#.

Nonsense. C++ works perfectly well on the Mac, as does Java. Heck, even C# works on the Mac with a bit of shoehorning.

larswik
Mar 2, 2009, 03:15 PM
Last year I started with Java and it was not powerful enough for what I needed. I switched to Objective C but it was to hard to learn from a book even with these good folks here. I bought a Python book last week and I am already a 1/4 way though it and it is much easier for me then Objective C. So far Python is a good starter language to build up to Objective C. Much is the same and you can created powerful GUI programs as well.

If you are totally new like me, this might be your ticket.

-Lars

Cromulent
Mar 2, 2009, 04:23 PM
Last year I started with Java and it was not powerful enough for what I needed. I switched to Objective C but it was to hard to learn from a book even with these good folks here. I bought a Python book last week and I am already a 1/4 way though it and it is much easier for me then Objective C. So far Python is a good starter language to build up to Objective C. Much is the same and you can created powerful GUI programs as well.

If you are totally new like me, this might be your ticket.

-Lars

Interesting that you state that Java was not powerful enough for what you needed yet ended up with Python. I'm not knocking Python at all, but Java is an extremely powerful language and from the benchmarks I have seen is actually faster than Python too.

Buschmaster
Mar 2, 2009, 04:32 PM
I know Java, Python, and Obj-C. I gotta say... Obj-C blows the others away. Java is ok, but I find it fairly slow from my real world use... It's better than Python as far as deployment, but that's about it. I'd jump in the fire and learn Objective-C and read up a LOT on Cocoa Dev Central.