Author

What are Protocols? How do We Use Them?

A protocol defines a “blueprint of methods, properties, and other requirements that suit a particular task or piece of functionality”. They can give also give nominal types polymorphic behavior. In Swift, the “protocol can then be adopted by a class, structure [a struct], or enumeration [an enum] to provide an actual implementation of those requirements.... » read more

Stacks & Queues (Data Structures)

In this article, I will briefly explore Stacks and Queues. We will also look at how we can implement these data-structures in Swift, and furthermore we’ll look at the types of applications which we can use stacks and queues for. As an aside, you will often hear stacks referenced in the context of memory management,... » read more

Certificate Pinning for iOS Apps

What is Certificate Pinning? Certificate Pinning refers to a technique of associating a host with an expected X.509 certificate, which is a digital certificate using the accepted international X.509 Public Key Infrastructure standard. By creating such an association, a browser or app is able to detect a change in the certificate used by a host,... » read more

Lambda Calculus

The Lambda Calculus is an abstract mathematical theory of computation, involving functions, and can be thought of as being the theoretical foundation of Functional Programming. It is “a formal system in mathematical logic for expressing computation [where its notation is thus] based on function abstraction and application using variable binding and substitution“(Ref#: B). It was was... » read more

Using Optionals in Swift

The article will aim to answer the question: what’s the best way to unwrap optionals in Swift? To answer that question we will explore what optionals actually are, and why Swift uses them. We will then consider a couple of approaches for how you might want to be unwrapping them in your code with a... » read more

What’s New in Xcode 10

Apple has just released Xcode 10 at WWDC 2018. Let’s take a look at what new stuff can be found in this version of Xcode, which works alongside iOS 11. I’ll continue update this article over time as more details become apparent. Dark Mode The famously rumored dark-mode is coming to Mac OS Mojave and... » read more

Memory Management in Xcode

Let’s being with a quick refresher on how Swift and Objective-C work with memory management. Stack vs Heap It’s firstly important to know that value types (like structs) will be stored on “the stack”, whereas reference types (basically meaning classes) are dynamically managed on “the heap”. N.B. The terms “the stack” and “the heap” can... » read more

Singletons: For & Against

In this article we will explore the controversial topic of singletons. For some, this singleton pattern an anti-pattern to be avoided at all costs, for others they are just a way of handling situations where we want to restrict the instantiation of a particular class to one instance where we would want to be able... » read more

Trees (BSTs & RBTs)

A tree is a data structure with multiple branching, they are made up of nodes, and each tree has a root node, and each root node will have zero or more child nodes, and each child node in turn can also have zero or more child nodes etc. Nodes at the bottom of the tree,... » read more

Higher Order Functions (in Swift & Python etc)

Higher-Order Functions are functions that can take one or more functions as arguments, these functions may also return functions.  in other words they take one or more functions as arguments (i.e. procedural parameters), and/or returns a function as their results. Functions that are not higher-order functions are called first-order functions. For programmers, the first instances of... » read more