2 Mar 2020              • Piotr Migdał                •              [programming]               [typescript]               [tests]

How I Learned to Stop Worrying and Love the Types & Tests

submited by
Style Pass
2021-06-29 01:30:05

2 Mar 2020 • Piotr Migdał • [programming] [typescript] [tests]
also at Quantum Tensors Medium How I Learned to Stop Worrying and Love the Types & Tests on 2 Mar 2020

It is fun to write fast without constraints, and run code in a flash. That is why I fell in love with Python and the Jupyter Notebook environment, a great tool for prototyping and interacting with data. However, interactive notebooks fall short when you want to write bigger, maintainable code. See the What’s wrong with computational notebooks? survey:

Restructuring and cleaning up code (refactoring) is being listed as one task notebooks are not meant for. For further reading on the pros and cons of notebooks, see The First Notebook War.

While I knew the concept of tests, I got discouraged by some overzealous test-driven development practices which make feature development slow and experimentation — even slower. In data science, you pretty much need to take an iterative approach to data. Creating meticulous tests before exploring the data is a big mistake, and will result in a well-crafted garbage-in, garbage-out pipeline. We need an environment flexible enough to encourage experiments, especially in the initial place.

Leave a Comment