Promises

Week 3, Days 2 and 3: On Feeling Completely Overwhelmed

November 16, 2016

Let’s talk about feelings for a second. I’m generally a very optimistic person with a decent amount of confidence in myself, my critical-thinking and problem-solving abilities, and my ability to stick with something when it’s challenging. I don’t like to dwell on the negatives, and I generally try not to let myself get too down. But today was kind of a sucky day. It didn’t start off that way. I woke up after six hours of sleep feeling a little sleepy, but feeling pretty good about most of the material we had covered in the past couple of days.

Continue reading

Week 2, Day 5: JavaScript Promises and Minecraft

November 12, 2016

After the callback hell we experienced yesterday, we learned about promises today. A promise, according to my instructor and the Promises/A+ Spec and basically any other legitimate source, represents the eventual result of an asynchronous operation. Let’s bring back our (slightly refactored, with the insertIntoTable function omitted, so it’s not 40+ lines long) gorgeous code from yesterday, and illustrate everything that’s wrong with it: router.post('/tweets', function(req, res, next){ let userName, name = req.

Continue reading