Blogmark

Calling private methods without losing sleep at night

via jbranchaud@gmail.com

https://justin.searls.co/posts/calling-private-methods-without-losing-sleep-at-night/
Software Development Ruby on Rails

A little thing I tend to do whenever I make a dangerous assumption is to find a way to pull forward the risk of that assumption being violated as early as possible.

Tests are one way we do this, but tests aren’t well-suited to all the kinds of assumptions we make about our software systems.

We assume our software doesn’t have critical vulnerabilities, but we have a pre-deploy CI check (via brakeman) that alerts us when that assumption is violated and CVEs do exist.

Or as Justin describes in this post, we can have some invariants in our Rails initializer code to draw our attention to other kinds of assumptions.