A Git alias is a way to give a Git command a nickname of your choosing. Good candidates for making a Git alias are when the command is:
A drawback of a Git alias that I’ve stumbled across is when you’re helping someone else with Git who doesn’t have the same set of aliases as you do. You’ll find yourself in a conundrum trying to remember the underlying command, or having to reference the Git aliases on your own computer. …
Feel free to clone my sample GitHub repository and follow along when reading this blog 👍
Two of my favorite tools for automating my workflow when developing projects — both personal and professional — is the power-couple of tox
and poetry
. These two tools combined make linting, testing, and virtualizing my code across multiple versions of Python a cinch!
I’ve grown to really despise managing multiple versions of Python and Python packages outside of a Python virtual environment. After just one or two projects with a handful of dependencies, it becomes a tangled mess to keep everything working right. Modifying a dependency in one project should not affect other projects on your machine in any way. Dependencies and versions of Python between projects should be idempotent. …
Dependency inversion — a specific implementation of inversion of control (IoC) — is an object-oriented software design principle that creates less fragile code and makes writing tests easier by decoupling lower-level classes from higher-level classes. It accomplishes this feat by passing objects into a class’ constructor as parameters instead of instantiating new objects inside of the class itself. This article isn’t intended to espouse on the merits of dependency injection — that’s already a well covered topic — but to demonstrate an example in Python along with how to write unit tests for code that uses dependency inversion. …
About