Posts

Adding Basic OAuth Flow to a MPA

TL;DR - For newdepths.xyz I wanted to add a simpler way for users to log in, in that way they can avoid creating a new password just for this little site. I also wanted to implement all the parts of the flow to get a good feel for them and how they fit together. Of course there are a lot of libraries that handle this well, but I think that doing it manually with low stakes is a great way to learn how everything fits together.
Read more

Podcast Notes and Key Takeaways

TL;DR- just notes and takeaways from recent podcast episodes. They’ll mostly be about product development, software engineering, or other tech stuff (GIS related probably). Podcasts Takeaways and notes from recent podcasts I’ve listened to - I’m finding that taking actual notes is helping me retain info and more actively listen lately - and I figured why not share publicly in case it gets someone else interested in listening to (or not) the episode.
Read more

Drawing Cards without Replacement

TL;DR - working out the number of draws it will take to get an Ace if pulling cards randomly without replacing them. Just doing it as “an exercise to the reader” - sparked by some questions that came about in an Advent of Code discord server I’m in. I work out the expected number of draws to the first ‘success’ (drawing an Ace from a deck of cards, for example) from first principles, in a not-necessarily-rigorous-but-good-enough way (mathematicians don’t @ me.
Read more

Modeling the Cooling in a Propane Tank

TL;DR: In a recent camping trip we noticed just how cold our propane tank was getting after cooking for a while - we started out pretty chilly anyway (about 50 F). The physics of this is cool and I wanted to play with modeling it. I have one of these little two burner propane stoves that we use when camping, it looks something like this: While we were cooking breakfast and boiling water for coffee, we noticed that the propane tank was getting super cold - there was not only a thick layer of frost forming on the outside, but a small chunk of solid ice on the bottom of the tank where it met the picnic table…
Read more

Podcasts I've been into lately

Here are some podcasts I’ve been into lately and why I like them. Note - I’m not affiliated with any of these podcasts, I’m just a listener. Tech Backend Banter - Lane from boot.dev interviews a variety of other devs (mostly) and talks about their experiences and projects. I particularly like that it’s not only Golang focused. It’s mostly entertainment, but I’ve learned a few things from it. I really enjoyed the episodes with John Crickett about ‘mechanical sympathy’ (and also his coding challenges) and the one with Thomas Ballinger about convex.
Read more

Two similar apps with dissimilar tech stacks

TLDR - My general takeaways from working on two similar apps. One the OG server-returns-html way with FastAPI/HTMX and one with Next.js using the app router / RSC / SSR. These are my quick take aways from the point of view of working on them from the perspective of a “non-web-dev dev”. Intro I am currently working on two somewhat similar web apps, one using FastAPI with HTMX and one using Next.
Read more

Notes: Gradient Descent, Newton-Raphson, Lagrange Multipliers

TL;DR: A quick “non-mathematical” introduction to the most basic forms of gradient descent and Newton-Raphson methods to solve optimization problems involving functions of more than one variable. We also look at the Lagrange Multiplier method to solve optimization problems subject to constraints (and what the resulting system of nonlinear equations looks like, eg what we could apply Newton-Raphson to, etc). Introduction Optimization problems are everywhere in engineering and science. If you can model your problem in a way that can write down some function that should be minimized or maximized (the objective function) to get the solution you want, even in cases where there is no analytical solution (most real cases), you can often obtain a numerical solution.
Read more

Notes: 'Hacking' on S63

TL;DR: The S63 encryption scheme is old and can be broken pretty easily depending on the information you have. These are some notes on how with a simple Python script to show what I mean. So this is an old standard that will soon be replaced by S100, but it’s still in place and used today. The encryption part of the scheme is mostly to allow data suppliers to license their data to users in a standardized way and collected payment for access to that data.
Read more

How Does S-63 Electronic Navigational Chart (ENC) Format Work?

TL;DR: S-63 is a standard used to encrypt official Electronic Navigational Charts (ENCs). Encryption and signing allow clients to be sure that they have official data and that it has not been tampered with. It also make it possible for data providers to license sections of the charts (cells) and be sure that they are not being shared illegally / pirated. This post gives an overview of the process and shows how to implement the key steps.
Read more

Newton Fractals Are Cool! And a Quick Intro to Newton's Method

Newton’s method is a root-finding algorithm that can be used to find the roots of differentiable functions. It is a very simple algorithm to implement, and it converges quickly in most cases, of course depending on the function. It is often used to find the roots of polynomials. For instance, in Chemical Engineering properties calculations, often cubic equations of state are used to model the behavior of fluids. These equations of state are cubic polynomials and most solved for their roots in most cases in order to compute fluid properties and phase equilibria.
Read more