Is Promise-chaining Better Than async/await?
Image credit: marcos mayer on Unsplash
"When I was your age, we used to do callback functions all the way down and be happy with it!"
-Someone (Possibly me.)
If you've written JavaScript for a while, you've probably seen code that needed several asynchronous steps and used callbacks within callbacks. This often led to the dreaded Pyramid of doom and made the logic very difficult to understand. Things are easier since ES2015 with the introduction of Promises, and then async/await in ES2017. I often wonder though: "Do we really need async/await?
Image credit: Pascal van de Vendel
I use MacOS for most of my work and one annoying thing slowly creeping up on me is how slow it is to open a new terminal window. Finally, I reached the breaking point when it seemed like every new terminal login was taking several seconds. Small delays like this can really break you out of your flow. I had to take action.
Image credit: Giuseppe Milo
You may have thought about switching to a static site, but what do you give up? If you're moving from a fully-featured Content Management System, you lose a lot. Like many choices, it's a tradeoff. A CMS offers many features and capabilities, while a static site excels at speed and simplicity.
There's static, and there's sorta static.
Image credit: Televisions with Static by Alpha - CC BY-SA 2.0
I'm migrating this website from Drupal to Gatsby.js.
This site has been running on Drupal 7 for almost exactly 10 years. I originally created it to get a free beer at the Drupal 7 release party on January 11, 2011. Not a bad run and Drupal 7 still has nearly 2 years left before EOL.
The main reasons to switch away from Drupal are: