SNippet EXtractor
Developer Experience
If you are part of a platform team or develop libraries or SDKs that are used by other people, a small detail from my previous post of the developer experience series might have caught your eye.
There may be a
README.MD
somewhere with information […], but this information tends to get outdated very fast
This problem gets increasingly worse when you use your documentation to provide code samples that illustrate how to use the platform, the library or the SDK that you provide.
Maintaining those code snippets is a tedious task, and they get outdated when the platform or library/SDK evolves. Also, it would be nice to be able to ensure, that the code in the documentation is always tested and guaranteed to run.
[Read More]The do file
Developer Experience
Solidblocks Hetzner
Compiling Ubuntu Kernel Packages
Project Developer Experience
Solidblocks RDS
What's my age again? (PostgreSQL Edition)
One of the many fun aspects when taking over an existing codebase is that you inevitably learn something new - if you want or not ;-).
Today a user reported a bug, that some numbers that are derived from the diff of two dates produced incoherent results. Looking at the code, it turned out that the code in question uses PostgreSQLs AGE
function to get the interval between two dates. The shortest reproduce I was able to come up with that shows the questionable behavior looks like this:
SELECT AGE('2021-06-30','2021-05-19') AS age1, AGE('2021-07-01','2021-05-20') AS age2;
and returns the following surprising results
+-------------------------------------+-------------------------------------+
|age1 |age2 |
+-------------------------------------+-------------------------------------+
|0 years 1 mons 11 days 0 hours 0 mins|0 years 1 mons 12 days 0 hours 0 mins|
+-------------------------------------+-------------------------------------+
The correct answer for both cases should be 0 years 1 mons 11 days
but the period for age2
is off by one day. This post will try to shed some light on the AGE
function, why it produces the unexpected results and show alternatives that produce a (maybe) better result.
JooQ In-Memory DSL generation with Liquibase and Gradle
For projects with roots in the Java ecosystem the combination if Liquibase and Jooq is a popular approach on creating and evolving database schemas, as well as interacting with the created data afterwards.
[Read More]