Mac First programming language (yet another thread)

Keytachi

macrumors regular
Original poster
Sep 14, 2006
161
0
Hi everyone! Next year i'm going to college, and it's about time i learn some programming languages (i want to join the informatics and computers engineering course).
My goal is to be able to create applications for mac. I have already done some tiny stuff in AppleScript, but it doesn't serve me that well.

I read somewhere that Objective-C isn't that simple, and that i should learn some language thats more simple before moving on to Obj-C.
Which languages should i learn before heading for Obj-C? Or should i start right away with Obj-C? Any idea is welcome!

Thank you, Keytachi
 

richard.mac

macrumors 603
Feb 2, 2007
6,298
2
51.50024, -0.12662
learn C. its a cousin of Objective C and C++ and is a very old and fast programming language. its pretty hard! well for me! if you can get your hear arround that them im sure you be ready to learn Objective C.
 

Cromulent

macrumors 603
Oct 2, 2006
6,034
35
The Land of Hope and Glory
Most Universities start with a language like Scheme or Java. You may want to bear that in mind. Can you link to your modules so we know what to recommend?

If you are purely interested in the Mac I'd go for C first then Objective-C. Learning C is also learning Objective-C as it is a proper subset so don't think you are wasting time.
 

Keytachi

macrumors regular
Original poster
Sep 14, 2006
161
0
Thanks for the replies. Here is the link to the classes i'll have: link.
I haven't read all the info of the classes, so i don't know if i will learn a specific language somewhere along the line.

I need to focus on my studies this year, so i'll probably buy a book on learning C (instead of looking for extracurricular classes).
 

Keytachi

macrumors regular
Original poster
Sep 14, 2006
161
0
Actually its portuguese. And there is a button to the top right corner with an UK flag :)
 

mobilehaathi

macrumors G3
Aug 19, 2008
9,347
6,218
The Anthropocene
Well, my Portuguese is pretty lousy, but from what I can tell Fundamentos da Programação might have you programming C++. Memory management, pointers, object oriented programming, and inheritance I think are mentioned, and I can't imagine any other language to use other than C++ for that stuff.
 

mobilehaathi

macrumors G3
Aug 19, 2008
9,347
6,218
The Anthropocene
Oh, I guess it could be Java...

(Now I don't know Java so smack me if I'm wrong.)

If I recall, Java does all the garbage collection for you...seems silly to learn about memory management but not implement it yourself?

Oh well, you'll learn a lot either way. You should be able to pick up C/C++ and later Obj-C once you know all those concepts.

Edit: Oh and programming in LISP will blow your mind...its such a cool language.
 

edenwaith

macrumors 6502a
Aug 7, 2001
688
86
So, start with java, move to C and then head to Obj-C?
Java wouldn't be a bad decision, either, since its syntax is very similar to C/C++ (well, at least when compared to other languages, such as BASIC or Ada).

If you are looking at learning a "proper" programming language, then I echo what others have mentioned by learning C and C++, since you can make use of those skills when moving over to Objective-C.
 

edenwaith

macrumors 6502a
Aug 7, 2001
688
86
Lisp

Yep definitely Java you want to be looking at.

Edit : and it looks like the AI course uses LISP as well.
Ah, good old LISP! I wore out the Shift, 9, and 0 keys on my keyboard from typing all of those parentheses!

Does anyone know if there is a LISP interpreter available for Mac OS 10.5 available? The last time I programmed in LISP, I used Mac OS 10.1, but the interpreter I had didn't work under Mac OS 10.2 for some reason...
 

Keytachi

macrumors regular
Original poster
Sep 14, 2006
161
0
I'll take on Java first, and then move on to C (and later to Obj-C). I hope it will give me the foundations i need :p

Also... this might be a very stupid question... but where is the Java Development Kit?!? Spotlight doesn't find anything!
 

Keytachi

macrumors regular
Original poster
Sep 14, 2006
161
0
Yes, i have the developer tools installed

