Jinior Dev - And tips and tricks?

Discussion in 'iOS Programming' started by Tander, Sep 6, 2012.

  1. macrumors 6502a


    Oct 21, 2011
    Johannesburg, South Africa
    Hey all,

    So I am busy studying from the Big Nerd Rach book on Objective-C. I'm doing okay so far with the book. However, I have wonder - what tips etc, do the more experiance developers have for us?

    I'm talking about - what did you do to make learning to program more fun / challenging and things that helped you make the code / syntax stick in your mind?

    At the moment, I am trying to write small CMD based programs that use / build on the stuff I have read in the book. Also, once I have copied a program's code from the book and completed it - I make comments in Xcode and erase all code and see if I can write it again, without resorting to the book.

    I would appreciate any other ideas you guys may have. :cool:

  2. macrumors 68000


    Jun 19, 2007
    White Lake, MI
    I would say to comment the heck out of everything. It will definitely help when you switch between projects.

    Also, to make things more fun, if you are going through a project and you think, hey why couldn't you add this in, do it. If you are afraid of messing up the project, before you go off on your tangent just zip up your project folder for safe keeping, and if you mess up, go back to where you zipped.
  3. Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    Or add a // TODO: comment, and come back to it later. These will even show up in your jump-bar choices.

    Or you could take advantage of SCM (source-control management) to return to a previous check-in point.
  4. Moderator


    Staff Member

    Aug 16, 2005
    New England
    +1 for SCM! A simple SVN or Git repository can save you tons of time and efforts and is much easier to manage than a bunch of zip files. Think of it as Time Machine for your codebase.

  5. thread starter macrumors 6502a


    Oct 21, 2011
    Johannesburg, South Africa
    Thanks for the suggestion guys, I appreciate it.
  6. macrumors 65816


    Dec 29, 2010
    Aartselaar // Antwerp // Belgium
    I also tend to use
    #warning REFACTOR THIS
    Alot when i'm coding alot of views at once, Also, if it needs checking by other persons in the development team, we add the name, etc.
    You can also tell Xcode to treat Warnings as errors.
    SO if you're not done with a piece of code and you add the #warning, and you forget about it or you're busy on another piece, it won't compile and it will remind you to go fix that block, it actually have helped me alot :)
  7. macrumors member

    Apr 20, 2012
    Learn code snippets and keyboard shortcuts to speed things up. Here's my shortcut chart for Android and IOS
      Eclipse			  Action			Xcode
    ctrl shift l			brings up shortcuts		com ,
    ctrl d				delete line			ctrl a, ctrl k, ctrl k
    ctrl delete			delete next word		(need extended keyboard)	
    ctrl backspace			delete previous word		ctrl delete
    ctrl shift delete		delete to end of line		ctrl k
    home				start of line			com {right arrow}
    end				end of line			com {right arrow}
    ctrl shift s			save all			opt com s
    ctrl z				undo				com z
    ctrl y				redo				shift com z
    tab				indent selection right		com ]
    shift tab			indent selection left		com [
    ctrl o				display elements in class	click on "no selection" above editor
    ctrl F11			run				com r
    ctrl alt j			join lines
    F11				debug
    ctrl alt h			find calls to method
    F3				goto definition
    F4				hierarchy to left    
    				shift between .h, .m		ctrl com {up arrow}
    In mac docs:
      cloverleaf = com
      slope	= opt

Share This Page