Darian Moody

@djm
139 Followers
184 Following
185 Posts

Head of Platform Eng. @ YunoJuno.

I love talking about the bleeding edge of software, how we ship more code as teams and indie development, come join!

Particularly: #Elixir, #Python, #Django, #JS & #Nix.

Twitterhttps://twitter.com/djm_
Webhttps://djm.org.uk
GitHubhttps://github.com/djm

The `TRUNCATE TABLE * CASCADE` root cause in Linear's post-mortem is a super easy mistake to make, and even harder to spot in review.

So to stop us ever making the same mistake as I have added a
Semgrep rule to our CI step.

https://semgrep.dev/playground/s/7KvyZ

Semgrep

An example is worth a thousand words, so here is it writing a #django rule to ban implicit ordering of querysets by defining the ordering on the model.

Written, tested and sent to CI within 60 seconds.

Says it all. Many thanks @charliermarsh & team.

What moving to `ruff` looks like for our dependency graph.

(pre-)commits just got a whole load faster ⚡️

Ruff stands on the shoulder of giants – so a huge shout to all the maintainers of the projects on this list, without you and the cataloguing of all the meticulous rules none of it would have been possible. Moving on but not forgotten.

#python #django

Django 4.2 brings one change I don't see anyone talking about: the default admin save & delete buttons have swapped sides.

If you're wondering why, it was part of a change to fix the tab ordering. You can read more here: https://code.djangoproject.com/ticket/33728

It'll take some getting used to after 14 years!

#django

#33728 (Tab order should match visual order for admin model forms’ submit buttons) – Django

No words.

This looks *fantastic*: a new free-to-access book on PostgreSQL 14 internals including nearly 60 pages on how the mysterious-from-the-outside locking system works.

https://postgrespro.com/blog/pgsql/5969985

#postgresql

PostgreSQL 14 Internals

I’m excited to announce that the translation of the “ PostgreSQL 14 Internals ” book is finally complete thanks to the amazing work of Liudmila Mantrova. The final part of the book considers each of the index types in great detail. It explains and demonstrates how access methods, operator classes, and data types work together to serve a variety of distinct needs. You can download a PDF version of this book for free. We are also working on making it available on a print-on-demand service. Your comments are very welcome. Contact us at [email protected] .

Thanks to a prod from @adamchainz, I discovered GitLens on VSCode has the ability to opt-in a display of relative age of code throughout the file as a heatmap bar down the left-hand side. 🎉

ChatGPT has replaced so much reading of software documentation for me.

#Nix documentation exists but spans across multiple domains and generally involves a lot of clicking and piecing together of information...and it is that bit which ChatGPT has shortened.

The key is to not trust it without checking, but often it gives some amazing hints and insights on bits it has picked up from elsewhere (and that the actual docs do not have).