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

jalagl

macrumors 6502a
Jun 5, 2003
802
1
Costa Rica
zosoeffex70 said:
I went the website for Eclipse and read this about a Java 'run-time environment':

http://download.eclipse.org/eclipse/downloads/drops/R-3.1.1-200509290840/java-runtimes.html

On the page above it does not display a Mac platform - what to do? Again, I'm very ignorant about programming/IDEs etc...

You can download 3.1.1 from http://www.eclipse.org/downloads/index.php, select "Other downloads for 3.1.1" and there's a MacOSX version on that page.

I've been praising Eclipse since the 3.1 release - it works incredibly well (or at least much, much better) on the Mac (in all platforms as well).

HOWEVER, if you want to learn Java, I recommend you use something like TextWrangler (suggested in the thread), and the command line tools. Regarding books, I recommend the Deitel & Deitel How-to books. I really like their approach. Once you manage the basics, you can start using an IDE like Eclipse. IDEs are pretty complex, and if you're starting to learn a language, I think it is better to isolate the complexities of the language from the complexities of the IDE.
 
C

CarlosC

Guest
AlmostThere, some very good answers. We should give you a soapbox editorial :) Contact me if you're interested.

>Say, do you know of any good books that would get me started programming
>in C w/Xcode as a beginner?
Well, I just recommended the following book in two other threads, so why not go for 3! ;)
http://www.amazon.com/exec/obidos/asin/0321213149/idevgames-20

