Tag: functional programming
-
The Versatility of __call__: A Python Developer’s Secret Weapon
Refactoring with __call__: From Personal Code to FastAPI Consider the following fictional example, Suppose we have both arg_b and arg_c defined, but we do not know about arg_a. If both arg_b and arg_c do not affect the behaviour of later computations, it would be nice to not having to keep passing the values around. Fortunately, Python…
-
How to repair a bridge, Advent of Code 2024 Day 7
After what felt like an eternity (five hours, to be precise), Day 20 part 2 finally decided to cooperate. I’m still slightly dazed from the wait, but duty calls! Today we’re tackling Day 7 of Advent of Code, picking up where we left off with Day 6 last week. Our task today is to repair…