Comment by magospietato

Comment by magospietato 17 hours ago

9 replies

There's a middle ground for sure. I've left a few witty comments and loglines in my time.

But I've also had to debug a Delphi unit which returned error codes inspired by the magical supercomputer Hex from the Discworld novels.

"Divide by cucumber error" is not a decent enough representation of a module's internal state, no matter how funny you think you are.

tikhonj 16 hours ago

But a wholly non-funny "Invariant Violated" message would be no better. The problem isn't that the message is funny, but that it does not contain the information you need to understand what's going on. The whimsy is just a distraction.

  • eptcyka 15 hours ago

    Do you find that distracting things help you debug shoddy code?

    • tikhonj 14 hours ago

      They don't hurt, and it's fun to come across them. If the funny thing is used in one place, it can be memorable and easier to search for. If it's the equivalent of "error [error]" or whatever, I honestly don't care.

    • arccy 14 hours ago

      if "divide by cucumber" is a unique string in the code base, then yes?

      • wiseowise 14 hours ago

        Right. And how many of those can your brain fit?

dotancohen 14 hours ago

"Divide by cucumber error" sounds like a great string to grep for - so actually helpful for developers to find the place in the code that threw it.