Type something to search...

Blog

Default Argument Pitfalls in Python: The Mutable Default Trap

Default Argument Pitfalls in Python: The Mutable Default Trap

Almost every Python developer hits this bug once. You write a function with a list as its default argument, call it a few times, and the list starts

Continue Reading
*args and **kwargs in Python: Flexible Function Signatures

*args and **kwargs in Python: Flexible Function Signatures

You've seen def wrapper(*args, **kwargs): in decorators, and probably super().__init__(**kwargs) in class hierarchies. These two parameters let a

Continue Reading
Python Scope Explained: LEGB, global, and nonlocal

Python Scope Explained: LEGB, global, and nonlocal

Every time Python sees a name like count or len, it has to figure out which variable that name refers to. Most of the time the answer is obvious

Continue Reading
Structural Pattern Matching in Python with match and case

Structural Pattern Matching in Python with match and case

Python 3.10 added the match statement, and many developers filed it away as "Python finally got switch". That undersells it. match can compare

Continue Reading
The CSS Box Model Explained: Content, Padding, Border, and Margin

The CSS Box Model Explained: Content, Padding, Border, and Margin

Every element you put on a web page, from a paragraph to a button to an image, is drawn as a rectangle. The rules that decide how big that rectangle

Continue Reading
Reducing Your MongoDB Atlas Bill: Practical Cost Optimization Tips

Reducing Your MongoDB Atlas Bill: Practical Cost Optimization Tips

An Atlas bill tends to grow quietly. A cluster gets bumped up a tier during a traffic spike and never comes back down. A staging environment gets clo

Continue Reading