Type something to search...

Blog

Handling Duplicate Key Errors and Unique Constraints in MongoDB

Handling Duplicate Key Errors and Unique Constraints in MongoDB

Every MongoDB developer eventually meets this line in their logs: MongoServerError: E11000 duplicate key error collection: shop.users index:

Continue Reading
Geospatial Queries in MongoDB: Building Location-Based Features

Geospatial Queries in MongoDB: Building Location-Based Features

"Show coffee shops near me." "Do you deliver to my address?" "Which drivers are within 3 km of this pickup?" Location features look simple on a produ

Continue Reading
CSS aspect-ratio: Responsive Media Without the Padding Hack

CSS aspect-ratio: Responsive Media Without the Padding Hack

If you've been writing CSS for more than a few years, you probably have a snippet somewhere that looks like padding-top: 56.25%. It was the only re

Continue Reading
The collections Module: Counter, defaultdict, deque, and namedtuple

The collections Module: Counter, defaultdict, deque, and namedtuple

Python's built-in list, dict, set, and tuple cover most of what you need. But a surprising amount of everyday code is the same few patterns w

Continue Reading
Sets in Python: Fast Membership Tests and Set Operations

Sets in Python: Fast Membership Tests and Set Operations

Sets are the most underused of Python's built-in collections. Plenty of code checks if item in some_list inside a loop, deduplicates with nested lo

Continue Reading
Python Dictionaries Deep Dive: Ordering, Views, and Merging

Python Dictionaries Deep Dive: Ordering, Views, and Merging

Dictionaries are everywhere in Python. Keyword arguments, module namespaces, object attributes, JSON payloads, and configuration all end up as dicts,

Continue Reading