Has anyone here read โ€žA Philosophy of Software Designโ€ by John Ousterhost? If so - was it worth the time spent? If not - why?

Decided to ask here because I definitely need to cut off on my reading list, and adding there every book I came across with no real recommendation is definitely not the way to go here ๐Ÿ˜…

#DailyPythonista #programming #askfedi #askmastodon #books

https://www.goodreads.com/book/show/39996759-a-philosophy-of-software-design

A Philosophy of Software Design

This book addresses the topic of software how to decomโ€ฆ

Goodreads

I kept forgetting how to assert exception messages in PyTest, so I finally checked the docs.

Hereโ€™s a reference snippet ๐Ÿ

#TIL #DailyPythonista #PyTest #TDD #Python #programming

https://borutzki.github.io/2026/03/30/how-to-assert-exception-message-in-pytest.html

Have you ever seen the typing.overload decorator in the wild and wondered what it's actually for?

I wrote a short blog post explaining the problem it solves and how to use it in practice. ๐Ÿ

https://borutzki.github.io/2026/02/07/how-to-use-overloaded-signatures-in-python.html

#Python #programming #DailyPythonista

Debugger is fun and stuff but sometimes it's just faster to dump Django ORM data to a JSON, skim through it, apply fixes and forget about the topic.

Here's how to do that programmatically, e.g. during TestCase execution.

#Django #Python #programming #DailyPythonista #TDD

https://borutzki.github.io/2026/01/25/how-to-dump-django-orm-data-to-json-while-debugging.html

What if I told you that the following way of taking the second object from a Django `QuerySet` might be unreliable and can lead to non-deterministic failures under some circumstances?

And if you think it's a bad idea whatsoever - can you explain why?

Take a look on my recent blog post for more details: https://borutzki.github.io/2026/01/19/why-using-n-on-a-django-queryset-can-be-unsafe.html

#Django #Python #DailyPythonista #programming #ORM

Out of nowhere I decided to describe briefly my approach to reuse model_validator (and any other validator) across multiple #Pydantic models.

Code snippet from image should do the job, full context is in the linked blog post.

https://borutzki.github.io/2025/12/22/how-to-reuse-pydantic-model_validator-across-multiple-models-without-boilerplate-code.html

#Python #DailyPythonista #programming

Ever needed to check for root / admin privileges to make sure your Python script can work correctly?

In my last blog post, I provide you with approach for Linux, macOS and Windows to get this stuff done.

Happy hacking ๐Ÿ

#DailyPythonista #Python #programming
https://borutzki.github.io/2025/10/16/how-to-check-whether-python-script-has-elevated-privileges.html

How to check whether Python script has elevated privileges?

It may happen that a Python script needs root privileges on Linux / macOS or admin privileges on Windows to run properly. If it does not have them, there is no point in continuing. Letโ€™s see how to quickly check whether the current runtime has those privileges.

Borutzki

Writing a technical article - even very subjective one - is quite a lot of work, if one wants to cover the topic well and at the same point not write a book on it in one go.

Just wanted to say that after a writing session.

Used a bunch of guard clauses (https://refactoring.guru/pl/replace-nested-conditional-with-guard-clauses) in text to state what the article is NOT about, to not waste my readers' computing power on reading something they're not interested in ๐Ÿ˜…

Still, it's work in progress. Until next time!
#DailyPythonista

Replace Nested Conditional with Guard Clauses

Problem: You have a group of nested conditionals and itโ€™s hard to determine the normal flow of code execution. Solution: Isolate all special checks and edge cases into separate clauses and place them before the main checks. Ideally, you should have a โ€œflatโ€ list of conditionals, one after the other.

Finally, started working on a separate blog dedicated to technical stuff like #Python, #Django, #Pydantic, #GitLab, #Docker, #RobotFramework and so on.

In this first post I introduce myself and the purpose of the blog, then proceed to a bunch of quick examples of printing "hello world" in Python.

Even if you're not interested - come and see how to add padding to printed string in Python ๐Ÿ

#DailyPythonista

https://borutzki.github.io/2025/10/03/hello-world.html

print(โ€œHello World!โ€)

Coding for people, not just processors. Pragmatic solutions for non-trivial problems.

Borutzki