Graham Wheeler's Random Forest

Stuff about stuff

Unit Tests that Don't Suck

Introduction This post is based on a talk I gave to my team in an effort to establish a common approach to thinking about unit tests. The existing code base we had suffered from a number of problems relating to how tests were being written; despite good intentions, it can be easy to do testing badly. In particular, here are some of the things I observed: a massive overuse of dependency injection: pretty much all dependencies of all classes were being set up using DI.

A Python Crash Course

I’ve been teaching a crash course in data science with Python, which starts off with learning Python itself. The target audience is Java programmers (generally senior level) so its assumed that things like classes and methods are well understood. The focus is mostly on what is different with Python. I teach it using Jupyter notebooks but the content is useful as a blog post too so here we go. The other parts are: