Tech and a few other things RSS 2.0
# Friday, January 31, 2014



I’m waking up to the thought of my product owner, I just stayed up until 4:30 and got into work at 8. I’m pumped, I created a miracle and I want this person to know it. I run my app with its cool little animation that took me 2 days, but I say 4 hours, the animation runs and then I need my API not to fail...it fails. Product owner, in her infinite Stanford MBA wisdom looks at me and in business, politically correct words says, WTF. I look at my app, i’m tired, my wit is gone, the only thing that comes to mind is to throw the phone. I don’t throw the phone, but for some reason in my mind I see the API guy drinking piña colada at his desk, feet up, shooting me the gun as if life is all daisies and sunshine.

Ok ok, it may not be the API guy's fault there are plenty of systems and hardware between him and my final data destination, but like the "product owner" I only see the next step and API is it in my mind. Time to reflect, my zen, beer mind says "look not to the problem, but to the solution." I look hard and take to the Googles. For iOS I end up at NSURLProtocol. I write my own implementation, but find this guy Jim Puls. Like anyone I respect, he doesn’t talk about problems, he fixes them, this being said with his work at Square he writes a very understated library which is an implementation of NSURLProtcol and like the clever drinker he is (or isn’t), he calls it Mocktail. As soon as I read his code and understand who he is (a person’s code speaks a lot to who they are...it’s a nerd thing), I fall in love with the open source project WHICH brings me to my point. API’s fail, and when you are early on in your project you don’t want that to affect your presentation to your product owner.

...I meant to write a post on Core Data and parent child NSManagedObjectContext and ended up here...HA damn you booze.

So here is a link to my NSURLProtocl blog post.

Friday, January 31, 2014 11:26:34 PM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Objective C
# Friday, December 27, 2013


Unless you really love Objective-C this will be a slow read and if this is interesting, you probably already know it. With that said, I’m slow sipping some bourbon and calculatedly decided to not wear pants, wait for it, ...ok, mental image established, read on.

Its been a journey for instance variables aka iVars in Objective-C. They started out with having to define the getter and setter methods...ugg so Java --see: senior citizen 4 o'clock happy hour discount at the Sizzler. The C wizards then moved on to giving synthesize the compiler director love. @synthesize with Objective-C moved us from having to work with getter and setter methods. A welcome change, but this is where some confusion starts with iVars.

Instance variables started out with being explicitly stated in the header file, however you like, and being mapped with the synthesization of your properties. Sans ARC (Automatic Reference Counting).

Example:
Yodiggity.h

@interface YoDiggity.h{
NSObject *_bigFun;
NSObject *smallFun___;
}

@property (nonatomic, retain) NSObject *bigFun;
@property (nonatomic, retain) NSObject *smallFun;
@end

Yodiggity.m
@implementation YoDiggity.h

@synthesize bigFun     = _bigFun;
@synthesize smallFun = smallFun___;
@end
The next step was not having to declare your iVars in your header file you simply declared the property, the synthesize and done. You could optionally declare your iVars right after your @synthesize, if you wanted to get disco.
Example:
Yodiggity.h
@interface YoDiggity.h
@property (nonatomic, retain) NSObject *bigFun;
@property (nonatomic, retain) NSObject *smallFun;
@end

Yodiggity.m
@implementation YoDiggity.h

@synthesize bigFun;
@synthesize smallFun = _onTheSpotDeclaredIvarSmallFun;
@end
This was nice, but the C gods didn’t stop there with Objective-C. They quickly decided why declare the @sythesize, and promptly got rid of the necessity of using it. Following this with implicitly declaring all your iVars with a “_” in front of your @property declaration.

Example:
@property (nonatomic, strong) NSObject *bigFun;
Without any mapping you can now access the iVar in the implementation file by typing:
_bigFun = @”bookers”;
Easy enough you say, but now I’m going to rock your world, like adding Jamison and Irish cream to a Guinness.

What does it mean when I do this in Objective-C:
self->bigFun
or
anObject->bigFun.

In short, it means you just tapped into the iVar directly in Objective-C. The deeper answer is “->” mean dereference. Dereference means I get the value the pointer is pointing to instead of the address and nearly everything in Objective-C is a pointer.

From what I’ve been told, don’t use “->” it a legacy component of C and until you get code accepted in the LLVM compiler, I’d probably listen to that advice.
Friday, December 27, 2013 1:15:53 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Objective C
# Tuesday, December 24, 2013


What’s a glorious drunk? A drunk who manages to know the difference between work and fun. If you say work is fun, you are unquestionably doing fun wrong. Please, don’t confuse rewarding with fun.

