Stanford's online lecture's.

Discussion in 'iOS Programming' started by Tander, May 10, 2012.

  1. Tander macrumors 6502a

    Tander

    Joined:
    Oct 21, 2011
    Location:
    Johannesburg, South Africa
    #1
    Hi all,

    So I have spent the last two weeks reading "Learn C on Mac""

    And it's been great. I got put o chapter 8, I think and i felt that I had learnt a lot of the fundamentals of the C language in order to move on to iOS programming.

    Now I am looking for a good book or online course to do in order to progress in the right direction.

    I came across Stanford's lectures on iOS programming and now wondering what are your guys views on this?

    Would a book be better do you think?
    If so, which book would be best?

    I am using Xcode 4 and a lot of the older books don't cover this nor do they cover iOS 5.

    Thanks for any input.

    R.
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    The Stanford lectures come highly recommended, if you're comfortable with that learning style. If you prefer books, see below.

    If you feel comfortable with the style taught in "Learn C on the Mac", I don't think more books is such a bad idea.
    I'm not sure there is one "best" book but "Programming in Objective-C (4th Edition)" by Stephen Kochan and "Objective-C Programming: The Big Nerd Ranch Guide" by Aaron Hillegass have been well-received. Once you're comfortable with Objective-C, you'll want to move on to iOS programming.
     
  3. Tander thread starter macrumors 6502a

    Tander

    Joined:
    Oct 21, 2011
    Location:
    Johannesburg, South Africa
    #3
    Hi Dejo,

    Thank you for your input.

    Well, I am having difficulties downloading lecture 1 on Stanford's site, but will try again.

    From what I can gather, I would prefer Stanford's way of doing it.

    I don't do too well with reading books - I need to constantly be trying out code / examples as I learn, this is the best way I learn new things. I need to see it in order to understand it better.

    If I jumped to Stanford's way now - and later go read a few reference books - would this also be a good approach into iOS programming?

    R.
     
  4. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #4
    Why are you on Stanford's website? Open iTunes, go into the iTunes store. Click on iTunes U from the black bar at the top of the store, choose Universities & College. Click on Stanford. On the right side there are a few lists, "Top Collections" is one of the lists. I almost guarantee you that "iPad and iPhone App Development" is their top collection (it has been for several years.) Click on it. Open it, and click "Get All" and "Subscribe Free". It'll download all the lecture videos + slide notes that have been released so far, plus new ones as they're available.

    At least that's how I get the videos... I think I had to tell iTunes to only do one download at a time in the preferences, otherwise it would stall sometimes.

    Hope that helps.
     
  5. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #5
    Sounds like a tutorial-style book is what you might like, something where you are coding and tweaking and doing exercises as you go. That's exactly the style that Kochan's book, at least, takes.
     
  6. TheWatchfulOne macrumors 6502

    TheWatchfulOne

    Joined:
    Jun 19, 2009
    #6
    Kochan

    I hear Hillegrass recommended around here more often than Kochan. I haven't looked at Hillegrass but I'm sure its a good book. The book that did it for me was Kochan. It wasn't even the newest edition. If you're going get his book I do recommend getting the newest edition due to all the recent major advances (Xcode 4; ARC; blocks; etc.) I would check Amazon or eBay for used copies if you want to save some money.

    After spending time in Kochan's book, I moved on to Beginning iPhone 3 Development from Apress. (Makes a lot more sense AFTER learning some things about Objective-C.)

    Nearly 2 years later, my first app is pretty close to being feature complete!
     
  7. reputationZed macrumors 65816

    Joined:
    Mar 9, 2011
    Location:
    34°55′42″N 80°44′41″W (34.
    #7
    Without a solid grasp of OOP your likely to get lost pretty quickly in the Stanford course. The class requirement is two semesters of programming in an OOP language and C is not an OPP language. Both Kochan's book and the BNR books are good intro's to Objective C. I'd give Kochan's book the nod for a beginner, the BNR seemed geared towards someone who already knows another language or two.
     
  8. Tander thread starter macrumors 6502a

    Tander

    Joined:
    Oct 21, 2011
    Location:
    Johannesburg, South Africa
    #8
    That's perfect. No idea why I was going to their website!

    This is much better - thank you!

    Great - I will give that book a try and see if it is a better read than the one I am reading now.

    OOP?

    I am not completely new to programming and I grasp the C language quite quickly.

    But thanks for your input, I will take it into account.



    Thanks for sharing your experience with us. I will look at a few different approaches and see which is the best route.

    Appreciate all the input and advise guys.

    R. :cool:
     
  9. larswik macrumors 68000

    Joined:
    Sep 8, 2006
    #9
    I spent 3 months reading that same book and letting it sync in. If you polished off that book in 2 weeks and can write some C programs like I did go for it! I wrote a bad looking but functioning BlackJack game at that point I felt good about stepping in to OOP. Just make sure you have a good grounding in C. With OOP it gets harder.

    But think of this with C. Lets say you are going to write a blackjack program. Could you? Do you even know where to start or how to start? In my case, the more solid my C background was the easier it was to go in to Object -C. Even after 3 months it took a couple of weeks to write a BlackJack game.

    Chapter 9 in that book is where it started getting harder. If you stopped after Chapter 8 you missed a lot. If you stopped because it got hard and you didn't understand and decided its better to move on, you more then likely will find Objective C hard too. I was there too at 1 point and from your recent posts you sound a lot like I did back then.
     
  10. KnightWRX macrumors Pentium

    KnightWRX

    Joined:
    Jan 28, 2009
    Location:
    Quebec, Canada
    #10
    Object Oriented Programming. Like the poster state, C is a procedural language, and the Stanford classes are more aimed at people with Object Oriented experience.

    I personally listened to a few and didn't like them. Not enough hands-on, too much talking. The course in the school is probably good, but online, you only have the theory portion of it, not the labs.
     
  11. reputationZed macrumors 65816

    Joined:
    Mar 9, 2011
    Location:
    34°55′42″N 80°44′41″W (34.
    #11
    While I like Stanford's approach I see their courses as a supliment to the books I'm using rather than as my sole source for learning iOS development. Listening to the Stanford courses has cleared up a few concepts that I wasn't fully appreciating from the books.
     
  12. Tander thread starter macrumors 6502a

    Tander

    Joined:
    Oct 21, 2011
    Location:
    Johannesburg, South Africa
    #12
    Maybe I should go back to that C book and re-read the last two chapters.

    My problem is I have no one to talk to directly who can explain some of the code more than the book does at this point.

    I am thinking I should join a pure programming forum on C - and ask for help with regards to my code.

    To answer your questions: I did find chapter 8 and 9 hard.

    Let me look at Stanfords courses over the weekend, and see where we are going with that.

    I think in the interim I must re-read Learn C on Mac from scratch.

    Once again, I really appreciate all of your input!
     
  13. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #13
    If you understand C math and control logic*, I think you know enough C to move on to learning Obj-C. Some may disagree, but... I don't think you really need to understand things like memory management or pointers in C because obj-C handles those differently.

    Anyways...

    The Stanford lectures includes at least one covering OOP. I think that one lecture is good enough. I'm not saying you'll know everything about Obj-C from it, but you'll know enough to start making some iOS apps.

    * Things you should know... Functions, mathematical operations available in C, for loops, while loops, if-else statements, the different data types, escape sequences (for formatting strings and log messages,) switch-cases, and... I can't think of anything else crucial to know... enums can come up pretty often, especially in Apple's sample code, I guess.
     
  14. Tander thread starter macrumors 6502a

    Tander

    Joined:
    Oct 21, 2011
    Location:
    Johannesburg, South Africa
    #14
    I know most of those.

    I took a different approach to reading the book this afternoon. I started from chapter 4 as this is where the code begins. Chapters 1 to 3 I know, 100%.

    With the new approach, I found myself knowing or rather, learning more than I did previously.

    Do you think reading the whole book will be more beneficial than just up to a certain chapter?

    I am downloading the first video from iTunes U from Stanford's page and will see how their style is.

    Maybe I can just pick up OOP easier - I think everyone is different in the way they learn.

    R.
     
  15. reputationZed macrumors 65816

    Joined:
    Mar 9, 2011
    Location:
    34°55′42″N 80°44′41″W (34.
    #15
    If your fairly confident in your understanding of C you may want to give this tutorial a go
    https://developer.apple.com/library/ios/referencelibrary/GettingStarted/Learning_Objective-C_A_Primer/_index.html
     
  16. larswik macrumors 68000

    Joined:
    Sep 8, 2006
    #16
    Tander, don't be in a hurry. If you rush your self you will get lost and you more then likely will not like programming because it is confusing. I spent over a year learning C and objective C, not Cocoa which is the fun user interface. But getting a grasp on the language.

    By Chaoter 8 in the Learn C book you already have enough experience to write a blackjack game for instance. But can you do it?

    If I said make a simple C project that uses a random number generator (which I posted the code a while back for you) from 1 to 50 and have it loop 1000 times and have it count how many time the number 42 comes up. Then at the end have it print out "The number 42 came up n number of times".

    That is a very simple thing, can you do something like that yet?

    By the way, this is a really good forum to ask questions. You are at a disadvantage because you don't have people around you that you can talk to. Places like this are the next best thing.
     
  17. Tander thread starter macrumors 6502a

    Tander

    Joined:
    Oct 21, 2011
    Location:
    Johannesburg, South Africa
    #17
    Larswik, I think you hit the nail on the head there. I started off by rushing and trying to just complete the Learn C book, so that I could get where I wanted to now. It is now evident that, was not the way to do it as while I understand how to write a simple C program - what you're asking I wouldn't be able to do. As I just read the book, tried a bit of code. But never studied the code - thus, when I got to chapter 8 - I was in trouble and confused as what what the hell was going on.

    I also believe that had I studied the first few chapters properly and understood the code all the way to chapter 8 - I would have been fine.

    So, lesson learnt - don't rush!

    I looked at the first lecture of Stanford's courses and Paul already starts off saying we should be comfortable with OOP before he begins - I'm not, so I won't use those courses just yet.

    I have started reading the Learn C book again, this time making sure I understand the code perfectly.

    With regards to asking questions - I didn't want to flood this section of the forum with C code and questions - but if it is okay to do that, I would appreciate some help when I get stuck. Can I ask here?

    Once again, really appreciate all the help and tips, I owe you guys! :D:cool:

    My end goal is to be able to write decent, legal code and make create apps for people to really enjoy!
     
  18. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #18
    1 - C isn't OOP. Unless they've changed the lectures in the most recent go around, Paul explains OOP in a lecture. He doesn't go into a lot of detail, but I think he covers it well enough.

    2 - I encourage the rush approach. C isn't your end goal. I say learn just enough C to move onto Obj-C and the iOS SDK.

    My person approach was:
    1.) Learn the basics of C. The most basic 25% or so.
    2.) Move onto Obj-C and the iOS SDK.
    3.) Move over to the Mac SDK.
    4.) Go back to learn all of C. <--- Where I am now.
    5.) Learn C++.
    6.) Learn the Ogre 3D SDK. (My next goal is to make a 3D game that runs on both Mac OS X and iOS, thus why I'm aiming to learn this. The SDK is all C++.)
     
  19. larswik macrumors 68000

    Joined:
    Sep 8, 2006
    #19
    I have to disagree with this. That is how I got lost in the first place. There is tons of C that I use in objective C for decision making that a firm grounding in C is warranted. I was the guy that rushed in the very beginning and got lost. If programming is not fun and feels to hard to learn, you give up.

    But the thing that I see a lot and struggled with myself wasn't learning the language. It was how to use what I just read? Great, I just learned what an array was and did the tutorial in the book. But how would I use it i thought for me. The only way to do that was to create my own simple little projects. like the one mentioned above for keeping track of a random number. There you use a for loop, if statement, counter. The important thing is you see how the Logic flows. But if you are like I was your probably asking yourself I don't know where to begin making my own projects?

    But Tander... The most important thing I learned when I took a Pascal class from my teacher was "Keep it Simple". Tackle project in small pieces. Like don't worry about creating a Blackjack game. Start by just getting the players name and build like that piece by piece.

    So the project I listed above generate a random number 1000 times with a number between 1 and 50 and keep track of how many times the number 42 comes up. Try that and ask questions here when you get stuck.

    In case you do the count the guessed number up top here is the random number generator again to copy and paste into your project.

    Code:
    int num = arc4random() % 50 + 1;
    
     
  20. Tander thread starter macrumors 6502a

    Tander

    Joined:
    Oct 21, 2011
    Location:
    Johannesburg, South Africa
    #20
    Hi bud,

    Thank you once again for your insight, it has really helped me a lot. You're right - I find that if I don't understand the book or code, I loose focus easily. But now that I have started the book again, and actually understanding it more, I am enjoying it more and willing to learn more on it.

    I think i should finish the whole book first - then move to Object-C and finally onto iOS.

    I thought about rushing it again, but I would just get lost and not understand what I was doing.

    Lastly, I agree, if you keep the code and small projects simple along the way, it will not cloud your mind and you can focus on the important bits along the way.

    R.
     
  21. larswik macrumors 68000

    Joined:
    Sep 8, 2006
    #21
    Yep. Make little games for your self as you work through it. It keeps it fun. Have the computer use a random number generator makes it fun and gives your results different outputs every time you run it. But most importantly you learn what is happening and how it works in small projects.

    Here is another idea that I did to keep it fun. generate a random number from 1 to 5. Then use the scanf to enter a number you think it is. Then use an if statement to see if your guess is the same as the random number, if so use the printf to write to the screen "Your right"!!

    Simple things like that will to each you a lot about how it works. If you have to try and learn that on top of learning how to use Objective - C, info overload.

    Good Luck!
     

Share This Page