Testing in Elixir with Multiple Environments

About a year ago, I was learning how to properly unit test Phoenix applications using the Mox library. The strategy I adopted for my side projects involves adding “module dependencies” to any module I want to unit test, and then using Mox to configure those dependencies during the tests.

While that approach is great for preserving good unit test hygiene, such as using explicit intra-module contracts, it isn’t always the simplest. One major hurdle I’ve encountered since writing that post is figuring out how to use both unit and integration tests in a sane way. Read more on Testing in Elixir with Multiple Environments…

Simulate Network Outages in Your App with Little Snitch

Modern development tools are super-convenient. XCode’s more recent builds let you debug an iOS app over WiFi, so you don’t have to succumb to the indignity of plugging in a Lightning cable (so 2017). React Native’s tooling goes a step farther, giving you the ability to run the native part of the app on a mobile device and execute the JavaScript side part of the app in a web browser on your development machine (where the JS inspection tools are more convenient). Networked debugging is amazing.

But sometimes, you need to test your app’s response to network outages. Read more on Simulate Network Outages in Your App with Little Snitch…

A Simple Approach to Comparing Database Structures

On my current project, we are developing a replacement for a legacy system written in Visual FoxPro that our customer has used for the last couple of decades. Since there is a lot of risk in switching over, we have developed a bi-directional syncing tool that attempts to keep each system up-to-date with changes made in the other. Read more on A Simple Approach to Comparing Database Structures…

An Introduction to Property-Based Testing with JavaScript

Property-based testing is a powerful technique that’s been widely and successfully applied to functional-style codebases for a long time. As functional programming continues to get more and more popular among JavaScript developers, the value of this style of testing is becoming more obvious to a wider audience. Read more on An Introduction to Property-Based Testing with JavaScript…

Using State Tables for Testing

Tests can benefit a project in many different ways. For example, they help ensure that the software behaves as expected. They also help document that functionality for pieces of code that other developers may have to maintain.

Lately, I’ve been using state tables in my tests to improve both of these benefits. State tables allow for clear and comprehensive tests that are scalable during the development. Read more on Using State Tables for Testing…

Accept It: Software is Wabi-sabi

Last week, after dealing with a frustrating build and deployment issue, I reflected on what makes software development frustrating at times–specifically, the well-known feeling that code “rots” over time. I happened to glance at a small Zen rock garden my wife had given me long ago and was reminded of wabi-sabi.
Read more on Accept It: Software is Wabi-sabi…