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.
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.
| https://twitter.com/djm_ | |
| Web | https://djm.org.uk |
| GitHub | https://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.
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.
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.
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!
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.
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] .
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).