The “One True Way”

2 min read Original article ↗

aYawningCat

Press enter or click to view image in full size

Press enter or click to view image in full size

Press enter or click to view image in full size

Press enter or click to view image in full size

Press enter or click to view image in full size

Press enter or click to view image in full size

Press enter or click to view image in full size

I’ve always had an uneasy feeling towards unit tests despite knowing of their benefits. It wasn’t until after I read Ishmael that I could articulate why though.

The reason is that for the most part, unit testing is not used as a growth inhibitor that allows for a diverse ecosystem to live in harmony. The main goal being driven behind almost all testing initiatives is to implement a form of gatekeeping and the proliferation of “One True Way”. There’s almost always an uneasy tinge of self-righteousness somewhere.

It has also helped me understand why I personally feel some code is “good” and some is “bad”. “Good” code has modules with simple interfaces that limit their growth, forcing the creation of an ecosystem where things can work together well and failures are contained. “Bad” code is either an implicit monolith where things are broken down but still tied together because of dependency chains or overly centralized with brittle abstractions where the higher order effects of changes can’t be predicted. (but are super efficient if you follow all the rules and stay within the dotted lines)

This goes far beyond testing and coding though and has helped me understand why diversity is truly important and why it is often at odds with a mindset of growth at all costs.

I highly recommend giving Ishmael a read, it’s available online for free. This chapter in particular left quite an impression.