The Danger of String Literals and Stringly Typed Code


Object literals are very useful and they often make your code easier to read and understand. String literals are a bit different, though. It's true that a string literal is the easiest solution to create a String instance. It's straightforward and everyone understands what's going on. But there's a price you pay every time you use a string literal. Did you know that?

Exclamation Marks and Fatal Errors


Fatal errors have a negative connotation and with reason. You should use them sparingly if you want to avoid having your application crash and burn at the slightest hiccup. Despite their negative undertone, fatal errors are an integral part of my workflow as I write elsewhere in this book.

Unboxing JSON With Swift and Unbox


Many developers new to Swift seem to be struggling with JSON. Despite the speed of Foundation's JSONSerialization class, it hands you an object of type Any, leaving it up to you to unwrap the object you received.

What Is Any in Swift


Last week, we discovered that AnyObject is a protocol defined in the Swift standard library. In today's installment of "What The Swift", I want to show you what Any is. To discover the meaning of Any, we need to revisit the Swift standard library.

How to Work With Bitmasks in Swift


A surprising number of developers struggle with bitmasks and bitwise operations. If you've had problems working with bitmasks, then I have good news for you. Swift's standard library makes this easy. In this tutorial, I'd like to walk you through an example I worked on last week for an application I'm working on.

About Bart Jacobs

About bart jacobs

My name is Bart Jacobs and I run a mobile development company, Code Foundry. I've been programming for more than fifteen years, focusing on Cocoa development soon after the introduction of the iPhone in 2007.

Stop Writing Swift That Sucks

In my free book, you learn the four patterns I use in every Swift project I work on. You learn how easy it is to integrate these patterns in any Swift project.