React Hot Loader: First Thoughts

The React Hot Loader is a tool to reload Javascript on a page as you edit React components (see video for a demo). So far, this works really well for me – I haven’t attempted anything large yet, but this improves development so much that it is clearly going to be the golden path for […]

, , , , ,

Efficient storage of large IDs in Postgres

Imagine a system that uses large-ish hex string identifiers, e.g. similar to UUIDs. To make the math easy, lets say we make a table with a million have 20 character IDs: CREATE TABLE ids1 (id CHARACTER VARYING(20));   — takes 2091 ms INSERT INTO ids1 SELECT ‘0123456789ABCDEF0123’ FROM generate_series(1, 1000000) num We can get the […]

,

Trace Logging with React

Long ago, when I was a Delphi (Pascal) programmer, I encountered a neat language feature called properties, which are awesome for debugging (and more well known now, as they are in C#). Property Area : Longint read fArea; Property Left : Longint Index 0 read GetCoord write SetCoord; Properties are accessed with the same syntax […]

, ,

Auditing Data Modifications in Postgres

Implementing Auditing Storing every change to an application’s database allows for sophisticated forensic analysis- usage trends over time, as a long-range debugger or for implementing data correction features more typically found in version control software, like ‘cherry-pick’ or ‘revert’. Many products require this in the form of an audit trail, which in the simplest case […]

, ,

Testing the output of tuned Postgres queries

Tuning SQL queries is a useful skill, and while many people struggle to manage complex SQL, the work is actually a series of simple tricks. For instance, refactoring a query often brings about algorithmic improvements, and if you tune enough queries, finding mathematically equivalent forms becomes muscle memory. This includes operations like inlining common table […]

Hacking Customer Service with Python

Customer support questions come in many forms, some of which are difficult to answer: Why does this screen show different results than it did a week ago? Why does screen A show ten records when screen B shows five? And, a favorite, what don’t you know about this problem? Answering these questions in a satisfactory […]

, ,

Testing ETL Processes

ETL (“extract, transform, load”) come in many shapes, sizes, and product types, and occur under many names – “data migration” projects, business intelligence software, analytics, reporting, scraping, database upgrades, and so on. I’ve collected some notes, attempting to classify these projects by their principal attributes, so that you can estimate the risks and plan the […]