A few points to share based on having worked in QA full time for the better part of a decade now:
1. Code can only ever tell you what the code Is doing - Use documentation to clearly detail what it is supposed do to, and why you want it to do that.
Teams that embrace detailed understanding of the what and why of their codebase have shown a far lower bug rate and overall long running productivity levels than teams who focus purely on 'productivity' and getting more code done faster.
One of the biggest things I've come across that seemed to reduce bugs during a project's lifetime: Record WHY you decided to do something, and WHY you make changes. Assume that you're an idiot who will forget things, because if you're a human then honestly you are. And if you don't think you are an idiot who can forget things as a programmer, then you probably really are an actual idiot who will contribute loads of bugs to projects over the years.
If you think you are too busy to take five minutes out of your day to write out some detailed thoughts about the what and the why of the code you're working on, then think about the five hours, or days, you're likely to spend trying to unravel things and track down a bug because you've misunderstood something.
2. Code small, code carefully, code only what you actually need, and analyse how a section of code might fail to do what you intend.
Poke at things from different angles, do not assume they will always function the way you expect at first glance.
3. Have other people USE your software as early as possible.
- You cannot fix what you don't realize is broken. Other people will break things in fun, new, and unique ways that you never dreamed of. Embrace it, and learn to address it.