# [2019.07.10] Ode to Unit-testing Once upon a time, there lived a little Data Scientist. He had quite a good understanding of LightFM model for recommender systems and wanted to reimplement it using PyTorch since the model's architecture was very close to those of neural networks. And our little Data Scientist wholeheartedly believed that his code in deep learning framework strictly replicated the original LightFM behaviour. But the model didn't train well. And the little Data Scientist spent several working days looking for a reason why and trying different things. Then he wrote a simple unit-test to check the coherence of the neural model with the classical one and found the bug, really stupid and ugly one, in his code. The end. A word to the wise: if don't have a test for some property of your code, with high probability the property doesn't hold.