I want to learn a programming language

Discussion in 'iOS Programming' started by Anton626, Jun 4, 2014.

  1. Anton626 macrumors member

    Joined:
    Mar 2, 2014
    #1
    Hi guys. I'd like to start developing apps for iOS. I know that there are lots of questions about that and you may be bored, however could you suggest me a book to read? i know nothing about programming. I have to start from 0. Thank you!
     
  2. steelzeh macrumors newbie

    Joined:
    Jun 3, 2014
    #2
    I'd suggest to read the Swift Programming book that is on iBooks.
    It will have everything you need.
     
  3. Anton626 thread starter macrumors member

    Joined:
    Mar 2, 2014
    #3
    I've read that I need to know objective C basis!!. Is this true or not?
     
  4. steelzeh macrumors newbie

    Joined:
    Jun 3, 2014
    #4
    Not really no, Swift is a language of it's own. It's running alongside Obj-C
     
  5. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #5
    Hardly. That book assumes prior knowledge of programming, the C language in particular. Also, that book tells you only about the Swift programming language itself and not about how you use it to make an app (like connecting to a UI, etc.)

    To the OP: please see my previous answer to someone else that recently asked pretty much the same question.
     
  6. Anton626, Jun 4, 2014
    Last edited: Jun 4, 2014

    Anton626 thread starter macrumors member

    Joined:
    Mar 2, 2014
    #6
    Ok so I will NOW start reading it. I hope it's true because I really no nothing about programming! Thank you!

    Edit: Ok I'll read your answer!

    Edit: OMG it's really confusing! There are tons of answers and everyone says something different! Please I just need to know where to start!
     
  7. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #7
    So, are you expecting a single answer to a question that usually has multiple answers, depending on the goals, skills, previous experience and learning style of the person asking the question?
     
  8. Anton626 thread starter macrumors member

    Joined:
    Mar 2, 2014
    #8
    Sorry you're right! I'll try to understand where to start from other posts. Thank you anyway.
     
  9. larswik macrumors 68000

    Joined:
    Sep 8, 2006
    #9
    Well, I started with Objective C and failed. I went back to C, took my time and wrote some programs in C and then stepped back up to Objective C and was able to work through it better.

    If you want to rush through learning to program you will fail most likely. I spent 3-4 months learning C and then the rest of a year working through Objective C and Cocoa before I was ready to send my first app to the app store.

    Work at it daily and don't turn the page in the book until you understand that page.
     
  10. AxoNeuron, Jun 4, 2014
    Last edited: Jun 4, 2014

    AxoNeuron macrumors 65816

    AxoNeuron

    Joined:
    Apr 22, 2012
    Location:
    The Left Coast
    #10
    I would definitely start with Objective C, though if you do have the time you could start with just plain old C.

    I would suggest just opening up Xcode and looking on YouTube. While there are a lot of bad objective C videos on YouTube from people with no teaching/communication skills, if you want a good start I would suggest the objective C tutorials from user "mybringback", I learned a LOT from his videos and it was an excellent place to start. And he isn't trying to sell you anything either. I would suggest taking a ton of notes and make sure you understand each video before you move on to the next one.

    After you have finished watching his Objective C videos, I would suggest the iOS development course from team treehouse (google it) or udemy, I've learned a HUGE amount from both of them.

    I wouldn't suggest starting with a book. At least for me personally, I learn coding a lot faster from coding video tutorials. I only started reading objective C books once I learned the basics of the syntax, so that I could understand even deeper. So basically, I have found it best to get basic knowledge from videos, and then strengthen your knowledge from books.

    Best of luck!
     
  11. Amazing Iceman macrumors 68040

    Amazing Iceman

    Joined:
    Nov 8, 2008
    Location:
    Florida, U.S.A.
    #11
    Download the WWDC App, register as a Developer (no need to pay, as you wouldn't be enrolling in a Developers program), and you will be able to see the videos from THE WWDC. This will give you an idea on what to do, and will be very helpful for you to understand about Swift and other new technologies unveiled on Monday.
     
  12. Anton626 thread starter macrumors member

    Joined:
    Mar 2, 2014
    #12
    This is the result of my first day of searching.

    Today I've been looking for tutorials about C. There are so many tutorials and it's difficult to choose the right one to follow. I chose one and I start reading it. After few seconds, I switched to the Swift book and I noticed that they have the same structure! Both start with the explanation of variables and constants, loops, function ecc. I read both fastly to see what was the difference between them and I found Switf easily to read. Moreover ( I don't know if I'm getting the wrong impression ) I read the first chapter of the Swift book without any knowledge of the C language and I understood it, and i compared it to the C-tutorial and I found the same things were explained in the same way ( but the code was different ). So my first impression is that I could continue reading it without learning other languages. Am I wrong?
     
  13. mfram macrumors 65816

    Joined:
    Jan 23, 2010
    Location:
    San Diego, CA USA
    #13
    Read it? Yes, you can read the book all you want. But to *learn* it, you're going to have to practice. When it comes to programming, the devil is in the details. You have to be extremely precise. You'll learn that as you start typing code and have the compiler complain about your mistakes.

    If you're learning to program, you need to be guided while you practice. And you need to practice by writing programs. How many program have you actually written while you were "reading" these books? Since the Swoft book isn't really a guided learn-how-to-program book, I'd believe it would be somewhat difficult to use it as such. But maybe I'm wrong.

    Feel free to read all you want. But in order to learn you need to practice and do exercises just like any other skill.
     
  14. AxoNeuron macrumors 65816

    AxoNeuron

    Joined:
    Apr 22, 2012
    Location:
    The Left Coast
    #14
    mfram above is completely correct. I would suggest looking up some youtube videos (I personally found the videos from youtube user "mybringback" to be extraordinarily helpful when I first started). I personally would NOT start out by reading a book, I found it extremely helpful to start reading a book after I already understood how to use and manipulate simple variables and how to create and use objects, getters & setters, etc.
     
  15. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #15
    The best way to learn to program is not with any of C, Objective C or Swift. None of those languages were designed for education. They're all terrible for learning to code, even if developing apps using one of them is your goal.

    Start with a beginner's language that's proven to work in lots of schools. Learn to program first. Then maybe learn some other more useful languages, such as Swift.
     
  16. Anton626 thread starter macrumors member

    Joined:
    Mar 2, 2014
    #16
    Thank you all for the advices! I'll start watching tutorials on YouTube and I will use the book to examine in depth each argument. As you answered, it seems the right thing to do to start!
     
  17. mcmul macrumors 6502

    Joined:
    Dec 14, 2009
    #17
    I agree with this comment but would like to add that if one is totally new to programming then I really wouldn't recommend starting with Objective-C and iOS. Frankly, the concepts of programming e.g. control flow, data types, algorithms (to an extent), systems and I/O, are absolutely necessary before stepping near the world of iOS and app development. You're trying to break the 100m world record before you can even walk (honestly!).

    I would spend a few weeks and months (however long it takes) getting the basics down and then look into using Swift with iOS. Until then, slow down and start with some really basic scripts and apps. Personally, I'd recommend Python which is my favourite scripting language.
     
  18. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #18
    I'm of two minds about this.

    There are plenty of apps that you could learn how to implement by stringing together some API calls without any real background in programming fundamentals.

    It's a bit like my own field of hardware design. There are plenty of projects that can be implemented simply by following the reference design with small tweaks. You don't necessarily need to know how the chip works to use it as a building block.

    For high level languages like swift, many of the design patterns are built in. e.g. you don't need to know how to implement a sort if you have a routine that will sort for you, you just need to know how to find that routine....

    B
     
  19. AdonisSMU macrumors 603

    Joined:
    Oct 23, 2010
    #19
    Ive learned that nothing beats writing code. Even when you fail you learn something...maybe even more than you would with the successes. So im torn on the whole learn another language before you learn the language you want to learn. If you learn the language you want to youll be more likely to stick it out when things get tough and they will get tough. After a year or so of building apps then consider design patterns and code/hardware optimizations.
     
  20. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #20
    I'd claim that this does not lead to learning programming or app development in the same way that plopping a few frozen dishes into the microwave does not teach cooking.
     
  21. AdonisSMU macrumors 603

    Joined:
    Oct 23, 2010
    #21
    Java is a mess. I cant believe anyone would recommend learning that language. The tooling alone is like yikes...
     
  22. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #22
    I agree. However the educational materials have been beat on and reworked on for over a decade by schools working to get enough of their students to pass AP exams.

    It will take Swift at least a few months to catch up. :)

    But Python has some good early learning materials available today. As well as things like Alice and HopScotch for younger people.
     
  23. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #23
    I've run into this, many, many times in my career. The problem is that for many people, once you learn how to do something one way you end up reusing that same pattern elsewhere no matter what alternatives the new language/environment provides.

    Personally, my early C programs looked like Pascal or Modula-2 like because those are the first languages I learned. It took me many years to start writing more C-like C and taking advantage of the different tools it provided.

    Much of what I do is technical computing and I gravitate towards Matlab. In Matlab there are many ways to handle lots of data with little code. Replacing nested loops with vectorized operations gives me less code to deal with and also improves performance over an explicit looping version. I often find that I can get significant performance boosts by replacing large sections of code with canned API calls and also get code that is far easier to maintain and read at the same time.

    Just because you can do something the hard way, it doesn't mean that you should.

    I've used this MR thread as an example of this before:
    http://forums.macrumors.com/showthread.php?t=1212054
    If you have a dictionary class at your disposal, why roll your own?

    This approach is also the approach taken by Scott Stevenson's book and its predecessor website: e.g. http://cocoadevcentral.com/d/learn_cocoa/

    Yes, the book is out of date, but the basic ideas remain.

    B
     
  24. mrxak macrumors 68000

    Joined:
    Apr 16, 2004
    Location:
    Drifting through space in a broken escape pod
    #24
    The way I've always learned a new language was to think of a specific project I wanted to create, and then I implemented it. These projects should not be huge, but big enough to require some hours of work.

    For example, one project I used to learn Objective-C was making a project to generate large arrays of random objects, run a multithreaded sort algorithm on it, run some other "work" on it, and then spit out some output. Utterly meaningless, and everything I did could be done with standard libraries a lot quicker, but it taught me syntax, Objective-C's handling of classes and inheritance, Objective-C's memory management, and it took a bit of time to think about everything.

    Now, of course, I have a strong theoretical background which lets me jump right into a project like that in an afternoon and come out understanding a lot of Objective-C's quirks (and that is just one learning project, to be clear, not the only one I did).

    If somebody is brand new to programming, they probably wouldn't even be able to imagine such a project, much less know the first step in implementing it. And yet, what I did is a joke compared to an actual iOS app.

    It absolutely makes sense to learn a programming language as a beginner, with all the things that entails. Everything we do in computing is building on what we learned how to do before. For somebody starting from nothing, they should really write a Hello World! program. Then figure out how to take in input from a console and manipulate it. Write a calculator program that parses input to identify operators. Build a Car class and subclass off of it. Make a Car array filled with Convertibles and MiniVans and PickupTrucks and bubble sort through it by carSpeed(). Write a recursive algorithm that solves basic chess puzzles. Write a program that reads in a big file of text, figures out probabilities from the language, and outputs a file of random text that beats typing monkeys and is actually mostly readable.

    Yes, eventually, you need to learn GUI, you need to learn Cocoa and other APIs. A lot of the hard work is already done for you and you can take advantage of a lot of other people's code. But if you don't even know how to make a for loop, or parse a string, or understand the theories that go into making efficient code, I don't know how you're gonna learn to make the next big iOS app.
     
  25. AdonisSMU macrumors 603

    Joined:
    Oct 23, 2010
    #25
    The swift book is just the programming language. I have a book I love so far is called The Big Nerd Ranch Objective C programming book. This book helps you get the C foundation and some significant XCode exercises under your belt. It was highly rated on Amazon.

    Im reading the SWIFT and Nerd Ranch books concurrently.
     

Share This Page