PDA

View Full Version : Teach Yourself Code




nashyo
Dec 19, 2011, 01:51 PM
How long does it take to learn objective c, if your not stupid and are determined to self-teach to the bitter end.

I'm using lynda.com and 'objective c for dummies' at the moment. I got another book coming through from amazon after christmas called 'Sams teach yourself iPhone development in 24hours' [new release].

Can we set a poll up to find out how many people taught themselves to code?

I have no previous experience coding, but I'm not a stranger pc/mac systems.



GorillaPaws
Dec 19, 2011, 02:19 PM
I've taught myself programming, Objective-C, and the basics of Cocoa. I still have a long way to go, and am always learning new things (also the frameworks keep improving so things are always changing). It will take a lot of patients, and hard work to get there but it's doable. It took me several years of studying on the side to get where I am, and I still have a LONG ways to go.

You'll be able to put things together much sooner than that, but as you learn more, you'll realize how much better you could have designed the code of your earlier projects.

As for resources, I fumbled through a few books before I found "Programming in Objective-C (http://www.amazon.com/Programming-Objective-C-4th-Developers-Library/dp/0321811909/ref=sr_1_1?s=books&ie=UTF8&qid=1324324954&sr=1-1)" by Kochan which is now in it's 4th edition. For me, it was the one book that made things click together. Aaron Hillegass has just released his newest edition of the "Cocoa Bible" called "Cocoa Programming for Mac OS X (http://www.amazon.com/Cocoa-Programming-Mac-OS-4th/dp/0321774086/ref=dp_ob_title_bk)" which is also in it's 4th edition. This book is excellent, but really should be supplemented by learning to search Apple's documentation and guides on programming topics as it moves quickly. You should fully understand pretty-much everything in Kochan's book (or an equivalent) before doing Hillegass.

Another book that really stood out for me was "Clean Code: A Handbook of Agile Software Craftsmanship (http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882)" by Martin. This book focused not on how things work, but on general principles and strategies for how to make Object Oriented Code easier to read and manage. The examples are written in Java, but knowing Objective-C should give you enough understanding to grasp the meaning of his examples--I could get the gist of them and I've never learned any Java. To make an analogy with learning how to write, in the beginning you're going to be concerned with making your sentences grammatically correct, or else things simply won't work. Understanding how things work is essential. As you start to figure things out, you'll be much more concerned with making your code easy to understand. This is equivalent to learning how to communicate meaning well in an essay. Both components are essential for writing good code.

larswik
Dec 19, 2011, 03:50 PM
I seriously started about 18 months ago learning. For me starting with Object C was to difficult so I stepped back to C with 'Learn C on the Mac'. I find the more people I talk to these days about programming want the instant gratification of programming and results.

The most important thing is to learn the concepts and understand what you are doing. I went a whole year before I even made my first GUI and write a real ugly console based blackJack game in C.

You can not learn to program in 24 hours. That would be the same as going to a 'Learn to fly in a 24 hours flight school'. For me after 18 months I still think I am at the beginning stages even though I have an app I made that I am testing on my iPhone right now.

admanimal
Dec 19, 2011, 03:53 PM
You can not learn to program in 24 hours. That would be the same as going to a 'Learn to fly in a 24 hours flight school'. For me after 18 months I still think I am at the beginning stages even though I have an app I made that I am testing on my iPhone right now.

Or to put it another way, there is a difference between being able to create an iPhone app or two and really knowing how to program. It's sort of like the difference between being able to cook a few different dishes and being a chef.

mduser63
Dec 19, 2011, 06:03 PM
I taught myself to program. To be fair, my dad had me learn Basic and C when I was quite young, and took some programming (in C) in college. But I really learned to program for real by reading books and working on projects in my spare time. Programming is not a simple skill. It will take a lot of time, effort and perseverance to get good at it. I started trying to write Mac software in earnest about 6 years ago. At this point, I make a good living doing it full time and consider myself quite proficient at Objective-C/Cocoa. That said, I can point to specific examples of ways in which I'm a better programmer now than I was 6 months ago. I'm sure a year from now, I'll look back and feel like I've learned a lot.

You will not become an expert overnight, or even within a year or two. I say this not to discourage anyone, but rather to give you reasonable expectations. Be content with small progress at first, and realize that you're not the only one who has a hard time when they're starting out.

