Programming Leftovers
-
Stop Being Fancy
This is a note to self:
Except where absolutely necessary, stop being fancy.
When confronted with, “Can this be done?”
If the answer is an immediate "Yes", go ahead, do that.
But if the answer is, “Well, you could, but you’d have to…"
Just stop right there. Don’t go do that.
-
Regex Isn't Hard
Here I’ll highlight a subset of the regex language that’s not hard to understand or remember. Throughout I’ll also tell you what to ignore. Most of these things are shortcuts that save a little verbosity at the expense of a lot of complexity. I’d rather verbosity than complexity, so I stick to this subset.
-
Weighted probability vs. favourability
Presence probability, typically obtained with presence-(pseudo)absence modelling methods like GLM, GAM, GBM or Random Forest, is conditional not only on the suitability of the environmental conditions, but also on the general prevalence (proportion of presences) of the species in the study area. So, a species with few presences will generally have low presence probabilities, even in suitable conditions, simply because its presence is indeed rare.
-
Limited Investment With Timeboxing
Timeboxing reduces risk by limiting how much time (hence money) we commit to something, so we can double down on winners and stop investing in losers. The goal of a timeboxed effort is not to complete something but rather to evaluate feasibility and profitability. By the end of a timeboxed effort, we should not count on having a deliverable, but we should have more material for the decision on whether to continue spending time on it.
-
Ccache and PostgreSQL build directories
We have talked before about how ccache affects build times of PostgreSQL. Now I was wondering how different build directory layouts affect ccache. I was never a user of separate build directories in the make build system (“vpath builds”), so this never concerned me much. But now with Meson this is required.
-
We Put a Distributed Database In the Browser – And Made a Game of It!
TigerBeetle is a distributed financial transactions database, designed for mission critical safety. How do you test something so critical? Well, we could tell you (and we will), but why not show you?
TLDR: You can now run TigerBeetle… compiled to WebAssembly… in your browser! With perfect network conditions, then not-so-perfect Jepsen’esque conditions, and finally, with unprecedented (cosmic) levels of disk corruption.
And on databases: