With respect to Train as you fight. That's another way of saying "practice makes perfect".
With respect, the complete maxim was taught to me as "Train as you fight, fight as you train." If you expect to engage in combat in full chemical protective gear, you must train in full chemical protective gear. If your training prescribes that you must use a checklist to launch the alert fighter, then you must use the checklist when the klaxon goes off.
Relate this to programming:
- Your program, application, or system must pass security certification and accreditation. So don't build your work with hard-coded, plain-text passwords.
- Your work is going to have to meet the standards of Sarbanes-Oxley, plan for it and program accordingly.
- QA testers are going to evaluate your work against requirements, write code that satisfies requirements.
For those of you old enough to remember Sgt Rock and his Howlin' Commandos, "Nuff said"