Saturday, September 26, 2015

Dead Code; Is it Really Harmful?

The answer is YES, and can put you out of business in 45 minutes, like what happened with Knight Capital Group!

Recently, I have been watching uncle Bob explaining his famous SOLID principles, and he mentioned a very interesting case of a bug. The code mistakenly set a flag which enabled the execution of a piece of dead code.

The side effect of this execution is 440 million USD's losses which is 5 times the market value of the company :)

Further read about this case:

http://www.bloomberg.com/bw/articles/2012-08-02/knight-shows-how-to-lose-440-million-in-30-minutes

1 comment:

microsoft erp said...

Although redundant code can cause several problems such as memory consumption, its removal might be even worse as it may introduce unintended bugs and viruses. We need to think twice before we get rid of the dead code in our app.