PDA

View Full Version : I feel frustrated and unable




NSG10
Aug 29, 2010, 12:24 PM
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?



Corndog5595
Aug 29, 2010, 12:27 PM
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?

Salacion
Aug 29, 2010, 12:35 PM
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.

Corndog5595
Aug 29, 2010, 12:38 PM
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.

GorillaPaws
Aug 29, 2010, 01:38 PM
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 (http://masters-of-the-void.com/) 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.

lee1210
Aug 29, 2010, 01:48 PM
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

NSG10
Aug 29, 2010, 02:36 PM
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?

Cromulent
Aug 29, 2010, 02:52 PM
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.

lee1210
Aug 29, 2010, 02:54 PM
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.


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

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

NSG10
Aug 29, 2010, 03:56 PM
Thanks, and yes this is my first language that I'm trying to learn.

lee1210
Aug 29, 2010, 04:24 PM
Thanks, and yes this is my first language that I'm trying to learn.

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

NSG10
Aug 29, 2010, 04:29 PM
Thanks LEE, I really hope they do soon.:o

fernandovalente
Aug 29, 2010, 09:10 PM
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 :)

chrono1081
Aug 29, 2010, 09:57 PM
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?

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.

chrono1081
Aug 29, 2010, 10:00 PM
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.

NSG10
Aug 30, 2010, 12:29 PM
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?

Corndog5595
Aug 30, 2010, 12:41 PM
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.

robvas
Aug 30, 2010, 01:01 PM
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.

NSG10
Aug 30, 2010, 01:41 PM
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?

Corndog5595
Aug 30, 2010, 02:10 PM
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.

NSG10
Aug 30, 2010, 03:03 PM
I understand variables and loops by now and lot of other things, I just hope my progress comes soon.

chrono1081
Aug 30, 2010, 03:13 PM
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?

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.

NSG10
Aug 30, 2010, 03:42 PM
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?

