Have your ever wondered how to take advantage of the cryptographic interfaces that Apple provides for you, but just unsure where to start? If you so, then this tutorial will provide you a brief overview on how to implement the CommonCrypto APIs into your iOS or macOS application utilizing Swift 5. In this tutorial I will cover taking a clear text Swift string and creating a MD5 and SHA-256 hashed value from this string. Before we dive into the code though, let's talk about why you might want to use these hashing functions in your application. One reason would be to persist sensitive inf
With daylight savings time being a few days old now for 2019 I thought I would put together a small tutorial on how to convert dates by timezone in Swift. There are two approaches that I generally use when converting dates, the first is to use a Foundation's DateFormatter, and the second is to perform an Epoch calculation based upon your current timezone offset. The advantage of using the DateFormatter approach is that dates can easily be displayed or evaluat
Java is a very concrete and powerful language. In the last 20 years Java has become a staple in enterprise, mobile, and server side computing. However, if you're coming over to Java from languages like Swift, Python, or Haskell you might say be wondering about different functional aspects of Java. One question I had is, "How come Java does not support n-value heterogeneous return type tuples?" The answer is that Java's methods are intended to have one return type per method call.
Recently I had a question come in from a reader on how to determine where the site packages are installed on macOS Mojave. So, what I wanted to do was create a short video explaining how to find these site packages and how to see what packages are installed. This technique should be applicable on macOS Mojave or High Sierra both. First, let's understand why you would want to know where the site packages are installed on any system? The main reason would be for making development decisions about how to design you Python program. This can be especially valuable for knowing which site pac
One topic that I have seen come up a lot over the last couple of years is how to detect internet connectivity in an iOS or macOS application. This is a topic that really interests me so I thought I would take some time and write a tutorial on how I and Apple recommend that client applications determine network connectivity. To start, I thought I would provide some context on where this network connectivity model might be applicable. The main use case is in a traditional client to server communication setting where a client is sending either a GET or POST request to a server, and the serv