Learning a new language- any recommendations?

Posted:
in Genius Bar edited January 2014
Well.



I've been giving serious thought about taking up a programming language so that I can write simple yet elegant little apps for Mac OS X. (Not to make a fortune, just to make tools, and put them out there)



Most of me is saying that this is complete madness as I've absolutely no programming experience whatsoever.



As a trained product designer, I am, however pretty good at art, mathematics, and user-interface design.



I've done a wee bit of light research and am torn between getting involved with Perl, Python and Cocoa (Objective-C).



Any suggestions, advice, condemnations etc would be really appreciated.



Thanks .

Comments

  • Reply 1 of 6
    MarvinMarvin Posts: 15,326moderator
    IMO Perl syntax is ugly. Python is very nice. Objective-C is confusing but programmers like it because it's a pure object oriented language.



    Objective-C is the best in terms of performance but you have to deal with compile times.



    Perl and Python are interpreted languages so they run slower but you don't need to compile them so development is faster.



    I've used quite a lot of languages and I personally love Python. There is also a way to write Python code to use the OS X Interface Builder documents:



    http://pyobjc.sourceforge.net/



    The good thing about Python is that you can mix C code in performance critical areas.



    I really wish that Apple would replace Applescript with Python. Even if they made a custom extension to the language. I also wish they implemented a low level compiler like psyco for OS X. In theory, you could do most of your programming with Python because runtime performance would come close to a compiled language.
  • Reply 2 of 6
    Quote:

    Originally posted by Marvin

    IMO Perl syntax is ugly. Python is very nice. Objective-C is confusing but programmers like it because it's a pure object oriented language.



    Objective-C is the best in terms of performance but you have to deal with compile times.



    Perl and Python are interpreted languages so they run slower but you don't need to compile them so development is faster.



    I've used quite a lot of languages and I personally love Python. There is also a way to write Python code to use the OS X Interface Builder documents:



    http://pyobjc.sourceforge.net/



    The good thing about Python is that you can mix C code in performance critical areas.



    I really wish that Apple would replace Applescript with Python. Even if they made a custom extension to the language. I also wish they implemented a low level compiler like psyco for OS X. In theory, you could do most of your programming with Python because runtime performance would come close to a compiled language.




    Thanks for the response, Marvin- very informative.



    Yeah, it's funny, but from the light research I've done, Python does seem to be the more appealing option both in terms of what it can do, and also where it has come from: open source, good humoured, with a firm sense of fun and satisfaction being part of the process.



    I'm a hard worker, but I also like to enjoy what I'm doing. I think I may have found a winner.8)
  • Reply 3 of 6
    I would have to recommend learning Java. Its a very useful language and most universitys teach Java to their beginning CS students for this reason. Also, a well written Java program can be run on Windows, Linux, and Unix as well as OS X.



    Personally I would recommend learning languages in this order:



    - BASIC (yes its a horribly obsolete language but its good for learning the basics, no pun intended , especially for someone who has no programming experience at all)

    - Java

    - C

    - Objective C or C++

    - Perl, Python, Ruby

    - obscure stuff like OCaml
  • Reply 4 of 6
    MarvinMarvin Posts: 15,326moderator
    Quote:

    Originally posted by baranovich

    I would have to recommend learning Java. Its a very useful language and most universitys teach Java to their beginning CS students for this reason. Also, a well written Java program can be run on Windows, Linux, and Unix as well as OS X.



    Personally I would recommend learning languages in this order:



    - BASIC (yes its a horribly obsolete language but its good for learning the basics, no pun intended , especially for someone who has no programming experience at all)

    - Java

    - C

    - Objective C or C++

    - Perl, Python, Ruby

    - obscure stuff like OCaml




    Yeah, I learned Java first in university but I hate it. Every Java program I've used under OS X has been horribly slow. Almost an order of magnitude slower than C-based languages. That's about the same performance as an interpreted language except that you've got to compile Java software too. It certainly can be faster and it has a lot of predefined classes for media handling and what not but I just don't like it.



    It does have the advantage of cross-platform GUIs but as programs like Azureus show, they aren't very good. Even on my 1.25 G4, the AZ interface is horribly slow at updating.



    I'd personally suggest learning programs in this order:



    Python

    C

    Objective-C, C++

    others



    You can do amazing things with Python and C alone. The very powerful open source 3D package Blender is written with C, C++, Python. One of the big strengths of this setup is that it's very easy to actually embed a Python interpreter into you app so you literally add a few lines of code and your app can support scripting.



    IMO Python is the easiest language to pick up. Here's tutorial 1:



    1: open textedit and type:

    print "hello world\

    "

    2: save as test.py or whatever

    3: open terminal, type the word python and drag in the file, hit return.



    I can't stand when programming languages make life difficult. Python is one of the few languages that I actually enjoy programming with. There was a time when I thought that it was silly for not using brackets round if and while blocks but I actually prefer it. It's faster to code in.



    I recommend using textwrangler so that multiple line indenting and multi-line comments are easier.
  • Reply 5 of 6
    You've both been very helpful and encouraging, thanks again.



    The Python homepage is pretty good: http://www.python.org/



    Again, I have to say, it all seems to have a very nice feel to it from the website to the documentation.



    Ah well, here we go!
  • Reply 6 of 6
    benzenebenzene Posts: 338member
    I'd have to agree. Start out with Python, and that will get your feet wet and at the same time you'll learn a truely useful and well-designed language.



    Once you've learned one programming language, it's quite easy to pick up others. (Just like foreign languages, I'm told.)
Sign In or Register to comment.