Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lessons/03-express-templates/catApp/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ app.get('/cats/bycolor/:color',index.bycolor);
app.get('/cats/delete/old', index.deleteOldCat);

app.listen(3000);

// It would be nice to have a few comments here, maybe for each section.
34 changes: 34 additions & 0 deletions lessons/03-express-templates/catApp/feedback.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Do not merge this branch!

**Homework Feedback for Cat App**

The link you sent in the homework survey did not exist anymore, so I went back in your commit history to find your original cat app. In the commit I am looking at there are a lot of old/extra files you would want to remove, but I'm assuming you did this later after this commit. (Your "move cat app" commit appeared to removed the cat app instead of moving it.)


Functionality:

All tasks completed!* Awesome job, and your app appears to be bug free. :D
*Second submission


Completion: (20/20)

Bug Free: (10/10)



Quality:

Your code was well organized and commented! It was very clear and readable.
Citing references when you took code from online was great. A good next step would be adding comments describing your functions for the functions you did not do this for.



Good Coding Practices: (10/10)

Readability: (9/10)


Summary: Nice work! Everything is functional and you followed good practices.

(49/50)
3 changes: 2 additions & 1 deletion lessons/03-express-templates/catApp/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function Cat(){
var cat = {
name: names[Math.floor(Math.random()*names.length)],
color: [colors[Math.floor(Math.random()*colors.length)],colors[Math.floor(Math.random()*colors.length)]],
age: Math.floor(Math.random() * 1001)
age: Math.floor(Math.random() * 1001) // These are old cats.
};
return cat;
}
Expand All @@ -36,6 +36,7 @@ var newCat = function(req, res) {
var cats = function(req, res) {
allCats = db.getAll();
// adapted from http://stackoverflow.com/questions/1069666/sorting-javascript-object-by-property-value
// Awesome citing your references!!!!!
allCats.sort(function(a, b) {
return a.age - b.age;
});
Expand Down