Google Chart API and large queries: the wrong end of a problem

Recently I have stumbled upon a "floating" (randomly appearing and disappearing, the nastiest kind) bug in the legacy code of an in-house financial system: a pie chart, drawn by Google Chart API, sometimes disappeared from the report. After a quick investigation I found out that requests URLs to the API were too long. First, I thought about converting request to POST. Thanks to the Good Empire, they added the POST support to their Chart API.

But then it dawned upon me: who on Earth needs a pie chart with 50+ sections? It is absolutely unreadable! Why the users even wanted to call this kind of report? Inertia of mind - they put all data they had in the report just because they could, and they just didn't care about the result.

Grouping all the "small" (under 1% of the chart's total value) entries into a single "Others" entry not only fixed the bug, but also rendered the report much more readable, and made customers happier.

Valuable lesson learned: never underestimate the inertia of mind – the customer may be actually unaware of what he really needs. The more usable your cases are, the simpler your code will be. And sometimes discovering a bug in your system can be a good thing: it can give you a possibility to improve the system's design.


  1. We at all times prioritize online on line casino bonuses that give users an excellent probability to show the bonus cash into actual money. Sloto Cash welcomes its new gamers with a staggering $7,777 worth of welcome bonuses and 300 free spins on 5 of the preferred slot games in its on line casino library. You only have to make a deposit of 점보카지노 $20 to claim this bonus.


Post a Comment

Popular posts from this blog

High-volume sampling: algorithms’ comparison

Spring Framework and Code Obscurity

Multi-threading skills - what do you mean by that?