Since the Trustworthy Computing initative Microsoft developers have been writing code following the guidance and coding practises documented in "Writing Secure Code". The book is now in it's second edition which includes practical advise following experience