I dispute the notion that a technology can be assigned a moral value. Morality comes from humanity, not from the technology itself. For example, a gun can be used to free people from tyrants, or it can be used to enslave them. Likewise, software and information can be used to cure, to build community, or to convey critical information so that a utility can provide more reliable service — or it can be used to spread rumor, to invade privacy, or further organized crime.
Learning to code is a lot like learning good marksmanship with a gun. The skills can be used for serious evil as well as good.
So your thesis can be summed up with one sentence:
Learn to code so that you can design stronger software and weather attacks better.
Could it be that the NRA has a valid point? Code doesn’t hurt people. People hurt people.