I recently moved the blog from Blogger into this ghost-based new home. Some things are still work in progress, let me know if you find something in need of attention »

Defer in Objective-C

Some time ago I was learning Go and I came across a very useful feature: defer. As its name suggests it defers the execution of a piece of code until »

Simplifying UIKit Animations

If you have ever worked with animations in iOS using UIKit you have most likely ended up with nested animation blocks and intractable code at some point. One of the »

Delegate Multiplexing

I have mentioned before how Cocoa is biased towards the delegate pattern. I argued that in some instances the observer pattern would be better suited. But in some cases the »

A* data structures

A* (A-star) is the typical textbook algorithm: it is a simple concept and can be easily explained. It is also widely known, one of the first algorithms you learn in »

Predictive Collision Detection

On certain applications, specially games, it is often necessary to determine if two moving objects collide. The standard approach is to check for overlap after each step of the animation »