balamw
Dec 19, 2011, 07:33 PM
You can not learn to program in 24 hours.

Just to be fair, those books are usually composed of 24 chapters that may take an hour to work through each, but the lessons may take days to weeks to sink in. Those 24 hours quickly balloon to a month or 6 depending on how much you can put into it.

EDIT: As to how I learned to write code... I had two teachers in school ~ grade 8 that thought it was important. They brought two computers into our lives. An HP-85 (Math) and an Apple ][ (Physics). One actually gave us optional lessons in BASIC (Math) while the other handed us the manuals and told us to have fun (Physics). I later had more official BASIC course and taught myself some Pascal and C on various 8 bit computers.

B

chrono1081
Dec 20, 2011, 05:54 AM
I've been programming on and off since I was 15...I didn't get my first computer until I was 17 meaning everything I learned for those two years was written in notebooks :eek: I am 30 now.

It was hard not being able to experiment with code but I did pretty well. I started with C, moved to C++ (self taught). In college I started with x86 Assembler in an "intro to programming" course (not very intro if you ask me), and also had Visual Basic and more C++ in college. I also learned some Objective-C on the side.

For programming, I learn more every day. Its not my full time job or anything so I am not as good as I could be but I'm not terrible either. I know the fundamentals and it helps greatly as most of the time I am scripting instead of programming. I have plenty of reference books on hand for any programming I need to do.

As for how long it takes, that depends. I know people who rushed through books and can't write a line of code. I know others who spent forever on one book and are great at programming because they took the time to do each exercise.

iHutch105
Dec 20, 2011, 06:05 AM
I don't think you ever stop learning to code.

nashyo
Dec 21, 2011, 07:04 AM
I don't think you ever stop learning to code.

This is probably the conclusion to this thread.

wpotere
Dec 21, 2011, 07:11 AM
I don't think you ever stop learning to code.

This is a true statement. Two reasons for me on this one, first the code is constantly changing. As the vendor makes enhancements, they may degrade or remove a method that you used to use and the other is just that there is a lot to remember.

robvas
Dec 21, 2011, 03:23 PM
This book is a good start:

http://www.amazon.com/Objective-C-Programming-Ranch-Guide-Guides/dp/0321706285/ref=sr_1_1?ie=UTF8&qid=1324502534&sr=8-1

Here's a hint, stay away from any book that has '21 days' or '24 hours' in the title. It's not that you won't learn it in that time period (it's just a fancy way of organizing the chapters), but they just aren't very good books.

firewood
Dec 21, 2011, 04:19 PM
Introductory programming is regularly taught as a 1 semester course in colleges. However many (I might even say most) people still don't really know how to code competently and solve problems with software after just one class. Maybe after 2 or 3 more programming classes (or the equivalent amount of time in self-study and coding on your own). Note, however, that there are whiz kids who pick it up a lot faster, and others who simply flunk out after trying for over a year.

IMHO, it's better to learn Objective C as your 2nd or 3rd programming language. Even familiarity with Basic or Logo (etc.) as a kid gives a person a huge head start. Pick something with a lot of kids or dummies or idiots books on programming to dive into at first, and move on when that starts seeming too easy.

thejadedmonkey
Dec 21, 2011, 04:29 PM
Or to put it another way, there is a difference between being able to create an iPhone app or two and really knowing how to program. It's sort of like the difference between being able to cook a few different dishes and being a chef.

Disagree. You can't make an iPhone app without knowing how to program, and you can be a programmer for years and still be learning new things. Programming is a continuous learning experience, but being at one end of the spectrum vs. the other doesn't mean you can't call yourself a programmer.

Just don't think you're as good as someone with a BS in CS.

chrono1081
Dec 21, 2011, 05:01 PM
This book is a good start:

http://www.amazon.com/Objective-C-Programming-Ranch-Guide-Guides/dp/0321706285/ref=sr_1_1?ie=UTF8&qid=1324502534&sr=8-1

Here's a hint, stay away from any book that has '21 days' or '24 hours' in the title. It's not that you won't learn it in that time period (it's just a fancy way of organizing the chapters), but they just aren't very good books.

