We look at how to work with ranges in a mixed Swift String/NSString environment.
Episode 80 · Dec 15
We look at how to work with ranges in a mixed Swift String/NSString environment.
Episode 80 · Dec 15
We benchmark the CSV parsing code from the previous episode and refactor it to become an order of magnitude faster.
Episode 79 · Dec 8
We write a simple CSV parser as an example demonstrating how to work with Swift's String and Substring types.
Episode 78 · Dec 1
We refactor the simple reactive library from the last episode using topological sorting to avoid any temporarily wrong values.
Episode 77 · Nov 24
We look at an example of a reactive pipeline with surprising behavior, discuss why it occurs, and how it could be improved.
Episode 76 · Nov 17
We clean up our layout code by introducing helper functions that leverage Swift's key paths.
Episode 75 · Nov 10
We continue to expand our experimental view binding mechanism to implement dark mode in our app.
Episode 74 · Nov 3
We experiment with reactive view bindings that don't rely on runtime programming.
Episode 73 · Oct 27
We introduce a project we're going to work on over a few episodes. To get familiar with the code, we build a new feature using the app's view-state driven approach.
Episode 72 · Oct 20
Brandon Kase joins us to show how Swift's type system can be leveraged to check file paths at compile time.
Episode 71 · Oct 13
We use the reactive array type from episodes #67 and #69 to back a table view. This allows us to correctly animate changes in the underlying data, even with filter and sort transformations applied.
Episode 70 · Oct 6
We built a reactive array type on top of the reactive list from episode #67 and implement a filter method.
Episode 69 · Sep 29
We extend our Elm-style app with a more dynamic view hierarchy by adding a navigation controller and a table view.
Episode 68 · Sep 22
We build a reactive linked lists on top of reactive programming primitives. We implement a reduce method on this type that does the minimum amount of work when the underlying data changes.
Episode 67 · Sep 15
We refactor our reducer-based project from episode #62 to use The Elm Architecture. Instead of interacting with UIKit directly, we build a virtual view hierarchy and let our Elm framework do the rest.
Episode 66 · Sep 8
We create a custom Quick Look extension to visualize binary tree structures in playgrounds.
Episode 65 · Sep 1
We build a component similar to NSFetchedResultsController to decouple our view data and to drive table view animations.
Episode 64 · Aug 25
We refine the observation capabilities of our new data type.
Episode 63 · Aug 18
We show the reducer pattern to simplify state management and to make typical view controller code more testable.
Episode 62 · Aug 11
We recap the tradeoffs between classes and structs and start implementation of our new type, leveraging Swift 4's keypaths.
Episode 61 · Aug 4
We show some of our favorite new productivity features in Xcode 9.
Episode 60 · Jul 28
We take a look at features like renaming, extracting expressions, extracting methods, and more.
Episode 59 · Jul 21
Building on the binary search tree code from episode #56, we implement red-black trees as self-balancing tree data structures and benchmark their performance.
Episode 58 · Jul 14
Today we're joined by Rob Napier, who explains why and how to add certificate pinning to your app.
Episode 57 · Jul 7
We look at binary search trees as an alternative to last episode's sorted array implementation. We benchmark the performance of insertion and lookup in both data structures, with some surprising results.
Episode 56 · Jun 30
Together with Károly, we improve our sorted array implementation using binary search. We benchmark both implementations to learn about their real-world performance.
Episode 55 · Jun 23
We write a dedicated target-action to make it easier to augment existing UI controls with callbacks.
Episode 54 · Jun 16
Lisa from Kickstarter shows us their test-driven development process to reactive programming.
Episode 53 · Jun 9
Swift 4's new features lets us delete code we've written in previous episodes.
Episode 52 · Jun 2
Brandon from Kickstarter demos how the company uses playgrounds to prototype and style individual view controllers.
Episode 51 · May 26
We extend our libpq wrapper to handle queries with properly escaped parameters. To achieve this, we have to dive deep into Swift's unsafe pointer APIs.
Episode 50 · May 19
Brandon from Kickstarter shows their approach of unifying all potential entry points into an iOS app using a common route enum, both in a simple demo implementaion and in their open source code base.
Episode 49 · May 12
We implement a lightweight wrapper around the libpq C library.
Episode 48 · May 5
Brandon from Kickstarter shows us how they write highly testable code with view models. We integrate Apple Pay payments and look at their open-source codebase.
Episode 47 · Apr 28
We look at multiple ways to create variables that have a class type but also conform to a protocol.
Episode 46 · Apr 21
We implement a type safe and Swift-like routing infrastructure that's pretty different from the common approach of most web frameworks.
Episode 45 · Apr 14
We set up our development environment using the Swift package manager and Docker.
Episode 44 · Apr 7
Instead of letting multiple view controllers manage the navigation bar's state individually, we pull this code out and unify the logic in one place.
Episode 43 · Mar 31
We make our Signal implementation thread-safe by safeguarding the access to shared resources.
Episode 42 · Mar 24
To conform IndexSet to the Collection protocol we implement a custom index type along the way.
Episode 41 · Mar 17
We add the ability to map over signals and control subscriptions in a more fine-grained manner. Along the way, we improve the signal ownership model and implement the concept of disposables.
Episode 40 · Mar 10
We extend the Future type of a previous episode to a simple reactive library. Along the way, we dive into debugging a reference cycle in our implementation.
Episode 39 · Mar 3
Conforming to the Sequence protocol allows us to efficiently iterate over the elements, and we gain all of its useful functionality.
Episode 38 · Feb 24
We build the basics for a custom index set collection type.
Episode 37 · Feb 17
We implement a Futures type that we can use instead of callbacks as a first step towards a reactive library.
Episode 36 · Feb 10
We build a sorted array type on top of Swift's native array and make it conform to the Collection protocol.
Episode 35 · Feb 3
We take a look at how reactive programming challenges us to think differently.
Episode 34 · Jan 27
We make our collection extension even more generic by implementing it on the Sequence protocol.
Episode 33 · Jan 20
We show how to use the Collection protocol to make an extension available not just on array, but on all collections.
Episode 32 · Jan 13
Mutating a nested untyped dictionary can be a challenge. To solve it we discuss the mutability of value types and the concept of l-values.
Episode 31 · Jan 6
We talk about the importance of types and interfaces as tools to express your intent precisely and to set the proper boundaries.
Episode 30 · Dec 30, 2016
We refactor a class hierarchy using a protocol and discuss the differences between both approaches.
Episode 29 · Dec 16, 2016
We extend our notification wrapper from episode #27 and discuss an alternative protocol-based approach.
Episode 28 · Dec 9, 2016
A lightweight generic wrapper around Foundation's notification API lets us avoid boilerplate code and provides a type-safe API.
Episode 27 · Dec 2, 2016
We build a generic, type-safe table view controller that can handle multiple cell classes.
Episode 26 · Nov 25, 2016
We add support for caching network requests without altering our original networking abstraction.
Episode 25 · Nov 18, 2016
We discuss the pros and cons of delegates versus callback functions and why delegate protocols are always class only.
Episode 24 · Nov 11, 2016
We talk about a familiar but surprisingly tricky problem: splitting an array into groups of elements. We discuss the pros and cons of our own solutions along with the solutions people sent us via Twitter!
Episode 23 · Nov 4, 2016
We show how we build simple command line tools leveraging the Cocoa frameworks. We use the Swift Package manager to include dependencies in our project.
Episode 22 · Oct 28, 2016
We can change structs by mutation, functional chaining, and inout parameters. We discuss how they differ at the call site and why they’re all equivalent.
Episode 21 · Oct 21, 2016
We use copy-on-write to write an efficient struct wrapper around NSMutableData and discuss how the standard library uses the same approach.
Episode 20 · Oct 14, 2016
We build a flexible sort descriptor abstraction on top of Swift's native sort methods, which is dynamic and type safe.
Episode 19 · Oct 7, 2016
We leverage the existing infrastructure of our app to add a search field with very little code.
Episode 18 · Sep 30, 2016
We connect multiple view controllers using a coordinator and callback functions. We simplify the control flow by refactoring the UI state into its own struct.
Episode 17 · Sep 23, 2016
We implement some of the more challenging parts of parser combinators.
Episode 16 · Sep 16, 2016
Join us in the functional programming gym to stretch your object-oriented comfort zone while we lay the groundwork for a parser combinator library.
Episode 15 · Sep 9, 2016
We build a tree structure from an array of Ledger account names. We first implement the tree using a class, and then we refactor it to a struct and discuss the differences and tradeoffs involved.
Episode 14 · Sep 2, 2016
We look at two different techniques to parse a simple expression language: handwritten parsers and parser combinators.
Episode 13 · Aug 26, 2016
Writing the code for evaluating transactions required continuous refactoring to keep our code simple and clean.
Episode 12 · Aug 19, 2016
Expressions are at the heart of Ledger. We write an evaluator for this expression language in a test-driven way.
Episode 11 · Aug 12, 2016
We give a quick introduction to Ledger itself and to the Mac app we're going to build.
Episode 10 · Aug 12, 2016
In this episode, we answer some of the questions we've received over the past few weeks. We cover networking, table views, stack views, our App class, and testing.
Episode 9 · Aug 5, 2016
We add POST support to a simple networking layer, using Swift's enums with associated values and generics.
Episode 8 · Jul 29, 2016
We create an abstraction around stack views using enums to specify UI elements in a declarative style.
Episode 7 · Jul 22, 2016
We leverage Swift's generics to keep our table view controller code clean.
Episode 6 · Jul 15, 2016
We refactor our code by moving the app's flow from the storyboard into a separate coordinator class. This avoids view controllers having implicit knowledge of their context.
Episode 5 · Jul 8, 2016
We add customizable styles to our CommonMark renderer from episode #2.
Episode 4 · Jul 1, 2016
We explore different approaches to factor out asynchronous loading code from view controllers, using protocols, container view controllers, and generics.
Episode 3 · Jun 24, 2016
We create attributed strings from CommonMark. We continually refactor our code to make the central logic short and understandable.
Episode 2 · Jun 17, 2016
We make use of Swift's generics and structs to build a simple network layer with great testability.
Episode 1 · Jun 17, 2016