re: 🍿What was the most remarkable πŸ¦— bug you have ever had to fix πŸ‘©β€πŸ”§? VIEW POST

re: There was a point in time where a particular function in MariaDB treated the value of 0 as invalid. Any other integer, positive or negative (within...

Funniest, and one I'm probably most well known for on Twitter?

In my tired coding binge one night, I wrote the following in C++

x = x++;

I just wanted x++, but was too tired to realize what I had done. This is an undefined operation in C/C++. It just so happened that the compiler I was using at the time did what I expected. But then when I used the exact same, already "verified to work" code on another compiler, or even a different version of the same compiler, the code would fail.

That was also in the very early days of ARM embedded programming. There was little by way of ability to debug anything on the platform. Each iteration of the code required not only compiling it, but then flashing it to a custom flash drive, and then inserting that flash drive into the desired hardware. Development and testing was painfully slow!

Code of Conduct Report abuse