r/ProgrammerHumor • • Oct 10 '26

Meme weAreWizards

Post image
7.8k Upvotes

203 comments sorted by

View all comments

4

u/Prematurid Oct 10 '26

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.

2

u/trig9ger Oct 10 '26

At that level you're pretty much an alchemist

1

u/Motleypuss Oct 10 '26

I had an issue with my BASIC interpreter where the lexer wouldn't run without console.log(), but still runs fine with them. Go figure!

1

u/Prematurid Oct 10 '26

That "huh" feeling you get when you realize the issue makes me laugh to this day. It is such a dumb thing to go wrong.

1

u/LadyZaryss Oct 11 '26 edited Oct 11 '26

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.

2

u/Prematurid Oct 11 '26

I figured it had to be something like that, but for my purposes it works as it is, so I decided to leave well enough alone. It is just a personal project that I use occasionally.

Still makes me laugh though.