While trying to figure out the best way to structure my “reducer” functions in a Redux-style Xamarin app, I found out that C# 7.0 introduced pattern matching support in switch statements!
I recently needed to find and fix a bug in a web app I’ve been working on. The bug had something to do with code that was updating the dimensions of a third-party generated UI component whenever the window was resized. While troubleshooting the issue, I repeatedly used a handful of the tools provided by […]
For the last few months, I’ve been using Visual Studio Code on a Node.js project. It’s a pretty great editor, and its support for TypeScript is fantastic. As part of my normal workflow, I try to follow TDD practices as much as possible. For efficiency’s sake, I like to execute the tests in the test […]
Nearly every project I have ever worked on has had to deal with dates in one way or another. For example, there might be a need to generate a report for a specific date range. This would require a user to select a start and end date, which would be sent over the network to […]
Way back in 2011, I wrote a blog post showing how to Run Tests from MacVim via Terminal.app or iTerm.app. I’ve been using that setup for years without a problem, but when iTerm2 Version 3 was released, it stopped working. I’ve updated the AppleScript and am posting it here for anyone who wants to run […]
It seems that on every Rails project I work on, I end up writing utility scripts that make changes to the production data in some way or another. Perhaps it’s pre-loading hundreds of user accounts for a customer that wants to provide a spreadsheet of users, or populating an account with fake data that can […]
Heroku provides a convenient command line interface for executing snippets of Ruby code remotely. One-liners can easily be piped into the heroku run console command. But what about much longer scripts that you write locally and want to execute in a remote Heroku environment? In this post, I’ll show you how to execute a long […]
Recently, I had to deal with a command line process that was occasionally hanging during my project’s continuous integration test suite. I decided to write a wrapper script that would watch the output of the wrapped process. If it didn’t see a particular bit of output after some period of time, it would kill the […]
I recently attended elm-conf (videos of the elm-conf presentations), which was hosted at Strange Loop on its preconference day. I’d been meaning to play around with Elm for years and was finally sparked to do so to prepare for the conference.