Daily Archives: 2020-04-02

Dropbox’s journey to type checking 4 million lines of Python

Source: OSNews

Article note: "We decided we wanted to pay for the runtime overhead of a dynamically typed language, and the programmer up-front effort of a statically typed language, but without getting all the benefits of static typing."

Dropbox is a big user of Python. It’s our most widely used language both for backend services and the desktop client app (we are also heavy users of Go, TypeScript, and Rust). At our scale—millions of lines of Python—the dynamic typing in Python made code needlessly hard to understand and started to seriously impact productivity. To mitigate this, we have been gradually migrating our code to static type checking using mypy, likely the most popular standalone type checker for Python. (Mypy is an open source project, and the core team is employed by Dropbox.)

This post tells the story of Python static checking at Dropbox, from the humble beginnings as part of my academic research project, to the present day, when type checking and type hinting is a normal thing for numerous developers across the Python community. It is supported by a wide variety of tools such as IDEs and code analyzers.

I recently came across an article complaining about Python’s dynamic typing and couldn’t quite believe this was still the case. As it turns out, nowadays there is indeed a standardized way to do write type annotations and to type-check prior to runtime using mypy, all the while being driven forward by the good folks at Dropbox (which includes Python’s Benevolent Dictator for Life Guido van Rossum). This article provides a fascinating insider insight into the history of type-checking in Python and how it evolved in symbiosis with Dropbox’s codebase.

Posted in News | Leave a comment

What Everyone’s Getting Wrong About the Toilet Paper Shortage

Source: Hacker News

Article note: Oooh. It may be partly all the people who are no longer pooping on company time with company institutional-grade TP causing a market ripple. Interesting. That makes sense.
Comments
Posted in News | Leave a comment