317

Yesterday, in a meeting with project stakeholders and a dev was demoing his software when an un-handled exception occurred, causing the app to crash.

Dev: “Oh..that’s weird. Doesn’t do that on my machine. Better look at the log”
- Dev looks at the log and sees the exception was a divide by zero error.
Dev: “Ohhh…yea…the average price calculation, it’s a bug in the database.”
<I burst out laughing>
Me: “That’s funny.”
<Dev manager was not laughing>
DevMgr: “What’s funny about bugs in the database?”
Me: “Divide by zero exceptions are not an indication of a data error, it’s a bug in the code.”
Dev: “Uhh…how so? The price factor is zero, which comes from a table, so that’s a bug in the database”
Me: “Jim, will you have sales with a price factor of zero?”
StakeholderJim: “Yea, for add-on items that we’re not putting on sale. Hats, gloves, things like that.”
Dev: “Steve, did anyone tell you the factor could be zero?”
DBA-Steve: “Uh...no…just that the value couldn’t be null. You guys can put whatever you want.”
DevMgr: “So, how will you fix this bug?”
DBA-Steve: “Bug? …oh…um…I guess I could default the value to 1.”
Dev: “What if the user types in a zero? Can you switch it to a 1?”
Me: “Or you check the factor value before you try to divide. That will fix the exception and Steve won’t have to do anything.”
<awkward couple of seconds of silence>
DevMgr: “Lets wrap this up. Steve, go ahead and make the necessary database changes to make sure the factor is never zero.”
StakeholderJim: “That doesn’t sound right. Add-on items should never have a factor. A value of 1 could screw up the average.”
Dev: “Don’t worry, we’ll know the difference.”
<everyone seems happy and leaves the meeting>

I completely lost any sort of brain power to say anything after Dev said that. All the little voices kept saying were ‘WTF? WTF just happened? No really…W T F just happened!?’ over and over. I still have no idea on how to articulate to anyone with any sort of sense about what happened. Thanks DevRant for letting me rant.

Comments
  • 58
    Oh man, all the memories and good moments this rant reminds me of...

    It was a pure and naive time. Before I killed my previous manager.
  • 13
    Keep us up-to-date on how this goes on. Great rant btw
  • 17
    i'd quit if I had managers and coworkers this stupid. I couldn't keep a straight face and pretend like everything is ok. 😂
  • 4
    Just do it and watch the world burn. And when they realise its was a mistake ask for a raise.
  • 5
    If you are a dev you would know that this kind of stupid things sometimes happen. Our brain always tries to avoid responsibilities and takes the laziest path towards a solution blah blah blah boom boom boom
  • 7
    I would have never let it slide. I feel it's a moral responsibility to make sure the correct solution is implemented notwithstanding what any manager/dev says or thinks.
  • 7
    I'm so glad I read this. I can't believe he got away with that
  • 17
    Oh man, so brutal lol.

    And another @PaperTrail classic :)
  • 1
    Couldn't you handle the input of a "0" really easy with a PL SQL trigger and a NVL function to make it look like it's just 0?
  • 8
    @nicnaknic Our DBAs call that "putting business logic in the database" and is forbidden.
  • 2
    @PaperTrail well that's just unfortunate...
  • 2
    @PaperTrail the way I see it its neither a dev responsibility nor a dba responsibility. I think marketing and sales should fix this by taking the opportunity to not sell stuff for $0. 😂
    Either that OR even better, treat the divide by zero by letting the divisor approach zero! That way your company will make literally unlimited $$$

    Hilarious rant nevertheless 😂
  • 2
    It remains me my old co-worker.
  • 0
    @Kalex @KKDev Came across this hilarious rant. 😂😂
  • 0
    I think I've lived pretty much this same scenario, save for a few different specifics, at least a hundred times in my career.
Add Comment