Ugh, that's my pet hate too.
But it's likely got little to do with callbacks and everything to do with IO concerns not being separated from business logic. Callbacks are merely the symptom (yet they seem to receive all the attention.)
There's no separation of logic in *this* code. That's for sure. It's horrendous.
Go to the
to explore the network more!