Somewhere in out application backend we generate a simple bullet chart. But in the most complicated way possible.
We call a web service to retrieve it(yes, a simple bullet chart). The service requires some parameters, and the code that generates them is hidden behind a wall of interfaces and abstract methods (the best and apparently only way to get to the actual code is to debug it).
However, one of these parameters is very well visible and it is a string with (uncommented)javascript function that manipulates the resulting chart, adding some final touches. With hardcoded values etc..

Dear programmers, I know we should avoid reinventing the wheel, but sometimes we should stop and consider the possibility, that we are using the wrong wheel and in completely wrong/obscure way. Thank you.
Yours WhoeverWillMaintainTheCode

  • 0
    I like inventing the weel again and again. My weels roll faster and smother even though they only fit my one cart. Maybe thats the cause why my pprojects take so long. At least I use nativ libraries instead of writting them my self in c.
  • 1
    Generate them in excel, using a macro to import a csv, and do a screen cap! then hide behind enterprize Java!

    Wheel reinvented.
  • 1
    That' not all folks! Because we need another axis on the top of the chart, we use the chart title property and fill it with something like
    <span style="opacity: 0;"> ******</span><span> 1 </span> <span style="opacity:0;"> **** etc.
    so that we have the right numbers on the right places on the top of the chart.

    I am amazed. Sadly, I am the one who needs to change the width of the chart...
Add Comment