News for hackers. Stuff that matters.
Re:Ask HN: What change in your programming technique has bee... by dmux on Thursday January 23, 2020 @03:41PM (#22131738)
How have you achieved a balance between too little and too much testing? I worked on a project that had a ton of tests, but they seemed to be "over fitted."
Re:Ask HN: What change in your programming technique has bee... by tcbasche on Thursday January 23, 2020 @11:03PM (#22135303)
The trick is to get something covered to the point where you could comfortable refactor the bejeezus out of it, and know that it's still working from a higher level. The test should be how you know the code works, and under any situation.

That is, you don't need to test that inbuilt standard library stuff is working as expected (e.g does a string reverse) but rather, does the combination of possible inputs match your expectations?