<jack>

If it’s too hard you’re doing it wrong.

Recent posts

Apr 18, 2020
When To Use PostgreSQL Enums PostgreSQL enums should be used for values that directly impact application control flow.…
Apr 11, 2020
The Context Overridable Global Pattern in Go Contexts and global variables mitigate each others weakness.…
Feb 4, 2018
Simple Enums in Ruby with the meta_enum Gem Ruby does not have a built-in enum type. The meta_enum gem can fill the gap.…
Aug 8, 2017
Simple PostgreSQL Upgrades in Development Upgrading a production PostgreSQL server can be a complex and delicate process. But in a development environment downtime is not an issue and database size is typically fairly small. For these cases performing the same upgrade process as production can be overkill. There is a simpler way.…
Sep 8, 2016
Development of a Simple Command Line Websocket Client While working on the Websocket Shootout, I frequently needed to connect to a websocket server and interact directly. None of the existing tools I was aware of had exactly the features I was wanted. That led to the creation of ws.…
Jul 7, 2016
Modeling Polymorphic Associations in a Relational Database Polymorphic associations can be difficult to correctly represent in a relational database. In this post I will compare and contrast four different ways to model these challenging relationships.…
Feb 15, 2016
Custom Aggregates in PostgreSQL Given a bank account of debit and credit transactions, what is the greatest balance the account ever had? Given a hotel with arrivals and departures, what is the greatest number of guests the hotel ever had? Both of these are examples of finding the greatest running total. Finding the greatest running total is a great exercise with which to explore some of the lesser known features of PostgreSQL such as window functions, custom aggregates, and C functions.…
Dec 28, 2015
Switch vs. Map: Which is the Better Way to Branch in Go? This article compares the performance of map lookup and switch statements in Go?…
Apr 23, 2015
Materialized View Strategies Using PostgreSQL Queries returning aggregate, summary, and computed data are frequently used in application development. Sometimes these queries are not fast enough. Caching query results using Memcached or Redis is a common approach for resolving these performance issues. However, these bring their own challenges. Before reaching for an external tool it is worth examining what techniques PostgreSQL offers for caching query results.…
Dec 18, 2014
16 Tips from the 2014 Winter Miniconf Hashrocket hosts an internal conference twice a year called Miniconf where we take a day to share ideas with each other. This last Miniconf I gave a quick 20 minute talk with a grab bag of Linux, shell, PostgreSQL, and Ruby tricks. This article is that talk converted to text format.…