Corndog5595
Aug 30, 2010, 03:50 PM
I am using this one and it is very nice.
Beginning Mac Programming (http://pragprog.com/titles/tibmac/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.

Cromulent
Aug 30, 2010, 03:51 PM
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?

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 (http://www.amazon.co.uk/Programming-Objective-C-2-0-Developers-Library/dp/0321566157/ref=sr_1_1?ie=UTF8&s=books&qid=1283201400&sr=8-1) is the best book.

NSG10
Aug 30, 2010, 08:18 PM
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 (http://www.amazon.co.uk/Programming-Objective-C-2-0-Developers-Library/dp/0321566157/ref=sr_1_1?ie=UTF8&s=books&qid=1283201400&sr=8-1) is the best book.

I already have kochan's book, but I find these two pretty helpful.

NSG10
Aug 31, 2010, 08:07 PM
Thanks everyone for your kind contributions. I really appreciate it.:)

larswik
Sep 1, 2010, 12:45 AM
I am in the same boat as you. I started to learn 2 years ago and stopped (mom past away). Here is how I started. I asked "What was the easiest language to learn?" People said PYTHON so I bought 'Python-Programming-Absolute-Beginner'. I was a great book and made learning simple through games. Got half way though it and gave up half way though (mom passed away).

4 months ago I started again switched to Objective C learning. The Python stuff helped a lot in understanding Objective C. 3 things are making learning much easier.

1. Programming in Objective-C 2.0 book ( I am on page 180 now)
2. Programming in Objective-C 2.0 videos to go with the book (a must)
3. This site.

I was getting lost in the book but the video helps explain it and helps me adjust to the syntax (terminology). The Videos were made by LiveLessons and steve himself teaches you. O and it you get the book there is a chapter in the beginning that you should not try to absorb when he talks about Hexadecimals I think, that was a nightmare.

knightlie
Sep 1, 2010, 03:38 AM
One other hint - make sure you're enjoying it, because programming is fun, and learning new languages is even more fun. If you get frustrated, walk away for a while and come back later. It's easy to get into a flap and start trying random solutions to a problem instead of thinking it through, and if you're frustrated you're not going to do that.

And when you get something working, whoop and holler and punch the air, because as Aaron Hildegass says, this stuff is hard. Reward your progress.

There are some useful books at http://www.pragprog.com - I have the Cocoa Programming and CoreData ones.

87vert
Sep 1, 2010, 06:27 AM
IO and it you get the book there is a chapter in the beginning that you should not try to absorb when he talks about Hexadecimals I think, that was a nightmare.


I also had to skip that section. It just comes out of nowhere and gets complex real quick. LOL been slowly trying to figure out that section.

I usually do about a chapter a day. Then every couple of days I will go back and try the exercises at the end of the chapter, trying not to use the book and do it from memory.

I think it also helps to type everything out instead of using copy/paste on repeating sections. I figured out the shift+enter to finish a word/statement the other day by accident. LOL

GorillaPaws
Sep 1, 2010, 09:14 AM
I think it also helps to type everything out instead of using copy/paste on repeating sections.

This is absolutely critical when learning. I wouldn't have believed it prior to learning to program, but there's something incredibly important that must be going on in the brain when you actually manually key this stuff in. It's like when you first learn the alphabet, or cursive and have to keep repeating letters over and over again. It's critical, so don't copy-paste.

Regarding some of the concepts that get skimmed over in Kochan, I can't think of any that are exclusive to Objective-C. They are easily researched online. I would suggest googling around to learn about hexadecimal--basically, each digit in a number goes from 0 to f (f representing 15) for a total of 16 possible values for each digit instead of 0 to 9. Also google around to learn more about bitwise operators, bit-shifting, how numbers are represented in binary, etc. This Harvard CS intro (http://itunes.apple.com/us/podcast/harvard-colleges-computer/id263483352) iTunes U course may prove helpful for understanding some of that (particularly how numbers are represented in binary).

Another important concept to understand is how text is encoded. Basically there have been different systems developed over the years for turning a binary number into a character, some of which involve treating 2 or more characters as one character e.g. the newline character: '\n'. When going through the process of teaching yourself programming from books, you'll need to supplement your understanding by using lots of different resources.

NSG10
Sep 1, 2010, 02:21 PM
Great tips, I will certainly keep them in mind. But typing the code instead of copying and pasting has definitely boosted my confidense and I had that in mind from the beginning.

Tharnid
Sep 1, 2010, 02:48 PM
I have a background in C#/Java and Obj-C is another world. I have a safari online subscription and Books24x7 so I have access to all the books (and videos for that matter) one would need. I knew Obj-C would be hard, but I am up to the challenge. I should have probably started 'droid because of my background, but

I think I messed up when I upgraded to sdk 4, but I don't know that for sure. I will try the book mentioned in this thread, but I am holding out for more books on the 4 SDK. Maybe I go back to the old version? I can say I had a bit of success getting the examples to run before the upgrade. I ran in to the same problem when I started learning cakePHP, codeigniter, django, and rails. I guess I come to the party a little late :)

Side note....I very frustrated with the quality of programming books it seems they rush them to press and they are full of errors.

larswik
Sep 1, 2010, 03:48 PM
87vert - that is funny we both skimmed over that section. I don't bother doing the exercises at the end of each chapter. What I do instead is try to write my own examples after each example in the book that is why I only do a few pages at night. When I learned the WHILE loop I spent the rest of the night coding my own versions of it so the information sunk in. I hate fractions and book seems to love them.

I also agree the most important thing is to write it out and not copy paste it. it helps sync in. This also helped a lot http://www.informit.com/store/product.aspx?isbn=9780132100724 and it was only $67. It said $75 but when I clicked to buy it was like $67. This better helps describe the chapters and get use to the terminology for the book. It's been a huge help for me!

lee1210
Sep 1, 2010, 03:48 PM
...but I am holding out for more books on the 4 SDK.
<snip>
Side note....I very frustrated with the quality of programming books it seems they rush them to press...

You explain some of the rush in your very own post. You want iOS 4 books, but are complaining programming books are rushed to press. You want it now, because it's new and you want to start learning it now. The people that write the books have only had access to iOS 4 for a few months. If there were a lot of iOS 4 books available, one could only assume they had been rushed to press.

I'm not insulting you personally at all, I'm just stating that the nature of things is that there are new hot things people want to learn, and publishers want books out on those topics ASAP to meet the demand.

-Lee

chrono1081
Sep 1, 2010, 04:28 PM
This brings up the point for any programming book you get, make sure to check the books website for "errata", meaning errors in the book. You will rip your hair out over something not working only to find out that there was an error in the book and the correction is on the website ;)

Its like this with EVERY type of technical book out there.

MorphingDragon
Sep 1, 2010, 06:37 PM
I have a background in C#/Java and Obj-C is another world... I knew Obj-C would be hard, but I am up to the challenge.

It will hard to learn if you keep on saying it is hard to learn.

neutrino23
Sep 1, 2010, 08:32 PM
If you are really starting from scratch I suggest you try learning C first. This is not hard and shouldn't take long. It is helpful to take a small step first.

Try browsing through the books at

Apress.com

They specialize in programming books. You can buy the books as PDFs so you can read them on your laptop wherever you are while practicing the lessons. The website also provides updates and downloads such as example software.

I'll suggest two books:

Learn C on the Mac by Dave Mark
Learn Objective-C on the Mac by Marc Dalrymple and Scott Knaster

One more, (not sure if this is on Apress):
Cocoa Programming for Mac OS X by Aaron Hillegass

firewood
Sep 1, 2010, 08:44 PM
If you think you're in over your head, don't learn Objective C or C first.

Don't.

Some people pick up programming more easily than others, and Obj C is not the easiest path. If you can figure it out, go for it (a lot here have, but that just survivor's bias, a huge statistical fallacy). If you can't, drop it. Go the the teen or even children's section of your local library and you will find much easier introductions to programming. Or look at the dummys/idiots book for one you think will be too easy. Any language. A kid's language.

Really.

Logo, Squeak/Scratch, Python, Basic, some toy programming language, whatever.

After enough of these easy intro to computing books starts seeming too childish, and you can answer the problem sets better than a 5th grader, then you'll be ready for C and Obj C.