Objective-C: Lazy Sequences

Lazy data structures are a powerful abstraction can increase the readability of your program while encouraging separation of concerns. What are they? Simply put, they are data structures that "realize" what they contain when they're needed (or right before they're needed). What can you do with lazy data structures? How…

Read this article

Adapting Binary Search

It’s great to use classic algorithms to solve problems at hand. Take this problem of ellipsis: For a given text. Fit the maximum number of words that fits in the given size, append “… More” if there was truncation. No, NSLineBreakModeTailTruncation will not work. We need different text. The näive…

Read this article

Reverse Engineering Objective-C

Languages that have dynamic introspection provide powerful meta-programming capabilities. This is generally done at runtime with additional memory used for storing metadata - such as types and method signatures. But they also provide the same power for people reverse engineering your code. Let’s look at Objective-C, a simple code…

Read this article

Evaluating Technologies

Every time you look at a new (or familiar) technology. You should ask: What are the tradeoffs? It's obvious to see the benefits of something - it's generally advertised everywhere. Everyone is always shouting the the pros of X. "X does Y easier" "X does Y faster" "X integrates with…

Read this article