I would also recommend "Xcode Tools Sensei"
http://www.meandmark.com/xcodebook.html
(Note: Yes, I am the artist of this book's cover, but I also recommmend it for what is in-between the covers) ;)

Cheers

Carlos
http://www.idevapps.com
http://www.idevgames.com
 

NewbieNerd

macrumors 6502a
Sep 22, 2005
512
0
Chicago, IL
My opinion on how to start programming

Language: C/C++ are by far the most important languages in the world. However, they are very messy and pointer-based, which means actually thinking about allocated memory for things. Blah. Don't start with that or you'll probably hate it quickly.

Python - Beautiful, simple language, but is really too high a level to do because it is designed, like Ruby (a fav of mine), for scripting and stuff that is very quick to write. You need to learn how to program and get a feel for things. So don't start here either.

My suggestion: go with Java. Objective-C is too C-based, in that you're going to see pointers (little astricks *) and structs and classes and stuff. You don't see those in Java, but you will be forced to learn programming techniques and terms. Your very first program is going to have terms like 'static' and 'void' and 'public' and whatnot...these things you need to learn, but the learning curve isn't too high. With java you can also make GUIs, i.e. little cute windows that pop up, with ease and it can be very rewarding. I support starting with Java 100%.

As for books, I have the Deitel & Deitel book and I think it is good as well. Right off the bat they are gonna tell you what every line means in your very first program. Another beautiful thing is that, within the first 2 or 3 chapters, they will be showing how to make those GUIs (windows) as well as Applets, which are Java programs which can run in web pages. They don't want 10 chapters for you to know programming pretty well. You will be excited about seeing your own windows popping up instead of just reading text at some command line. Very good book. Find it on ebay/amazon/half.com for cheap.

As far as how to start programming, I know XCode and Eclipse and what not seem popular and interesting, but don't do it. It's WAY too complicated for starting. If you don't use Java, just use a simple text editor and the command line. If you do use Java, check out something called DrJava:
http://www.drjava.org

It is easy to use and simple. A window comes up where you can create new text files and whatever without having to go through all this, start a new project, blah blah junk. You don't need that. To compile things, you just click the `Compile All' button at the top. It will show at the bottom if there were any errors and where they are. If it does compile correctly, you just have to type `java HelloWorld' if HelloWorld.java is your file and poof, it runs your program right in front of you. Nothing complicated. It is simple, and so I HIGHLY recommend it.

That's just my opinion. If you have any questions, feel free to ask. No dumb questions...I still ask plenty of them, hehe. :)
 

caveman_uk

Guest
Feb 17, 2003
2,390
1
Hitchin, Herts, UK
NewbieNerd said:
Objective-C is too C-based, in that you're going to see pointers (little astricks *) and structs and classes and stuff. You don't see those in Java..
So Java doesn't have classes? News to me. The pointer stuff in objective-C is not exactly hard - most of the time you don't actually have to think about them being pointers. Though you're right that's what they are. I found I had to think a lot harder in C or C++ about pointers than in Objective-C. In C++ it's all *, ** (pointer to a pointer - cool!!!) and &. I do think that the Cocoa frameworks should decide if it is actually going to be a fully object orientated language. It seems odd there are structs (like NSRange, NSPoint) knocking about in what's supposed to be an object-orientated language.
 

gekko513

macrumors 603
Oct 16, 2003
6,301
1
caveman_uk said:
I do think that the Cocoa frameworks should decide if it is actually going to be a fully object orientated language. It seems odd there are structs (like NSRange, NSPoint) knocking about in what's supposed to be an object-orientated language.
Yeah, it's a bit strange, but there are good reasons why it is the way it is. The dynamically typed Objective C classes are not as efficient as C functions or statically typed C++ classes.

Range, points and rectangles and stuff like that are frequently referenced and would bog down the program if it was done with Objective C classes.
 

Soulstorm

macrumors 68000
Feb 1, 2005
1,887
1
I have been learning C++ for some months now, and although I have not yet explored the full potential of the language, I must say that I find it fairly easy to use. I had originally programed in Applescript, but I don't think that this is important...

Objects are fairly easy to handle in C++. I am saying this because I am not yet a complete programmer. Sometimes it's good to hear how a newbie sees things with a language you intend to start learning...

I have looked at C and I don't know if you find it strange, but I think that if you start learning C++, it's easier to learn C afterwards, much easier than if you do it the other way around.

I haven't been involved with Objective C yet, but I have heard that C++ is the most important language out there. If you know that language, then it's easy to learn the other C's variations. The only thing that bothers me though, is pointers. Although I understand them, I think it's a pain in the **s. Well, I guess that is the beauty of it, right?

My newbish opinion: Start developing console applications using C++ in XCode, and then I think that the path will be clear for you. It will be easy to decide which road you will choose.

Good luck and welcome to the programming world!
 

NewbieNerd

macrumors 6502a
Sep 22, 2005
512
0
Chicago, IL
caveman_uk said:
So Java doesn't have classes? News to me. The pointer stuff in objective-C is not exactly hard - most of the time you don't actually have to think about them being pointers. Though you're right that's what they are. I found I had to think a lot harder in C or C++ about pointers than in Objective-C. In C++ it's all *, ** (pointer to a pointer - cool!!!) and &. I do think that the Cocoa frameworks should decide if it is actually going to be a fully object orientated language. It seems odd there are structs (like NSRange, NSPoint) knocking about in what's supposed to be an object-orientated language.

Yeah, I meant that Objective-C has BOTH structs and classes and the beginner will can be confused about the differences and which to use, etc. I do agree that Obj-C is not that hard and maybe a good place for a new programmer to start, at least on a Mac, but I think Java is a cleaner, simpler beginning.
 

GorillaPaws

macrumors 6502a
Oct 26, 2003
932
8
Richmond, VA
Dude... if you decide to go the Objective-C route (I'm in the (Slow)process of trying to teach myself), get the Kochan book "Programming in Objective-C" (it is a slow approach - i.e. it doesn't assume you're an experienced programmer, or that you know any C at all) also get a book that will have you doing stuff with Interface Builder like O'Reiley's book "Learning Cocoa w/ Objective-C" or the Hillegass book "Cocoa Programming for Max OS X". Use them together. The Kochan book will teach you all of the language that you will need to learn, but by itself it's kind of tedious, and you'll loose interest FAST because you just make command line programs and stuff. When you start to get boared, switch to the O'Reiley/Hillegass book, It'll rush through the language stuff faster than you want (which is why you have the Kochan book), but it'll have you making apps w/ interface builder that have minimal code, but will open in a window and allow you to add in all of those Apple-centric widgets drag and drop style. Do that for a while until the language stuff gets too far ahead of where you're grasping everything, and then switch back to Kochan. Go back an forth - a great way to get your feet wet with Cocoa programming.

I've also bought a couple of other books and I can tell you to steer FAR AWAY from the Trent/McCormack "Beginning Mac OS X Programming." It looks like the ideal place to get started (especially since it's written for Xcode 2 and Tiger) but don't be fooled, it's trying to be all things to all people, so everything gets watered down so thin that you don't get much of anything out of it e.g. it covers the entire Objective C language in 52 pages.... riiiight.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.