Jacob Tomlinson's profile picture Jacob Tomlinson
Home Blog Talks About

When to rebuild things that already exist

PyCon UK 2023 Cardiff, UK Talk 25 minutes Abstract Slides Video Photos

Abstract

This year I built a library that already exists. The existing solutions didn’t quite meet my needs, I wanted something that ticked all of my boxes. When thinking about building something new people referred me to xkcd #927. But I did it anyway.

For the last 6 years I’ve maintained dask-kubernetes, a Python library for deploying Dask clusters on Kubernetes. In that time I’ve tried nearly every Python Kubernetes client library on PyPI. In fact dask-kubernetes today uses over five different libraries and tools to interact with the Kubernetes API. Each one has different strengths and weaknesses, features and bugs. To satisfy all of the needs of Dask Kubernetes there is no one library that can do it alone.

Should I continue to build wrappers and shims in dask-kubernetes to homogenize the various dependencies? Should I contribute to an existing one to fill in the blanks? Or can I build one library to rule them all?

Earlier this year I decided to build exactly the library I needed. Not a perfect universal library to supersede everything, not a wrapper for everything that exists. Just the library I need to solve my problems, to reduce complexity in my projects and to help me learn the things I need to know to maintain these projects into the future.

In this talk I will dig into my perspective on when to wrap a dependency, when to contribute to a dependency and when to build a new dependency from scratch.

Pictures

PyCon had a fantastic photographer who took some nice pictures of me.

Me standing on a stage at PyCon UK holding a clicker
Picture by Mark Hawkins for PyCon UK.

Me standing on a stage at PyCon UK with a slide saying “The Problem” which explains that we had too many Kubernetes Python libraries in the dask-kubernetes project
Picture by Mark Hawkins for PyCon UK.

Me standing on a stage at PyCon UK with a title slide saying “When to rebuild things that already exist”
Picture by Mark Hawkins for PyCon UK.

Me standing on a stage at PyCon UK with a slide saying “Dask Kubernetes, a tool for deploying Dask clusters on Kubernetes”
Picture by Mark Hawkins for PyCon UK.

Me standing on a stage at PyCon UK showing a meme about Python versions
Picture by Mark Hawkins for PyCon UK.

Me standing on a stage at PyCon UK
Picture by Mark Hawkins for PyCon UK.