WWDC 2016 5 Minute Update: Opening Up iOS, Xcode Extensions, Apple...
A very brief summary of changes & impressions from WWDC 2016 Day One.Opening up iOSThe most notable changes to iOS were the addition of many APIs and Extension points. Apple wants to allow...
View ArticleReal World Flux Architecture on iOS
About half a year ago we started adopting the Flux architecture in the PlanGrid iOS app. This post will discuss our motivation for transitioning from traditional MVC to Flux and will share the...
View ArticleBridging Existentials & Generics in Swift 2
We are back to another episode of discussing generics, protocols with associated types and some type system limitations in Swift 2. This time we will dive into an interesting workaround that the...
View ArticleBroken Toolchain Post Mortem
Dependency managers, IDEs, continuous integration, automated tests - all these tools are created to supercharge a developer team’s productivity. While modern development tools are amazing in many ways,...
View ArticleDeclarative API Design in Swift
In my first real job as an iOS developer I built an XML parser and a simple layout engine - both had in common that they had a declarative interface. The parsers was driven by a .plist file that mapped...
View ArticleApple Isn't Doomed Quite Yet
The outcry in the Apple community after the latest Apple event has been huge. For many of its loyal customers it seems that the last bit of the remaining magic of the Jobs era has vanished.I personally...
View ArticleUnderstanding Data Race Detection by Implementing it in Swift
TL;DR: In order to learn more about how Thread Sanitizer’s data race detection works I’ve implemented a very simple version in Swift. You can find it on GitHub.We all know concurrency is hard. It’s...
View ArticleWhy I don't Believe in Uber's Success
I wanted to write this blog post for well over half a year. I don’t believe Uber will be a successful business. I’ve been making my points in individual conversations over and over again - with this...
View ArticleBridging Swift Types to Objective-C
At PlanGrid we started adopting Swift prior to the 1.0 release. Despite the tooling problems you’re probably familiar with, we’re still excited Swift users and have written almost all new code since...
View ArticleSurprises in Profiling Multi-Core Performance with Instruments
Short version: When profiling code that should run on multiple cores in parallel, CPU utilization of multiple cores isn’t a good indicator as a single thread might utilize multiple cores at (almost)...
View ArticleSafely migrating millions of database records across thousands of devices
This is a cross post of a piece that original appeared on the PlanGrid R&D blogAt PlanGrid we recently shipped a major release for our iOS app that required a data migration of our core record...
View ArticleA Simple Undo/Redo Implementation in Swift
NSUndoManager is a powerful API, but it is geared towards Objective-C code and relies on runtime features. This post demonstrates a simpler alternative that is better suitable for idiomatic Swift...
View ArticleAnother Small UIKit Debugging Adventure
Working with closed source APIs sometimes requires us to use advanced debugging techniques to track down issues that cannot be explained by our application code alone.This week I had an interesting...
View ArticleQuick Thoughts on Prototyping Software
It’s almost the end of July and I’ve tried to keep up a schedule of blogging at least once a month. So I decided to pull a topic from the long pile of potential blog posts I’ve accumulated:...
View ArticleModeling one-to-many in SQlite using the JSON1 extension
I’m currently reading a great book on designing data intensive applications. In the earlier chapters of the book the author (one of the main contributors to Apache Kafka) discusses the history of...
View ArticleWhen You Can't Avoid Email
Don’t get me wrong, Email is a great tool and an evergreen in everyone’s communication stack. I use it, among many other things, to stay in touch with friends, receive food delivery confirmations and...
View ArticleAutomatic serialization in Objective-C
Recently I worked on a tutorial that required me to serialize a large amount of objects. This is a common use case in many games - if the user quits the game and reopens it you want to restore the...
View ArticleObjective-C: Accessing backing iVars of properties in subclasses
Most Objective-C developers have a fairly good understanding of properties and instance variables and how these two work together.Today I want to discuss an interesting case that will force you to...
View ArticleArithmetic Expressions in Swift
While I still cannot fully understand how the release of a new programming language didn’t leak before WWDC, most of us got surprised by the announcement of Apple’s new Programming Language Swift.Like...
View ArticleThe downside of Web APIs
Web APIs have done a lot for the world of technology. Services that have formerly been isolated islands can now be connected through a few simple HTTP Requests. Posting to Facebook on every GitHub...
View ArticleUsing SSH for private and work account on a Mac
Disclaimer: I’m not a huge fan of configuring software; I’m primarily writing this to remember it for the future.Using SSH instead of HTTPS to authenticate against services such as GitHub, Bitbucket or...
View ArticleSwitching iOS devices and the Keychain
Unfortunately some of my MovieLoggr users ran into the following issue: After switching to a new phone and restoring it from a Backup MovieLoggr would behave unexpectetly (and in some cases crash)...
View Article"I didn't know that" is the best way to learn
This is no original thought. Nevertheless I’ve been thinking about it often enough to make it worth spending a few minutes framing it in my own words.I’m currently working as a Software Engineer....
View ArticleBreaking Swift with NSObject and Generics
Today, while trying to implement a generic data source in Swift, I ran into my first Swift compiler segmentation fault, yay (looking at Open Radar there seem to be many out there)!
View ArticleTalk: Introduction to FRP on iOS
Back in April I gave a talk at NSMeetup in San Francisco on Functional Reactive Programming on iOS.
View ArticleiOS 9 Detects Cycles in Layout Trees
A couple of months ago I was faced with an issue that was fairly hard to debug:Hackathons are a great place to see noteworthy issues. Yesterday's highlight: endless recursion in Storyboard @LAHacks—...
View ArticleSwift Error Handling and Objective-C Interop in Depth
For the impatient reader:TL;DRThe ErrorType protocol has hidden requirements that are automatically fullfilled if you use an enum to implement the protocolObjective-C methods can only be translated to...
View ArticleA Flux Inspired Architecture for iOS
This year I spoke at 360iDev about “Safer Swift Code with Value Types”. The goal of the talk was to explore an architecture that uses immutable value types for the model layer.
View ArticleConvenient Error Handling in Swift
Swift 2 introduced an error handling mechanism that includes backwards compatibility with Objective-C.This is great news, the new mechanism is a lot stricter. Long gone are the days in which one could...
View ArticleIntroducing ReSwift
For the last two months I have been actively working on Swift Flow with the goal of bringing the ideas of the Flux and Redux libraries to Swift developers.
View ArticleSpeaking
I enjoy sharing things I’ve learned and spreading ideas. Here are the talks I’ve given in the past & the upcoming ones I’ve got scheduled. Upcoming On a speaking break 🙂 2017 Workshop:...
View ArticleAbout
Hey there! My name is Benjamin Encz and I currently live in San Francisco. I moved here from Germany in 2013. Currently I spend most of my time writing software, with a strong focus on iOS development....
View ArticleHow I Write Swift Specs With Quick
I’ve recently tweaked the way I write Quick specs. I came to realize that I was placing a majority of my testing code inside of it blocks. This seems to be common among many code bases that use...
View ArticleValidated: A Swift μ-Library for Somewhat Dependent Types
Today I built & published a μ-library that makes it easier to leverage Swift’s type checking system for program verification: Validated.
View ArticleSquashing Commits With Git Rebase: A Very Quick Guide
Git’s interactive rebase is extremely useful for keeping a somewhat clear commit history. Here’s a very brief guide on how to squash multiple commits into a single one.
View ArticleCompile Time vs. Run Time Type Checking in Swift
At some point, when learning how to use Swift’s type system, it is important to understand that Swift (like many other languages) has two different forms of type checking: static and dynamic. Today I...
View ArticleDecoding Heterogeneous Collections in Swift
The problem of decoding Swift types from an outside data source, such as JSON, has been mostly solved. Since Swift’s release we’ve seen more than a dozen popular JSON mapping libraries pop up.However,...
View ArticleBeware the UIKit Visitors!
Investigating the Cause of Quadratic Time Complexity When Adding Subviews in UIKitYesterday Two weeks ago we identified a performance regression in the PlanGrid app, when entering a view that...
View ArticleGCD's Main Queue vs. Main Thread
The correct way to ensure that code runs on the main thread / main queue is a recurring issue that causes some confusion among Cocoa developers. The topic came up again this week as part of an issue...
View ArticleFlavors of Engineering Management
What is like to be an engineering manager vs. an individual contributor? Should engineering managers code? What do engineering managers actually do? The correct, yet unhelpful answer is: “it...
View ArticleArticle 43
Projects scheduled onto platform teams via agency model tend to balloon in scope Once I have engineers; might as well get a ton of stuff done!
View ArticleEngineering Process Is Overvalued
Many engineers and managers focus too much on process and overlook much more important aspects of a successful engineering team.Here’s a quick reminder about what really matters and what engineering...
View ArticleMy Five Favorite Books for Engineering Leaders
I recently got asked a lot about book recommendations for engineering leaders. Here are the five books that I’ve found most helpful so far.
View ArticleArticle 46
Personal Values Some of these are not fully fleshed out, I still want to share them as they give a useful view into what I care about. 1. Ownership Within your realm of capability I can trust you to...
View ArticleArticle 44
What I did in the past & what I’m looking for next The goal of this page is to go beyond a resume and hopefully provide useful context on my past experience and on what I’m looking for in a new...
View Article