News for hackers. Stuff that matters.
Re:Unit Testing Doesn’t Affect Codebases the Way You Would T... by valuearb on Sunday November 26, 2017 @09:37PM (#15784428)
Unit tests are a poor way to validate code behavior. 30+ years of development has taught me that validation tests within the code itself are far better.

1) They run whenever the product runs. Good logging code tells you when it fails, even on customers devices.

2) By being part of the production code, they are far easier to keep up to date as the code changes even through refactoring.

3) They don’t force you to change anything about how you code.

Re:Unit Testing Doesn’t Affect Codebases the Way You Would T... by jacob019 on Monday November 27, 2017 @11:28AM (#15788503)
Agreed. I like to test the validity of a function's input and throw an exception if it fails. It catches most regressions with a nice error message.
Re:Unit Testing Doesn’t Affect Codebases the Way You Would T... by mastox on Sunday November 26, 2017 @10:54PM (#15784689)
Not sure I understand. Can you give an example?