r/ProgrammerHumor • • May 17 '20

Hiring a Stack Overflow pro.

Post image
54.9k Upvotes

692 comments sorted by

View all comments

Show parent comments

0

u/[deleted] May 17 '20

[deleted]

8

u/Lampz18 May 17 '20

It's like when your code doesn't work, so you ask the interview grader how you could fix it, and their solution doesn't work, so they don't take off points. How is fstream to string conversion so simple yet impossible.

6

u/[deleted] May 17 '20

It sounds like the code might be timing dependent (i.e. has a race condition). (If the language is interpreted, in which case the interpreter will spend some time on those comments). It breaks when it runs faster (or slower) than the surrounding code expects it to. Simple fix might be to add a usleep(10) somewhere, a more complex one is to figure out what causes the timing dependency in the first place with a debugger.

0

u/[deleted] May 17 '20

[deleted]

2

u/Volandum May 21 '20

I'd love to have a poke at this, but I guess this problem doesn't lend itself to a reproducible example!

0

u/[deleted] May 21 '20

[deleted]

1

u/Volandum May 21 '20

Well I'd really love to take a look if there's a convenient way for you to do that.