Get the latest tech news
Counting Sheeps with Contracts in Python
I find code contracts fascinating, these are development tools that allows you to specify the behavior of your system, making it safer, easier to maintain, and a breeze to debug. They play well with your usual code-quality tools and are absolutely addicting once you start using them!
Implementation doesn’t matter, which makes that a perfect tool for math-oriented people, as the joke goes: a mathematician sees a burning trash in the street, they go “ah, not interesting, I know how to solve that” and go along with their day without extinguishing the fire. In a next blog post, I’ll explain how I implemented these by using some python dark magic, and how DbC can be used in parallel to your usual dev techniques to unlock tons of productivity gains during coding and unit testing. This is my first real blog post, so I’m very interested in your opinion, and I’ll happily oblige by answering any question or comment you can have, so don’t hesitate to put them below or send them to me directly (contact at the bottom).
Or read this on Hacker News