I’m sit’n on my parents couch in KC, my hometown, for the holidays and can’t help but think what an epic time drinking Kansas City dry with E. Hem would have been. From the stories I’ve read it seems his nights ended up with a lady, a fight, or passing out. Mix in his love for traveling and experiencing different cultures and you have solidified my man crush. --Barkeep, another whiskey please.

My fascination with Hemingway started when I found out he did his time in KC writing for the Kansas City Star and had a likening to a good time. After learning this, I knew this was an author I needed to know about. I embarked on “The Old Man And The Sea,” based off a true story; it’s an easy read, maybe even considered a short story at just over 100 pages. My thoughts: I loved every last drip. The Old Man And The Sea is about a fisherman who confuses his pride and talent for what is best for him. It doesn’t end well, it’s not a happy read, but the correlation between this story and a singularly driven career minded individual is eerie.

Does my love for the book and Hemingway reek of partisanship because of correlations I draw between himself and I….pshh of course, I’m human. With this I will leave you with one of my favorite quotes from Earnest.

"Don't you drink? I notice you speak slightingly of the bottle. I have drunk since I was fifteen and few things have given me more pleasure. When you work hard all day with your head and know you must work again the next day what else can change your ideas and make them run on a different plane like whiskey? When you are cold and wet what else can warm you? Before an attack who can say anything that gives you the momentary well-being that rum does? The only time it isn't good for you is when you write or when you fight. You have to do that cold. But it always helps my shooting. Modern life, too, is often a mechanical oppression and liquor is the only mechanical relief."


P.S. Yes, E. Hem committed suicide, but I believe that being involved in war at such a young age and not having the appropriate tools to deal with mental collateral damage a war causes led him to textbook psychological behaviors. Drinking to cope, writing to indirectly express his emotion which he could not convey in person, and a series of of relationships, that I believe was because he could never make peace with his own demons.

Tuesday, December 24, 2013 10:55:29 PM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
readings
# Tuesday, October 01, 2013



It’s a pretty solid read and very insightful on how patterns drive most of our life and if monitored closely can be good predictors of your future. I’m not feeling much in terms of writing a review for this book, so I can sum up a good portion of this book with a single graphic. However, I do suggest it as a read. It will leave you with the tools to improve yourself.


Tuesday, October 01, 2013 11:48:43 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
readings
# Sunday, September 01, 2013


Do you like coming into work? Many things go into this, outside of working with cool people, your workspace really helps drive this. A good workspace helps drive productivity, collaboration and fun Friday nights. I tend to aim more to the last of this list. Hint: If your office is full of non married 20 somethings and it’s empty every Friday night...your Workspace...well it sucks. In my years of working i’ve seen companies slowly pick up on this and build more engaging workspaces.

Ready for the big stretch of a segue? ...The same thing is happening with the maturity of Objective-C and xCode and the use of xCode workspaces. As iOS projects have graduated from iFart and move into more fully interactive games and engaging applications like Facebook, Square, and Google Now, a workspace becomes a must in breaking down larger reusable components that can not only be used by your app, but many other apps.  In steps workspaces with xCode 4. So last year you say. I agree, but in my humble opinion its only been this year (2013) and with the proliferation of Cocoapods that I have really seen workspaces being fully adopted and used as they should.

The short of what I’m saying, if I'm saying anything, is when building that next project for yourself, think about how you can break down key parts into a separate project for something you could potentially use in the future.  This could be your networking and model layer, something Apple leaves fairly undefined on how you should implement it.



P.S. --- Oh yeah and don’t nest projects in projects anymore, you may think you have a good reason to do so, but unless you go by the name bbum, you in all likelihood do not.


Sunday, September 01, 2013 11:31:55 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Objective C | xCode
Navigation
About the author/Disclaimer
        

My name is Ben Coffman. Currently leading the release of native for iPhone and redefining how banking apps work for Capital One. I have a strong focus on mobile development, building effective development teams and a drive for rapid prototyping and continuous integration using nearly all SDLCs. When I turn the internet off I focus on my family, random hobbies, and sharing moments in life.

My pseudo proactive thoughts
--> Twitter @coffmanben

Learn About Me
--> Linkedin
--> StackOverflow

Blogs I follow:
  1. Big Nerd Ranch
  2. NS Hipster
  3. Scott Hanselman

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Ben Coffman

Archive
<October 2014>
SunMonTueWedThuFriSat
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678
«Older Posts
All Content © 2014,

Sign In