Hacker News new | ask | show | jobs
by badminton1 3333 days ago
How can you understand the node event driven architecture without mentioning the node event loop? You can't.

The event loop is not something you can be abstracted from, it is a core component of node that you need to be aware of all the time.

If you have long lived code within an event loop tick you will starve the I/O and everything will start timing out.

Then, freecodecamp (and every other coding camp) do an incredible disservice to society by telling everyone that ever touched a computer for 5 minutes that they're "full-stack engineers", a denomination that is in itself very questionable too.

It's like calling myself a veterinarian because I walked my dog, or calling myself a chef because I fried an egg. These camps promote a very oversimplified vision of what it means to be a software engineer.

1 comments

That's why Python does the contrary and let you use the event loop explicitly. But then the problem is that you have to deal with it even for simple things.

I think the balance is missing here.

I think the balance is node, which allows an implicit event loop (via async/await), or an explicit event loop (via using coroutines as standins for async functions and manually yielding them).
There is "the" event loop in node. http://docs.libuv.org/en/v1.x/loop.html