Marcus T·Aug 18Python Type Hints Meet Dependency InjectionI took some time recently to actually understand a pattern I had just been blindly copying and using in FastAPI.
Marcus T·Aug 10Stop Writing God Classes In PythonSome classes start off innocently enough. However, they may keep taking on more and more responsibility and turn into 1000-line monsters.
Marcus T·Aug 2Rotating a Matrix 90°: The Transpose-and-Reverse TrickRotating a 2D matrix by 90° is one of those interview problems that looks hard at first and then becomes more obvious once you see the…
Marcus T·Jun 15Building An Extensible System in PythonSo far in this series, we’ve covered several important object-oriented design concepts:
Marcus T·May 11Design Patterns For Practical Python DevelopmentDesign patterns are typical solutions to problems that commonly occur in software design and architecture. They represent best practices…
Marcus T·May 5Composition vs Inheritance in PythonIf you read the previous article on abstract classes, you’ve already started thinking in terms of structure and contracts. Now we’re going…
Marcus T·Apr 29Most Python Developers Don’t Need Abstract Classes (Here’s When You Do)Python gives you abstract classes… but it doesn’t expect you to use them.
Marcus T·Apr 24Abstract Classes in Python: Designing Code Like an ArchitectWhen building software that’s meant to scale, one of the most valuable tools in your toolkit is the ability to define a contract — a…
Marcus T·Apr 3The Two S̶w̶o̶r̶d̶ Pointer TechniqueOne of my favorite artists of the 90’s is Photek. The intricate Drum&Bass beats he crafted are classic. One song in particular that…
Marcus T·Mar 2Revisiting Linked Lists (Part 1)After more than twenty years as a software developer, I’ve never actually implemented a linked list in the real world.