Learning programming.

Discussion in 'Mac Programming' started by XNine, Apr 7, 2005.

  1. macrumors 68040


    First, I'd like to say that I have past experience programming my own games on an Apple IIe that never workd. Second, I would like to know the best way to learn coding for OSX. I need a basic understanding of all terminology and what it does.

    IF you have any resources (good books, ebooks, sites, etc) please reccomend. I tried starting out with HELLO WORLD! and completely [expletive deleted] that up. So....yeah.

  2. macrumors 68040


    What language do you want to learn? If you want to write applications for the Mac, then I guess you want to learn C/C++.

    You'll get as many recommendations as you'll get responses since everyone has their own best way of learning, but if you're serious, I would recommend learning Java first. This is similar enough to C++ to make a move to C++ not exactly painless, but you wouldn't be distracted by the need to learn C first (hence having to unlearn all the bad things about sequential programming when you start on C++) and it would give you a good grounding in object-oriented programming. Also all the necessary tools and compilers are free for Java, and it's mostly crossplatform.

    However, since you seem to have problems with the simplest programs, I suggest you take a look around for beginner programming courses. Nothing can substitute for having someone to ask in person when you're having problems.

    As for books, I suggest you get "The C++ Programming Language" by Bjarne Stroustrup ...

    ... only joking - I still haven't finished it myself. Take a course and use whatever books they recommend.
  3. macrumors 603


  4. macrumors 6502


    My favorite language is Java. I like using Xcode a lot more than using Microsoft's .Net 2003 for Windows. The Xcode IDE feels more complete and it's a lot easier to use.

    My suggestion is to get some books on C++, Objective C, or Java for beginners. You can apply what you learn to pretty much any platform whether it be OS X or Windows. I like programming in Java because it's a great cross-platform language.

    If you want to learn how to program using Xcode, there should be some beginners books by Big Nerd Ranch, O'Reilly, and maybe some "Dummies" books. I have a bunch of Deitel & Deitel books and they are great. Although they get really advanced in a few chapters. Good luck.
  5. macrumors 68040


    Thanks for the Links/suggestions. I'd really like to learn Cocoa, but if I have to gradually learn through other languages, that's cool.

    Eventually, when Tiger IS released, I'd like to develop some widgets, and I understand (from the ADC site) that it requires knowledge of JAVA/HTML/Network interfacing, etc. So...





  6. macrumors member

    Start with Python

    I would recommend to start with simple language as Python. It's just more fun and you may become productive in a shorter period of time.
    Following is a hello world (hello.py):

    #! /usr/bin/python
    print "Hello, World!"

    to run:
    in Terminal type:
    $ python hello.py

    OR make in executable and type only file name to run:
    $ chmod 755 hello.py
    $ ./hello.py

    It's easy to add a loop:

    #! /usr/bin/python
    print "Hello, World!"
    for i in range(10): print "hello again #", i

    Check out Python site for documentation:

    Good luck.
  7. macrumors 603



    For your hello world, just enter in:


    And then press F5 to run it. I learned VB.NET and QBASIC isn't too far removed... :rolleyes: :p ;)
  8. macrumors 603


  9. macrumors member

    Agree. Python makes programming fun. I know several languages, Java, C, C++, Objective C, etc. I like python for its elegance and simplicity. It can get a job done.

    My vote is for python. Start there.

Share This Page