• You are very correct about teaching. I do believe there is a place for a very simple bit of code to explain how to do something. However, those should be limited in scope. For example, VB Script help contains a lot of examples on how to use the File System Object. An example with 3-4 lines of code restricted to just what is minimally required to get it working, can be helpful to someone using it for the first time. Any larger examples, for instance an entire script, would be better off filled with correct coding practices. Every class I have ever taken uses only the simplest code, no error checking, no security, nothing. I can see showing a short example to introduce the class to a function, but actually the class would benefit by having real world examples including best practices for security.

    I have to point out something you said that I do not believe is reflective of reality. Not only has china been attacking us for quite a while, including stealing data from JPL back under Clinton, but they are doing so much that a recent honey pot was found and attacked by them within days. Our "allies" have been hacking our infrastructure for years as well, including France, Germany and others. Britain may be "formerly" announcing their plans, but don't believe for a second that they have not been engaged in this for quite a while. Countries have hacked into our corporate databases and provided information to companies in their own countries in order to gain an advantage.

    The only thing "new" is that people are starting to talk about it a bit more. I don't want to get into a debate about right or wrong, or which side is doing what. The fact is that our leaders have known about these risks for quite a while, and have decided to ignore the attacks. Our corporate leaders don't want to spend the money. Google is a great example as they just decided to start encrypting data between their data centers due to hacking attempts (quite successful ones) by our own government! They knew of the risks when they chose the path they went down, and only now are they doing anything because they are concerned about a loss of business.

    Good coding practices are a necessity. Unfortunately it is far too late to start. By the time any country or corporation fixes things, they will have already suffered loss in some form.

    Dave