Do you have private static methods that help you break your algorithms down into smaller parts? I do. Every time I write a new method, I realize that it can be a new class instead. Of course, I don't make classes out of all of them, but that has to be the goal. Private static methods are not reusable, while classes are—that is the main difference between them, and it is crucial.
Here is an example of a simple class:
There is an obvious code duplication, right? The easiest way to resolve it is to introduce a private static method:
Looks much better now. But what will happen if we have another class that needs the exact same functionality? We will have to copy and paste this private static method
encoded() into it, right?
A better alternative would be to introduce a new class
Encoded that implements the functionality we want to share:
Now this functionality is 1) reusable, and 2) testable. We can easily use this class
Encoded in many other places, and we can create a unit test for it. We were not able to do that with the private static method before.
See the point? The rule of thumb I've already figured for myself is that each private static method is a perfect candidate for a new class. That's why we don't have them at all in EO.
By the way, public static methods are a different story. They are also evil, but for different reasons.