We all want our apps to be stable and to run reliably on all of our customers’ devices. However, due to the inherent complexity of most software, we can never guarantee that even the production code will be 100% without bugs. Whether they’re the result of a programmer error, a flaw in the OS, or a bug in a third-party library, crashes will inevitably pop up from time to time.
It is our job as software engineers to promptly find a solution when this happens. This is where crash logs come in handy.
When an app crashes on an iOS…
You don’t have to be a hacker to stay private online
I would like to begin this article by stating that complete online privacy is a myth. There will always be a chance that someone with the right skills will spy in on your activities no matter what you do.
There are a few quick and easy steps, however, that even people with minimal technical ability (if you can download apps and send emails you’re fine) can execute to increase their chances of staying private.
By staying private, you can evade the watchful eyes of big tech giants who log…
This article is my take on the chapter with the same title from the brilliant book The Pragmatic Programmer. You should absolutely give that a read if you haven’t already.
I often use programming or investing analogies when I talk about real-life stuff. Using investing analogies to talk about programming stuff is super fun for me, and hopefully, it will be fun for you too.
Your most important asset as a software developer is the knowledge and experience stored inside your brain. However, this is an expiring asset. …
Have you ever wondered about what happens under the hood between tapping an app icon and
I really like to take a deep dive into topics like this that seem trivial at first but can greatly advance your understanding of the iPhone’s operating system.
Every single iPhone app that exists today could technically be described as a single call to the
Wait, what? Yep, you read that right. Read on to find out why.
If you check the
UIApplicationMain(_:_:_:_:) function, you can see that it has a return type of
Int32. However, this function never actually returns…
If I look at code from other languages I don’t often work with, say Python, and if the code is well-written, I usually instantly know what’s going on.
If I look at well-written Objective-C code, my gut reaction is “What the heck is this? Is this actual code or just some randomly generated gibberish?”
Or at least, that’s the way it used to be.
As you can see, I’m not the biggest…
A segue creates a new view controller instance, but it can not “decreate” that view controller, or some preceding ones. Once a segue is triggered, it can not go back. It is like a one-way street.
Let’s assume you have View Controller A, B, and C. You segue from A to B and from B to C, but when you dismiss C you want to return to A and not B. A simple back button in a navigation controller is no use here because that always takes you to B.
Unwind segues offer an elegant solution to these problems and…
In this article, we will find out what copy-on-write is and why it’s absolutely awesome. We will also learn how it works and how we can implement our own custom objects with copy-on-write behavior.
Copy-on-write is the magic behind value types. For starters, consider the following simple example:
var x = ["a", "b", "c"]
let y = x
print(x) //["a", "b", "c", "d"]
print(y) //["a", "b", "c"]
As you probably already know, collections like Array have value semantics.
What that means is that unlike reference types, which store a reference to the object, value types store a copy of…
In this article, we will deep dive into Big-O Notation, write our first algorithm and illustrate the importance of the growth of an algorithm’s run time through a concrete example from the Swift Standard Library.
An understanding of Big-O Notation is essential for the comparison and design of algorithms, hence indispensable for the articles that will follow, so that’s why I think it is a great starting point.
Now let’s get going.
Big-O Notation is a metric we use to judge the growth rate of an algorithm’s running time as we increase the input size. This is called time complexity.