Need Tips on Learning Objective-C (or Any Language)

Discussion in 'Mac Programming' started by Josh Kahane, Feb 22, 2009.

  1. macrumors 6502

    Joined:
    Aug 29, 2006
    Location:
    Suffolk, UK
    #1
    Hi

    So I have realized that if I want to be able to do any substantial programming for Mac OS X or the iPhone I am going to need some solid knowledge in Objective-C.

    I was wondering if you could give me any tips on helping me learn Objective-C, as its m first language ever, and would really appreciate it.
     
  2. macrumors 6502a

    Joined:
    Aug 10, 2003
    Location:
    USA
    #2
    Hello Josh,

    Congrats on your new adventure. I'm in the same boat you are. I learned HTML back in grade school, and now I'm trying to learn other languages. I started with the Learn Cocoa and C is for Cocoa tutorials here: http://cocoadevcentral.com/
     
  3. macrumors 6502

    Joined:
    Jan 3, 2009
    #3
    Well...everyone has a style of learning. Steve Kochan has a new book, called Programming in Objective-C 2.0 which is excellent. I think you will not go wrong if you need a solid basis in Obj-C. He assumes that you have no prior C experience and teaches both C and Obj-C. I think it's an excellent book. Moreover, he has a website which is quite active http://www.classroomm.com/objective-c/
     
  4. thread starter macrumors 6502

    Joined:
    Aug 29, 2006
    Location:
    Suffolk, UK
    #4
    Great thanks guys. I should have said I already have Steve Kochan's book, 'Programming in Objective-C 2.0' and its great if not a little overwhelming, lots to remember and a little confusing. But that link should be handy.

    Keep the help and tips coming people. :) Your helping not only me but alot of newbies out there. Thanks.
     
  5. macrumors 68000

    Joined:
    Jun 20, 2007
    #5
    Also, if you do not have experience with { type launges, c or c++ I would suggest either getting the "learning c on the mac"

    http://www.amazon.com/Learn-C-Mac-Dave-Mark/dp/1430218096

    and spends LOTs of hours getting the basics of OOPs MVC and other core patterns.

    oh. and it's going to be difficult as your first language/

    anyone that says different is fooling you.

    the key is to keep learning, build small apps first and have fun instead of thinking you are going to be the next "ishoot" if you "just get your app out in a month"

    ain't going to happen.
     
  6. thread starter macrumors 6502

    Joined:
    Aug 29, 2006
    Location:
    Suffolk, UK
    #6
    I understand completely, its a harsh reality, its going to be a whole load of work, but I really want to learn it. Don't you think after reading Programming with Objective-C 2.0 reading Learn C on the Mac is a good idea? Wont that completely confuse things for me? Or are they pretty much the same?
     
  7. macrumors 68000

    Joined:
    Jun 20, 2007
    #7
    No. Both would be better actually. and IMO I would read the Programming in C first, it's about building blocks, and as you know Obj C is built on c++, and there is still a lot of C in the API of OS X so know that first, would make the programming obj c much more lucid IMO.

    the good thing about the Programming in OBJ c book, (the one with the lime on the cover not the stephen kohncran book which Ihave not read) is that it does a REALLY good job at allowing you to wade into these concepts.

    But still, Programming in C will give you the base, read it fast, then go to the Obj C book.

    THEN, read Programming in C again, then the OBJ C book again, you will be surprised how much better things stick when reading the concepts for the 2 or 3rd time.

    best of luck!
     
  8. macrumors 68030

    gibbz

    Joined:
    May 31, 2007
    Location:
    National Weather Center
  9. macrumors 68000

    Joined:
    Jun 20, 2007
    #9
    Yes. I can't say enough about that series, IMO REALLY well done.

    (those are the books I am speaking of, (i mistakenly said "programming"))

    (and in the correct order of learning.)

    :eek:
     
  10. macrumors newbie

    i-ash

    Joined:
    Nov 26, 2008
    Location:
    Melbourne, Australia
    #10
    Cheers, thanks for the link. :)

    I too am learning Objective-C, following Kochan's book. All good so far, am 6 chapters, but have been needing solutions to a few of the excercises.
     
  11. macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #11
    First off, this comes up constantly on these forums, so I'd just use the search and read the many hundreds of posts that have already been made on this subject.

    I wasn't going to reply at all on this one, until i saw:
    I just wanted to make a minor correction... Objective-C is built on C, not C++. It is a different approach to extending and adding Objects to C than C++ took. It allows you to use C++ in a manner referred to as Objective-C++, but they are not the same, and one is not built on the other. Since Objective-C is a proper superset of C, there is naturally a lot of C at work when writing Objective-C, and using the Cocoa API.

    -Lee
     
  12. macrumors 68000

    Joined:
    Jun 20, 2007
  13. macrumors regular

    Joined:
    Apr 1, 2006
    Location:
    California
    #13
    Yes, the answers to the exercises are posted at the forum specified by that link.

    Cheers,

    Steve Kochan
     
  14. macrumors regular

    Joined:
    Apr 1, 2006
    Location:
    California
    #14
    You can follow that order of learning, as many others have. However, I don't agree with that approach. I think it's better to treat Objective-C as a language unto itself and learn it from the start rather than learning the underlying procedural C language first followed by the additions added to create the OOP language Objective-C.

    I think that this approach worked in the past when programmers who already knew C wanted to learn the then "newer" object-oriented languages like C++ or Objective-C. I don't see why a new programmer who doesn't know C would need (or want) to follow that approach today. It's a different mindset and approach to programming. I'd rather the programmer learn how to write a class definition and a method first before learning how to write a structure and access its members or a function and how to call it and pass it arguments.

    Just because Objective-C is an extension to C doesn't mean you need to learn C first.

    Just my opinion, albeit biased since that's how I wrote my book. :).

    Cheers,

    Steve Kochan
     
  15. macrumors 65816

    GoKyu

    Joined:
    Feb 15, 2007
    Location:
    New Orleans
    #15
    Steve: I bought your book, and I made it to chapter 3 without too much trouble, but then I felt like I needed to relearn at least the basics of C that I knew years ago.

    I ended up buying the "Learn C on the Mac", which is a really good book as well, and after I feel a little more comfortable with that, I'll come back to the object oriented stuff in Objective-C.

    -Bryan
     
  16. macrumors newbie

    Joined:
    Feb 22, 2009
    #16
    Programming in C

    Hey Steve,

    I purchased your Programming in C book and I was wondering if you had solutions to the exercises in your book. I visited the website where they might be found (http://www.kochan-wood.com/) but it doesn't seem to have solutions posted.

    Do you have an updated site where the solutions are? I could really use them as a reference for practice.

    Thanks
     
  17. macrumors newbie

    TotalLuck

    Joined:
    Jan 3, 2009
    Location:
    Moreno Vallley
  18. macrumors newbie

    Joined:
    Feb 22, 2009
  19. macrumors newbie

    i-ash

    Joined:
    Nov 26, 2008
    Location:
    Melbourne, Australia
    #19
    You can find the answers here: http://classroomm.com/objective-c/ :)
     

Share This Page