Building an iPhone application.

  Kent Fenwick        2012-01-28 07:03:36       2,441        0    

One of my New Years resolutions was to finally learn the iOS SDK and build a 'real' application.

I am happy to report that progress is going really well and wanted to share something that I have noticed about iOS programming.

It only looks scary... it's not. It's actually very easy.

Now, I am not building Mail, Angry Birds or Photosynth or anything, but the core concepts of the SDK are not that bad once you spend some time learning delegation. If you don't understand delegation, iOS programming is VERY hard. Even if you have GUI experience and aren't coming from the web, it's going to be tough. I am still learning some of the more advanced design patterns, but for the most part, once you understand delegation, you are pretty much there.

I have tried and failed to build iOS apps before. Here is what I did differently this time around and it seems to be working.

1) I set a realistic goal. April 2, 2012 in the App Store.

2) I picked a relatively simply application with a defined scope.

3) I picked an application that involved stretching my confort zone a little. Nothing involving OpenGL or anything, but more than a simple "Push this and that" application.

4) I bought The Big Nerd Ranch Guide to iOS programming and can't say enough good things about it. I am huge Pragmatic Programmer reader, but love the TBNR's approach. I strongly recommend.

5) I work on it EVERY 3 days. Yes, I have a schedule and hold myself accountable. I knew that everyday would be too much given my busy workload and family commitments, but every 3 days is no problem.

6) I try not to follow the book as much as possible. Using TBNR at the beginning is helpful, especially if you are coming from Ruby, Python, Java etc. I had some C and C++ experience in undergrad, but nothing to shake a stick at. However, I don't recommend working on ALL the examples exactly as they are laid out.

Try challenging yourself by implementing something more advanced on your own. Turn a standard view controller into a Navigation View Controller. Use Modal Views or Flip Views etc. Stretch yourself.

7) Read the documentation. Everyone should always read the docs, but it's SO IMPORTANT when doing iOS programming. Almost everything you will ever want is already done for you. It's there, in an interface or protocol. Seriously go look! All of the standard effects are not done with some crazy Core Animation. They are there, waiting for you to implement. The syntax looks scary but it's not. Just spend some time with.

8) I am really taking my time. I am, for once, not in a rush. I have my goal, but I am also willing to let that slide if it means me understanding some deeper concepts when finished. It is not a race. Someone is already working on the same app you are. Seriously, it's probably true. While I was working on mine, I have already seen a crappier version of it pop-up on the App Store. That gives me more motivation to take my time and make mine really good.

9) I am breaking the rules and not being bogged down by design. I know, I know. This one is probably bad, but I just can't be bothered with making it look amazing right now. Maybe later. The point is that it works and serves a purpose. Function over form for now. Designing for iOS involves some serious work and good design chops. If you aren't up for it, this is something I would consider paying for, and I might just do that.

10) I am sitting with my problems.

I love Einstein's quote that goes something like:

"I am not really that smart, I just sit with problems longer than most people do."

Isn't that so true!

Normally when I am doing some client Ruby work and I hit a small snag, and it's close to dinner time and my energy is low, I fire up Chrome, Google my problem and find an answer. I don't always find the BEST answer, but it's an answer. However, the learning process doesn't really happen. I don't give myself the chance to figure it out on my own.

This time around I am sitting with the problem. Here is my little loop.

1) Try it.
2) Get up and walk away.
3) Try again.
4) Go for a walk / do some pushups (gets the blood flowing)
4) Try again.
5) Read the documentation.
6) Try again.
7) Go to the whiteboard and draw it out.
8) Keep trying.
9) Go back to the docs.
10) Try again
11) Look through some sample source code.
12) Try again.
13) Meditate.
14) Try again
15) Keep trying
16) Google it
17) Find a good answer on stack overflow.

Normally, by number 10, I've figured it out, or at least part of it. Then it's back to 1.

When I first started programming I was going slow! Now, I am already learning the bindings and learning the cause and effect of actions. I can guess when I am going to see compiler errors and warnings. It's an investment in yourself and it's very much worth it.

----

I hope this posts helps some of you and makes others laugh at what a complete Noob I am to iOS programming.

If you are like me and were sort of on the fence with this whole iOS thing... take the plunge. Buy The Big Nerd Ranch book. Sit with the problems. Set a goal. Visualize the outcome and have some fun.

For some reason I posted this to Google+ but I do like to rant / blog over here too.

http://www.kentfenwick.ca

Thanks for reading.

Source:https://plus.google.com/114373064968292928213/posts/52UL2K2DSQK

APPLE  IOS  APPLICATION DEVELOPMENT 

       

  RELATED


  0 COMMENT


No comment for this article.



  RANDOM FUN

Water on my laptop