12
xsid
6d

Scenario A:
Your code is working. You run again, now it's not working.

Scenario B:
Works on production. Next day it doesn't.

It is nothing you just experienced alternate universe. You probably with your manager temporarily jumped into another timeline where your code is not working.

Next time it happens tell your manager it's not your fault.

Eureka!

Comments
  • 4
    It was caused by a cosmic ray or microscopic black hole.
  • 5
    Multithreading issues. But you can be sure it never works right, it just appears to be right at some point.
  • 1
    Depends on what you're working on. It could be some new data added to the source.
  • 0
    I tried to write a unit test for code who's outcome is different depending on what the date/time is on the database server.

    I failed.

    PS: I know you would normally isolate the database with a mock, but it was a database function being tested.
  • 2
    Multithreading or undefined behaviour. Listen to your compiler kids...
  • 2
    Or uninitialized memory if you're in a language that supports it!
  • 1
    If your code doesn't ALWAYS work, it has a bug, it's as easy as that. Working sometimes or just on your machine doesn't count.
Your Job Suck?
Get a Better Job
Add Comment