Developers, despair: Half your time is wasted on bad code

Developers, despair: Half your time is wasted on bad code
But which half? Too much effort by developers is wasted on debugging, maintaining and fixing bad code.