Skip to content

Instantly share code, notes, and snippets.

@neight-allen
Created March 24, 2017 16:28
Show Gist options
  • Select an option

  • Save neight-allen/c24520dd0266fd83c2c2af6573f29fe1 to your computer and use it in GitHub Desktop.

Select an option

Save neight-allen/c24520dd0266fd83c2c2af6573f29fe1 to your computer and use it in GitHub Desktop.

Revisions

  1. neight-allen renamed this gist Mar 24, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. neight-allen created this gist Mar 24, 2017.
    11 changes: 11 additions & 0 deletions dan-feedback
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    # Quantified Self Wk 2 Feedback

    - Nice clean model in your API
    - [This is a nice clean way to create multiple foods](https://github.com/drod1000/qs-node/blob/master/test/server-test.js#L65-L68)
    - [This is a clear and effective test.](https://github.com/drod1000/qs-node/blob/master/test/server-test.js#L75-L90) Tests exactly what you want. Consider setting a global constant `assert` so you don't have to type `chai.assert` each time.
    - You've handled all your `done()`s correctly in your test. Nice work picking up on the asynchronicity.
    - I like how you're handling edge cases in your reponses, [like this](https://github.com/drod1000/qs-node/blob/master/server.js#L34-L36)
    - Nice work borrowing the ["return a promise" pattern](https://github.com/drod1000/quantified-self/blob/master/lib/foods.js#L89-L93) from the backend in the front end. It fits in beautifully.
    - However, try to avoid [refreshing the page after an AJAX call](https://github.com/drod1000/quantified-self/blob/master/lib/foods.js#L12-L14). It kind of defeats the purpose of an AJAX call 😉.

    If you're goal was to write clean and functional and well tested code, then you've done it. As you said, you want to add more functionality, but you've tackled all of the real challenges already. There's going to be some challenge in adding more resources to your API, but I'm confident you can do it. I recommend working on this at least a little bit each week, so that its stays fresh, but expect to not get it to where you want until after graduation. The capstone projects are going to be the focus for the next few weeks.