First programming language (yet another thread)

Discussion in 'Mac Programming' started by Keytachi, Sep 3, 2008.

  1. macrumors regular

    Joined:
    Sep 14, 2006
    #1
    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
     
  2. macrumors 603

    richard.mac

    Joined:
    Feb 2, 2007
    Location:
    51.50024, -0.12662
    #2
    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.
     
  3. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #3
    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.
     
  4. macrumors 603

    mobilehaathi

    Joined:
    Aug 19, 2008
    Location:
    The Anthropocene
    #4
    C/C++

    You might even start with it at University.
     
  5. thread starter macrumors regular

    Joined:
    Sep 14, 2006
    #5
    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).
     
  6. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #6
    Ah, it's in Spanish. Sorry my language skills suck :).
     
  7. thread starter macrumors regular

    Joined:
    Sep 14, 2006
    #7
    Actually its portuguese. And there is a button to the top right corner with an UK flag :)
     
  8. macrumors 603

    mobilehaathi

    Joined:
    Aug 19, 2008
    Location:
    The Anthropocene
    #8
    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.
     
  9. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #9
    Yep definitely Java you want to be looking at.

    Edit : and it looks like the AI course uses LISP as well.

    Looks like a very good course by the way :).
     
  10. thread starter macrumors regular

    Joined:
    Sep 14, 2006
    #10
    So, start with java, move to C and then head to Obj-C?
     
  11. macrumors 603

    mobilehaathi

    Joined:
    Aug 19, 2008
    Location:
    The Anthropocene
    #11
    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.
     
  12. macrumors 6502a

    Joined:
    Aug 7, 2001
    #12
    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.
     
  13. macrumors 6502a

    Joined:
    Aug 7, 2001
    #13
    Lisp

    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...
     
  14. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #14
    Ready Lisp.
     
  15. thread starter macrumors regular

    Joined:
    Sep 14, 2006
    #15
    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!
     
  16. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #16
    Have you installed Xcode?
     
  17. thread starter macrumors regular

    Joined:
    Sep 14, 2006
    #17
    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?
     
  18. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #18
    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.
     
  19. macrumors regular

    Joined:
    Nov 7, 2004
    #19
    Just start with Obj-C. Advise I've received and now give to inspired Macintosh programmers.
     
  20. macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #20
    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
     
  21. thread starter macrumors regular

    Joined:
    Sep 14, 2006
    #21
    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!
     
  22. macrumors 603

    mobilehaathi

    Joined:
    Aug 19, 2008
    Location:
    The Anthropocene
    #22
    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!:)
     
  23. macrumors 65816

    fluidedge

    Joined:
    Nov 1, 2007
    #23
    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.
     
  24. macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #24
    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
     
  25. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #25
    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).
     

Share This Page