Tools I Enjoy#
Python#
Ruff#
Ruff is a python linter and formatter that completely replaces black
, flake8
, and isort
. It completely blows them out of the water in terms of speed and quality of error messages. The team behind Ruff (astral), is also very responsive to issues and moves fast to fix them.
Don't know which rules to enable?
If you are integrating Ruff into an existing project, I would follow astral's recommendation of starting with a small set of rules. But if you are starting a project from scratch, I usually start with ALL
and ignore the few that I don't like, as they come up, like so:
uv#
uv is a python package manager that is a drop-in replacement for pip
, poetry
, etc. It is also developed by the same team as Ruff (astral). Just like Ruff, it blows the competition out of the water in terms of speed, and the team ships updates at breakneck speed. One of the most exciting features that I am looking forward to is workspaces. It is a new concept in the Python world, so it is a little rough around the edges, but I am excited to see where it goes. My hope is that it will make dependency management in monorepos a breeze.
marimo#
marimo is a notebook development framework that I believe will be integral to the future of data science. It is similar to Jupyter notebooks, but aims to be more robust and fix some of the main flaws that Jupyter has. It has deterministic execution, so if you change a cell, all cells that depend on it will automatically update, giving it full reproducibility! It also has reactive UI elements, so you can create dashboards right in the notebook. The notebooks are stored as .py
files, so they are much easier to version control and diff. There are many more features, and they are young, so I am excited to see where the project goes.
DevEx#
Pre-Commit#
[pre-commit] is a framework for keeping your code well formatted and linted. At its core, it's a simple tool that runs a set of checks on your code before you commit. It is highly configurable and flexible, so you can run it on any language, using any set of tools. It is very easy to set up, and manage. A lot of major tools provide hooks, so you do not have to craft them from scratch.
While I understand some people's aversion to pre-commit hooks, I find their concerns can be addressed easily in a few ways:
- Only run the checks that are fast and non-intrusive, don't expect it to run all checks. For example, I mainly only run formatters, linters, and typecheckers.
- All checks can be run manually, instead of at commit time, so it doesn't have to get in the way of your work flow.
- Run pre-commit in CI, so that any issues in CI can easily be run locally as well.
Renovate#
Renovate is an automated dependency management tool. It searches your repo for out of date dependencies and opens PRs on your behalf to update them. It works for most languages and frameworks, and even works in private repositories for free. It is highly configurable to work with your exact needs. It takes a while to figure out what works best for you, but once you do, it provides amazing benefits without getting in your way.
If you want to learn more about why Renovate, you can read this blog.
And if you are concerned about supply chain attacks, I recommend looking at bodinsamuel/renovate-automatic-branch. It allows you to push all renovate PRs to a separate branch, and then review them all as a bunch at a cadence you prefer.
Don't know where to begin?
Renovate has so many configuration options that it can be overwhelming. They even have a reading list organized by skill level because it's so much. After installing, I would recommend just starting with their onboarding guide, seeing what happens, then iterating from there. It is not worth going through all the reading until you have an exact question you need answered.