52
tudo
6y

Callback Hell!

Comments
  • 6
    Promises to the rescue!
  • 4
    @kamen I promise you that I will callback?
  • 2
    @gathurian Basically yes, but at least you can chain them instead of nesting them like you have to do with bare callbacks.
  • 4
    Async await sorry
  • 1
    @kamen async await to the rescue
  • 2
    Bring it on. I got async and await with me!
  • 3
    He never fucking calls back
  • 1
    I work on a codebase where the original dev apparently didn’t feel there were *enough* callbacks and decided to write his own (very shitty) async process engine that takes normal tasks and splits them up into smaller tasks and splits them all up with setTimeout.

    The problem is he apparently doesn’t know anything about async coding and the thing is rife with race conditions and performance issues.

    A good chunk of my work on this code has been to just undo this insanity. The more code I remove, the better it runs.
  • 2
    ...and this is why I hate JS.
Add Comment