That reminds me of a conversation that I had with a programmer 20-odd years ago. Someone he knew had programmed the
PLCs controlling some big hoists in a carpet factory. The factory was about to be opened but the bosses wanted a demo of the machinery in operation first. All was going well, until a massive roll of carpet was to be lifted up by hoist which ran along a track in the roof of the building. Up it went, and then it started its journey towards the other end of the track. As it neared its destination, instead of gracefully slowing to a stop, it began a manic acceleration which culminated in the carpet roll hitting the gable end and demolishing it!
TBH, I don't know what actually happened next, but I like to think of the bosses standing there dumbstruck, while the programmer standing behind them mutters "
Well, THAT was not supposed to happen!"