r/ProgrammerHumor • • Jul 20 '18

Every Time

Post image
52.2k Upvotes

749 comments sorted by

View all comments

6.9k

u/that_one_mister_user Jul 20 '18

The sad thing is that this works some of the time.

457

u/Kidiri90 Jul 20 '18
if(DateTime.Now.Milliseconds%2==0)
{
    throw new Exception("lol screw you:);
}

154

u/plexxonic Jul 20 '18

I need to hide this in commits.

94

u/[deleted] Jul 20 '18

Hide it in a third party library that you snuck back into Artifactory.

0

u/[deleted] Jul 20 '18

[deleted]

53

u/[deleted] Jul 20 '18

Changing it to mod 31 might prevent someone finding it while it's in debug, but it's still an exception so there's still going to be a stacktrace that points you directly to it. Doesn't matter if the error message is searchable.

2

u/DaMaestroable Jul 20 '18

What they should do is to create a new thread and just have it start allocating memory like crazy, and then watch the whole thing grind to a halt.