Is learning programming on OS X a good idea?

Discussion in 'Mac Programming' started by Not Available, Jun 30, 2009.

  1. Joined:
    Jun 30, 2009
    #1
    Tomorrow I'll be buying my first Mac computer ever, a 2.26Ghz 13" MacBook Pro. I'm going to use it 90% for learning programming and programming languages (C/C++, Python, Cocoa and Ojective-C, PHP and SQL) .

    My question is if it is a good idea to learn this on OS X. I see that many tools have been developed by third party companies, but I'm just curious if it's going to be more productive on a Mac, or it would be better on a Windows-based machine.

    Thanks in advance!
     
  2. macrumors P6

    Tallest Skil

    Joined:
    Aug 13, 2006
    Location:
    1 Geostationary Tower Plaza
    #2
    I don't see why not!

    XCode* is an amazing tool; you'll grow to love it.

    *requires free online developer account. Sign up at developer.apple.com
     
  3. macrumors member

    Joined:
    Jun 10, 2009
    Location:
    UK
    #3
    Cocoa and Objective-C are Mac only, so you're in for a treat there, and of course the Mac has good support for C/C++. But nearly all other programming languages are out of date on the Mac; Python, Perl, Java, Ruby (not sure about PHP). Some of these you can update yourself as I did with Python and Perl (the latest Python, 3.1, can be downloaded from the Python website, and Perl can be nabbed by Googling ActivePerl). The only way to update Java on the Mac is whenever Apple decides it's time as the Java website doesn't have the latest version for Mac to download. So we're basically stuck with Java 5 while the rest of the world gets Java 6. BOO to Apple for this because Java 6 has been out for about 2 years now.

    EDIT: You can also download MySQL from their site you need up to date SQL.

    Further edit: You might find it easier, if you're going to be using scripting languages like Perl, Python, Ruby, etc, (oh, and Java of course, until Apple update it) to use Bootcamp for a Windows install. But for C/C++/Obj-C/Cocoa you'll be fine with using Leopard.
     
  4. macrumors 6502a

    Joined:
    Nov 4, 2005
    Location:
    Hollywood, FL
    #4
    YES! - Xcode is a great tool and you will be able to use it for all your programming needs.
    Although, for programming in Python, I downloaded their software from their site (you can do it on XCode but it takes a bit longer to set up). For Obj-C, C++, & C, I've used my MBP without any problems.
    Have fun!
     
  5. thread starter Guest

    Joined:
    Jun 30, 2009
    #5
    Thanks a lot, guys! I've already had a look over some of the tools I'd like to use.

    For Python, I will definitely be downloading the latest package available on http://python.org.

    For C/C++, I was thinking of Code::Blocks. They say they could use one or two Mac developers for their OS X port. Is it a good idea to use this 3rd party software, or should I stick to XCode?

    Java is definitely bad news. I didn't know about that.

    I think it's just the fact that all I could find on Google was a 2001 post, stating that at programming, Windows is still a better platform.

    Thanks a lot again, and I'm also looking forward to your further answers!
     
  6. macrumors 6502

    Joined:
    May 17, 2002
    Location:
    Denver, CO
    #6
    Java 6 is available for OSX and it is most likely already installed on your Mac if you've been keeping up with the software updates; if you haven't you can download the various Java updates from here.
     
  7. macrumors regular

    GroovyLinuxGuy

    Joined:
    Apr 2, 2006
    Location:
    Canada
    #7
    Can't answer to C/C++, or Objective C, but for Python, Perl, and TCL (yes, there is still someone using it!!) OS X is great. I downloaded MacVim for my editor (sometimes I don't want to work in the terminal with plain old vim) and am pretty happy with my set up
     
  8. macrumors member

    Joined:
    Jun 10, 2009
    Location:
    UK
    #8
    Hmmm, thanks for that. My system is up to date. What confuses me is why Eclipse insists on using the JDK 1.5 for compiling my programs. When I try and use 1.6 I get a warning message (on the New Project creation screen).

    Sorry for the thread derail, but this is confusing me now.
     
  9. thread starter Guest

    Joined:
    Jun 30, 2009
    #9
    Oh, here's something I've really wanted to ask you: what is your opinion on Panic's CODA, if you've ever used it. It looks like the ideal web development application, but I'm still curious about a user review.

    P.S.: I'm sorry for my English not being perfect, as it's not my primary language.
     
  10. macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #10
    For C/C++/Objective-C, you should be fine with XCode. I have only used that, and the terminal/gcc for programming on the mac, so I can't speak to the quality of third party offerings.

    My opinion on Windows vs. UNIX or UNIX-alikes for programming is 100% for UNIX. The only reason you'd need windows is if your only goal was to build windows apps that require .NET. Mono is available for other platforms, but I treat it with trepidation when it comes to commercial use.

    I think OS X is a great environment for programming, and I'd say the next choice for operating systems for this purpose would be linux. Cygwin is the only thing that makes it possible for me to get programming done on windows.

    -Lee
     
  11. thread starter Guest

    Joined:
    Jun 30, 2009
    #11
    Well... thanks a lot, everybody! I've chilled down!
     
  12. macrumors 6502a

    Joined:
    Sep 17, 2007
    #12
    IMO, a Mac is the perfect computer to (learn to) program with. The platform is widely enough used where you can use it for day to day tasks with no trouble, yet, it is unix based so you get all the advantages of that as well. You get all the tools you will probably ever need by downloading XCode. That will also get you all the typical tools needed to program the Unix way, so to speak. I still prefer the latter to xcode, although it is a great tool. I stick to the basics when I program, even on windows,... terminal, vi, gdb, gcc, Makefiles, etc. I would start off with C and C++ as those are widely used on all platforms.
     
  13. thread starter Guest

    Joined:
    Jun 30, 2009
    #13
    Hi, guys! I've got my MacBook and have installed XCode 3.1.3. It looks and feels awesome, but I've got one problem, which is quite weird...

    I went to File >> New File... >> C and C++ >> C++ File, I configured what had to be configured, wrote my program, but I can't find a place where I can compile & run it. Any help will be appreciated.

    Note that I've created a FILE, not a PROJECT.
     
  14. macrumors 68030

    Winni

    Joined:
    Oct 15, 2008
    Location:
    Germany.
    #14
    It all depends on what your ultimate goal and target market are. If you want to write business applications, investing time in the OS X platform is in almost all cases a WOFTAM (waste of f.... time and money). OS X is NOT an enterprise or business platform and Apple is not a player in the enterprise market, end of discussion.

    If you want to write apps for home users or maybe even want to enter the Indie game developer niche, the Mac is fine.

    In my very personal opinion, the Mac is not a good development platform. Or, to be more precise, it completely sucks when compare with Windows. Windows has a richness of programming languages and development tools that the Mac can only dream of, and almost all of them allow for the development of applications that look and behave completely native. On the Mac, if you don't use Objective-C and Cocoa, it is more difficult to find alternatives with 100% support for the Mac platform.

    If client side apps and games don't interest you, then you won't care about this. All scripting languages are there, Mono is getting better with each release and even Java is currently up-to-date.

    But again: If you're in it for the money (and with that large set of languages that you want to learn you must be in it for the money), you have to very carefully evaluate your business case. Windows is where the corporate money is. Macs are almost exclusively used only by home users or a few professional individuals who are in the audio/video business.
     
  15. macrumors 601

    sammich

    Joined:
    Sep 26, 2006
    Location:
    Sarcasmville.
    #15
    You could use XCode to make simple CLI (command line interface) programs, but you can also use a program like TextWrangler (free) or TextMate ($$$ but very very good). I tried using XCode for a simple CLI but I was too cumbersome for me back then, maybe someone can clear that up.

    If you're compiling say a simple helloWorld.cpp file CLI program, just navigate to the location of your cpp file via terminal (ie 'cd') then compile using
    Code:
    g++ -o helloworld helloWorld.cpp
     
  16. thread starter Guest

    Joined:
    Jun 30, 2009
    #16
    No, I want C/C++ and Python for education purposes (there are many competitions going on in our country from 9th to 12th grade, and I've got two years to prepare for them :) ), Cocoa and Objective-C because I want to develop a Hangman game, together with one of my friends, for our iPod Touches, and PHP and SQL because I've got a lot of ideas for online applications, which are mostly going to be used by me (I'm willing to develop a CMS because I find this to be the best way to enhance your skills, and I also want to port an offline application written in C++ which is all about managing and controlling databases).

    I'm too young to think of business just yet, and could you be more specific about the tools a PC has and a Mac dreams of? XCode and Code::Blocks are amazing, CODA as well. I don't know if Eclipse has an OS X version, but so far, except for some platform switching problems, I love this OS.
     
  17. macrumors 6502

    duggram

    Joined:
    Apr 17, 2008
    #17
    Holy buckets!! Sounds like you are very young and way ahead of the game now. Use the Mac, have fun, go forth and be fruitful (i mean produce lots of code)!
     
  18. macrumors 6502a

    Joined:
    Sep 17, 2007
    #18
    I don't necessarily agree. Using a language like C++ and a framework like Qt allows you to write GUI applications that are very portable and will run on Windows, OSX or Linux/X11 and they will look and feel just like native applications. For my own projects, even if my target is Windows, I usually do all my development on my Mac (or a linux machine) as it is much faster for me to do it on a unix platform and those skills translate to all other platforms.
     
  19. macrumors member

    Joined:
    Jun 4, 2009
    #19
    In my day job I have to support 6 or so UNIX variants and Windows. Let me say that Windows sucks to develop under. Unreliable and poor development tools compared to UNIX. Sadly I don't get to develop for OSX so I can't compare that equally.

    Of course this is just my opinion and ppl will no doubt disagree. What you are developing and in what language/environment will probably have an effect on that as well.

    Andrew
     
  20. macrumors regular

    Joined:
    Jul 16, 2007
    #20
    Not Available,
    Stick with XCode and Objective-C and C++ for now. Learn the IDE and the environment and how to manage projects. Do tutorials (www.cocoadevcentral.com) to kick off with.

    IGNORE everyone punting you towards other IDE's, text editors, their favourite language etc. Stick to one thing till you get comfortable and don't try to do too much by collecting all the latest and greatest tools and libraries.

    Learn to program. Not to play with programming tools.
     
  21. macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #21
    I'm not necessarily disagreeing with your sentiment, but these seem at odds. Learning XCode might be considered "playing with programming tools" before one has really learned to program. I think part of programming is understanding how compiling/linking/etc. works, and XCode abstracts that all away. It is learning a tool that is very narrowly available instead of learning things that apply many places (I can compile with gcc on Windows, Linux, BSD, Solaris, OS X, etc.) like compiling with GCC.

    Again, I don't think using XCode at this phase is a specifically bad idea at all, but I do feel that knowing what's going on under the hood and mastering a decent UNIX editor like vi(m) should occur pretty early in ones programming career.

    -Lee
     
  22. macrumors 601

    HiRez

    Joined:
    Jan 6, 2004
    Location:
    Western US
    #22
    I agree with mongrol, I wouldn't worry so much about what language or environment you use. If you learn to program in anything, you'll be better prepared for everything else. Being a programmer isn't about knowing a language or API, it's about solving problems, and doing it efficiently, something you will learn no matter what tools you are using. The most important thing is to just get started and hopefully start with something you're passionate about, that will help keep you motivated during the rough spots.

    Personally I love Objective-C/Cocoa for desktop (or iPhone) apps and Python/Django for web apps. But you really can't go wrong with anything. If you're still in high school, you shouldn't be too worried about getting aligned with the next business software trend or whatever, just learn to program first using whatever is the most fun for you, then you can move into what makes the best sense for your career. Well some people with disagree with me, but that's my advice.
     
  23. macrumors newbie

    Joined:
    Mar 7, 2009
    #23
    Java 6 for OS X is 64-bit only. The latest release of Eclipse 3.5 is available in Cocoa 64-bit, so Eclipse 3.5 will run fine on Java 6. Previous Eclipse versions (Carbon) will require 32-bit Java 5 on OS X.
     
  24. thread starter Guest

    Joined:
    Jun 30, 2009
    #24
    That's the next thing I want to do, after I get my foot wet on programming: learning to use UNIX and FreeBSD. I'll look into vi(m) just in order to get an idea on how it works.
    Well... that's my weakness: it takes me a lot of time to get the motivation and see the reason behind something. But now I've got the reason and use for each of them. I've also got the material I need.
    Well... I didn't know at first anything about XCode, and being something delivered by the OS manufacturer, I assumed it's a bad tool with lots of flaws and limitations (see iWeb), but now I see it's an awesome tool, actually, and I kind of enjoy using it.

    Thank you, guys! You've helped me a lot so far, I really wasn't expecting :)
     
  25. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #25
    No need to use FreeBSD as Mac OS X is basically the same with a different GUI on top. Just learn to use the Terminal application in Mac OS X and you should be fine.
     

Share This Page