Ways to Learn Coding??

Discussion in 'iOS Programming' started by Dark4218, Dec 28, 2011.

  1. Dark4218 macrumors newbie

    Joined:
    Jul 27, 2010
    #1
    So I wanted to start a forum that talked about how people learned how to code on Objective C+. I want to know because I want to learn a nice easy way. I don't care about length, just difficulty. And when I ask for ways of learning, I'm talking about ways like Lynda, Apress's Programming for Absolute Beginners, and etc. I just thought I should start a forum for this. thanks for posting!
     
  2. KnightWRX macrumors Pentium

    KnightWRX

    Joined:
    Jan 28, 2009
    Location:
    Quebec, Canada
    #3
    3 years of college, countless nights spent in a warm blanket in front of the computer learning archaic and arcane GNU tools and compiling and writing code. 10 years of Unix work, writing code while the boss is not watching.
     
  3. jonnymo5 macrumors 6502

    Joined:
    Jan 21, 2008
    Location:
    Texas
    #4
    There is no nice easy way. It takes time and dedication.

    1. Go to School
    2. Read lots of books
    3. Write lots of programs (not tutorials)
     
  4. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #5
    IMHO only the last one is fundamental.

    Write lots of programs. Like anything learning to code requires practice.

    I find books very useful myself, but school is largely irrelevant.

    B
     
  5. wpotere Guest

    Joined:
    Oct 7, 2010
    #6
    I would agree except the fact that just because you can get something to work does not mean that you are are writing efficient code. I am working with an application that my predecessor wrote that looks like a 12 year old coded it. It works, but it is laggy in many areas and it is hard to follow because the guy didn't follow normal coding protocols. Hell, he didn't even comment in the code.

    I have found that people with a formal education in programming are much less likely to make a mess of their code and generally follow a more logical flow.

    Can anyone learn to code? Sure... Can they easily learn to do it right? Eh...

    I can learn how to drive a car on my own, but that doesn't make me a F1 driver. ;)
     
  6. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #7
    :)

    I was merely suggesting that the order of those bullet points should be reversed.

    1. Practice, practice, practice.
    2. Reading books, tutorials, etc...
    3. School

    A self-taught driver won't become an F1 driver by taking a course or reading books either. ;)

    B
     
  7. wpotere, Dec 29, 2011
    Last edited: Dec 29, 2011

    wpotere Guest

    Joined:
    Oct 7, 2010
    #8
    Ah, I simply misunderstood you... ;)
     
  8. jonnymo5 macrumors 6502

    Joined:
    Jan 21, 2008
    Location:
    Texas
    #9
    There are some fine programmers out there that didn't go to school but in my experience they are the minority. Many don't know why they wrote the code the way they did except that it works. Sure it did the job but with an exponential big O its going to take a while. Thats why i listed all three.

    School - background theory and concepts
    Books - stay up to date with current state of the art
    Practice - because practical knowledge is priceless
     
  9. ArtOfWarfare, Dec 29, 2011
    Last edited: Dec 29, 2011

    ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #10
    Books are not up to date. They're expensive and quickly become old. Don't bother buying the newest books... The only book I'd recommend is The C Programming Language. It's older, which makes it cheaper, but still pretty darn relevant.

    Online resources are much better as those will actually be updated from time to time and thus remain up to date (plus they're often cheaper.)

    Regarding school... I just started college this fall. I had one programming course, which taught "C++" (about the only things taught that weren't straight C were CStrings, IOStreams, and FStreams). The only good practice encouraged in the class was including comments. We didnt get into naming conventions, variable handling, memory management, MVC, or anything else like that. So, at least thus far, I've found that school doesn't really teach good programming habits.
     
  10. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #11
    Books tend to be more structured than pure online resources which can help for learning something new or for reference material.

    You can keep costs down by making use of your local library, reselling books or using eBooks and online libraries (e.g. http://my.safaribooksonline.com/).

    Many of the things you talk about there are really personal style which is best developed by ... practice and looking at a bunch of code written by other folks. ;)


    ----------

    My experience is that that is also true for the folks who did go to school to learn programming. The majority of them also produce inefficient, poorly structured code. The one advantage they have over others is that they had to practice their craft in order to complete their course.

    School and books are not required.

    Once you've got the basics down you can always add another book or course or degree to hone your craft, but none of those are a substitute for practice.

    B
     
  11. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #12
    Define "nice" and "easy". These things mean different things to different people. And people learn things in different ways; what may be "nice easy" to one person might be "extremely frustrating" to another.

    Books are updated from time to time; these are known as "editions". Also, often there are errata and addendum available for them. Even online resources can become neglected and outdated. Often, I find it hard to find online resources that have had the proper effort to curate, educate, and do so as "one voice", so to speak. I'm not saying online resources aren't good; they're usually my first "go-to" when I have a question. It's just that they aren't always the perfect answer.

    I find books are good for teaching fundamentals, where using the very latest tools is far less important than instructing the key concepts that become the foundation of your knowledge. A good C / Objective-C / iOS book can prove to be a valuable resource months or even years after you thought you learned everything it taught you.
     
  12. KnightWRX macrumors Pentium

    KnightWRX

    Joined:
    Jan 28, 2009
    Location:
    Quebec, Canada
    #13
    IMHO, School and writing practice programs go hand in hand.

    Schools usually don't give you practice work in the form of Tutorials, but as simple needs/problems that need solving. This is a good place to practice without having to think of an idea of what to code. Sometimes, coding is the simple part, finding what to work on is the hard part.

    In 3 years of college, you will have many practical labs/exercises/projects given to you and you can then bang into them.
     
  13. tyche macrumors 6502

    Joined:
    Jul 30, 2010
    #14
    Practice. You can't read a book or listen to a lecture and learn. Sure, it all makes sense what you're reading or listening to but close that lesson and try and repeat what you just 'learned' and realize you're lost. You need hands on practice and repeat code samples over and over. Even more so, take the small lesson or example you just learned and use it as many ways as possible to re-enforce it. Just don't do the exercise, do it and then modify all the parts you can to make it do other things.

    The best way I've found is to have a goal. When I want to learn a particular programming language, I have an application or game I want to create. Then I follow a respected book on the language but continue to deviate the topics/syntax I just read and apply them to what I want to do. It helps keep the motivation going. I prefer a book to video or classroom.

    But I think you're going to continue have people say you need to invest a lot of time and practice. Just like anything else. Give it the 10,000 hour rule.
     
  14. jonnymo5 macrumors 6502

    Joined:
    Jan 21, 2008
    Location:
    Texas
    #15
    The "programming" classes are the least useful of the courses. They really only help people who haven't done programming before get up to a level where they can complete assignments in other courses.

    The important ones are data structures, algorithms, OS, Architecture, logic and design, etc. School also gives you a chance to work with other people before you are tossed into a real product team. Not to mention it is a great place to make contacts. Software is a people business.

    As always not all schools are equal so it is important to find one that has a strong focus on computer science and didn't just add the major to the math or science program as a money maker.
     
  15. Rob.G macrumors 6502

    Rob.G

    Joined:
    Jan 17, 2010
    Location:
    NW Oregon
    #16
    To really learn to program, you'll have to figure out a lot of it yourself.

    Books are pointless. They're often poorly done, out of date by the time they're published, and (IMO) are written by people to make a quick buck.

    The best way to learn will be all the FREE resources, such as this forum. That and starting simple and writing your own programs. Start out writing Hello World (just about the simplest possible program in any language), and go from there.

    I learned BASIC eons ago simply by reading the Reference Manual and experimenting. From there I moved onto C, then to HTML, JavaScript, ColdFusion, Java, etc. Now I'm back into C/Objective-C trying to get a grip on the goofy syntax.

    Here's Hello World in C:

    Code:
    
    int main() {
      printf("Hello World!");
      return 0;
    }
    
    
    That's it. But since the Mac is a fairly elaborate environment (which is a good thing too), it helps to learn how to use XCode too.

    Just yesterday I purchased a deal (I don't remember if it was from MacUpdate or Cult of Mac), but it's a C course and an Objective-C course, for $79. It has a 30-day MBG so if it ultimately isn't good, I'll ask for a refund. But it gives you a good intro to C first, and then goes into Obj-C. I'm almost done with the C part... it's been a nice refresher, since the last time I used C was 1985... but if you know JavaScript, most of C will look pretty familiar.

    When I find more time, I'll dive into Rails and Python. I already know some Ruby and like it for the most part; I just never quite got a grasp on Rails. I already do a lot of MVC stuff in ColdFusion using various OO frameworks, so at least that's familiar. That'll be something else you'll need to deal with eventually -- MVC. Model/View/Controller. Don't let it intimidate you. When I was first introduced to it, I was like, WTF, this is stupid. But after really getting into it, the WTF turned into FTW. For large apps it makes a heck of a lot of sense and will make your life easier.

    There's a free iOS course on iTunes-U from Stanford. BUT, it dives right into it pretty hard-core, so if you don't know C yet, it will confuse you. Still, it's worth getting.

    One more thing.. check out phonegap.com. It's a framework for writing mobile apps that will work on iOS, Android, and most others. It uses HTML5 and JavaScript. Plus you can use the jQuery-Mobile framework with it, which makes things even easier.

    I hope this helps and I wasn't rambling too much.

    Rob
     
  16. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #17
    Yeah, I clarified this in my second post.

    IMHO both books and school/courses are merely scaffolding to provide structure to your practice, but the practice is really where you learn.

    At least that's how it works best for me...

    B
     
  17. salacious macrumors 6502a

    Joined:
    May 15, 2011
    #18
    im also doing this task, let me tell you so far it hasnt been easy, my only objective is learning how to code for iphone ios, thats where the money is at, i wanted to learn how to develop a game, idevgames is a good website to learn from, to be honest if you want to learn how to code then go to a coders forum, determination is key, download 3-4 ebooks on c programming and use xcode to blast away, once you understand everything, if your interested in iphone game making then go the the stanford university videos in itunes they are free, and the guy whos teaching is really simple to understand..
     
  18. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #19
    You will need several things at minimum:

    Basic problem solving skills. Poor problem solvers never learn to code well.

    Basic instruction. You can get that from a number of books, online or in-person courses, tutorials and tutors, etc.

    Practice. One needs to actually write (not copy) code that solves a number of different types of problems, and get the code to work.

    Feedback. Even if you get some code running, it could still be cr*p. Have more experienced programmers review your code, make sure it really works, and suggest ways to improve it. Learn from that, and get your new code (re)reviewed. Rinse and repeat.

    A lot of coders who think they are good leave off this last step. Maybe they're good in their own minds.
     
  19. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #20
    Definitely! I think that even if you don't get feedback, just explaining it to someone else is a great idea.

    There are so many times I have been struggling with a problem and just talking through it with anyone else willing to listen can reveal the missing piece.

    For code, even a forum such as this place is a useful venue.

    School also provides a natural venue for this kind of interaction.

    B
     
  20. Dark4218 thread starter macrumors newbie

    Joined:
    Jul 27, 2010
    #21
    Thanks for the posts guys. I agree with Rob.G. Books do get old fast. I bought the apress Obj. C for Absolute Beginners, and I used to use that Xcode until I updated to OSX Lion. I still tried to use the book. But the 2 Xcodes are too different. And dejo when I mean easy. I just mean at level to understand fairly well, not like a level a person with an IQ of 200 would learn at. Its also too expensive to buy "editions". Within a year or so, Apple usually updates the Xcode and so the books become pointless. And firewood. You forgot one minimum: Dedication. I cannot get myself to sit down and code for more than an hour. Its mostly because of time (junior highschool) and when I am not busy, I pull out my book, try to learn, but I can't. I need someway to just learn. I think it's because of my ADD though, my brother and dad have to be on medicine. What I don't get either is that he learned Java, Obj C+, and C++. I don't know how he did that considering his ADD is worse and he didn't start the medicine until early January. Sorry about my rambling, what I'm trying to say is, how do you get yourself to pay attention??
     
  21. 1458279 Suspended

    1458279

    Joined:
    May 1, 2010
    Location:
    California
    #22
    First the old books are not worthless. The version of xcode does change but you have to understand what you are trying to do in the end.

    You are trying to solve problems using code/API's etc... Consider that any problem worth your time is not going to be something you'll find where you can cut and paste and the problem is solved.

    You have to understand what the problem is and then figure out how to solve it. The book might be teaching you to customize a button, yet the example doesn't match what xcode currently does, so boil down what the author is telling you, then figure out how to do it.

    Example: Old books that show how to do a quick-sort, the logic is the same, the languages have changed. So understand how a quick-sort works, then use the modern tools to solve that problem.

    2nd. And hour at a time might not seem like much, but if its a quality hour twice a day, you should be fine. Make it a point to understand what you are trying to do.
    You are NOT trying to read a book, you ARE trying to comprehend the book. If you aren't 'tuned in' to the book and have to re-read then that's what you'll have to deal with. Don't skip ahead and don't continue until you understand what the chapter is about, you'll only make things worst.

    Pretend that you are going to teach a class on iOS programming... understand the book so well that you can teach someone else what's in the book. If it takes you 10 times thru to fully understand 1 chapter, then that's fine, the important part is that you understand it. Once you start to make good small steps, you'll feel better about it and you'll speed up over time.

    Attention can be tricky, I like coffee, no-tv, no radio, if something is on your mind that you can't get away from, take care of it and come back.
     
  22. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #23
    Everyone is different that way. Is there something that works well for you for other endeavors?

    IMO the fact that you are going to do this piecemeal 30-60 minutes at a time means that you really do want to have a bit more structure in your learning. Hillegass is probably the right book for you. It's shorter and many of the lessons it teaches are learned through the exercises.

    B
     

Share This Page