News for hackers. Stuff that matters.
Re:It's probably time to stop recommending Clean Code (2020) by throwaway2037 on Thursday May 27, 2021 @11:00AM (#27303927)
My style is similar about tiny interfaces: My usual style in Java is an interface with a single method and a nested POJO (struct) called Result. Then, I have a single implementation in production, and another implementation for testing (mocking in 2010s forward). Some of my longer lived projects might have 100s of these after a few years.

Please enjoy this silly, but illustrative example!

public interface HerdingCatsService {

    /*public static*/ final class Result {
        ...
    }

    Result herdThemCats(ABunchOfCats soMuchFun)
    throws Exception;
}

There are no comments on this comment yet.