In the early days, compilers for C and such had options that would check for buffer overflow. So many security issues these days seem to be due to the ability to overflow a buffer and get into memory areas the hacker isn’t supposed to have access to.
Maybe there needs to be more effort put toward making applications bullet-proof in the beginning, rather than the constant patching that goes on.
We could stop writing so much stuff in C? Ruby, Python, Java, and others are immune from buffer overflow.