Permalink
Browse files

Retitle first section & change headings

Also, reword last learning objective.
  • Loading branch information...
matt-brendzel committed Jul 1, 2016
1 parent 70266c0 commit f148fad7aeb476e062f79b51cbf258ed1dbabe11
Showing with 7 additions and 6 deletions.
  1. +7 −6 README.md
@@ -13,17 +13,18 @@ By the end of this, developers should be able to:
- Explain the value of using promises instead of callback interfaces.
- Read Node documentation that uses callbacks and translate that into
implementations using promises.
- Convert Node scripts using callbacks into scripts using promises.
- Rewrite Node scripts using callbacks as scripts using promises.

## Preparation

1. [Fork and clone](https://github.com/ga-wdi-boston/meta/wiki/ForkAndClone)
this repository.
1. Install dependencies with `npm install`.

## Callbacks versus Promises
## Drawbacks to Callbacks

Callback drawbacks:
Asynchronous code necessitates callbacks.
But dealing with lots of callbacks can be tricky:

- Callbacks can be messy when they're nested: "callback hell". See [`lib/copy-json.js`](lib/copy-json.js).
- Each callback will have to handle it's own errors if necessary.
@@ -130,11 +131,11 @@ readJSON('./example.jsom')
.catch(console.error); // handle error conditions
```
## Code-Along: Promisify `copy-json.js`
### Code-Along: Promisify `copy-json.js`
## Lab: Pomisify `hey-yall.js`
### Lab: Promisify `hey-yall.js`
## Lab: Promisify `randomizer.js`
### Lab: Promisify `randomizer.js`
## Additional Resources

0 comments on commit f148fad

Please sign in to comment.