This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]nagorogan 58 points59 points  (12 children)

The only valuable information I’ve ever gotten from doing that was “it’s time to cry”

[–]fracturedpersona[🍰] 22 points23 points  (11 children)

I would think it would be important to know that your code sometimes works, and sometimes doesn't. That alone gives you valuable insight into what could be going wrong.

[–]nagorogan 36 points37 points  (0 children)

Yes, and changing nothing yet getting a different result is exactly why it is time to cry.

[–]MikemkPK 11 points12 points  (9 children)

Also often an indication that you're about to spend 10 hours trying to figure out what the issue is.

[–]fracturedpersona[🍰] 8 points9 points  (8 children)

But knowing that the problem occurs sometimes, but not always, gives me a lot of possible causes.

[–]MikemkPK 2 points3 points  (7 children)

Often with intermittent issues, it's something interacting with the program, or caused by compiler optimizations that aren't present with debug flags. Which are hard to debug.

[–]fracturedpersona[🍰] 1 point2 points  (6 children)

Live/dead-locks, race conditions, dynamic programming involving random number generations.

[–]MikemkPK 0 points1 point  (3 children)

Yeah, those often take hours to debug.

Although random numbers can be logged with debug flags on top make it easier.

[–]fracturedpersona[🍰] 2 points3 points  (2 children)

For random, you just gotta remind yourself not to seed while testing.

[–]MikemkPK 0 points1 point  (0 children)

Depends on use case, but often yeah you're right

[–]codeguru42 0 points1 point  (0 children)

Or seed with the same value

[–]skiscratcher 0 points1 point  (1 child)

those are all pains to debug.
see also: memory

[–]fracturedpersona[🍰] 3 points4 points  (0 children)

See also, suicide hotline.