Ramblings RSS Feed

Avoid Passing the Delegator

Jul 21, 2016

When developing APIs, we strive to eliminate interdependencies between software components. Sometimes doing so completely is unachievable so one pattern we use is the delegation pattern to limit how much components can know about each other. This pattern consists of the delegator which is typically a reusable library component, and a delegate which is typically a custom controller1.

  1. Cocoa Core Competencies - Delegation and the Cocoa Frameworks

Read more…

Detecting the Debugger on OS X

Jan 30, 2016

How can your program detect if it’s being attached to a debugger? One approach is detecting if a mach exception handler is configured. Another more well known approach is detecting the usage of ptrace. I will discuss the merits and disadvantages of both of these.

Read more…