DerickBailey.com

Trade Secrets Of A Developer / Entrepreneur

  •  About
  •  Twitter
  •  G+
  •  RSS
  • Blog
  • Courses
  • Products
  • Newsletter
  • Publications
  • Podcasts
  • Work With Me!

You Need ES2017’s Async Functions. Here’s Why …

April 18, 2017 By Derick

You Need ES2017’s Async Functions. Here’s Why …

With the addition of async functions in JavaScript, our code is about to be dramatically simplified. You need to learn this new syntax now, even if you can’t use it just yet. And I’ll show you the benefits of this new syntax to get you started.

Filed Under: Async Await, Callbacks, Error Handling, ES2017, Functions, JavaScript, Node.js, Promises

Callbacks First, Then Promises

October 5, 2016 By Derick

Callbacks First, Then Promises

When I’m looking at asynchronous JavaScript – network calls, file system, or whatever it may be – I don’t reach for promises, first. In fact, a promise is typically a last resort for me, relegated to specific scenarios. I don’t mean to say promises are not useful. They certainly are useful and they are a […]

Filed Under: Callbacks, JavaScript, Promises

Ending the Nested Tree of Doom with Chained Promises

September 27, 2016 By Derick

Ending the Nested Tree of Doom with Chained Promises

Julia Jacobs recently asked a question in the WatchMeCode community slack, about some asynchronous code she wanted to clean up. In this question, she wanted to know of good options for restructuring deeply nested promises without introducing any new libraries. Would it be possible to clean up the code and only use ES6 features? It’s a common […]

Filed Under: Callbacks, Community, ES6, JavaScript, NodeJS, Patterns, Promises, WatchMeCode

In What Order Does My Express.js Middleware Execute?

May 9, 2016 By Derick

I recently had a conversation in the WatchMeCode slack where someone was asking about the order in which various parts of Express middleware would fire. After some initial thoughts on the question, I found myself not 100% certain of the order between calls to “.use”, vs get/post/etc. So I whipped up a quick demo app […]

Filed Under: Callbacks, Dependencies, ExpressJS, JavaScript, Middleware, NodeJS

What Do You Name The Callback Function?

February 15, 2016 By Derick

What Do You Name The Callback Function?

JavaScript practically requires callback functions to do anything asynchronous. Unless you’re talking about generators, you really can’t get away from them. Callbacks are everywhere. But someone recently asked a question about naming callback methods: Do you use different / standard callback names in different scenarios?  For example,  “next” for Express middleware, maybe “cb” or “callback” […]

Filed Under: Callbacks, Code, Context, ExpressJS, Functions, JavaScript, Naming, NodeJS

Derick Bailey Around The Web

  • Twitter: @derickbailey
  • Google+: DerickBailey
  • Screencasts: WatchMeCode.net
  • eBook: Building Backbone Plugins

Copyright © 2016 Muted Solutions, LLC. All Rights Reserved · Log in