The Promise of a Burger Party

Two weeks ago, I was in a conversation about how I might implement a feature in JavaScript. It needed to be asynchronous to access external data, I said "well, let's use fetch()...so in code... umm..." while I paused to remember fetch API, the person I was talking to said, "It returns a promise". My brain froze, and I said: "I honestly don't know what you mean..."

I've written promise based code plenty of times, but somehow things didn't connect in my brain this time. I realized I actually don't "get" promise after all.

I can not tell you how hard it is to explain this sentence - "It returns a Promise"

but probably because I really don't understand Promise.

— Mariko Kosaka (@kosamari) January 13, 2017

If you know me from twitter, I'm a visual learner who draws code concepts as physical metaphor. It is how I cope with a double layer of abstraction (programming language & English as a second language). So naturally, I had to draw it this time as well.

...

Read more @ Mariko Kosaka