Hacker News new | ask | show | jobs
by leghifla 901 days ago
Just a fun anecdote on end-to-end testing I did 20 years ago while working on the compression of images.

Some parts of the algorithm were easy to test, others very hard. On the easy part was loading and saving the file. I tried to test as best as I could, but the lossy part was not really tested.

Then time to benchmark the algo on some images. The results were kind of OK, but some images compressed much better than others at low bit-rate, while the content did not look much different.

On square images, everything was fine. On rectangular ones, at high-bit rates it was somewhat fine, but strange patterns like ghosts of another part on the image started to appear for lower and lower bit rates.

Of course, I searched on the mostly algorithmic parts what was going on, and failed. Only after a holiday break and fresh eyes did I found the root cause: inversion of height and width in some part of the loading AND saving.

I had "end to end" test of the loading and saving, but the error was symmetric, so undetected. Young engineer error...