Implementing callback with NSInvocation

Let’s say we wanted to write a callback with NSInvocation. Why would you need that? Maybe you do not like the block syntax, or maybe you do not like how blocks capturing works, or maybe you’re working with a really old codebase which can not use blocks.

Lost art of manual memory management

Manually managing of memory is an art that is getting extinct at an alarming pace. If you started working with Objective-C after 2011 or with Swift there is a high chance you’d probably never worked with manual memory management aka Manual Retain Release (MRR). And if one never had an opportunity of first hand experiencing MMR, one might even think of it as some outrageous technique where the entire code is blathered with calls of retain and release all over the place. Even more so when its antagonist, the Automatic Reference Cycle (ARC) claims to solve a problem which was not as monstrous as ARC claims in the first place.

Step by step guide towards type erasures in Swift

There are 2 kind of programmers that you encounter in the wild. Ones those who really like types and the others those really don’t. Forget arguments over spaces vs tabs, this is the real debate. This is a big deal. Probably the first thing engineers think when starting on a new project. Perhaps even before they think about the real goal of the project itself. Like, “I need a weekend project where I can use python”. Type is a serious thing.

Immutability - Swift vs C++

Immutability awareness is on the rise. Especially when the codebase grows in size and complexity, the benefits of immutability for stability, readability and maintenance reasons is imminent.

Concurrent read writes with libdispatch

Lets write a thread-safe collection. Say a cache that provide a way to load and store values. And for simplicity, we only care about storing Int for a String key.