This is a list of useful resources that I find myself referring to over and over. I’ve posted this mostly to make it easier for me to find these resources but they may be of use to use as well.
TDD
Sandi Metz’ Magic Tricks of Testing - Having read the entire presentation, slide 176 has a table that gives a good summary of which types of methods to test.
Refactoring
Questions to ask when refactoring based on SOLID design:
- Is it DRY?
- Does it have one responsibility?
- Does everything in it change at the same rate?
- Does it depend on things that change less often than it does?
iOS / Objective-C
UITableViewDataSource methods I use most frequently:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView; - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section; - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath; |
Method with block parameter:
I can never remember this syntax for a block parameter:
- (void)aMethodWithArgument:(Type)arg withBlock:(returnType (^)(Argument List))block; |
UIViewController lifecycle
Useful when calling these methods directly when writing tests: