Recent Posts
Context and tramp-data
October 27, 2024
A common problem I see developers struggle with is passing extraneous data down functions where it doesn’t feel like it belongs as argument.
It’s common to see this kind of thing happen when someone is eliminating global variables when refactoring, or when passing redundant data for performance reasons.
Not much is written about this (anti-?) pattern. According to stack-overflow, this is called “tramp data”:
The data itself is called “tramp data”.
read more
Rules-based authorization
June 15, 2024
Authorization is a simple problem with a very large and complex solution space.
I’m going to plant a flag and say Django’s documentation on authorization follows a bad pattern (for most applications). Django’s built-in permissions work well enough for the django-admin views, but they’re not ideal for a generic web application.
Django goes all-in on the “permissions-as-data” pattern. Every possible action is a permission object, and these permissions are linked to users or groups.
read more
Custom local domains for development
July 11, 2022
Make development easier by using local domain names during development
read more
Use suspense with apollo today
July 11, 2022
If apollo doesn’t yet support suspense, wrap it in react-query
read more
Pleasant Python Promises
July 7, 2022
Use generators to make python promises easier on the eyes
read more