Expanding on the Joule-Thomson Effect

TL;DR - “real” gases heat up or cool down when they are throttled through a valve from high pressure to low pressure. This is because of interactions between the molecules and it’s an interesting property. Counter intuitively, maybe, they flip from cooling to heating at some temperature. A one plot summary in two plots: interactive plot Motivation I read a blog post from a researcher hypothesizing about the mechanism behind the Joule-Thomson effect.
Read more

Reflecting on 2025

In no particular order - a reflection on the year 2025. Spit into a few different areas of life. Biggest and easily the most exciting update (currently redacted)! If you’re reading this, I guess I’ve decided to share it (or you’ve done something bad and should be ashamed). Here’s to another one! Some cool “wrapped” shares / stats: Github Wrapped: https://git-wrapped.com/profiles/Heathhenley Goodreads year in books: https://www.goodreads.com/user/year_in_books/2025/33307498 According to Spotify my music age is 66 lol.
Read more

Simple query refactor - 100x faster

TL;DR - Recently set out to speed up a slow query behind a multi-column cursor paginated endpoint. A simple switch to represent the where filters as a tuple makes a huge difference in performance on the exact same data with the same indices. Eg - change where ( a > c or (a = c and b > d )) to where (a, b) > (c, d). In the “tuple” case postgres can use the index more efficiently and get more of the needed rows using the index condition, versus walking it, reading rows in and filtering.
Read more

Working on a Fisheries Data Platform

TL;DR: A side project I’m working on is a web interface for the photos collected by a smart scale. The scale and its attached camera is deployed in remote areas and as the fish are caught they are weighed on the scale and their picture is taken. There is a mobile app that coordinates all of that and when the user is back in an area with service / wifi, the photos are sent up to a bucket.
Read more

Using Gflags Page Heap to Debug on Windows

TL;DR - It sets a global flag so that when the OS allocates memory in your application, it specifically sticks the allocated chunk at the end of the page, with a special no access page after each used page. Then any buffer overrun becomes immediately obvious! What happened We have a relatively simple standalone Windows MFC desktop app (old school) whose sole purpose is to take user inputs and call into a third party library with them.
Read more