Mark of a mature programmer

This quotation is attributed to Bram Cohen, the inventor of the BitTorrent protocol:

The mark of a mature programmer is willingness to throw out code you spent time on when you realize it’s pointless.

I complement that with this:

A mature programmer, when he starts working on a sufficiently large and potentially legacy system that has some broken parts, ugly warts, and code smells, avoids the temptation to rewrite it from scratch, and fixes it instead.