On 01/01/2013 11:32 AM, Alexander Schreiber wrote:
Having throw-away code in such a system will increase
the risk of errors
and the cost of maintenance quite a bit. Which is why people being serious
about code quality usually have code commits gated by code reviews.
I once wrote a text editor as a throw-away code project in order to
learn the operation of some of the more arcane instructions of a
particular machine. It was full of odd vector instructions and
satisfied me that I could understand the descriptions of the
instructions detailed in the hardware manual. Shortly after that, I
moved on to another venture.
Imagine my surprise when I discovered fully 10 years later, that my
little learning project was still being used as the standard editor!
The instruction set of the architecture had changed, with many of the
instructions that I had used being tossed on the scrap heap. Someone
had very carefully replaced them with subroutines that did the
equivalent thing.
I was dumbfounded and horrified.
Moral: If you write throw-away code, keep it to yourself and don't let
another breathing human being see it. They might try to use it.
--Chuck