I feel frustrated and unable

Discussion in 'Mac Programming' started by NSG10, Aug 29, 2010.

  1. macrumors member

    Joined:
    Aug 26, 2010
    #1
    Hey, I,m just starting to learn objective-C and I must say these few days have been frustrating and mind boggling while trying to learn this language and sometimes I feel like quitting, but I just can't seem to accept that. Did anyone of you who learned the language have the same thoughts while going through the process and do you have any tips for me or books or anything that can help me get up fast on track with this language?
     
  2. macrumors 65816

    Joined:
    Jul 16, 2010
    #2
    I am in the same boat as you I guess.
    Do you know any other languages currently, and how much do you know about Objective-C?
     
  3. macrumors 6502a

    Joined:
    Apr 8, 2010
    #3
    To learn Objective-C with better form, you really need to have some general knowledge about coding. Tackling it straight on with no past experience is absolutely mind-boggling.

    I learned the basics. Just figuring out how to get simple number variables to pop up on screen took me days. You seriously need to be committed, and if you want to create serious applications, I recommend ponying up the money for a course.
     
  4. macrumors 65816

    Joined:
    Jul 16, 2010
    #4
    I find learning the basics of C++ (takes maybe a few weeks) helps.

    Nothing complex, just like some kind of windows command line blackjack game or something of that nature.
     
  5. macrumors 6502a

    GorillaPaws

    Joined:
    Oct 26, 2003
    Location:
    Richmond, VA
    #5
    I taught myself Objective-C from scratch with no real previous programming knowledge/experience. It's hard. Period.

    I really struggled until I found Kochan's book and made my way through it (twice actually). Programming languages are absolutely unforgiving with regards to spelling, syntax, or other errors. Computers execute exactly what we say, not what we mean (always remember this).

    I found the Masters of the Void tutorial to be very helpful in understanding memory (stack vs. heap) as well as how pointers work--the animated clips are terrific.

    Also, keep in mind that you're not going to learn how to program in a few days. It's going to take a lot of time/effort to get there.
     
  6. macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #6
    It really depends on your background. Objective-C can certainly be learned as your first language, but I consider the following levels:
    Never programmed before: you will have to learn the basics of programming, algorithms, control structures, program flow, what a function is, etc. On top of all of that, you'll need to learn the syntax for all of these things in Objective-C (really, just C syntax for most of this. Then, you'll have to learn the concepts of Object-Oriented Programming. What is an Object, a Class, object/class methods, inheritence, etc. Then you have to learn how all of that is implemented in Objective-C. You'll also need to learn to use tools like an Integrated Development Environment or a programmer's text editor and a compiler. The point is, this is a lot to learn, often without results that are demonstrable. This will seem overwhelming, but you will have to learn most of this for any language.

    Next would be if you'd programmed any language, but not OOP. That will cut down what you need to learn. You'll need to learn basic syntax unless you know C. Then you'll need OOP concepts and the Objective-C syntax for them.

    The easiest will be for one who already knows one or more OOP languages. That means it's only syntax, which is very easy.

    I think the best advice is to be patient. Programming can be very frustrating, but if you really love it the rewards are high.

    Good luck, stick with it.

    -Lee
     
  7. thread starter macrumors member

    Joined:
    Aug 26, 2010
    #7
    Thanks guys for the kind contributions and I know I have to stick to it, I,m reading two books now and have finished a few chapters already. The question is that I want to learn this language ( objective-c ) without going through the headache of learning another computer language, is that possible? And how long exactly until I get really good knowing that I understand and I 'm noticing my progress from what I've learned so far. And what is the title of Kochan's book that was referred to earlier? And does it teach me as newB in objective-C?
     
  8. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #8
    Don't worry I still feel frustrated and unable :).

    That's half the fun of programming. Banging your head against a wall for a few days and then having that "Eureka!" moment and fixing something that has been bothering you for ages. That's rewarding.

    That's basically all programming is. Solving a sequence of (sometimes frustrating) puzzles.
     
  9. macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #9
    You still haven't said outright if this is the first language you are trying to learn, but from what you have said that does seem to be the case.

    As I stated above, there is certainly nothing preventing you from learning Objective-C as your first language. No matter what language you learn first, you're going to have to pick up the concepts as you go along. Once you know the concepts learning any particular language is largely syntax, which is the easy part.

    The Kochan book that is referenced is "Programming in Objective-C 2.0". It assumes no prior programming experience.

    I sometimes think of it as designing a maze. When you're "done" you are then thrust into the maze to make tweaks and repairs, so you need to be able to navigate the maze, sometimes years after designing it. The more you do it, the better you get at designing shortcuts and secret panels to help you (and others) navigate the maze when it needs maintenance or a new wing added on.

    -Lee
     
  10. thread starter macrumors member

    Joined:
    Aug 26, 2010
    #10
    Thanks, and yes this is my first language that I'm trying to learn.
     
  11. macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #11
    It's been a very long time since I learned my first programming language and how to program in general. Since I did so in a structured classroom setting, it's hard to recommend a language-agnostic method to learn programming concepts. This is the hard part, but it's hard to teach concepts without being able to give some concrete examples. Hence, most people learn the concepts along with their first language, making the language itself seem mysterious.

    The best thing to do is keep trucking. If the books you have don't suit you trying another may help. Re-reading the one you're reading now may help, too. To get help, it's best to try something for a while, then ask a specific question about a piece of code or a concept.

    Again, good luck. Things will start clicking soon.

    -Lee
     
  12. thread starter macrumors member

    Joined:
    Aug 26, 2010
  13. macrumors 6502

    fernandovalente

    Joined:
    Aug 29, 2008
    Location:
    Third world **** hole, I mean, Brazil
    #13
    I know that feeling, and today I *LOVE* Objective-C. First learn C, then learn OOP. Bad written books will make you feel that way. Don't try to learn it from blogs, books are much better. Try Cocoa Programming for Mac OS X by Aaron Hillegass. It solved my problems :)
     
  14. macrumors 604

    chrono1081

    Joined:
    Jan 26, 2008
    Location:
    Isla Nublar
    #14
    Welcome to programming ;)

    In all seriousness though everyone, and I mean EVERYONE goes through this while learning to program. You will hit so many stumbling blocks and frustrations along the way especially if its your first language. It WILL come though, but it will take some time.

    A few pointers I can give:

    -Grab multiple books on the same topic. This is a huge help.

    -If one book has you stuck, hop to another where it is teaching the same concept.

    -Realize that anyone can learn anything, how fast you pick it up depends on how you are exposed to it. (Hence my reasoning for multiple books).

    -Don't try and memorize every morsel of code. I see people do this a lot and was guilty of it too when I started learning programming. In programming, you will memorize the basics and reference the rest a lot. (Some purists may chime in here but really, no one can memorize it all which is why there are so many reference books).

    -Keep trying! Once you learn a concept, make a few other programs of it yourself doing different things and don't be afraid to experiment. A good rule of thumb is to try one concept per day. If you try and cram too much in at once you will forget most of it. Each time you sit down to program focus on learning one thing.

    Programming takes time but will become easier the more you do it and the more code you write. I remember years and years ago I was absolutely frustrated learning classes in C++. I didn't understand them. Now it seems silly that I got stuck on something like that.
     
  15. macrumors 604

    chrono1081

    Joined:
    Jan 26, 2008
    Location:
    Isla Nublar
    #15
    Oh, one more thing...

    Don't ever let yourself get stuck on one concept and stay stuck. There are a lot of different paths to learning programming so if you get stuck on something like bitmasking (why some books teach this at the beginning i'll never know, I have yet to use it for anything) skip it. Come back to it later if you want to know it, just keep it in the back of your mind that it exists and you can reference it if you ever need to.
     
  16. thread starter macrumors member

    Joined:
    Aug 26, 2010
    #16
    Thanks chrono1081, for your great advice. I did download more than one book and every time I get stuck in a book I try to read that topic in another, I'm also taking it a bit slower learning one thing at a time, I'm able to read a lot of topics and do them, but as you said I find that a little confusing and find my self jumping back through chapters to link things together. Step by step seems to be working great. My question is do I have to learn any languages prior to objective c or can I learn it without any prior language and how long did it take you or any of the membesr here to get a hold of things in objective c?
     
  17. macrumors 65816

    Joined:
    Jul 16, 2010
    #17
    Although there is no easy or comfortable way to do it, I find that I get through things faster and understand them better when I learn from a physical book. Maybe I am not focused when reading from a computer screen or something, but things just go through one ear (eye?) and out the other.
     
  18. macrumors 68000

    Joined:
    Mar 29, 2009
    Location:
    USA
    #18
    There's a lot to grasp in C, without adding any Objective-C into the mix. I'd say you might want to concentrate on getting all the plain C stuff down pat before you throw objects into the mix. Loops, arrays, logic, functions, there's a lot there, especially for a first timer.

    A good book can really help, some people really do better when they are learning from a book.

    You also might want to step away from the computer while you learn. Being able to enter code in while you're reading is both good and bad, you can see things right away but at the same time you tend to skip over parts.

    My tips for first starting out:

    )) Don't copy/paste any code. Type it all in by hand.
    )) Change programs around. See what happens when you make even a small change
    )) Ask. Ask the internet. Ask other people. But research first because a beginner will annoy people very easily!

    It would help if you have a buddy you can chat with in person, or online, because there are a lot of things a person can explain better than a book! And people can show you, not just tell you.
     
  19. thread starter macrumors member

    Joined:
    Aug 26, 2010
    #19
    Thanks corndog5595 and robvas, but how long did it take you guys to get the language right and feel that you know what your doing?
     
  20. macrumors 65816

    Joined:
    Jul 16, 2010
    #20
    Sorry for the wall of text...enjoy?

    I’m actually a little more than halfway through a book right now. I picked up about 6 from my local library until I found one I thought would work. I have to learn a specific way or something, and if somebodies style of teaching doesn’t ‘click’ with me then I have a hard time learning.

    I highly recommend doing this. Sometimes your library might have to get some of the books from another towns library, just so you know.

    If you get stuck on something, just keep powering through it. Eventually you will be reading, mid-sentence and your mind will just go, “ohhh...duh, I had to do xxxxxx.” This has happened to me probably four or five times.

    I keep a list (dashboard sticky) of things that I don’t quite understand. I try to avoid actively looking for solutions to these problems because I know I will remember it better if I figure out the problem on my own.

    Learning C++ (or just basic fundamentals of C) will help you out a bunch, but it isn’t necessary. I have probably spent two or three weeks of my life learning some basic C++ and it has really helped me out. I pretty much just learned about variables, loops, stuff like that. Any book will explain these things fine and you don’t necessarily need to learn them prior-to.
     
  21. thread starter macrumors member

    Joined:
    Aug 26, 2010
    #21
    I understand variables and loops by now and lot of other things, I just hope my progress comes soon.
     
  22. macrumors 604

    chrono1081

    Joined:
    Jan 26, 2008
    Location:
    Isla Nublar
    #22
    It depends on the book you have whether you should go with C first or not. Its not necessary to learn it first, but if the book you have doesn't tell you anything about loops, arrays, functions, etc, then it may be advisable to run through a C book first, then come back to Objective-C.

    If you choose this route, I would recommend going through C not C++ though since Objective-C is a superset of C and you can mix them together. You don't have to be an expert in C to pick up Objective-C, but knowing the basics will help if the Objective-C book you have doesn't cover the basics.

    As far as picking up Objective-C for me, it took me about a week to go through the book I had. Cocoa took me a bit longer since its different then anything I'm used to. I also have previous programming experience in C, C++, x86 Assembler, Visual Basic, and (not really programming) Lua so that helped a bit.

    C++ is my strong suit as I use it the most but once you learn one language pretty good, its easy to switch between them. The concepts are mostly the same, its just the syntax that changes.
     
  23. thread starter macrumors member

    Joined:
    Aug 26, 2010
    #23
    I'm currently reading:

    1- Objective-C for absolute Beginners by Gary Bennet, Mitch Fisher, Brad Lees.
    2- Objective-C for Dummies by Neil Goldstein.

    What do you guys think of these two books and do you recommend anything else?
     
  24. macrumors 65816

    Joined:
    Jul 16, 2010
    #24
    I am using this one and it is very nice.
    Beginning Mac Programming

    It seems to go pretty quickly over things, but not too quickly. It is designed for people that have little-to-no coding experience at all. But if you already understand a lot of stuff, this book doesn’t teach you like an idiot, so its easy to skim past stuff you know and power through stuff you don’t.


    If you are already well through the books you have right now and you like them, I suggest you finish them instead.
     
  25. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #25
    They are not the books that are usually recommended here. The consensus seems to be that the Steve Kochan book Programming in Objective-C 2.0 is the best book.
     

Share This Page