Re: The problem with testing
..."many programmers are incapable of doing that, especially for code they written"...
That applies to ANYTHING you have written. You do not read WHAT you have written (when checking for errors), but what SHOULD have been written, or what you intended to write, hence missing the error completely.
A substantial part of my first job involved creating (from templates, to be sure, but we had to modify it) legal contracts, where absolutely everything must be correct to avoid possible problems later on. I was fortunate to have had very good mentors and it was drilled into me that reading your own writing (no matter how perfect you thought it was) had to involve the following steps:
Read for spelling mistakes.
Read for grammar mistakes.
Read for logical mistakes.
Read for numbering mistakes (paragraphs/sections).
Read for cross-referencing mistakes (where you refer to something in the same document, e.g. page number, paragraph number, section number, et cetera. These things regularly change).
Read for meaning.
Read for consistency.
Check that your indentation is consistent and correct.
Check your apostrophes (dotting the i's and crossing the t's).
Check your capitalisation.
Let it lie for a day or two (not always possible) and re-read.
Once it is perfect and there are absolutely no errors, give it to a colleague or two to check.
Correct all the errors they found and repeat.
And then, six months down the line when you scan through it, the unseen and unfound errors leap out at you...
Not the most exciting task to be sure, especially if you are under pressure and short of time, but it has to be done. (Bizarrely, I used to enjoy the process once started, despite the initial reluctance to get going, since I am a troubleshooter, really. Troubleshooting is what interests me, not necessarily the subject matter (although it does make it easier and more enjoyable if it involves something that I am interested in as well)).