Author Archives: Graham

About Graham

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

Categories will bite you

What I wanted to do was this: + (void)load { Method foo = class_getInstanceMethod(self, @selector(foo)); Method newFoo = class_getInstanceMethod(self, @selector(FZA_swizzleFoo)); method_exchangeImplementations(foo, newFoo); } However, my tests wouldn’t work when I did that. It turns out that for some reason +load … Continue reading

Posted in Uncategorized | 2 Comments

On internal quality

I was asked by attendees at my VTM talk on test-driven development a small collection of questions on a similar theme, which I’ll summarise here. How do I do TDD when my boss doesn’t want me to? What do I … Continue reading

Posted in Business, code-level, Responsibility, software-engineering, Talk, TDD, VTM | 6 Comments

A first look at appCode, and the future of Cocoa IDEs?

It’s been almost a full rotation of this great rock about its axis since JetBrains announced the start of its appCode Early Access Program. appCode is an Integrated Development Environment, just the same as Xcode. Just like Xcode, appCode works … Continue reading

Posted in code-level, tool-support | 8 Comments

On my own competency

There was a question on programmers.stackexchange.com about whether to put your Stack Overflow reputation in your CV. I don’t, and answered as much: there’s no point in writing for its own sake, unless you want to be a writer. If … Continue reading

Posted in Business, software-engineering | Comments Off on On my own competency

What happens when you jailbreak an iPad

Having played around with an iPad running a jailbreak OS yesterday, I thought it would be useful to explain one possible attack that doesn’t seem to get much coverage. As I’ve discussed in numerous talks, the data protection feature of … Continue reading

Posted in Encryption, iPad, iPhone, ssh | 2 Comments

On counting numbers

While we were at NSConference, Alistair Houghton told me that he was working on static NSNumbers in clang. I soon thought: wouldn’t it be nice to have code like this? for (NSNumber *i in [@10 times]) { /* … */ … Continue reading

Posted in code-level, Foundation | Leave a comment

On NSInvocation

I was going to get down to doing some writing, but then I got some new kit I needed to set up, so that isn’t going to happen. Besides which, I was talking to one developer about NSInvocation and writing … Continue reading

Posted in Foundation, iPad, iPhone, Mac, software-engineering | Leave a comment

On comment docs

Something I’m looking at right now is generation of (in my case, HTML) API documentation from some simple markup format. The usual way to do this is by writing documentation markup inline in the source code, using specially formatted comments … Continue reading

Posted in books, documentation, software-engineering | 5 Comments

On Being a Software Person

On Wednesday I spoke at Qcon London, about “Mobile App Security and Privacy: You’re Doing It Wrong (and so am I)” as part of @akosma’s track on iOS and Android. The whole track was full of win: particularly, if you … Continue reading

Posted in Uncategorized | Comments Off on On Being a Software Person

On Singleton(s)

I woke up this morning to a discussion on Twitter over how different implementations of the Singleton pattern compare. This is like comparing your Herpes: no matter whose is better or more efficient, you still have unsightly blisters. Overview: wtf … Continue reading

Posted in Uncategorized | 7 Comments