Not that it will avoid errors on the part of the implementor, but if you do a thorough reading of the classic "Applied Cryptography" by Schneier, he pretty much covers all these problems. He covers all the issues such as ECB vs CBC, IVs, HMACs, etc. It's the definitive book on the topic and anyone who is interested in cryptography should buy this book.
No, he famously and openly admits to not doing this. _Applied_ is not a definitive book, and _Practical Cryptography_ (now _Cryptography Engineering_), which he co-authors, starts out with a disclaimer to this effect.
Interesting, I'm admittedly a few years out of date, the last time I used the book heavily was about 10 years ago... I'll have to pick up this new(er) book.