At a local Python meetup, there were several attendees that weren't familiar with pytest
, which gave me the idea to make this post as a primer on how I use pytest
. This isn't going to be a comprehensive review of pytest
and how to use it. For that, pick up …
-
-
Coffee
I've been a big fan of coffee for many years, but it's only in the last few that I've really started diving deeper on coffee and its preparation. I don't have an espresso machine, so most of my consumption at home is prepared as a pour over.
I've almost always …
-
[TIL] Killing Long Running Postgres Queries
I recently had issues with long running postgres operations and found these two commands, one for finding long running queries, and one for killing them. My issue turned out to be with an
UPDATE
instead of a query, but I'm noting this for future use. Note that the interval can … -
[TIL] Shell Alias for Failing Commands
TL;DR: Instead of
&&
use;
after a command that might have errors.My main project at work has a nice Make command for getting a new truncated version of our main database. Unfortunately, I can never remember the exact command, and it requires a second command (
pg_restore
) to update my … -
TIL: Docker Commands
I set up my main project at work to utilize LocalStack this week. I wasn't able to get it working using a virtual environment with Python, but another project at work has it set up through Docker. A coworker that is much more familiar with Docker than I am helped …
-
Mocking in Python tests
For a while now, I've felt unsure about mocking in Python. It has helped me test in the past, but I've also seen a lot of smart people talk or write about its pitfalls.
Recently, I had to test some functionality around calls to Twilio, so I decided to investigate …
-
Django Tasks - Cronjobs vs Celery
Like my previous vs post, this isn't a showdown. Instead, this post is about matching the solution to the problem. The tl;dr is that Celery is great at what it does, but it requires more infrastructure and setup than I needed to solve my problem.
The Problem to Solve …
-
ramblr
In writing for this blog, there are some posts I'd like to write that I don't think quite fit the theme of this blog. For example, I want to write short book reviews to link to from my books page, but I don't want them showing up on the index …
-
Keyboards
I
recently* read Timo Zimmermann's post about buying a 'keyboard to last' and it made me realize I haven't posted about my keyboard journey yet. If you don't know much about mechanical keyboards, Brett Cannon's post about deciding on a new keyboard has a lot of great info. It also …