News for hackers. Stuff that matters.
Re:Warming Up to Unit Testing by crimsonalucard on Tuesday February 25, 2020 @09:26AM (#22413447)
It's a sign that your programming methodology is so error prone that you need unit tests to catch errors.

Most of the code I write doesn't need unit tests (automated or manual) because the way I programmed it reduces the complexity of the program to the point where my intuition and the type checker alone will cover correctness.

Basically another way to put is... the code doesn't have any errors in the first place so any form of unit testing isn't really needed.

Note that I am talking only about unit tests or tests that cover pure internal logic. Anything that touches IO or anything external becomes an integration test and That is not what I'm talking about.

Re:Warming Up to Unit Testing by bobm_kite9 on Tuesday February 25, 2020 @09:50AM (#22413606)
Can you point us to some code that demonstrates how you do this?
Re:Warming Up to Unit Testing by crimsonalucard on Wednesday March 04, 2020 @04:15PM (#22488217)
Haskell code.

I would try coding some solution in haskell with minimal IO. You should only need the type checker to verify correctness.