Somehow, while working on the ranking of “De Schuilplaats” in the shittified 2023 Google Search, between writing and peddling guest blog posts to spammy website with reasonable PageRank, I overlooked the fact that I could add a profile for a holiday home for free to a website operated by the province of Drenthe to promote tourism in the region. So here is our new profile on the Drenthe.nl website, that has an OpenPageRank of … 5/10:
The following is a copy of an guest post of mine that was published on Hoogsensitief.NL on June 19, 2023: Overgevoelig voor programmeren?
Programmeren lijkt bij uitstek een activiteit die geschikt is voor gevoelige mensen. Zolang je computer in een omgeving staat met prettige verlichting (het liefste daglicht) en zonder rumoerige collega’s of (veel erger!) achtergrondmuziek, zit je vaak in een bubbel waarin je zelf de controle hebt over binnenkomende prikkels. Klinkt ideaal toch?
Early during the development of the PostgreSQL backend for FlashMQ.com—that is our amazing managed MQTT hosting service!—, I decided on using UUIDs rather than auto-incrementing integers wherever I needed or wanted surrogate keys. I am one of those people who prefers the use of natural keys where their use is … natural, but I certainly have nothing _against_ surrogate keys, only to their overuse, which usually results from an over-reliance on ORMs (which I do have something against). There are a couple of advantages to using UUIDs over auto-incrementing integers (available in PostgreSQL via sequences):
I needed to compare semantic versions within Postgres. I tried the existing semver extension, but when I found that it was a bit problematic to adjust to be fully compliant with the semantic versioning spec, I decided to write a simple domain-based alternative myself: pg_text_semver.
(Version parsing was part of my effort for more robust pg_restore of FlashMQ extension data. I might write more about that in the future.)
My newest PostgreSQL extension—pg_extra_time—contains the date-time functions, operators and casts that I was surprised to not find in the standard library. Maybe one day…
Again, this extension is a shoot-off from the PostgreSQL work I’m doing for the backend of the high-performant FlashMQ.com MQTT hosting service, that is due to launch later this quarter.
Yesterday, I released a tiny PostgreSQL extension that I use to validate email address in the backend of FlashMQ.com: pg_html5_email_address validates email addresses in the same way that modern web browsers do for <input type="email"> elements.
The advantage of having email validation in your data backend to be in sync with the HTML5 spec is twofold:
- The HTML5 spec has a more reasonable definition of what constitutes a valid email address than RFC 5322.
- It’s convenient to have you HTML5 frontend and PostgreSQL backend follow the same validation rules. Since the backend of our MQTT hosting service is based on PostgREST and the frontend on Vue.js, we find it important that both PostgreSQL and HTML5 + JS have the same ideas about validation.
pg_html5_email_address is available on PGXN: https://pgxn.org/dist/pg_html5_email_address/1.1.0/
Yet another PostgreSQL extension that emerged from the FlashMQ PostgreSQL backend is: pg_safer_settings. pg_safer_settings offers some functions and a mechanisms to make working with settings in PostgreSQL a bit safer. Its defining features are:
- easy access to database and role-level settings, bypassing session-local and transaction-local settings; and
- a type-safe configuration table pattern that allows for IMMUTABLE access to configuration values, and fine-grained access control.
My latest split-off release from our super-stable FlashMQ.com PostgreSQL backend is version 1.0.0 the pg_utility_trigger_functions. It’s a very simple bundle of a bunch of trigger functions that I find useful to carry around with me, and it’s sufficiently-tested for me to bring it out immediately under a 1.0.0 stamp.
Another release from the long list of PostgreSQL extensions that I’m splitting off from the database schemas that make up our rock-solid MQTT hosting platform issss: pg_role_fkey_trigger_functions. That extension name is quite the mouthful. From its readme (again courtesy of pg_readme):
The pg_role_fkey_trigger_functions PostgreSQL extension offers a bunch of trigger functions to help establish and/or maintain referential integrity for columns that reference PostgreSQL ROLE NAMEs.
Many extensions are yet to come, because I’ve found that dependencies in themselves aren’t bad, as long as they are used side by side, and not needlessly stacked on top of each other. That they are no longer 100% internal to the migrations belonging to the app doesn’t worry my, because:
- I still maintain them myself anyway, and
- the migrations can (and will) use specific extension versions, so that, in fact, no control and cohesion is lost, even while some decoupling and modularity is being won.