RSSAmplifier

Blog

<jack>

Recent content on

jackchristensen.comRSS feed ↗31 posts

Latest posts

Building an Embedded Multiplatform SQL Database with AI

I wanted a SQL database that didn&rsquo;t exist, so I tried to build it with AI

MacBook Pro with Colima vs. Remote Linux for Devcontainers

I tested whether it was worth remoting to a Linux server instead of running in a VM on a MacBook Pro.

Improving SQL Tests with Doppelgänger and Canary Data

SQL statements can appear to work correctly in development and testing but fail catastrophically in production

Sharpening the Axe is Doubly Important In Software Development

The ancients recognized the wisdom of sharpening one&rsquo;s tools. It is especially important in software development

When To Use PostgreSQL Enums

PostgreSQL enums should be used for values that directly impact application control flow.

The Context Overridable Global Pattern in Go

Contexts and global variables mitigate each others weakness.

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.

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.

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.

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.

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…

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?

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…

About

About &#xA; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean nec dolor in magna lobortis egestas. Suspendisse eu erat tempor, tristique neque eu, convallis nulla. Curabitur vel bibendum lacus, at semper mauris. Suspendisse aliquet commodo ex, sed sagittis metus aliquam id. Maecenas feugiat rutrum lorem vel imperdiet. Nullam ornare lectus ut enim finibus, et porttitor mi tincidunt.…

Contact

Contact &#xA; Aenean ipsum justo, semper eu nisl ut, pretium tincidunt sem. Praesent et diam sit amet lacus lobortis dictum a id lacus. Quisque hendrerit sit amet turpis eu varius. Ut id lorem ac felis ultrices tincidunt. Pellentesque consequat arcu ac fringilla imperdiet. Phasellus pellentesque, sapien non pulvinar blandit, sapien ante aliquet felis, vel porttitor sapien ante in lacus. Fusce non…

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.

React2FS - React to File System Changes

React to file system changes by executing a command

Go Performance Observations

In the course of optimizing the pgx PostgreSQL driver I observed a number of performance characteristics of Go that I hope you will find useful.

Tern 1.0.0 Released

New release of Tern rewritten in Go

Writable Common Table Expressions

Writable common table expressions are a powerful feature of PostgreSQL that is rarely used when building applications with an ORM like ActiveRecord. It allows inserts, updates, and deletes to be performed in the WITH clause of an SQL statement. Here are a few techniques that I have found useful.

Surus 0.4.0 Released

Surus now can use PostgreSQL&rsquo;s JSON functions to build JSON much faster than Rails to_json

Faster JSON Generation with PostgreSQL

A new feature in PostgreSQL 9.2 is JSON support. It includes a JSON data type and two JSON functions. These allow us to return JSON directly from the database server. This article covers how it is done and includes a benchmark comparing it with traditional Rails JSON generation techniques.

Text Tunnel - Remote Text Editing

Use your favorite GUI text editor on remote servers over SSH.

Surus - PostgreSQL Acceleration for ActiveRecord

Accelerate ActiveRecord with PostgreSQL specific support

tern - The SQL Fan&#39;s Migrator

New gem to simplify complex database schema migrations

tod - Time of Day for Ruby

New gem to simplify time of day handling

assert_db_rejects - Test database constraints in Ruby on Rails

A simple gem plugin for testing database constraints.

Solving a Math Puzzle with Ruby

A math puzzle from The Art of Game Design by Jesse Schell is solved with Ruby.

Linksys WRT54G2 Connection Problems Solved by DD-WRT

Random internet connection loss was solved by installing DD-WRT.

Selenium Broken by Firefox Upgrade on Ubuntu

The path to the Firefox binary changes on upgrade. This can break Selenium.

Ruby 1.9 Development with Windows, VirtualBox, and Ubuntu

Ruby is more at home on *nix than on Windows. This tutorial covers setting up a Windows machine as a VM host, installing an Ubuntu VM, building Ruby 1.9, and setting up file sharing between Windows and the VM.