Holko.pl

Concurrent Core Data, Now Easier Than Ever

Core Data has a popular opinion of being hard to use, especially in concurrent environments. Why is that the case? First, it truly is complex because it solves a hard problem. Second, until WWDC16 Apple haven't really said how to best set up the Core Data stack. There were many options, each with its own issues, that we had to choose from.

That's why I'm super happy that things get clearer in iOS 10 with the introduction of NSPersistentContainer.

Read more →

Remote Data State as an Enum

Last night I came across How Elm Slays a UI Antipattern article written by Kris Jenkins. In it the author notices that a common list-based UI can be in one of four separate states: notAsked, loading, failure and success and proceeds to model those states explicitly as a sum type.

According to Kris, this approach works well in Elm giving compile-type safety to this common source of UI confusion. Let's see if this approach will fit the stateful world of UIKit by using it for a view based on UITableView.

Read more →

Fetching and Observing a Single Object in Core Data

I know what you're thinking after reading the title. Is Core Data really THAT complicated to need a whole article about working with a single managed object? Well, it sure looks so if you want to do it well.

Read more →

Will We See Android-Like Instant Apps on iOS?

A couple of days ago, at its I/O conference, Google introduced Android Instant Apps. Long story short, we'll be able to use an app without installing it first. In Google's example, tapping on a link to BuzzfeedVideo opens, after a short loading time, the native app instead of a website. To me (and not only me!) this feels like magic future.

There's a good demo of this in the video below.

Read more →

Xcode Search: the Hidden Gems

As software developers, we spend a surprisingly large amount of time reading code. Robert C. Martin points this out in Clean Code:

Indeed, the ratio of time spent reading versus writing is well over 10 to 1. We are constantly reading old code as part of the effort to write new code.

Reading through the whole codebase is just not practical. When you join a new project, browse through some open source library or just work on a large codebase, search becomes an immensely useful part of your toolkit. So, let's dive in into some hidden 💎 of Xcode's Find Navigator.

Read more →