That Objective-C book is very good. I read about halfway through it since yesterday (a friend of mine borrowed it and gave up on it). I'm pretty familiar with C and Objective-C so its an easy read but even if I wasn't I still feel like I would have learned a lot from it. (I actually did learn a few tricks from it too).

One of the nice things about it is it has one of the easiest explanations I've seen on the heap and stack. It also doesn't build up pointers to be some scary impossible thing like other programming books tend to do.

As for the "Teach yourself in blah blah days" I agree, terrible books usually. I learned C++ with one of those books back in 1998 or 1999 I forget which and I didn't know until I got my first computer a few months later that the book was full of typos!

Maybe they've improved since then but I dunno, I still avoid them.


Just don't think you're as good as someone with a BS in CS.

I can't totally agree with this. Some of the best coders I know have no degree. I also have two friends who graduated from a major university in CS who only know one language, and they barely know it. They know a great amount of theory, but hardly any coding. (In many cases a person with a BS will probably be better, but not all cases).

One of those friends was just at my house an hour ago and thought I was programming in a language other than C++ (the language he knows) because he saw, as he put it "keywords that aren't part of C++".

This is part of the code he saw:


class myNode : public MPxNode
{
public:

//Creator class required for all Maya plugins
static void* creator() {return new myNode;};

//Initialize function required to intialize plugin
static MStatus initialize()
{
//Create data type to store the attribute
MFnNumericAttribute numericAttrFn;

//blah blah blah

return MS::kSuccess;
}


Sure looks like C++ to me! Apparently he never dealt with any API's or at least not enough to remember them.

A degree, although very important to have doesn't always mean the person has more skill. (Sadly though they'll find jobs much easier just because they have a degree from a certain school than I will even though I know much more about programming).

firewood
Dec 21, 2011, 05:47 PM
Disagree. You can't make an iPhone app without knowing how to program...

Untrue! There exist apps in the iOS App store "developed" by people who only know how to cut-and-paste and drive Xcode, but have no clue how to program or debug the simplest stuff if it's not in code they can find somewhere and paste together. There are also native iOS app generation web sites which will do a lot of pasting of Objective C for them automatically. The results are usually not very good apps, but custom native iPhone apps can be made by people who don't really know how to program. They have apps in the store, and yet still ask the most blinkingly ignorant programming questions about their barely working code on various Q&A groups.

Please don't become one of them.

feflower
Dec 21, 2011, 05:53 PM
Please don't laugh this off immediately; he come across a little odd, but I found this guy's many tutorials are one of the best ways to get started.

I tried to teach myself programming and this guy's tutorials (including the ones for xhtml and css) really helped me get the basics...

Let me know what you guys think!

http://www.youtube.com/watch?v=1Xqn5IHbusA

firewood
Dec 21, 2011, 05:56 PM
Just don't think you're as good as someone with a BS in CS.

Gates and Allen and Woz and Zuckerberg don't have a BS in CS. (Woz got his BSEE *after* he retired from programming for the Apple II. Gates has some honorary doctorates IIRC, but after the fact.) What a bunch of unsuccessful non-programmers. Not.

thejadedmonkey
Dec 21, 2011, 06:24 PM
Gates and Allen and Woz and Zuckerberg don't have a BS in CS. (Woz got his BSEE *after* he retired from programming for the Apple II. Gates has some honorary doctorates IIRC, but after the fact.) What a bunch of unsuccessful non-programmers. Not.

I don't mean to imply that you need a BS to be a good programmer, simply that if you can coble together an iPhone app, that doesn't mean that you're as good as someone with BS in CS.

admanimal
Dec 21, 2011, 07:04 PM
Disagree. You can't make an iPhone app without knowing how to program

Sorry, but that is simply incorrect. Anyone can follow along with an online tutorial or book and simply click and type the things it says to, perhaps adding some of your own artwork and/or text. They end up with an iPhone app, but they do not know how to program.

Again, I think my cooking analogy fits pretty well. Most people can follow the steps outlined in a recipe and end up with a decent final product. Most of those same people wouldn't have a clue how to come up with a novel recipe of their own, i.e. they are not chefs.

Whether or not you have a BS in CS means little. I am about a year away from getting my PhD in CS, and I teach a lot of kids who will eventually end up with BS's in CS but can't really program. Likewise, I know there are many people with no degrees who are much better programmers than I am. Experience tends to be a better indication of skill than what degree you have.