Hacking slightly better sum types without Go generics Go doesn't have real sum types, but we can at least hack together an exhaustive switch helper, without requiring generics.
macOS Scripting: How to tell if the Terminal app has Full Disk Access My macOS system configuration script requires Full Disk Access, so I wanted to add a warning if the user's terminal app doesn't have the required permissions. This check should be performed right at the beginning of the script, because if the process fails halfway through, the …
HTTPS Requests with a Small Set of Root Certificates on ESP8266 + Arduino Part of the Getting Started with ESP8266 + Arduino series. In yesterday's post, I walked through best practices for making secure HTTPS connections using a root certificate store on ESP8266 with Arduino. In that example, I used Mozilla's full list of trusted root certificates for my certificate …
HTTPS Requests with a Root Certificate Store on ESP8266 + Arduino Part of the Getting Started with ESP8266 + Arduino series. As part of my exploration of the basics of the ESP8266/Arduino/PlatformIO development experience, I wanted to learn how to make HTTPS requests. I figured this would be more challenging than using Golang on a Raspberry Pi, for example, because …
Reusing an ESP8266HTTPClient Part of the Getting Started with ESP8266 + Arduino series. In my ESP8266/Arduino/PlatformIO HTTPS demo project, I make two consecutive HTTPS requests, to different sites, from the same function. You can see the code in question here. I'm doing this work using the ESP8266HTTPClient library, which is …
API Design Reading List A friend recently asked if I had any recommended reading on designing APIs in general. I found some time today to dig through my Pinboard, and these are the relevant links I found. Many/most of them are language- or technology-specific, but I think it's useful to read …
DRYing up duplicate code into helper functions We often assume it’s clear what it means to DRY up duplicated code. But it’s worth examining what DRY really means, and why it’s important.
Choosing a Version Number for a CocoaPod with Updated Dependencies Semantic Versioning generally provides a clear rule for incrementing a library’s version number, but it fails to cover one common case which arises with CocoaPods: how are updates to a pod’s dependencies considered?
Parent-Child Communication in a Coordinator/View Model Application I received an interesting question via Twitter last week: @cdzombak In the coordinator/MVVM architecture you described on @fatalerrorfm, how do ParentVC communicate with childVC. PC->PVM->Cord->CVM? — Cory Sullivan (@jcsully98) January 12, 2017 It took me a few days to find the time to write …
Over-Reactive? Complex data flows, especially in an asynchronous environment, _are_ complicated and hard; maybe the problem is _there_, not in a tool designed to help model and reason about them in a formal manner.
Modeling polymorphic relationships in Swift (spoiler: enums seem pretty cool) In traditional Objective-C code, we’d typically use protocols to express a polymorphic relationship. In Swift, we can take advantage of the language’s powerful enumerations to model these relationships, eliminate runtime type checks, and remove room for error in client code.
App Transport Security: What, Why, How? In this talk, I answer all your questions about App Transport Security: What is it? Why does it matter? How do you make your server compatible with it, and how do you configure your app to talk to non-compliant servers? Which other apps are using ATS?
‘Obviously super complex’: evaluating software architecture as simple vs. easy I have a problem with the characterization of VIPER, right out of the gate, as across-the-board “obviously super complex”, for a few reasons.
String is not a sufficient type: how using your type system can help you make better software We deal with types, explicitly or implicitly—depending on our language of choice—every day. We often use them without even thinking about them, or we consider them an annoyance when we’re just trying to get something done. This brief talk presents an accessible metaphor to help explain that type sy…