PDA

View Full Version : Jinior Dev - And tips and tricks?




Tander
Sep 6, 2012, 09:36 AM
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:

Rob.



waterskier2007
Sep 6, 2012, 11:02 AM
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.

dejo
Sep 6, 2012, 11:11 AM
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.
Or add a // TODO: comment, and come back to it later. These will even show up in your jump-bar choices.

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.

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

balamw
Sep 6, 2012, 11:17 AM
Or you could take advantage of SCM (source-control management) to return to a previous check-in point.

+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.

B

Tander
Sep 7, 2012, 02:09 AM
Thanks for the suggestion guys, I appreciate it.

jnoxx
Sep 7, 2012, 03:19 AM
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 :)

solderguy1
Sep 7, 2012, 12:12 PM
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