Continuing on our journey with design patterns, this week we’ll visit the observer pattern. This is a really simple pattern to implement. We’ll quickly go through some theory and get down to business. Hopefully, by the end of the article, you’ll be using the pattern in your projects. The Observer… Read more »
Early this year Dejan wrote an amazing article about sorting algorithms. In this article he was comparing common sorting algorithms with the swift sorting algorithm. What we could observe from his conclusion is that swift sorting algorithm is a lot faster than any other concurrent. Now that swift is open… Read more »
Abstract factory is one of the creational design patterns. You probably encountered it in your development without realising. Here we’ll cover the swift version of the text-book version of the design pattern and say a few words about the dependency inversion principle. Abstract Factory We’re all taught to code to… Read more »
In the first part of the fantastic world of Codable we tackled just one of the possible problems that in real life could make this amazing language feature hard to use. In this article we will try to cover another possible scenario that can happen while working on APIs poorly… Read more »
I was one of those people screaming to the miracle in the WWDC room when they first presented Codable in swift 4. I could not wait to put my hands on this new swift feature and starting using it. Personally I believe that this swift 4 feature is awesome, but… Read more »
In Swift you’ll be constructing objects all the time. It might seem simple at first glance but initializers in Swift are a pretty deep topic. In this article we’ll cover designated and convenience initializers. We’ll touch a bit on the failable initializers, required initializers and initializers in structs. We’ll finish… Read more »
Sometimes it’s better to crash then to have your app running in an inconsistent state. In this short article we’ll cover the options you have for crashing and what are the main differences between them. There’s only five, with some subtle differences. Let’s dive in. Five Ways to Fail You… Read more »
Last week we covered some basics on Optionals. This week we’ll dive in a bit deeper. We’ll take a look at the implementation of the optionals, optional chaining, nil-coalescing operator and a few more goodies. Granted, you’ll probably do just fine knowing the basics, but it’s fun to know how… Read more »
Optionals are one of the major language features of Swift. Understanding what they are and how to use them will be crucial if you want to code in Swift. Hopefully, by the end of this article you’ll get a solid grasp of the foundations and you’ll be a happy swifter…. Read more »
You might have heard that some of the swift native types are being converted from classes to structures. In this article, we’ll explore structures and classes, we’ll talk about values, references, stacks and heaps. Hopefully, by the end of it, you’ll understand the differences between them. Reference Types and Value… Read more »