Author Archives: Graham

About Graham

I make it faster and easier for you to create high-quality code.

Confine ALL the things!

I was talking with Saul Mora at lunchtime about NSManagedObjectContext thread confinement. We launched into an interesting thought experiment: what if every object ran on its own thread? This would be interesting. You can never use a method that returns … Continue reading

Posted in code-level, software-engineering | 4 Comments

How to TDD with CATCH

Plenty of people have asked me about the TDD framework I use. While the book Test-Driven iOS Development has code using OCUnit (for pragmatic, and previously-covered, reasons); I am currently more frequently to be discovered using Phil Nash’s CATCH framework. … Continue reading

Posted in code-level, software-engineering, TDD | 1 Comment

The security apprentice

This originally appeared in a post at Sophos’ Naked Security blog. There have been two recent occasions on which my computing life has been influenced by Lord Sugar, the business mogul in charge of Amstrad and star of BBC One’s … Continue reading

Posted in Uncategorized | Comments Off on The security apprentice

On advertising’s place in the tech industry

Dave Winer said the way is open for a non-ad-supported tech sector: The tech industry has been absorbed by the ad industry, and vice versa. However, there is, imho, still room for a tech industry that is not merged with … Continue reading

Posted in Business | 4 Comments

Why we don’t trust -retainCount

I’m pretty sure @bbum must have worn through a few keyboards telling users of StackOverflow not to rely on the value of an Objective-C object’s -retainCount. Why? When we create an object, it has a retain count of 1, right? … Continue reading

Posted in code-level, Foundation, iPad, iPhone, Mac | Comments Off on Why we don’t trust -retainCount

Synthesized ivars are private

Perhaps this isn’t news. Perhaps it doesn’t matter because you’ve provided public accessors. But here are the results anyway. #import <Foundation/Foundation.h> @interface A: NSObject @property (nonatomic, assign) int a; @end @interface B: A – (int)differentGetter; @end @interface C: NSObject @property … Continue reading

Posted in Uncategorized | Comments Off on Synthesized ivars are private

Is it an anti-pattern to use properties everywhere?

I’ve seen questions about whether to always provide accessors for ivars, and recommendations, such as in akosma software’s ObjC code standards, that say Whenever possible, do not specify ivars in the header file; use only @property and @synthesize statements instead. … Continue reading

Posted in code-level | 10 Comments

Some LightReading about mobile app security

[This article was co-written with @securityninja] If mobile app security is failing, it’s up to the security industry, not developers, to repair it. An article published yesterday at security news site DarkReading announces “Developers not applying secure development life cycle … Continue reading

Posted in Uncategorized | 2 Comments

Building an object-oriented dispatch system in Objective-C

iTunes was messing about rebuilding the device I was trying to use for development, so I had time over lunch to write a new message dispatch system in the Objective-C language. “But wait,” you say, “Objective-C already has a message … Continue reading

Posted in code-level, OOP, Uncategorized | Comments Off on Building an object-oriented dispatch system in Objective-C

On privacy, hashing, and your customers

I’ve talked before about not being a dick when it comes to dealing with private data and personally-identifying information. It seems events have conspired to make it worth diving into some more detail. Only collect data you need to collect … Continue reading

Posted in Business, Crypto, Data Leakage, Privacy, Responsibility | Comments Off on On privacy, hashing, and your customers