Xcode is confusing?

Discussion in 'iOS Programming' started by bulldoze, Jun 29, 2012.

  1. bulldoze macrumors regular

    Joined:
    Mar 15, 2011
    #1
    I am trying to get back into programming and I quite like the idea of crafting a simple little app for my son.

    Trouble is I feel as though I am being stifled by having to not only learn a new programming language (Objective C) but also the Xcode environment as well.

    I should mention I have a fair amount of experience in programming although this was many (22 yrs) ago so was mainly Quick Basic and Turbo Pascal. In those days the editors were very simple and it was all about the code - when I load up Xcode it seems the code is hidden behind a very confusing and complicated environment.

    I seem to be held up learning the code because I have to fight through the environment and I can't learn the environment without writing code! catch 22!

    Tell me it gets easier!
     
  2. ppilone macrumors 6502

    Joined:
    Jan 20, 2008
    #2
    Do you have anything specific you find confusing that you'd like help with? A blanket "Xcode is confusing. Help!" won't elicit many responses.
     
  3. mfram macrumors 65816

    Joined:
    Jan 23, 2010
    Location:
    San Diego, CA USA
    #3
    XCode is a tool that doesn't necessarily have the most intuitive interfaces in the world. But it has a long history of evolution behind how it got to where it is today. I would treat learning Obj-C and XCode together as a package. Go through the tutorials and learn both at the same time.

    Don't try to make it work like how you want it to work... you'll need to get into its mindset. Anything else will end in frustration for you. Like any other new tool, it takes time to learn how to use it.
     
  4. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #4
    It is possible to write and compile Objective-C code without using Xcode, if you feel you must. A text editor and Terminal come to mind. I spend the majority of my time in Xcode in the code editor, so I don't feel like there is too much "in the way". And there is the ability in Xcode to hide much of the supporting panels, so you might consider that, as well.
     
  5. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #5
    Do you have experience with C yet? I'd suggest learning the basics of C using a text editor and command line (and the free ebook "Learn C the Hard Way") before learning Xcode and Obj-C.

    Anything/everything you learn to do in C can be done the exact same way in Obj-C. If you know how to do something in straight C and straight Obj-C (and Obj-C won't be appreciably simpler to use), do it in C, as C code tends to be faster and more portable. Also, C code is generally contained all in a file or two while Obj-C code tends to be spread amongst several code files + various libraries and resources. So Xcode is really necessary for organizing Obj-C projects, while its much more feasible to learn C with just a text editor (like Gedit) and a command line (like Terminal.)
     
  6. Theclamshell macrumors 68030

    Joined:
    Mar 2, 2009
    #6
    Spend some time looking through the documents in the Xcode organizer. It will help you learn the interface and it will make it much less confusing.
     
  7. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #7
    Xcode is more of a professional power-users tool. For coding up simple little apps, you might want to try something simpler like a Python or Javascript editor (appears to be many of each for Mac OS).
     
  8. 1458279 Suspended

    1458279

    Joined:
    May 1, 2010
    Location:
    California
    #8
    I too did Turbo Pascal, brings back memories! Started my 1st business using TP. It actually had an advanced IDE for it's time.

    I'd suggest learning both at the same time... You don't have to master Xcode or order to be functional with it. You can grab a book or watch some YouTube vids on Xcode and learn the basics, then focus on ObjC and pick up a more Xcode as you go along.

    If you remember TP, it had an editor with compiler 'built in' ... Xcode is a modern day version of the same. Not only is the compiler 'built in', but debugger, screen layout tool (Interface Builder), file browser, help documents, etc...
    It's the same concept, just more advanced.

    I though the Big Nerd Ranch was a great book, it pretty much took you step by step, click by click, thru the process.

    Trust me, I know it can really suck to want to do a simple task and not know which button to click... The iTunes WWDC videos are helpful as well.
     
  9. bulldoze thread starter macrumors regular

    Joined:
    Mar 15, 2011
    #9
    Thanks for all the help guys. lots of stuff to think about there.

    I played around with simple Python programs last year in Linux and enjoyed that as a learning experience but there is no end product to show around so I lost interest after a while.

    This is why I am trying to learn Obj C and Cocoa. I guess I will have to fight through, I am waiting for the lightbulb moment when it all becomes clear :)
     
  10. 1458279 Suspended

    1458279

    Joined:
    May 1, 2010
    Location:
    California
    #10
    One other way of looking at this:
    With TP you learned a programming language and you had optional add ons, like the graphics lib.
    With App Dev, it's like having a bunch of things built in.

    In other words, you should focus on two things 1st:
    1. enough Xcode to be able to work around and know where things are.
    2. ObjC get the basics of that down and run thru some sample code trying to understand what it's doing. (parameter passing is odd compared to Pascal)

    If you jump into too many things, you might overload yourself.

    Take the classic 'Hello World' and start making changes.

    Browse thru the many sample codes from Apple, they have direct links in the documents. Start Xcode, find the 'Organizer' button in the upper right corner, click the 'Documentation' and find some samples to browse thru.

    To compare, programming in TP was 1 function based language, what your doing now is MUCH more info to digest... take small bites...
     
  11. bulldoze thread starter macrumors regular

    Joined:
    Mar 15, 2011
    #11
    One of the things I have always tried to do in a new language is to do a bouncing ball program or download one and play around with it till I can understand what is going on.

    Even this seems enormously complicated in Xcode due to having to have about 5 separate programs to do just this simple thing!
     
  12. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #12
    5 separate programs? Care to explain?
     
  13. 1458279 Suspended

    1458279

    Joined:
    May 1, 2010
    Location:
    California
    #13
    Xcode does nothing for editing graphics, so you'll have to create or buy the graphics some other way.

    There's no stock 'built in' physics engine for a bouncing ball, but you can use Cocoas2D or write your own from scratch. Note: Once you install Cocoas2D, it works very much like it was built in from the start.

    However, for taking a simple graphic and moving it around and 'bouncing' off walls, you only need the source code editor, compiler, linker, simulator. But, they are all pretty seamless.

    The older versions of Xcode had Interface Builder as a separate program, but now everything is much more blended together.

    Try this: open the documentation, find some samples in there and run those. There's a ton of samples out there, but you might want to start with simple interface stuff, buttons, lists, sliders, etc...
     
  14. samdev macrumors regular

    Joined:
    Sep 16, 2011
    #14
    What's complicated about XCode? Posts are easier to answer if you can formulate a question instead of a rant.
     
  15. 1458279 Suspended

    1458279

    Joined:
    May 1, 2010
    Location:
    California
    #15
    I think his point is that there is so much to grab onto at 1st, that it can be overwhelming. I suggested smaller bites.
     
  16. camitampa macrumors newbie

    Joined:
    Apr 18, 2012
    #16
    I am also an older x-programmer who has decided to get back into the world of coding. I have twenty years of VB experience and my code has generated much money for my family. I decided to learn objective-c and found it very confusing. I gave up and tried corona SDK and Lua. Since I don't want to code games I decided to go back to objective-c and Xcode.

    I found this web page of tutorials:
    http://www.djavupixel.com/development/video-tutorials-learn-objective-c-iphone-osx-free-ebook/

    After going through the free ebook and the tutorials I started with the course from Stanford U in iTunes.

    I also purchased the book IOS 5.0 application development.

    I recommend all of the above. The videos in the link are amazing.
    Good luck
     
  17. SteppingStone macrumors member

    SteppingStone

    Joined:
    Aug 6, 2012
    #17
    For me personally the biggest single hurdle in Xcode was figuring out how to use interface builder. Granted I didn't read any documentation, but still... I started on Xcode 3, and Referencing Outlets, Sent Events, etc were exposed in a way which is (IMO) clumsy compared to what Visual Studio had in, say, 1995.

    Now it all seems fine, but I remember tearing my hair out trying to get a button to work.

    Once I got over that and all I had to do was learn Objective-C, it went quickly. If you know C, Objective-C is actually very simple (especially compared to something like C++). It doesn't do much, but it does what you need for the most part.

    Anyway, my point is that it does get better.
     
  18. phr0ze macrumors 6502a

    Joined:
    Jun 14, 2012
    Location:
    Columbia, MD
    #18
    This guy has a bouncing ball tutorial:

    http://timroadley.com/2011/12/14/box2dswipeinteraction/

    The books by the big nerd ranch are really good. Just get the iOS specific book. It seems like they try to sell the Objective C book too, but there is enough of an objective C primer in the iOS book to make things clear.
     
  19. animefx macrumors regular

    Joined:
    May 10, 2005
    Location:
    Illinois
    #19
    I've had similar experience in Quick Basic and Pascal, but I've also had some Visual Basic and a bit of C before taking on Objective C. I still have A LOT to learn about the language, however the XCode interface itself has been the least of my issues. I find it to be pretty self explanitory and very helpful overall. Theres things here and there that aren't obvious what they are, but it's simple enough you should be able to jump right in. I would suggest watching some tutorials online or getting a book that covers XCode 5 with Objective C, and they will walk you through the basics.

     

Share This Page