-
Formatting Currency Values with BigInt
I am building a small double-entry accounting app that serves my specific needs. One key thing is multi-currency support done right. I know that “done right” can mean whatever you want it to mean, but for my use case it means inventory tracking. All multi-currency operations should be associated with a cost, and a collection of multiple postings on an account create an inventory with values tracked at cost in my primary currency.
-
Building in Public
This is an exercise in finishing a project. I’ve been building a personal accounting app for myself during the last couple of months. There are a lot of unknowns and I will talk about the details of this app in a follow-up post, but first I want to ramble a bit about the things that have been on my chest.
-
PostgreSQL and its annoying crosstab
Today, I had to pivot (pun intended) from my usual tasks to help a colleague with a query. The task is deceptively simple: Collect metadata about all columns of a table in a single query. This was to be a function in PostgreSQL that would return a table with the following columns:
-
Magical Refs in React
I learned React by looking at it. Yes, really. I inherited some React codebase since I was the only dev with JS knowledge on my team, and I had to figure out how to make it work. Since most change requests were small there was no need to reach out to the docs, and after implementing a couple of minor fixes the pieces started to fall into place. I’ve never seen class components since my first contact with React was with functional components.
-
TIL: PostgreSQL's copy command does run triggers
I always assumed that the
COPY
command in PostgreSQL bypassed triggers. I didn’t know that, I just assumed it. It felt correct. My experience with copy is bulk importing data and that usually meant creating either temporary tables as staging area or importing into new tables. In any case, it seems I’ve never copied data into a tables with triggers.