1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

What programming language should i pick?

Discussion in 'Mac Programming' started by Keytachi, Sep 27, 2006.

  1. macrumors regular

    i want to learn a language but i dont know wich one :( i thought of Visual Basic for a start but... is that a good language to start with?
  2. Moderator


    Staff Member

    Visual Basic is a Microsoft propietary language. You cannot use it natively in OSX. Personally I think everyone should learn C as that way you learn enough about how things work to understand what is going on and it's a good gateway to Objective-C. This is not a very fasionable attitude these days though. Most people will say Java!
  3. macrumors 68020


    Ya, I'm doing Java as my first ever language and I guess I'm getting better as it's pretty easy and lots of guys on this forum know it:D
  4. macrumors 68020


    I often prescribe Java as a first language, simply because it's portable and forgiving.

    C/C++ errors tend to be a bit cryptic and intimidating. Java, IMO, tends to be quite good about telling you exactly what went wrong and exactly where it happened.
  5. Moderator


    Staff Member

    I agree about the compiler error messages but Java does not teach you about how the machine works, the fundamentals of data structures or the lower level workings of languages. Once you know and understand C you have a good feeling for what the other languages are doing, even though they abstract the raw bits away. And in Obj-C at least you can always drop to raw C when you need to...
  6. macrumors 68020


    This could go the other way, too. You don't *have* to know how the C memory model works or what the signature of an overloaded stream operator is to be a decent programmer.

    Most beginning programmers I know don't start in C. Most seasoned programmers I know didn't start in C. We all started in BASIC, FORTRAN, COBOL, PASCAL, Java, or some scripted language (Ruby, Python, Perl, etc).

    C and C++ are very good for learning the nitty gritty of computer innards. Even then, Assembly is just as good, if not better, than C/C++ for that. None of them, IMO, are good entry-level languages.
  7. macrumors member

    Hi, Keytachi. The answer to your question depends on what your goals are. Why do you want to learn to program?
  8. macrumors 68000


    Ah, but what do you want to do with your soon to be programming skills? Create desktop applications, web apps, server-side applications, dashboard widgets, etc...? Granted there are basics to programming but you should learn the language you plan on using or one that's in the general ballpark to get the job done.
  9. macrumors 68000



    That's not a good language at all if you're interested in learning the science. C or Java would be much better choices.
  10. macrumors regular

    well first of all i want to finish MyCGy (Make your computer greet you) and then i wanted to learn a base language i dont have any specific goal, i just want to know a language first and then ill decide wht i can do :p
  11. macrumors 65816


    Your first programming languages should be English and pseudo code :)

    The key is to learn to describe what a program should do, in a very high level way, and use step-wise refinement to break that description down into more and more detailed steps, resulting in a precise algorithm. After that, whichever programming language you use will be a mere technicality. At least, for beginner programs :)
  12. macrumors G4

    I've been at this from the 1970's. and full time from the early 80's. I'll tell you,
    there is no "best" language.

    I am surprized that no one has asked you what kinds of programs yu want to write. This matters a lot. In fact some things simply can't be done in some languages a.

    For example are you wanting to write code that runs on a web server to generate HTML? Or you wanting to write an Aqua application that runs on a Mac. Does the cose need to be portable to Windows and other non-Mac UNIXes. Or maybe your long term goal is to write cose that will fit inside some device like a Robot or air defence radar. or more likey you are interrested in game development.

    What are your long term goals?
  13. Moderator emeritus

    Python is a good starter language because you must use good programming techniques to get results and you receive quick feedback without compiling.

    Visual BASIC is a poor starter language because it allows slop more than most. If you're looking for form-based programming, you can download JBuilder Foundation for free and fill in the blanks using Java instead of BASIC. REALBasic would allow you to programme using BASIC but once again, it allows slop simply because BASIC is a poor language.
  14. macrumors G4

    You've got this exactly right. Way back when I was in school one of the proffs did not let students code in a compilable language. It was a kind of "structured English" that he made us use. He said to many students would simply change stuff at random untill the program worked and never understand what they were doing. (This actually works with toy programs.)

    Later when you are doing non-toy projects you find that a typical pogrammer spends only about 1/6th of his time wriing code. Making software is like painting a house. The very last step is to apply the paint all the hard work in in the "prep".
  15. macrumors regular

    well i wanted to learn a mac/windows language, one that would work in all OS. i might go to java and then a C
  16. macrumors member

    Thank you. It sounds like you would like to learn a general purpose language and, broadly speaking, how to program. Java is currently quite popular as a CS learning language because it is a powerful language which experience with can be a valuable job skill. However, Java is also a complex language with an enormous class library for which even very experienced Java programmers require reference documentation now and then.

    Consider the classic 'Hello World' example in Java. To create even the simplest self-contained, compiled program in Java, you need to declare a class with a name matching that of the file (except for the .java suffix) and then add a very specific method to it:

    public class HelloWorld
        public static void main(String[] args) {
            System.out.println("Hello, world.");
    This needs to be in a plain text file named HelloWorld.java. You would then compile it (e.g. using the command line 'javac HelloWorld.java') and then run it (e.g. 'java HelloWorld'). Even simply printing out the text is rather verbose.

    There are many high level languages that run on all major platforms which allow you to program powerful, well structured applications with far fewer lines of code and, empirically, much less development time. Using these languages, you can also learn sophisticated programming techniques such as OOD (Object Oriented Development), functional programming, network communication and multithreading, usually with greater ease than with the many C variants (including Java).

    Many advanced libraries are available in these high level languages, allowing access to databases, xml parsers, GUIs and more. Several of them have interpretive modes that allow you to immediately get a response to each line of code that you enter (much like using the command line). This can be wonderful for learning how to program.

    Here are some high level languages that enjoy these features. I'll list them in the order that I would recommend them to you, but I'd advise you to try several and see what you like best:




    PHP (Normally used for web development, but also good for general use)



    If you're mainly interested in making GUI programs, these days they are normally event driven and it can be very efficient to use a RAD (Rapid Application Design) drag-and-drop style IDE. I'd highly recommend waiting a while before you start doing GUI programming as it is fairly complex once you get beyond the basic, shallow level (in other words, where there is no model or controller (MVC)).

    Have fun and happy hacking!
  17. macrumors regular


    I am starting to wish I started like that too... I first started in BASIC and sorta did a pinball move between a few languages and setteled down in Java.

    Because I did not get much insight or help I am now wishing that I started with pseudo code and later wrote it for java (which I also wish I started in).

    In java you can't mix the different data types accidently which would keep you from possable debuging problems you will have.

Share This Page