News for hackers. Stuff that matters.
Re:Why Most Unit Testing Is Waste [pdf] by BlackFly on Tuesday October 31, 2017 @08:32AM (#15592712)

    class AccessCountedInteger {
        private final int value;
        private int accessCount = 0;

        AccessCountedInteger(int value) {
            this.value = value;
        }

        public int getValue() {
            accessCount++;
            return value;
        }

        public int getAccessCount() {
            return accessCount;
        }
    }
This unit has side effects on the method getValue() that impact what is returned by getAccessCount(). While it is contrived, if you are making something following the builder pattern, you will in general have a lot of side effects from all of the methods called on the final build() method. This is quite amenable to unit testing.
Re:Why Most Unit Testing Is Waste [pdf] by lmm on Tuesday October 31, 2017 @08:55AM (#15592838)
That is not the kind of side effect that Haskellers would acknowledge as necessary (and I'd see it as a bad idea). We can call it a "side effect" but I think there's a qualitative difference between that and something like file I/O or async.
Re:Why Most Unit Testing Is Waste [pdf] by mempko on Tuesday October 31, 2017 @09:41AM (#15593134)
Why in the hell would you write a unit test in your contrived example? I mean look at it!