From The Atlantic:
The underlying problem here is that most software is not very good. Writing good software is hard. There are thousands of opportunities to make mistakes. More importantly, it’s difficult if not impossible to anticipate all the situations that a software program will be faced with, especially when–as was the case for both UBS and Knight–it is interacting with other software programs that are not under your control. It’s difficult to test software properly if you don’t know all the use cases that it’s going to have to support.
Though there are a number of angles to this piece (and you should read it all), here’s another nugget:
This is one problem that regulation probably can’t solve directly. How can you write a rule saying that companies have to write good software?