Andrew's Blog about computing (Mostly)

The Setup After working with MVC and MVP in cocoa touch for the last few years, I think it’s time to take a step back and consider the MVVM approach. Recently, I watched a talk given my Ben DiFrancesco where he discusses how and why you should adopt MVVM in your projects. Ben explains how adding …

Lately I’ve been toying with the idea of making a connected garden assistant device. The device itself would be an Arduino like MCU node with an array of sensors that all relay information back to an app. Ultimately, the data provided by these sensors would help you take better care of your plants. This is …read in detail

Unicode is great! It’s so great that it solves all of our localized character issues. But what if you’re working with a low level accessory that requires ASCII ONLY characters as valid input? Let’s say you were to throw in some 💩? How would this system deal with that? This may produce unexpected results and really mess-up-yo-day. …

When starting to learn Swift, you will eventually want to explore creating Swift closures as asynchronous completion handlers. Naturally, you’ll try and fire up a Playground and wire up a function that takes another function as an argument. But when you want to test your completion execution, you might have noticed that the debug console …read in detail

All hail Lazy Initialization Lazy initialization, also known as lazy loading, is one of those tools every developer should know. When lazy loading, we don’t need to instantiate the property on class initialization time. This is great if you have a bunch of expensive objects you need to create in your view controller, but not …

Credit: xkcd CocoaPods are an incredibly helpful tool for incorporating dependencies into your Xcode projects. But what if you want to create your own pod to share as an open-source project or for internal use? This is exactly where I am today and I decided to document my findings as a reference to myself and …read in detail

Credit: xkcd Lately, I’ve been attempting to transition more of my code from Objective-C to Swift. Consequently, I’ve also been trying to wrap my head around some of Swifts functional aspects like Functors and Monads. Knowing that functional programming can sometimes seem overtly academic and less practical, I was somewhat reluctant to begin my studies. …read in detail