Today's reading assignment for programmers: ewd's manuscripts
A good starting point is not the beginning, but ewd 249, Notes on Structured Programming
"Program testing can be used to show the presence of bugs, but never to show their absence!"
I would never suggest stealing a 42-year-old book, but there's legal and not-legal PDFs of this easy to find: