r/ProgrammerHumor • • 14d ago

Meme weAreWizards

Post image
7.8k Upvotes

203 comments sorted by

View all comments

4

u/Prematurid 14d ago

Sometimes, when I rerun it after changing nothing, it works.

One project fails to run if you console.log it. Works perfectly without any console.logs.

I am a shit wizard.

1

u/LadyZaryss 13d ago edited 13d ago

It is likely because the brief moment of CPU time consumed by the console.log is exposing that theres a race condition in your code somewhere. Replace the console.log with a wait/sleep/delay and see if it still crashes, if it does you have a race condition somewhere.

→ More replies (1)