utsengar / tipcalculator

codepath prereq app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Review for codepath tip calculator

utsengar opened this issue · comments

Hi @timothy1ee

Please review my version of tip calculator for codepath here, I am going for a 3 week trip tomorrow (abroad with no internet connectivity), so had to hack it in day!

I tried to make it simpler and made some changes in the user experience using AlertView. You can see the screenshots here: https://github.com/utkarsh2012/tipcalculator/blob/master/README.md

-Utkarsh

Thanks, Utkarsh, looks good. Note that you shouldn't use a static variable as an instance variable, e.g.,

static NSString *billTextField;

Instead, use an Objective-C property (which is the same thing as a Java private field and a getter/setter). e.g.,

@property (nonatomic, strong) NSString *billTextField;

When you're back in town, please let me know so we can schedule the phone call.

@timothy1ee Thanks Tim! I will reach the bay area on Dec 18th 2013, will that be too late for a call?
I can try to do a skype call from India too.

I got some valuable feedback from a friend too (thanks @jvashishtha):

  1. Always use word case for file names and project names. Like TipCalculator instead of tipcalculator or tipCalculator.
  2. Use verbose names for variables and methods. For eg. TipViewController _tipViewController instead of TIpViewController *vc.
  3. Use Storyboards - they are awesome. You would not have to write a single line in app delegate then.
  4. Don't use float. Use CGFloat. Thumb rule - Always use the objective c variant when there are options to chose between c and objective c. Reason - they support 64 bit.
  5. You dont need to use NSMutable_ for stuff that you initialize once and then dont change. Just use NS* variant (referring to the NSMutableString in TipViewController.m)
  6. Do if (buttonIndex != alertView.cancelButtonIndex) or if (buttonIndex == 1) instead of just if (buttonIndex)
  7. Follow some styleguide in your code. NYTimes has a really good one - https://github.com/NYTimes/objective-c-style-guide.

Dec 18th will be fine, I'll send out some time slots today.

Sorry for the delay. Can you schedule your 5-10 minute phone conversation by going here. Navigate to December 18th and choose any slot that works for you. Let me know if none of those slots work.

I will reach San Francisco on the 18th Dec, so to be on a safer side, I am shooting for: 8:15pm – 8:30pm