EDIT:
I have found the Java class option in XCode.
I'm reading the tutorials in the Sun website, but it doesn't have any Mac OS specific tutorial (only with the NetBeans IDE), and i'd prefer to use XCode.
Any tips on what to do/follow?
 

rev316

macrumors regular
Nov 7, 2004
156
0
Just start with Obj-C. Advise I've received and now give to inspired Macintosh programmers.
 

lee1210

macrumors 68040
Jan 10, 2005
3,180
1
Dallas, TX
Yes, i have the developer tools installed

EDIT:
I have found the Java class option in XCode.
I'm reading the tutorials in the Sun website, but it doesn't have any Mac OS specific tutorial (only with the NetBeans IDE), and i'd prefer to use XCode.
Any tips on what to do/follow?
Don't use XCode right now.

Once you're finding yourself burdened by having to build quite a few classes at one time for a particular project, or you're really having trouble with what you need to import for something, etc. that's when you need an IDE. Smultron seems to be a popular editor, though I prefer vi at the commandline over any other editor. Others tend to be quick to disagree on vi, so use whatever you're comfortable with to edit the code. Then use javac from the commandline to compile and java to run the generated classes.

Java will help you catch some beginner errors like array overflows that in C will behave in unexpected ways. Do make sure you get the basics of arrays down first, before moving to the more dynamic data structures like lists, sets, etc. The other things are great, but knowing how to properly manipulate an array is crucial.

There are a few others around here that are just getting into Java as well, so we're in a pretty good position to assist you as you run into problems.

This:
http://java.sun.com/j2se/1.5.0/docs/

and more specifically, this:
http://java.sun.com/j2se/1.5.0/docs/api/index.html

should become your best friend. Being able to navigate and parse the API documents is as important a skill as being able to pick up syntax and apply, etc.

Good luck!

-Lee
 

Keytachi

macrumors regular
Original poster
Sep 14, 2006
161
0
Use the Java Tool template, type your code in and click build and go pretty much. You'd probably be better off using the command line though.
Ah, yes. I'll use the command line. It has been working with the windows commands (yay! i made an Hello World app!) so i'll keep using that.

Thanks a lot for all the help!
 

mobilehaathi

macrumors G3
Aug 19, 2008
9,347
6,218
The Anthropocene
Ah, yes. I'll use the command line. It has been working with the windows commands (yay! i made an Hello World app!) so i'll keep using that.

Thanks a lot for all the help!
Ewwww, Windows command line!:D

I'd go with Terminal, but don't necessarily listen to me. I wouldn't want to needlessly derail your learning!:)
 

fluidedge

macrumors 65816
Nov 1, 2007
1,365
16
can i recommend learning HTML.

hang on before you shoot me down.

HTML is a nice simple language that teaches good structure and makes you think about your code. I think it's a nice way to get into the mind set of learning another language.

Get one of those learn HTML in a month books and work through it cover to cover.

just a thought.
 

lee1210

macrumors 68040
Jan 10, 2005
3,180
1
Dallas, TX
can i recommend learning HTML.

hang on before you shoot me down.

HTML is a nice simple language that teaches good structure and makes you think about your code. I think it's a nice way to get into the mind set of learning another language.

Get one of those learn HTML in a month books and work through it cover to cover.

just a thought.
I mean no disrespect, but HTML is not a programming language, it is a text markup language. There are some print/display languages that are turing-complete, like postscript, but HTML is not one of them.

You didn't mention javascript, so I'm not sure if that's what you meant. If so, javascript would be a fine place to start, but... it's a little "floppy" in terms of being loosely typed, which makes me uncomfortable for a beginner. That would be my primary complaint against starting with javascript.

-Lee
 

Cromulent

macrumors 603
Oct 2, 2006
6,034
35
The Land of Hope and Glory
I'd steer clear of HTML. It does not teach you anything about programming really, it is mearly a document formatting tool (and arguably LaTeX would be better to learn if that was your goal).