In 2010, I had this conversation with my prolific colleague Mr. Ajax:
Hey, would you fetch some data from this URL for me, please?
I’m on it! Just give me a success callback so I can let you know when I’m done.
OK, here you go. Thanks.
Oh, and you should give me an error callback, too. You know, just in case.
Good point. Anything else?
Hey, I noticed that there’s some code duplication between those two callbacks! You could move that into a third always callback.
(impatiently) Alright, I’ll refactor them. Tell you what: why don’t you run now, and I’ll give you the callbacks later?
(irately) What do I look like, an EventEmitter?
Thankfully, jQuery 1.5 changed ...