If you didn't think NodeJS dependency hell was that bad, you should try sequentially parsing a graph that's stored as an array of nodes and their references, where processing of said nodes forces you to use some async functions that depend on other async functions.

What should have been 20 lines of code written in 30 minutes has turned into 3 hours of horror, reading about babel, realizing that it's just adding more problems without solving one, assessing the effort of modification of async libraries to include sync methods as well, trying out asyncwait, async, and everything else there is, trying to rethink the recursive algorithm, rewriting it several times, cursing and hating myself for not choosing to use Python or .NET Core, screaming senselessly at my wife in a language as familiar to her as Klingon, crying in the bathroom, re-assessing my life choices, thinking whether it was a mistake to dedicate 10 years to this career, maybe I'm just not cut out for it since I can't handle this simple task, watching noose tying tutorials on youtube, thinking about my naked empty RPI that won't connect to the server any time soon.

Seriously. Why is it SO BAD?! Or is it just me?

  • 0
    Java: hold my beer 😂

    I think it happens in most languages doesn't it?
  • 0
    @spaceJunk that's the thing, I didn't have this issue in any other language.
  • 0
    well in java you'll get a "jar hell", don't know about that async thing but sounds terrible, my only experience with node was with angular 4, I thought node was supposed to be good since it's very popular right now.
  • 1
    My take is it's one of those things that's bound to happen when taking on a new language. It's like tying your shoelaces: effortless on the same pair of shoes until you switch to a different pair that uses zippers and buckles on top of the laces.
  • 1
    Async programming is different. I first encountered it in C# wpf environment where most actions stopped the entire UI. Learning to use tasks and async/await was a life saver and provided a much better experience (much much better than creating new threads and messing with the UI dispatcher). In JavaScript its the same but it forces you to think that way rather than giving you a choice but that what's make it's single thread design work. So I'd say, learn about it. It will help you in many modern languages (C#, Java8...).
Add Comment