Peter Jones has been on some Software Testing training and raised the question of “why companies are unwilling or unaware of the cost of not engaging in proper testing practices” (paraphrased heavily)
I was going to leave a comment, but it grew into its own post size blob so here it is:
> So what as programmers can we do to make this situation better?
Does part of the problem stem from the method under which software is produced. i.e. rushed and time/money constrained. With this in mind developers are inclined to give estimates that err on the side of getting it working. Not providing a framework of validation to prove the code works and assisting the next developer, due to the nature of the payoff of “delivery now”. Costs incurred by the next developer are swept under the “last developer is sloppy” rug, and the cycle continues.
With this is mind management also want the cheapest option now, developers are paid/rated by success now, and most people’s morals are willing to be traded. Maybe “good” developers think if managers are willing to deploy systems with insufficient testing then the developer is willing to milk the project then move on. Maybe management are willing to take this line, been willing to get finical results today and risk tomorrow, rather than risk both.
It also may take developers that have a better understanding of financials and complete project life cycle costs to stand up and push for change. I’ve seen also the situations where the “cost” to fix problems in a live system have bean cheaper than testing up front. In situations that this has occurred, I would believe the errors were derived from specification errors/gaps that would have taking great amounts of testing before those areas where ‘what-if’ed.
So it comes down to management understanding the benefits to be gained from testing, developers committing to providing (unit test) tests for there work, and supporting the testing efforts of other “testers”. I have also found in the past that testing is one the invisible things that get sacrificed as time gets tight, which is where I believe the TDD/XP ideas helps by delivering parcels of tested functionality.