Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Does your code (or one of the libraries) contain some stupid (maybe native) io-buffering or multithreading shit?
-
@24th-Dragon I honestly don't know. I will probably slap myself when I fix it but I don't know right now.
-
@metamourge No multithreading, the logging is done with a library that logs to console and to files too but we couldn't trace it back to problems with it. It just won't work. I will continue next week, I am done, I left earlier because of it today. xD
-
a3y355yDoes your code load something from a file or network?
If you can fix the problem by removing the log line and adding a small, manual delay, it's definitely related to asynchronous shit. -
Did you try a sleep () instead?
Sounds like some asynchronous stuff is happening, and the logging might give it just enough time to finish...
Colleague while reviewing my latest commit.
Him: Hey, RemusWasTaken, why did you leave this debug log in here?
Me: That function won't work unless I leave that line exactly there.
Him: It can't stay, come here so we can fix it.
Three hours of debugging later, this Friday afternoon.
Him: Okay, I give up. Let's leave it there for now.
Me: I did the same thing yesterday. Time well spent.
Nodejs is weird sometimes, or we are incompetent devs.
rant
nodejs
javascript
debugging