1. Guest,
    If you need help getting to know Xenforo, please see our guide here. If you have feedback or questions, please post those here.
    Dismiss Notice

what programming language shold I learn first?

Discussion in 'Apple' started by Eric_L, Mar 3, 2009.

  1. Eric_L

    Eric_L Well-Known Member

    Joined:
    Nov 2, 2002
    Messages:
    1,994
    Likes Received:
    1
    I think I've decided to take the plunge and start writing some small programs for fun. I've had a few ideas for simple programs for a while which I'd like to try to implement. I'm not under any illusions about it being easy. I've written some programs in Basic and have fleeting experience in others.

    One idea involves simple web animation so I'm thinking about Java.

    The other idea is an iPhone strategy game (2D). It would require me to learn Objective C... and maybe some open GL.

    So which do you think I should start with? Do you have any books or websites to recommend for a beginner?

    I've looked a little at Objective C and it seems nearly all books are written for people with some experience with other C languages (not me). I'm pretty good at filling in the blanks - but I get easily annoyed with books and manuals which make too many assumptions about the readers existing knowledge..

    I'm in no real hurry. I think the fun will be in the assembly more than the finished work. Just wondering which/where to start... Thought I'd ask for guidance rather than jump in blindly...
     
  2. Ted Todorov

    Ted Todorov Well-Known Member

    Joined:
    Aug 17, 2000
    Messages:
    2,943
    Likes Received:
    19

    Well, pick up a C book as well, one that doesn't assume, hopefully. It is a hard question -- when I went to college Pascal and Assembly Language were what everyone had to learn. Yes, that was 28 years ago...

    But I wouldn't waste my time with Java -- I can't think of a single amazing Mac application (or one for any other system) written in Java. Objective-C on the other hand -- all sorts of amazingly cool things were written in it. But Objective-C is a superset of C, so knowing C helps. Another good thing about Obj-C is that the excellent development environment -- X-Code is a free download from developer.apple.com

    If you want to try an interpreted language (the various flavors of C are compiled) -- Ruby is fun.
     
  3. DaveF

    DaveF Moderator
    Moderator

    Joined:
    Mar 4, 2001
    Messages:
    16,617
    Likes Received:
    1,155
    Location:
    One Loudoun, Ashburn, VA
    Real Name:
    David Fischer
    You've asked a question akin to, "I'm interested in finance, what should I learn?" It really depends on your goals. To learn Computer Science, then start with something like Pascal and get some CS books on algorithms and data structures (did this in college for an almost-minor). To do fun things on the web, then go with HTML and Javascript or PHP or Ruby and learn the skillz you need to make your fun web pages (I had a ball with this in grad school). To make iPhone apps, then you have no choice but to dive into Obj C (I learned Obj C back in the day for the NeXT). Or if it's career-centric, learn the tool of choice (I'm fluent in Matlab and functional in Excel).

    If it's learning for kicks with no goals in mind, getting into web design is probably the easiest and quickest payoff option. You can easily do both client side (Javascript) and server side (PHP or other) apps. They will function on an iPhone, for further quick success.

    But if you aspire to do iPhone apps or write games, you probably need to dive into Obj C.

    Or if if you're really an Windows guy, look into the MS stuff for hobbyists. They put out a superb suite of Visual C apps for free for non-professionals.

    Good luck!
     
  4. Jay H

    Jay H Well-Known Member

    Joined:
    Mar 22, 1999
    Messages:
    5,678
    Likes Received:
    32
    Location:
    Pittsfield, MA
    Real Name:
    Jay
    I started with Pascal, but if you want to learn a bit, I think you could start with C, then go into C++/Java, you will easily pick up Java after you learn C/C++ as they are somewhat similar, at least in the basics. Don't be too concerned with learning every little syntax and structure but try to work concepts, design, algorithms, and get into good programming habits now.

    Jay
     
  5. geis

    geis Member

    Joined:
    Nov 24, 2008
    Messages:
    5
    Likes Received:
    0


    Good question and great attitude! I've been developing software for the last 15 years (frig! I'm getting old) and have written in everything from MIPS assembly language to PHP to Eiffel. You've done a good job laying out what you're trying to be able to do, so that should help.

    First, I'd like to add some criteria to your list. Since you're learning for fun, let's not convince you to learn a language that hasn't been used since 1982. So that rules out Forth, COBOL, and yes, IMHO Pascal. ;-)

    Next on the list, there are a few languages that you could learn very quickly, but they are unstructured and will lead to your ultimate demise (causing you to fall from the rank of "programmer" to the unenviable position of "programmer fodder"). This rules out SNOBOL (if you are reading this post without some sarcastic inflections by this point, go back and start again), ActionScript and, yes, even JavaScript.

    Now, you were considering Java because you wanted to do some web animations. Those actually work better with JavaScript at this point, but I wouldn't recommend learning JS as your first language. IMHO, people do learn better if they start to understand how the machine actually works. It makes it hard to learn from languages like JS that are so far from how a processor actually works.

    That being said, Java isn't a terrible option to start learning on. It offers fairly strict Object Orientation (when compared to something like C++), it is a C-based language, and it will get you to the point of seeing what you're coding relatively quickly. If you go that route, spend a few minutes with the book in Borders to make sure it doesn't assume you have prior C or C++ knowledge.

    On the other hand, a lot of what you're looking for is still in the C-based world. Objective C is really just C + some extensions. C++ is just Object Oriented C. Java is just a better crack at OO C that is platform independent (and slower, but for simple tasks, no one cares). JavaScript is also C-based.

    JavaScript probably isn't the best language to learn first, but IMHO it's going to be the best way to write web code. Given that Java is C-based (at least syntactically), learning C or Java would put you in a great position to learn JavaScript quickly and yet still write good code in an unstructured language.

    Other languages to consider might include Python. Personally it's not my favorite language, but truly Object Oriented developers seem to love it. The good points for Python are that you can learn it relatively quickly, it has great OO, it's fairly portable, and it has a lot of good GUI libraries. Good GUI libraries means you can probably write something useful fairly quickly in Python. Additionally, python was the language selected by Google for their Android platform. So, you might be able to start quickly on Google phone apps with Python in your pocket. Be forewarned: Python code is white-space sensitive. That part is a little strange, but it does allow me to keep making SNOBOL jokes. ;-)

    Good luck to you!
     
  6. Sam Posten

    Sam Posten Moderator
    Moderator

    Joined:
    Oct 30, 1997
    Messages:
    19,961
    Likes Received:
    1,582
    Location:
    Aberdeen, MD & Navesink, NJ
    Real Name:
    Sam Posten
  7. Eric_L

    Eric_L Well-Known Member

    Joined:
    Nov 2, 2002
    Messages:
    1,994
    Likes Received:
    1
    Thanks Geis and guys. It sounds like I should start with C. Can anyone suggest any books or websites?
     
  8. DaveF

    DaveF Moderator
    Moderator

    Joined:
    Mar 4, 2001
    Messages:
    16,617
    Likes Received:
    1,155
    Location:
    One Loudoun, Ashburn, VA
    Real Name:
    David Fischer
    If you're learning C, in addition to your self-learning resources, get a copy of The C Programming Language for reference. It's the reference for ANSI C and will help out with all the mundane usages of functions, and pointers, and references, etc. (Unless it's online. I haven't done C in six years.)


    Let me make another recommendation: Skip C. Go straight to Obj C.

    Over the years I've been told, and observed, that object-oriented programming is easier to learn by those not already grounded in conventional programming. Since you're coming in a fresh babe from the woods, dive straight into Object Oriented Programming and to get that sense straight off.
     
  9. geis

    geis Member

    Joined:
    Nov 24, 2008
    Messages:
    5
    Likes Received:
    0
    Yeah, I couldn't agree with DaveF more on 'The C Programming Language'. It is one of the best language references ever written (of any language, IMHO). It does present some information as a tutorial, but as a tutorial, it's a B- at best (no pun intended). May want to just browse the book store for an additional book to use as a walk-through guide.

    -geis
     

Share This Page