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

XIII

macrumors 68040
Original poster
Aug 15, 2004
3,449
0
England
Hi. I've decided I'm going to teach myself some form of programming, and have sort of decided that C seems to be the most useful. I then find there are three forms of C... C, C#, and C++. What do each of these do, and which is easiest to learn? Thanks.
 

mspock

macrumors newbie
Aug 26, 2003
23
0
dont forget objective-c

hi, i just started programming myself 2 weeks ago.

Im taking class in html and CSS, that will be follow after christmas with a class on php and mySQL. Im learning java by myself, and next year i have a class on c++ using Borland C++ builder on PC.

If you are posting on a macintosh site, i would assume that you would like to program on your mac. Then u need to learn Objective-C, wich is a object oriented language use in mac os x. Then learn Cocoa for the design of interface...

You can also learn java, wich is crossplatform and a good language to start with (i dont usually recommend alot of book from them, but Barry Burd's "Beginning programming with java 2nd edition for dummies" is a must have for the absolute beginner. It wont be a reference book on java, but it will teach you how to understand alot of programming concept that you will encounter in all object oriented programming languages. Plus, it give you a pretty good start in java.

U can use Xcode to code in C, C++, objective-C and java (and more). its a pro IDE (integrated developpement tool) that come bundle on every mac. Just install it from you os x cd/dvd.

For java, i would recommend Eclipse 3.1, wich is an open source IDE, or JCREATOR from Sun (have to buy it).

What i love about learning java, is that you can use your knowledge to build good desktop app, and use it for developping with java enterprise platform (J2EE) for server/client app, etc. It is widely use (in competition with .net).

hope that help !
 

Linkjeniero

macrumors 6502
Jan 6, 2005
255
0
I've been programming for a while now, and I recommend you to start with Java. Much more forgiving to newbies, and lets you concentrate on learning instead of fixing obscure errors; also Java programs run everywhere. When you're ready to move on, learn C or C++ (the difference between them is that C++ is object-oriented and C is not), but not C# (wich is another MS "improvement" that only benefits them).
 

zv470

macrumors 6502
Jul 4, 2004
441
157
Japan
Yes definately start with Java and then move on to C++. Here is a run-down...


Java is easy and you'll learn about Object Oriented Programming (OO).

C++ is great (and it's OO), but difficult to debug for the beginner.

C encourages structured programming which is quite different to OO. Also C is difficult to debug.

Objective-C is an OO version of C.

C# is Microsoft's own programming language.




Get yourself a good beginners book on Java and download Eclipse from http://www.eclipse.org
 

XIII

macrumors 68040
Original poster
Aug 15, 2004
3,449
0
England
Thanks Guys. Thats just what I needed. I'll have a go with some Java for Dummies books (;)), and see how I get on. When I feel like I can move on, I'll try some C or C++.. Thankyou all, for your quick and informative answers.
 

plinden

macrumors 601
Apr 8, 2004
4,029
142
If you get into Java, also read Effective Java by Bloch (not right away, learn the language first). It'll help you avoid the pitfalls that many Java newbies fall into because Java is so easy to use.
 

XIII

macrumors 68040
Original poster
Aug 15, 2004
3,449
0
England
Ok. Are there any other absolute beginners books for java I should get hold of?
 

Vanilla

macrumors 6502a
Mar 19, 2002
589
0
Atlanta, GA
XIII said:
Ok. Are there any other absolute beginners books for java I should get hold of?

I'm working my way through Sams "Teach yourself Java 2 in 21 days" and so far (day 4) I've found it very informative, easy to read and educational. I'm coding the examples using Eclipse 3.1, which is a great piece of open source software.

Vanilla
 

HiRez

macrumors 603
Jan 6, 2004
6,265
2,629
Western US
I would recommend Java if you are self-teaching programming, for the huge number of resources available, both printed and beginner-friendly online tutorials and references. C and Python would also be good choices, but I think Java would be easiest to start with. I would teach yourself C at some point anyway, as so many other languages derive from it (including Java, in part).
 

XIII

macrumors 68040
Original poster
Aug 15, 2004
3,449
0
England
Thanks, I'll look through some free resources for java, and maybe buy a book. :) Here goes nothing! :D

Just as a side note, how long do you think, before I can create something I will be proud of? :)
 

ham_man

macrumors 68020
Jan 21, 2005
2,265
0
C# is the devil.

ANSI C. Objective-C is built on C and that is what you will most likely want to step up too for Mac programming...
 

seriypshick

macrumors member
Apr 4, 2005
76
0
Everywhere
ham_man said:
C# is the devil.

ANSI C. Objective-C is built on C and that is what you will most likely want to step up too for Mac programming...
Same thoughts here.
Objective-C is 'the mac language'. It's based on C. Therefore You should learn C before you dive into any OOP(Objec Oriented Programming). Then when you get the basics go for Objective-C.

XIII said:
Just as a side note, how long do you think, before I can create something I will be proud of? :)
I have been learning programming for around a year. I have yet to create something that I can be proud of.
:)
 

VanMac

macrumors 6502a
May 26, 2005
914
0
Rampaging Tokyo
I agree with the learning Java posts.

'C' would be a waste of time, unless your gonna writes some device driver of some sort, or maintain some legacy code.

C# is microsoft code for .net crap. Ughhh.

Java will serve you well. It is platform independant, so it will run on mac, unix, windows, etc. You will also learn OOP concepts which is good. Procedural languages are dead, so again, no point in learning the old way of doing things. (and before someone flames me about that, I've been coding for over 15 years, so I'm accustomed to the 'old ways' ).

Also visit http://java.sun.com and post messages in their "New To Java" forums. You will get very good responses. (as long as you dont ask them to do your homework for you).

Happy coding :)
 

Nutter

macrumors 6502
Mar 31, 2005
432
0
London, England
I strongly disagree with the statement that learning C is a "waste of time", particularly if you are interested in programming for the Mac. Objective-C is a very simple and elegant extension of ANSI C, so if you start by learning C you will feel very comfortable with Objective-C syntax.

I would recommend that you consider starting with Steve Kochan's excellent book, "Programming in Objective-C":
http://www.amazon.com/exec/obidos/t...f=sr_1_1/103-1746753-4167037?v=glance&s=books

This book doesn't assume any prior knowledge of C, so it is a perfect way to get to grips with the language straight away.

I wouldn't recommend that you learn Java if you are likely to want to program serious applications for the Mac.
 

petej

macrumors regular
Jun 9, 2004
138
7
Whilst I am a hater of C#, I am shocked at how it is now starting to make inroads into some industrial sectors. Thankfully, this only seems to be for relatively small extensions to business software packages, but it is creeping in. In that sense, time spent learning C# now may not be wasted time.
C++ would be first choice for me out of your shortlist.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.