diff --git a/lessons/04-client-jquery-ajax/burgerApp/app.js b/lessons/04-client-jquery-ajax/burgerApp/app.js index f795a317..4a4f565e 100644 --- a/lessons/04-client-jquery-ajax/burgerApp/app.js +++ b/lessons/04-client-jquery-ajax/burgerApp/app.js @@ -1,3 +1,5 @@ +// Some comments would be nice here for style/readability. +// What you have here is pretty straightforward, but it's a good habit to get into. var express = require('express'); var path = require('path'); var logger = require('morgan'); diff --git a/lessons/04-client-jquery-ajax/burgerApp/feedback.txt b/lessons/04-client-jquery-ajax/burgerApp/feedback.txt new file mode 100644 index 00000000..a7f356b7 --- /dev/null +++ b/lessons/04-client-jquery-ajax/burgerApp/feedback.txt @@ -0,0 +1,20 @@ +Burger App Homework Feedback + +Everything seems to be working! Love the favicon. +Awesome website. Terrible burgers. + +Functionality +All pages had full functionality and it doesn't look like there are any bugs! + +Completion: 20/20 +Bug Free: 10/10 + +Quality +Your styling is consistent throughout and you generally follow good practices! +You forgot to delete the index.js from the boilerplate/in-class exercise, and left some unnecessary logs. +Unfortunately the lack of comments hurt readability. Other than that, nice work! + +Good coding practices: 9/10 +Readability: 6/10 + +Total: 45/50 \ No newline at end of file diff --git a/lessons/04-client-jquery-ajax/burgerApp/models/burgerModel.js b/lessons/04-client-jquery-ajax/burgerApp/models/burgerModel.js index 4828810d..9b31f6f5 100644 --- a/lessons/04-client-jquery-ajax/burgerApp/models/burgerModel.js +++ b/lessons/04-client-jquery-ajax/burgerApp/models/burgerModel.js @@ -1,6 +1,8 @@ var mongoose = require('mongoose'); // Create ingredient Schema +// Create burger schema +// Try to make sure you update your comments after making changes! var burgerSchema = mongoose.Schema({ orderNumber: Number, ingredients: [String] diff --git a/lessons/04-client-jquery-ajax/burgerApp/public/javascripts/main.js b/lessons/04-client-jquery-ajax/burgerApp/public/javascripts/main.js index f1a8e6f6..f0bfaba2 100644 --- a/lessons/04-client-jquery-ajax/burgerApp/public/javascripts/main.js +++ b/lessons/04-client-jquery-ajax/burgerApp/public/javascripts/main.js @@ -1,3 +1,8 @@ +// There are no comments here. +// While your code is pretty readable, +// commenting is super important so that other people +// (and future you) can understand it better. + var $form = $("#ajax-form"); var totalCost = 0; diff --git a/lessons/04-client-jquery-ajax/burgerApp/routes/index.js b/lessons/04-client-jquery-ajax/burgerApp/routes/index.js index d054e56b..ae9401ab 100644 --- a/lessons/04-client-jquery-ajax/burgerApp/routes/index.js +++ b/lessons/04-client-jquery-ajax/burgerApp/routes/index.js @@ -1,3 +1,5 @@ +// Delete files you are no longer using. + var home = function(req, res){ res.render("home", {"classes": [ "Olin.js", diff --git a/lessons/04-client-jquery-ajax/burgerApp/routes/ingredients.js b/lessons/04-client-jquery-ajax/burgerApp/routes/ingredients.js index 174cc81b..8c45d0fd 100644 --- a/lessons/04-client-jquery-ajax/burgerApp/routes/ingredients.js +++ b/lessons/04-client-jquery-ajax/burgerApp/routes/ingredients.js @@ -114,7 +114,7 @@ routes.editPOST = function(req, res) { if(err) { console.error("error updating name/price:", err); } - console.log(newDoc); + console.log(newDoc); // Probably don't need this console.log. It's usually good to get rid of these when you are done. res.send(newDoc); }); });