33

This was WAY back in my first job as a programmer where I was working on a custom built CMS that we took over from another dev shop. So a standard feature was of course pagination for a section that had well over 400,000 records. The client would always complain about this section always being very slow to load. My boss at that job would tell me to not look at the problem as it wasn't a part of the scope.

But being a young enthusiastic programmer, I decided to delve into the problem anyway. What I came to discover was that the pagination was simply doing a select all 400,000 records, and then looping through the entire dataset until it got to the slice it needed to display.

So I fixed the pagination and page loads went from around 1 min to only a few seconds. I felt pretty proud about that. But I later got told off by my boss as he now can't bill for that fix. Personally I didn't care since I learned a bit about SQL pagination, and just how terrible some developers can be.

Comments
  • 17
    "...I learned a bit about SQL pagination, and just how terrible some developers [AND BOSSES] can be."

    What a tool.
  • 1
    It IS still as business. I get that doing work for free doesn't pay their bills but still...
  • 0
    When I started at my current job we had a REALLY weird paging system in place as well.. it was like one big query of everything and then 2 outer queries that flipped the results? I changed it to SQL Server offset and fetch and improved the page load quite a bit.
  • 2
    @BadFox it is, and the end goal is indeed to turn a profit and keep the lights on.

    What respectable business would charge the customer to fix a bug? Why would the business want someone using their software that is stuck between suffering and paying more money? That's how competitors steal business.

    Speaking as a software engineer and as a business owner myself, throwing in freebies advances the business much farther than charging for each little feature. Our clients get excited when we do that. They tell all their associates and friends which in turn increases our business with zero marketing dollars spent.

    Also, instead of praising and encouraging a kick-ass junior dev for taking initiative and using their free time to learn and to be proactive in the codebase, he berates him about money. That dev is worth way more than that feature.

    This was a lost opportunity for the boss/business to show some humanity and a little less Scrooge McDuck to both the customer and to @IdolWotaP.
  • 1
    @duckWit ahhh, yes, I can see your point.
Add Comment