{"action":"created","comment":{"url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/pulls/comments/44177183","id":44177183,"diff_hunk":"@@ -0,0 +1,38 @@\n+1. CRAIGSLIST USER NARRATIVE\n+Users navigate to craigslist.com where they are prompted to choose an area based on country, state, and city, if they have never been to the site before.  After navigating to the subpage for their local area, users can search all of craigslist via a searchbar and they can also navigate to different topics or subtopics through href links.  For example, a user can browse through all items currently up for sale by clicking on the for sale link, or they can be more specific by entering a subcategory of for sale, like bikes.  Inside each subcategory, users can also search for more specific things.  For example, inside bikes, users can search for bikes by size, color, type, etc.  Users also have the ability to create new posts, and they are guided through how to specify the details about their post so that other users can easily navigate to them.\n+\n+2. Building outside-in means that we always want to start on the client side and then work out way into the server and database and stuff like that.  So if I want a user to be able to sign in to my app, first I'm going to create the form in html so the user has a place to submit their information, then I'm going to work on client side javascript so that I can listen for the submission of that form.  Then I'm going to make an ajax call and make a route through my server so that I can save that user information in the database.\n+\n+3. a.console.log for life\n+   b. debugger;\n+   c. rubber duck program to remind myself what I'm trying to accomplish, then go through the code line by line, making sure I understand what each line does and checking for syntax errors\n+\n+PROJECT 1 REVIEW\n+1.  The first thing I did was write a description of the problem I was trying to solve and how my app would do it.  Then I created narratives for how different users would interact with my app.  Then I drew up wireframes for each of the pages my users would interact with.  Then I created the basic html mockups based on the wireframes.  Then I started working on the client side javascript to attach event listeners to buttons and stuff like that.  Then I created the models and decided how and why they would interact.  After the client and models were set up I worked on setting up my server ad creating objects with my models to save in the database.  Lots of AJAX and RESTful routing.\n+\n+2. I started the auth stuff too early.  I wanted to make sure that jobs taken out of the queue by a user would not be accessible by other users, so I did all of my auth stuff so that I could connect a rider to a job when it was added to myjobs by the rider.  This was not super outside in.  In retrospect, at that point in the process, I would have instead just added a attribute to all jobs called available that had a default boolean of true.  When jobs removed from the queue, I could have done a put route to change available to false.  Then I would have had more time to make sure the client side stuff was all set before moving into the models and database.\n+\n+3. I'm trying to add cookies so that when I make changes to the server, it won't automatically log my user out.  My cookies work, but the problem is I need to make the cookies a condition of displaying the jobs on my ejs page and I don't know a. if that is even possible, or b. how to write out that condition.  I've tried a ton of different things to no avail.\n+\n+ <% if ((!job.rider && job.completed === false) && job.available === true) { %>\n+\n+ I need something like if job.rider.cookies === \n+\n+ The problem I'm having is that when cookies are enabled, no jobs show up on my courier.ejs page\n+\n+**below is an exchange I had with Matt.  It probably fixes my problem but I dont understand how to implement it.\n+John Costa [12:35 PM] \n+hey matt i could use some help this afternoon.  i have my cookies set up and they are working, but im having trouble setting conditions in my ejs.  is there a time we can meet that works for you?  thanks man\n+\n+mattwock [12:42 PM] \n+I'll see what I can do. My hypothesis, however is that you can send the cookie info as a local variable to your EJS file. Something like:\n+\n+mattwock [12:44 PM]\n+var loggedInCookie = res.cookies.currentUser || null;\n+res.render(\"index\", { cookie: loggedInCookie });","path":"costajohnt/pseudo_quiz.md","position":32,"original_position":32,"commit_id":"e1e542a43138cb90358cb9ac745ea378405f9824","original_commit_id":"e1e542a43138cb90358cb9ac745ea378405f9824","user":{"login":"tgaff","id":1916144,"avatar_url":"https://avatars.githubusercontent.com/u/1916144?v=3","gravatar_id":"","url":"https://api.github.com/users/tgaff","html_url":"https://github.com/tgaff","followers_url":"https://api.github.com/users/tgaff/followers","following_url":"https://api.github.com/users/tgaff/following{/other_user}","gists_url":"https://api.github.com/users/tgaff/gists{/gist_id}","starred_url":"https://api.github.com/users/tgaff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgaff/subscriptions","organizations_url":"https://api.github.com/users/tgaff/orgs","repos_url":"https://api.github.com/users/tgaff/repos","events_url":"https://api.github.com/users/tgaff/events{/privacy}","received_events_url":"https://api.github.com/users/tgaff/received_events","type":"User","site_admin":false},"body":"this seems right; did you manage to get some help with this?","created_at":"2015-11-06T19:27:20Z","updated_at":"2015-11-06T19:27:20Z","html_url":"https://github.com/sf-wdi-22-23/23-homework/pull/115#discussion_r44177183","pull_request_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/pulls/115","_links":{"self":{"href":"https://api.github.com/repos/sf-wdi-22-23/23-homework/pulls/comments/44177183"},"html":{"href":"https://github.com/sf-wdi-22-23/23-homework/pull/115#discussion_r44177183"},"pull_request":{"href":"https://api.github.com/repos/sf-wdi-22-23/23-homework/pulls/115"}}},"pull_request":{"url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/pulls/115","id":49606503,"html_url":"https://github.com/sf-wdi-22-23/23-homework/pull/115","diff_url":"https://github.com/sf-wdi-22-23/23-homework/pull/115.diff","patch_url":"https://github.com/sf-wdi-22-23/23-homework/pull/115.patch","issue_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/issues/115","number":115,"state":"open","locked":false,"title":"quiz complete","user":{"login":"costajohnt","id":14304404,"avatar_url":"https://avatars.githubusercontent.com/u/14304404?v=3","gravatar_id":"","url":"https://api.github.com/users/costajohnt","html_url":"https://github.com/costajohnt","followers_url":"https://api.github.com/users/costajohnt/followers","following_url":"https://api.github.com/users/costajohnt/following{/other_user}","gists_url":"https://api.github.com/users/costajohnt/gists{/gist_id}","starred_url":"https://api.github.com/users/costajohnt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/costajohnt/subscriptions","organizations_url":"https://api.github.com/users/costajohnt/orgs","repos_url":"https://api.github.com/users/costajohnt/repos","events_url":"https://api.github.com/users/costajohnt/events{/privacy}","received_events_url":"https://api.github.com/users/costajohnt/received_events","type":"User","site_admin":false},"body":"week six day two quiz completed","created_at":"2015-11-03T20:21:50Z","updated_at":"2015-11-06T19:27:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c18849e594468935bfe905b1f347230ec37a5d2d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/pulls/115/commits","review_comments_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/pulls/115/comments","review_comment_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/issues/115/comments","statuses_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/statuses/e1e542a43138cb90358cb9ac745ea378405f9824","head":{"label":"costajohnt:master","ref":"master","sha":"e1e542a43138cb90358cb9ac745ea378405f9824","user":{"login":"costajohnt","id":14304404,"avatar_url":"https://avatars.githubusercontent.com/u/14304404?v=3","gravatar_id":"","url":"https://api.github.com/users/costajohnt","html_url":"https://github.com/costajohnt","followers_url":"https://api.github.com/users/costajohnt/followers","following_url":"https://api.github.com/users/costajohnt/following{/other_user}","gists_url":"https://api.github.com/users/costajohnt/gists{/gist_id}","starred_url":"https://api.github.com/users/costajohnt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/costajohnt/subscriptions","organizations_url":"https://api.github.com/users/costajohnt/orgs","repos_url":"https://api.github.com/users/costajohnt/repos","events_url":"https://api.github.com/users/costajohnt/events{/privacy}","received_events_url":"https://api.github.com/users/costajohnt/received_events","type":"User","site_admin":false},"repo":{"id":43331884,"name":"23-homework","full_name":"costajohnt/23-homework","owner":{"login":"costajohnt","id":14304404,"avatar_url":"https://avatars.githubusercontent.com/u/14304404?v=3","gravatar_id":"","url":"https://api.github.com/users/costajohnt","html_url":"https://github.com/costajohnt","followers_url":"https://api.github.com/users/costajohnt/followers","following_url":"https://api.github.com/users/costajohnt/following{/other_user}","gists_url":"https://api.github.com/users/costajohnt/gists{/gist_id}","starred_url":"https://api.github.com/users/costajohnt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/costajohnt/subscriptions","organizations_url":"https://api.github.com/users/costajohnt/orgs","repos_url":"https://api.github.com/users/costajohnt/repos","events_url":"https://api.github.com/users/costajohnt/events{/privacy}","received_events_url":"https://api.github.com/users/costajohnt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/costajohnt/23-homework","description":"Homework repository for SF-WDI-23","fork":true,"url":"https://api.github.com/repos/costajohnt/23-homework","forks_url":"https://api.github.com/repos/costajohnt/23-homework/forks","keys_url":"https://api.github.com/repos/costajohnt/23-homework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/costajohnt/23-homework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/costajohnt/23-homework/teams","hooks_url":"https://api.github.com/repos/costajohnt/23-homework/hooks","issue_events_url":"https://api.github.com/repos/costajohnt/23-homework/issues/events{/number}","events_url":"https://api.github.com/repos/costajohnt/23-homework/events","assignees_url":"https://api.github.com/repos/costajohnt/23-homework/assignees{/user}","branches_url":"https://api.github.com/repos/costajohnt/23-homework/branches{/branch}","tags_url":"https://api.github.com/repos/costajohnt/23-homework/tags","blobs_url":"https://api.github.com/repos/costajohnt/23-homework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/costajohnt/23-homework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/costajohnt/23-homework/git/refs{/sha}","trees_url":"https://api.github.com/repos/costajohnt/23-homework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/costajohnt/23-homework/statuses/{sha}","languages_url":"https://api.github.com/repos/costajohnt/23-homework/languages","stargazers_url":"https://api.github.com/repos/costajohnt/23-homework/stargazers","contributors_url":"https://api.github.com/repos/costajohnt/23-homework/contributors","subscribers_url":"https://api.github.com/repos/costajohnt/23-homework/subscribers","subscription_url":"https://api.github.com/repos/costajohnt/23-homework/subscription","commits_url":"https://api.github.com/repos/costajohnt/23-homework/commits{/sha}","git_commits_url":"https://api.github.com/repos/costajohnt/23-homework/git/commits{/sha}","comments_url":"https://api.github.com/repos/costajohnt/23-homework/comments{/number}","issue_comment_url":"https://api.github.com/repos/costajohnt/23-homework/issues/comments{/number}","contents_url":"https://api.github.com/repos/costajohnt/23-homework/contents/{+path}","compare_url":"https://api.github.com/repos/costajohnt/23-homework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/costajohnt/23-homework/merges","archive_url":"https://api.github.com/repos/costajohnt/23-homework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/costajohnt/23-homework/downloads","issues_url":"https://api.github.com/repos/costajohnt/23-homework/issues{/number}","pulls_url":"https://api.github.com/repos/costajohnt/23-homework/pulls{/number}","milestones_url":"https://api.github.com/repos/costajohnt/23-homework/milestones{/number}","notifications_url":"https://api.github.com/repos/costajohnt/23-homework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/costajohnt/23-homework/labels{/name}","releases_url":"https://api.github.com/repos/costajohnt/23-homework/releases{/id}","created_at":"2015-09-28T23:02:07Z","updated_at":"2015-10-14T14:13:40Z","pushed_at":"2015-11-05T01:06:30Z","git_url":"git://github.com/costajohnt/23-homework.git","ssh_url":"git@github.com:costajohnt/23-homework.git","clone_url":"https://github.com/costajohnt/23-homework.git","svn_url":"https://github.com/costajohnt/23-homework","homepage":null,"size":125,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sf-wdi-22-23:master","ref":"master","sha":"2dbf7286de05a270cda3b814bb3d7d1f31a76ceb","user":{"login":"sf-wdi-22-23","id":14679138,"avatar_url":"https://avatars.githubusercontent.com/u/14679138?v=3","gravatar_id":"","url":"https://api.github.com/users/sf-wdi-22-23","html_url":"https://github.com/sf-wdi-22-23","followers_url":"https://api.github.com/users/sf-wdi-22-23/followers","following_url":"https://api.github.com/users/sf-wdi-22-23/following{/other_user}","gists_url":"https://api.github.com/users/sf-wdi-22-23/gists{/gist_id}","starred_url":"https://api.github.com/users/sf-wdi-22-23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sf-wdi-22-23/subscriptions","organizations_url":"https://api.github.com/users/sf-wdi-22-23/orgs","repos_url":"https://api.github.com/users/sf-wdi-22-23/repos","events_url":"https://api.github.com/users/sf-wdi-22-23/events{/privacy}","received_events_url":"https://api.github.com/users/sf-wdi-22-23/received_events","type":"Organization","site_admin":false},"repo":{"id":43088708,"name":"23-homework","full_name":"sf-wdi-22-23/23-homework","owner":{"login":"sf-wdi-22-23","id":14679138,"avatar_url":"https://avatars.githubusercontent.com/u/14679138?v=3","gravatar_id":"","url":"https://api.github.com/users/sf-wdi-22-23","html_url":"https://github.com/sf-wdi-22-23","followers_url":"https://api.github.com/users/sf-wdi-22-23/followers","following_url":"https://api.github.com/users/sf-wdi-22-23/following{/other_user}","gists_url":"https://api.github.com/users/sf-wdi-22-23/gists{/gist_id}","starred_url":"https://api.github.com/users/sf-wdi-22-23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sf-wdi-22-23/subscriptions","organizations_url":"https://api.github.com/users/sf-wdi-22-23/orgs","repos_url":"https://api.github.com/users/sf-wdi-22-23/repos","events_url":"https://api.github.com/users/sf-wdi-22-23/events{/privacy}","received_events_url":"https://api.github.com/users/sf-wdi-22-23/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sf-wdi-22-23/23-homework","description":"Homework repository for SF-WDI-23","fork":false,"url":"https://api.github.com/repos/sf-wdi-22-23/23-homework","forks_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/forks","keys_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/teams","hooks_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/hooks","issue_events_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/issues/events{/number}","events_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/events","assignees_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/assignees{/user}","branches_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/branches{/branch}","tags_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/tags","blobs_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/git/refs{/sha}","trees_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/statuses/{sha}","languages_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/languages","stargazers_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/stargazers","contributors_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/contributors","subscribers_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/subscribers","subscription_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/subscription","commits_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/commits{/sha}","git_commits_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/git/commits{/sha}","comments_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/comments{/number}","issue_comment_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/issues/comments{/number}","contents_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/contents/{+path}","compare_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/merges","archive_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/downloads","issues_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/issues{/number}","pulls_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/pulls{/number}","milestones_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/milestones{/number}","notifications_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/labels{/name}","releases_url":"https://api.github.com/repos/sf-wdi-22-23/23-homework/releases{/id}","created_at":"2015-09-24T19:37:23Z","updated_at":"2015-10-20T16:59:08Z","pushed_at":"2015-11-06T19:22:39Z","git_url":"git://github.com/sf-wdi-22-23/23-homework.git","ssh_url":"git@github.com:sf-wdi-22-23/23-homework.git","clone_url":"https://github.com/sf-wdi-22-23/23-homework.git","svn_url":"https://github.com/sf-wdi-22-23/23-homework","homepage":null,"size":15099,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":12,"forks":23,"open_issues":12,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sf-wdi-22-23/23-homework/pulls/115"},"html":{"href":"https://github.com/sf-wdi-22-23/23-homework/pull/115"},"issue":{"href":"https://api.github.com/repos/sf-wdi-22-23/23-homework/issues/115"},"comments":{"href":"https://api.github.com/repos/sf-wdi-22-23/23-homework/issues/115/comments"},"review_comments":{"href":"https://api.github.com/repos/sf-wdi-22-23/23-homework/pulls/115/comments"},"review_comment":{"href":"https://api.github.com/repos/sf-wdi-22-23/23-homework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sf-wdi-22-23/23-homework/pulls/115/commits"},"statuses":{"href":"https://api.github.com/repos/sf-wdi-22-23/23-homework/statuses/e1e542a43138cb90358cb9ac745ea378405f9824"}}}}