Skip to main content

Python

Context Managers and Cross Cutting concerns in Python
Hello, In this short article I would like to talk about context managers. I personally consider that at the core they are just a form of decorators. If you don’t know what a decorator is check the Decorator Pattern Wikipedia article.
Method Injection and Property Injection Design Patterns
Hello, In this article we’re going to explore the Method Injection and Property Injection design patterns. To demonstrate the patterns I’m going to add a new interface named Encoder to the printer.py file and a concrete implementation for two encoders: Rot13Encoder and NullEncoder.
Constructor Injection and Null Object Design Patterns
The Constructor Injection design pattern is a pattern that helps you declare all the required dependencies of a class in it’s constructor.
Composition Root Pattern: How to Write Modular Software
The composition root is a design pattern which helps you structure a software application by implementing a class that builds all the other classes.
Introduction to Pyenv for Linux Users
Hello, In this article I will introduce you to pyenv, a tool for managing python environments. Installing pyenv is pretty straight forward, you’ll need to clone the repo and add the binaries to the path.
LeetCode: Find The Town Judge
Hello In this article I will present you my Python3 solution for the following problem which I found on LeetCode: find-the-town-judge.
LeetCode: Arrays 101: Introduction – Solutions
·2 mins
Hello, LeetCode is a good place to practice programming by solving problems of all levels! After you solve a problem, you’ll get access to all submitted solutions, sorted by time and memory usage. That’s a nice way to compare your code to others and see what you did well and where you can improve.