Pattern Matching without Regex! – Introducing the Rosie Pattern Language

Recently, I was able to attend Jamie Jenning’s talk on the Rosie Pattern Language (RPL/“Rosie”) at Strange Loop 2018. I had not previously been aware of Rosie, but after learning about it, I am extremely excited about the prospect of never writing another regular expression again. Read more on Pattern Matching without Regex! – Introducing the Rosie Pattern Language…

An Introduction to Content Localization in Android Apps

When creating any kind of application, it’s important to build it for the users you expect to be supporting. Because of this, it may be necessary to display different strings, images, and other content based on the language or region of your users.

While creating the translations of an app can be a lengthy process, enabling content localization in an Android app is as simple as adding new files and folders to your resources. Read more on An Introduction to Content Localization in Android Apps…

CSS-Animated Countdown Timer with React and TypeScript

A while ago, on an old project, we needed to implement a countdown timer. The specified design looked relatively simple: an outline of a circle with the number of seconds remaining inside. As the time counted down, the text would need to update, and the stroke around the circle would need to disappear at an appropriate rate so it would be completely gone when the time got to zero seconds.

I originally implemented this timer in an Ember project. For the past year, I’ve been working with React, so I decided to try my hand at re-implementing it as a React component. Read more on CSS-Animated Countdown Timer with React and TypeScript…

Using an Int Type in TypeScript

The project I’m working on has a Node.js back end written in TypeScript, with a PostgreSQL database for persistence. We had a production user who encountered an error when the system tried to insert a row into a table that had an integer column in it. The value it was trying to insert was 239.99999999999997, so it made sense that PostgreSQL was complaining about it being “invalid input syntax for an integer.”

Read more on Using an Int Type in TypeScript…

A Library for Driving NeoPixels with the ESP32 Micro Controller

The NeoPixel is a very cool little device. It combines three LEDs (red, green, and blue) with a specialized microprocessor, all in a package about the same size as a traditional LED. These smart LEDs open up a wide range of new project possibilities because they reduce the amount of circuitry and processor pins that would otherwise be necessary to drive an array of lights. Read more on A Library for Driving NeoPixels with the ESP32 Micro Controller…

Unit Testing Custom Xamarin.Forms Controls

When using Xamarin.Forms, the conventional wisdom is that you write unit tests around the ViewModel, but not the View. This approach works well for most cases with MVVM, but if you’re developing custom controls, it’s likely not sufficient. In this post, I’m going to dive into a bit of what it takes to successfully write unit tests around custom Xamarin.Froms controls.

Read more on Unit Testing Custom Xamarin.Forms Controls…

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…

Level up your PostgreSQL Skill with Lateral Joins

PostgreSQL’s lateral joins have a lot of uses. One of my favorites is the ability to reuse calculations in a query.

Before I discovered lateral joins, I would either copy calculations throughout the query or use subqueries. Neither of these approaches is ideal because they make the query much more difficult to read—and nearly impossible to update and maintain. Additionally, the query is inefficient, because it performs the calculations more than once. Read more on Level up your PostgreSQL Skill with Lateral Joins…