Need help with getting started programming

Discussion in 'Mac Programming' started by xcsic, Oct 29, 2008.

  1. xcsic macrumors newbie

    Oct 29, 2008
    Hi there. I'm sure this is a rather rare kind of topic around here, but I'm a rather advanced Mac user that really wants to get into programming for the Mac and iPhone. However, I have very little knowledge on programming. For instance, I can edit HTML to achieve what I want changed in sometinhg, but really nothing else.

    I realize that I must first learn a basic programming language, and then move on to C, and from there, Objective-C, and maybe some other things along the way. My question is, where do I go to get started? I need instructions to get to the top from scratch. I know that this process will most definitely not happen overnight. I am willing to work at this and put effort into it. Any help is greatly appreciated.
  2. dubhe macrumors 65816


    May 1, 2007
    Norwich, UK
    I had fun making simple widgets using dashcode, it got me into JavaScript and made me think like a programmer, if that makes sense. I hope to make more complex widgets sometime and from there move on.
  3. pit29 macrumors 6502a


    May 23, 2006
    The Golden State
    Probably you should start learning Python. It's somewhat slower than native C, but presumably much more easy to learn (and to read!). Depending on what you intend to program, user input may be limiting, and not execution speed. Plus, there's software to translate Python into C code.

    I guess it's easier to learn Python, because it's more structured than C, and does many things automatically that you'd have to implement manually in C. Eventually, the challenge will be learning all the APIs that you need to create windows, dialog boxes, menus, etc... But that'll be the the same, no matter what language you learn.

    If you want to download a basic IDE for Python, have a look here: But you'll also have an interpreter already installed with OS X.
  4. lucidmedia macrumors 6502a

    Oct 13, 2008
    Wellington, New Zealand
    Strangely enough, I *personally* do not subscribe to the idea that one must progress from simplicity to complexity in learning situations... Complexity must be managed, not simplified.

    This includes learning procedural programming before OOP. As someone fresh to programming, you have the opportunity to learn object-oriented techniques at the outset...

    There are a few books on objective C which do not make any assumptions about prior experience with programming. With the popularity of the iphone, I would guarantee there will be plenty more to come... So, with the right materials I would say attack your target head on and put your efforts into the skills and concepts directly related to your final goals.
  5. liptonlover macrumors 6502a

    Mar 13, 2008
    First... LOL. No offense, but there's about 10 a day, only a slight exaggeration :rolleyes:

    You should probably start with C... Objective C just builds off of it, it's the same language in object oriented style. You can just go through a tutorial that teaches you enough C to learn obj-c, (you don't need to know much, I can't write anything in pure C) or you can learn C separately then move on. I advise you go to, where by the way you can also learn C++ if you're interested. Click on the tutorials link in the sidebar, and scroll down to 'C Tutorial'. Go through those. Technically you don't need to learn EVERYTHING there, but it's a good idea to anyways. If you can't find out how to just do a C app in xcode or whatever app you choose to use when following the tutorial, ask here. I dont' remember, but someone can help I'm sure.

    Next, go to and do their becomeanxcoder tutorial. You could do it without any programming knowledge, but I still advise first. becomeanxcoder is a little out of date but the differences should be easy to pick up on. It's still a very useful tutorial.

    Good luck!
  6. grimreaper1377 macrumors regular

    Oct 20, 2007
    If you're talking about learning programming for Cocoa, then Kochan's book is hands down the best. It assumes no prior experience, and you should have a very thorough understanding of Objective-C after reading it.
  7. xcsic thread starter macrumors newbie

    Oct 29, 2008
    Thanks everybody for the comments. Liptonlover, I'll do what you suggested first and see where that gets me. Grimreaper, where could I find this book? It sounds like I could a lot from it.
  8. SydneyDev macrumors 6502

    Sep 15, 2008
    How much of an independent learner are you? Some universities make their 1st year computer science course notes available for free online...
  9. dse macrumors newbie

    Oct 31, 2008
    used to be easier

    when there was one major forum all of us watched (Usenet new group comp.sys.mac.programming). You can still find the excellent but dated FAQ for that group online, if you have the ancient tools and want to develop for OS 9 or earlier on legacy machines.
    Appologies to anyone reading this in its first form, this is edited and improved.

    Used to be we had a few printed and CDRom information resources and could suggest politely to RTFM (read the fine manual). Now its all on disk and the massivess of it makes finding a place to start a challenge.

    There are many issues for you to conquer. Also for me, tho different ones. You will find that there is a commonality to all proceedural programming languages, much of it based on the grammer we use in mathematical equations. Some of us find it useful to explore language design as well as specific language grammar, but that goes beyond your query.

    First for you is the basic concepts of programming in a procedural language (yes, there are non-procedural 'languages', Filemaker Pro is one example).

    If you live near a college which has a computer science curriculum you could visit the relevant department and seek out a conveniant course to take or audit. The bookstore will have tomes of interest, consider used copies if expense is an issue. Once you master the grammer of one language it is not all that hard to learn another, especially if they are related. C came first (well, actually there was a B, but not I think an A). C was developed at Bell Labs and was licensed for free in academic use, but not for commercial use, so it was widely used at colleges thruout the US and overseas well into the 80's. C has evolved, the slightly safer form is sometimes called K&R C, and is what is mostly used today.

    Object-oriented programming became a hot topic ca 1980, and while one could do that in C, the syntax was exposed and ugly, and the need for stronger typechecking was well known as well, so C++ and Objective C were independantly invented, each using different syntax. With Steve Jobs and the NeXT computer Objective C found an anchor and grew, and has come to us with cocoa.

    C++ has been refined since then into an equally serious tool which had well developed programming and framework tools for developing Mac applications in legacy and carbon environments, but for reasons not to be speculated on by me has been thrown over by the new apple OS team in favor of objective C (it is the language they use for OS X and later versions).

    Cocoa has no support for C++, you will need to access the cocoa interfaced routines, so you will learn Objective C. One can have mixed code, ie, some of your work can be coded in other languages such as Fortran, Forth, C, even C++; but it will be simplest if you focus on objective C.

    C is primarily used in a unix OS environment, most of the books you find will cater to that. Better would be a book which focuses on Obj C in a Macintosh development environment, but dont be too fussy if you cant find one. The Mac GUI was originally developed as an alternative to the unix command-line experience, altho some of the programming tools invented for Mac use had interfaces that used both (including tools you will be using now). I dont know of any particular books to refer you to, partly for lack of a decent bookstore to browse (I live in a rural part of eastern long island).

    There is a vast amount of information online, including committees you could join where future language extensions are being debated and developed.

    Once you have the grammer of objective C down, you will find there is more than just the keywords of the language to be learned. Lots of code has been written, debugged, and placed in librarys for your use. You can reinvent those wheels, and sometimes you should, but often it helps to use the 'standard lib' routines. In addition, and this is where cocoa comes in, there are more extensive libraries called frameworks which you need to learn how to exploit.

    Even the simplest application will find it requires an impressive amount of code just to get launched, set up its own menus, and put an initial window up on the screen. Further code is needed to support mouse clicks on the window and the menus. The beginning of that code is already written for you in a framework, you may have to add code to handle what is to be done when a mouse click invokes your menu items, but even then some of that is pretty much done already by a good framework.

    Frameworks come in layers, the OS hides some of those layers behind the monlithic interface called cocoa. Above cocoa is your own code, between it and cocoa can be another layer, in the past this might have been PowerPlant, TCL, or MacApp.

    Documentation is difficult to write, especially on new and unfamiliar topics with lots of detail and a short deadline - making for a high risk of errata. Technical notes result, they provide factual corrections, work-arounds, and code examples showing how to accomplish goals using the complex tools. Since 1984 the manuals documenting the Macintosh OS and its toolbox have expanded from one huge phone-book volume to the three book set (OS 5) and its 3 book extensions (OS 6) to the many volume IM set (OS 7). CUrrent documentation is published electronically on the OS X media, many many mega (giga?) bytes of it. Perhaps there are third party publications as well, there were back in the days of OS 6 when there were only some 300 tech notes to worry about.

    Welcome, and good luck.
  10. dse macrumors newbie

    Oct 31, 2008
    Mactech magazine

    Once upon a time there was a magzine called MacTutor. It was taken over by Mactech, and you will find them online at

    Once upon a time, apple development had an outreach program that was affordable to smal-scale developers, mainly you got the magazaine d e v e l o p. That was dicontinued about a decade ago, shame, because it contained some really essential info. Luckily it is all archived at Mactech, as well as available on CD (maybe DVD?).

    But, remember, you need to focus on the current material more than how it used to be done; on the current bugfixes, not the ancient ones. Look for basic info on Cocoa development until you get your feet wet enough to come back here with questions.

    At some point you will discover the joys of source code perusal. Other peoples code, written with comments talking about what they are doing and why (hopefully not obsolete, nothing so unhelpful as a lying comment).
  11. grimreaper1377 macrumors regular

    Oct 20, 2007
    Almost everywhere. Its pretty popular, and I'm sure you could pickup a second-hand copy from Amazon or ebay.

Share This Page