I went to make a change today.
I was changing something simple (or so I thought); I was just improving an error message.
Unfortunately, the particular code that issues that particular error message only runs on certain platforms.
Which means, in order to test that code, I had to test it on that platform.
Happily, I can access that particular platform, as it is able to run as a guest virtual machine on my main development system.
However, running a guest virtual machine is annoying, because it is very slow and expensive; I hate using the virtual machines for development because they are 8x-15x slower than using my main workstation.
So I almost made and submitted the change without testing it.
But then I stopped, and calmed down, and realized that That Would Be Wrong.
So I started up the guest virtual machine.
And, since it's Windows, I knew that this meant that Windows would immediately demand to run Windows Update, and download and install a month's worth of patches, and Oracle would immediately demand to run Oracle Java Updater, and download and install a month's worth of patches, and Adobe would immediately demand to run Adobe Reader Updater, and download and install a month's worth of patches.
And so forth.
So after I started up the guest virtual machine, I went and brewed a new pot of coffee, and patiently waited 10 minutes for all the updating to occur, while I drank my cup of coffee.
And then I made my change.
And tested it.
And, sure enough, it didn't worth the first time.
So, I figured out why, and fixed it, and tested it again.
And it worked, so I submitted it.
Which is, of course, why you always have to test your change. Even after 35 years developing software, I still find that my code doesn't always work the first time I try it.
You always have to test your change.
In an ideal world, I'd like it to be a lot easier to test my change on many platforms.
But I haven't persuaded the people who hold the purse strings to make this happen, so for the time being it's very expensive for me to make a change that is specific to a particular platform.
So instead I work very hard to make as much of the code as possible platform-independent, and have the smallest amount of code possible be platform-specific.
It was just my bad luck in this particular case that I had to work on a bug in that platform-specific code.
That's the breaks, in life.
At least the bug is fixed.