The most amazing thing, is that at home I have a stupid script.
Initially, it had only a few lines (well, the first version had only one line). During time, it accumulated changes, but because it was something small and stupid, I never thought about adding tests. A few months ago, it started to become more and more complex. And it reached the point that I wanted to ditch it, and start over. So... while using the legacy one, I started to create the new one, with testing, good design, pretty and so... but the old one kept evolving —with pain— and the lack of time, made me stop the new version.
So now, that script, that has around 200 lines, still lives. And because it does the job, and it seems always do the job (yet sometimes it seems to misbehave), I never save time to rebuild it.
Now thinking while writing, probably... I should clean it a little bit. But without tests, I am afraid of breaking something... (there are other users at home) so...
PS: The content of the post is based on more than ten experiences in companies through my career. About the script, that is something that I just realized that I had fallen into my own trap.