@neothefox As I've gotten deeper and deeper into IOC, DI, and unit testing, I've found that private methods are a code smell. Why? Because to effectively test the private method, you have to write bigger and more complicated tests around whatever code is calling the private method.

Dangerous programmers know how to invoke private methods using tricks, so rather protect others from themselves, I'd rather protect myself by writing good tests on my code.

In my code almost everything is public now.

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!