At the start of my software engineering career (decades ago) I was given the task to advise another engineer on how to use the interfaces for our operating system to write a device driver. This was about 6 months before the release. After a couple of months, I advised my manager that this other engineer was ignoring my advice and dodging calls. I told them that though the engineer knew the device inside and out, he was flailing on writing the driver for our system. My manager told me to not worry. After many versions of the driver, all of which crashed our system, with about three weeks to go before it had to be released, my manager assigned me the task of rewriting the driver.
After two weeks of working weekends and nights, with my manager constantly checking my progress and trying to pressure me to work faster, I told my manager I had the driver done on a Friday afternoon. Because of the tight schedule, he asked me to do a code review with a senior engineer. That senior engineee pointed out a couple of good changes to make, but also one that I knew was wrong and told him.
Late in the day my manager asked me how the code review went and I told him that there were a couple of good suggestions I had implemented and they worked great. I also told him that one of the suggestions was bad and would cause a system crash. His response was “make that change”. I said I knew it would crash the system and tried to explain why. He got exceptionally angry and told me he didn't care and that the other guy knew more than I did (which admittedly he did). Then he said “don't go home until you've made the change”.
I was very annoyed by the manager’s attitude. I had already been putting in long hours over the last couple of weeks to recover from his bad decision to rely on an engineer whom I had told him was not going to succeeed. So, I stayed late making the change and running tests. Sure enough the system crashed. So, I went home and enjoyed my weekend.
On Monday morning, my manager came to me with a growling attitude and asked if I had made the change the reviewer suggested. I said “yes”. He asked how it worked out. I told him “the system crashed as I had predicted.” He asked if I had worked over the weekend to fix it. I told him “no, I just did what you told me to do and then enjoyed my weekend.” His faced turned bright red and he started to yell at me to make it work. I told him that I had already removed the change and scheduled time on the test system to rerun the tests. If looks could kill, I would have been dead. I got some satisfaction at the time paying him back for his bad decisions and crappy attitude.
The postscript to that story is that a bug was discovered in the driver after it was released. The bug was related to the problem the senior engineer had suspected existed, but for which he suggested an incorrect fix. My passive-aggressive action in response to the rude and abusive treatment of my manager ultimately resulted in a bad experience for our users. The silver lining is the experience taught me to be careful to avoid being pushed into and pushing others into malicious compliance.