Blog

List, Dict, and Set Comprehensions in Python: Writing Cleaner Loops
A large share of the loops in any Python codebase do the same thing: start with an empty list or dict, loop over something, maybe skip a few items, a
Continue Reading
f-Strings in Python: Formatting Tricks You Probably Aren't Using
Most Python developers use f-strings every day, but usually only for the simplest job: dropping a variable into a string. f"Hello, {name}" is nice,
Continue Reading
Understanding Python's Truthiness: How if Decides What's True
In Python you can write if items: instead of if len(items) > 0:, and if name: instead of if name != "":. The condition in an if doesn't hav
Continue Reading
Using MongoDB with Django: Options and Best Practices
Django's ORM is one of the best things about the framework. Models drive the admin, forms, authentication, serializers in Django REST Framework, and
Continue Reading
How to Use CSS Cascade Layers (@layer) to Tame Specificity
Every CSS codebase eventually hits the same wall. A third-party library ships a selector like .datepicker .header button.nav, and you need to overr
Continue Reading
A Complete Guide to CSS Container Queries
For more than a decade, responsive design meant one thing: media queries. You asked the browser how wide the viewport was and adjusted your layout ac
Continue Reading