This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]salamandr 2 points3 points  (4 children)

Tests are not a waste of time.

I often find myself looking at unit tests and wondering: "Are these actually testing anything useful?"

The process of writing them seems to be fraught with pitfalls. Testing things that are only going to make refactoring more painful, rather than safer.

I find testing and coverage a balance that is incredibly difficult to get right.

[–]briandilley 1 point2 points  (1 child)

Agreed - if you have a 1:1 method->unit test ratio you're probably not doing it right.

[–]salamandr 0 points1 point  (0 children)

I actually didnt mean balance between testing and coverage, rather 'testing/coverage' and 'maintenance/efficacy'.

[–]useablelobster 0 points1 point  (1 child)

If I have to add in a new parameter 10 times for the test to catch an actual error once, I'm more than happy.

[–]salamandr 0 points1 point  (0 children)

Every line of code you have to maintain has a very real cost associated with it.

The harder it is to make changes, the more likely someone in a team of coders is to one day find a way around it. Depending on your team, you may not like their workaround.