HACKER Q&A
📣 Wowfunhappy

What is the most amusing bug you've encountered?


A recent HN thread about Hackintosh gave me the opportunity to recount a favorite anecdote: Many years ago, I was browsing a Hackintosh forum, and I came across a thread titled something like:

> Help! Audio only works while I'm moving my mouse!

This is my all-time favorite technology problem. What's yours?


  👤 otras Accepted Answer ✓
I was working on a frontend issue related to CSS and shadows. There was a card element with a photograph on the left and a white container on the right with some information, and it looked like the shadow below the card was a different color below the photograph than below the rest of the card.

     __________
    |photo|info|
    |_____|____|
    [  shadow  ]
After debugging the CSS and inspecting every element, I couldn't figure it out. I ended up taking a screenshot, zooming in to the pixels in GIMP, and using the color picker to see just how different they were, but it turned out the shadow was the same color! It was the same principle behind the checker shadow optical illusion (https://en.wikipedia.org/wiki/Optical_illusion#/media/File:C...), where the darker side (the photograph) made the shadow look lighter than the shadow below the lighter side.

Definitely made for an interesting writeup as I closed the issue.


👤 Jugurtha
I wrote an algebraic equation systems solver to compute KPIs from user text equations.

The user would upload a spreadsheet file that contains hundreds of equations for different "KPIs", and the solver would go through them, look for the variables in database tables and columns, and then solve the system.

Example:

  kpi1 = sales.clients + marketing.last_year_accounts – kpi2*legal.billable_hours
sales, marketing, legal being database tables, and clients, last_year_accounts, billable_hours being column names. kpi2 is another KPI defined somewhere solved iteratively.

I squinted my eyes hard looking at one equation that used to be solved that raised an exception. As a matter of fact, I don't know if you have spotted it in the equation above.

The problem is the dash[0] instead of the - (minus). It would be "minus", then somehow Excel would transform it to an en dash if I recall correctly. Since I used abstract syntax trees and parsed the equations, it threw the solver off.

I remember at some point, I just noticed a difference in length compared to the - sign.

[0]: https://en.wikipedia.org/wiki/Dash


👤 kleer001
Universally I'm a huge fan of the off-by-one errors. Because the index started at 0 instead of 1, or 1 instead of 0, or the range ends one before the given number, or the difference between subtracting two numbers and then using that as a range. Or when you're using < or > when you should be using <= or >= Whoo, there's so many ways to be off by one. Good times.