{"action":"created","comment":{"url":"https://api.github.com/repos/lanza/devmountain/pulls/comments/200772854","pull_request_review_id":135158801,"id":200772854,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDc3Mjg1NA==","diff_hunk":"@@ -0,0 +1,63 @@\n+//\n+//  NoteController.swift\n+//  Notes\n+//\n+//  Created by Eric Lanza on 7/6/18.\n+//  Copyright © 2018 ETLanza. All rights reserved.\n+//\n+\n+import Foundation\n+\n+class NoteController: Codable {\n+    \n+    static let shared = NoteController()\n+    \n+    var notes = [Note]()\n+    \n+    //MARK: - CRUD Methods\n+    func addNote(_ note: Note) {\n+        notes.append(note)\n+        saveToPersistentStore()\n+    }\n+    \n+    func updateNote(_ note: Note, withBodyText bodyText: String) {\n+        note.bodyText = bodyText\n+        saveToPersistentStore()\n+    }\n+    \n+    func deleteNote(_ note: Note) {\n+        guard let indexOfNote = NoteController.shared.notes.index(of: note) else { return }","path":"week1/1.5/Notes/Notes/Controllers/Model Controllers/NoteController.swift","position":29,"original_position":29,"commit_id":"42c8b36c045f5c94cd058669383c04db57d55474","original_commit_id":"42c8b36c045f5c94cd058669383c04db57d55474","user":{"login":"lanza","id":12656790,"node_id":"MDQ6VXNlcjEyNjU2Nzkw","avatar_url":"https://avatars3.githubusercontent.com/u/12656790?v=4","gravatar_id":"","url":"https://api.github.com/users/lanza","html_url":"https://github.com/lanza","followers_url":"https://api.github.com/users/lanza/followers","following_url":"https://api.github.com/users/lanza/following{/other_user}","gists_url":"https://api.github.com/users/lanza/gists{/gist_id}","starred_url":"https://api.github.com/users/lanza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lanza/subscriptions","organizations_url":"https://api.github.com/users/lanza/orgs","repos_url":"https://api.github.com/users/lanza/repos","events_url":"https://api.github.com/users/lanza/events{/privacy}","received_events_url":"https://api.github.com/users/lanza/received_events","type":"User","site_admin":false},"body":"As a general rule of thumb you can favor shorter variable names if they are created and immediately used. e.g. does the name `indexOfNote` save you from any thinking or searching as compared to the name `index` here? If the variable is going to propagate further through the code than you might ask \"`index` of what?\" but since you're using it immediately then it's not ambiguous.","created_at":"2018-07-06T21:22:16Z","updated_at":"2018-07-06T21:49:02Z","html_url":"https://github.com/lanza/devmountain/pull/1#discussion_r200772854","pull_request_url":"https://api.github.com/repos/lanza/devmountain/pulls/1","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/lanza/devmountain/pulls/comments/200772854"},"html":{"href":"https://github.com/lanza/devmountain/pull/1#discussion_r200772854"},"pull_request":{"href":"https://api.github.com/repos/lanza/devmountain/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/lanza/devmountain/pulls/1","id":199847947,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5ODQ3OTQ3","html_url":"https://github.com/lanza/devmountain/pull/1","diff_url":"https://github.com/lanza/devmountain/pull/1.diff","patch_url":"https://github.com/lanza/devmountain/pull/1.patch","issue_url":"https://api.github.com/repos/lanza/devmountain/issues/1","number":1,"state":"open","locked":false,"title":"End of week 1","user":{"login":"ETLanza","id":32312087,"node_id":"MDQ6VXNlcjMyMzEyMDg3","avatar_url":"https://avatars1.githubusercontent.com/u/32312087?v=4","gravatar_id":"","url":"https://api.github.com/users/ETLanza","html_url":"https://github.com/ETLanza","followers_url":"https://api.github.com/users/ETLanza/followers","following_url":"https://api.github.com/users/ETLanza/following{/other_user}","gists_url":"https://api.github.com/users/ETLanza/gists{/gist_id}","starred_url":"https://api.github.com/users/ETLanza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ETLanza/subscriptions","organizations_url":"https://api.github.com/users/ETLanza/orgs","repos_url":"https://api.github.com/users/ETLanza/repos","events_url":"https://api.github.com/users/ETLanza/events{/privacy}","received_events_url":"https://api.github.com/users/ETLanza/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-06T21:08:56Z","updated_at":"2018-07-06T21:49:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49475a3ce7e7f0077c575bb84e24057bb32937c8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/lanza/devmountain/pulls/1/commits","review_comments_url":"https://api.github.com/repos/lanza/devmountain/pulls/1/comments","review_comment_url":"https://api.github.com/repos/lanza/devmountain/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lanza/devmountain/issues/1/comments","statuses_url":"https://api.github.com/repos/lanza/devmountain/statuses/42c8b36c045f5c94cd058669383c04db57d55474","head":{"label":"ETLanza:master","ref":"master","sha":"42c8b36c045f5c94cd058669383c04db57d55474","user":{"login":"ETLanza","id":32312087,"node_id":"MDQ6VXNlcjMyMzEyMDg3","avatar_url":"https://avatars1.githubusercontent.com/u/32312087?v=4","gravatar_id":"","url":"https://api.github.com/users/ETLanza","html_url":"https://github.com/ETLanza","followers_url":"https://api.github.com/users/ETLanza/followers","following_url":"https://api.github.com/users/ETLanza/following{/other_user}","gists_url":"https://api.github.com/users/ETLanza/gists{/gist_id}","starred_url":"https://api.github.com/users/ETLanza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ETLanza/subscriptions","organizations_url":"https://api.github.com/users/ETLanza/orgs","repos_url":"https://api.github.com/users/ETLanza/repos","events_url":"https://api.github.com/users/ETLanza/events{/privacy}","received_events_url":"https://api.github.com/users/ETLanza/received_events","type":"User","site_admin":false},"repo":{"id":139217984,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkyMTc5ODQ=","name":"devmountain","full_name":"ETLanza/devmountain","owner":{"login":"ETLanza","id":32312087,"node_id":"MDQ6VXNlcjMyMzEyMDg3","avatar_url":"https://avatars1.githubusercontent.com/u/32312087?v=4","gravatar_id":"","url":"https://api.github.com/users/ETLanza","html_url":"https://github.com/ETLanza","followers_url":"https://api.github.com/users/ETLanza/followers","following_url":"https://api.github.com/users/ETLanza/following{/other_user}","gists_url":"https://api.github.com/users/ETLanza/gists{/gist_id}","starred_url":"https://api.github.com/users/ETLanza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ETLanza/subscriptions","organizations_url":"https://api.github.com/users/ETLanza/orgs","repos_url":"https://api.github.com/users/ETLanza/repos","events_url":"https://api.github.com/users/ETLanza/events{/privacy}","received_events_url":"https://api.github.com/users/ETLanza/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ETLanza/devmountain","description":null,"fork":false,"url":"https://api.github.com/repos/ETLanza/devmountain","forks_url":"https://api.github.com/repos/ETLanza/devmountain/forks","keys_url":"https://api.github.com/repos/ETLanza/devmountain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ETLanza/devmountain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ETLanza/devmountain/teams","hooks_url":"https://api.github.com/repos/ETLanza/devmountain/hooks","issue_events_url":"https://api.github.com/repos/ETLanza/devmountain/issues/events{/number}","events_url":"https://api.github.com/repos/ETLanza/devmountain/events","assignees_url":"https://api.github.com/repos/ETLanza/devmountain/assignees{/user}","branches_url":"https://api.github.com/repos/ETLanza/devmountain/branches{/branch}","tags_url":"https://api.github.com/repos/ETLanza/devmountain/tags","blobs_url":"https://api.github.com/repos/ETLanza/devmountain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ETLanza/devmountain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ETLanza/devmountain/git/refs{/sha}","trees_url":"https://api.github.com/repos/ETLanza/devmountain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ETLanza/devmountain/statuses/{sha}","languages_url":"https://api.github.com/repos/ETLanza/devmountain/languages","stargazers_url":"https://api.github.com/repos/ETLanza/devmountain/stargazers","contributors_url":"https://api.github.com/repos/ETLanza/devmountain/contributors","subscribers_url":"https://api.github.com/repos/ETLanza/devmountain/subscribers","subscription_url":"https://api.github.com/repos/ETLanza/devmountain/subscription","commits_url":"https://api.github.com/repos/ETLanza/devmountain/commits{/sha}","git_commits_url":"https://api.github.com/repos/ETLanza/devmountain/git/commits{/sha}","comments_url":"https://api.github.com/repos/ETLanza/devmountain/comments{/number}","issue_comment_url":"https://api.github.com/repos/ETLanza/devmountain/issues/comments{/number}","contents_url":"https://api.github.com/repos/ETLanza/devmountain/contents/{+path}","compare_url":"https://api.github.com/repos/ETLanza/devmountain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ETLanza/devmountain/merges","archive_url":"https://api.github.com/repos/ETLanza/devmountain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ETLanza/devmountain/downloads","issues_url":"https://api.github.com/repos/ETLanza/devmountain/issues{/number}","pulls_url":"https://api.github.com/repos/ETLanza/devmountain/pulls{/number}","milestones_url":"https://api.github.com/repos/ETLanza/devmountain/milestones{/number}","notifications_url":"https://api.github.com/repos/ETLanza/devmountain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ETLanza/devmountain/labels{/name}","releases_url":"https://api.github.com/repos/ETLanza/devmountain/releases{/id}","deployments_url":"https://api.github.com/repos/ETLanza/devmountain/deployments","created_at":"2018-06-30T04:06:37Z","updated_at":"2018-07-06T20:52:43Z","pushed_at":"2018-07-06T20:52:41Z","git_url":"git://github.com/ETLanza/devmountain.git","ssh_url":"git@github.com:ETLanza/devmountain.git","clone_url":"https://github.com/ETLanza/devmountain.git","svn_url":"https://github.com/ETLanza/devmountain","homepage":null,"size":2657,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lanza:master","ref":"master","sha":"0bdc3b84136dc5b9f29d94d2f14910d0d03d81cc","user":{"login":"lanza","id":12656790,"node_id":"MDQ6VXNlcjEyNjU2Nzkw","avatar_url":"https://avatars3.githubusercontent.com/u/12656790?v=4","gravatar_id":"","url":"https://api.github.com/users/lanza","html_url":"https://github.com/lanza","followers_url":"https://api.github.com/users/lanza/followers","following_url":"https://api.github.com/users/lanza/following{/other_user}","gists_url":"https://api.github.com/users/lanza/gists{/gist_id}","starred_url":"https://api.github.com/users/lanza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lanza/subscriptions","organizations_url":"https://api.github.com/users/lanza/orgs","repos_url":"https://api.github.com/users/lanza/repos","events_url":"https://api.github.com/users/lanza/events{/privacy}","received_events_url":"https://api.github.com/users/lanza/received_events","type":"User","site_admin":false},"repo":{"id":140028856,"node_id":"MDEwOlJlcG9zaXRvcnkxNDAwMjg4NTY=","name":"devmountain","full_name":"lanza/devmountain","owner":{"login":"lanza","id":12656790,"node_id":"MDQ6VXNlcjEyNjU2Nzkw","avatar_url":"https://avatars3.githubusercontent.com/u/12656790?v=4","gravatar_id":"","url":"https://api.github.com/users/lanza","html_url":"https://github.com/lanza","followers_url":"https://api.github.com/users/lanza/followers","following_url":"https://api.github.com/users/lanza/following{/other_user}","gists_url":"https://api.github.com/users/lanza/gists{/gist_id}","starred_url":"https://api.github.com/users/lanza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lanza/subscriptions","organizations_url":"https://api.github.com/users/lanza/orgs","repos_url":"https://api.github.com/users/lanza/repos","events_url":"https://api.github.com/users/lanza/events{/privacy}","received_events_url":"https://api.github.com/users/lanza/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lanza/devmountain","description":null,"fork":true,"url":"https://api.github.com/repos/lanza/devmountain","forks_url":"https://api.github.com/repos/lanza/devmountain/forks","keys_url":"https://api.github.com/repos/lanza/devmountain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lanza/devmountain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lanza/devmountain/teams","hooks_url":"https://api.github.com/repos/lanza/devmountain/hooks","issue_events_url":"https://api.github.com/repos/lanza/devmountain/issues/events{/number}","events_url":"https://api.github.com/repos/lanza/devmountain/events","assignees_url":"https://api.github.com/repos/lanza/devmountain/assignees{/user}","branches_url":"https://api.github.com/repos/lanza/devmountain/branches{/branch}","tags_url":"https://api.github.com/repos/lanza/devmountain/tags","blobs_url":"https://api.github.com/repos/lanza/devmountain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lanza/devmountain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lanza/devmountain/git/refs{/sha}","trees_url":"https://api.github.com/repos/lanza/devmountain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lanza/devmountain/statuses/{sha}","languages_url":"https://api.github.com/repos/lanza/devmountain/languages","stargazers_url":"https://api.github.com/repos/lanza/devmountain/stargazers","contributors_url":"https://api.github.com/repos/lanza/devmountain/contributors","subscribers_url":"https://api.github.com/repos/lanza/devmountain/subscribers","subscription_url":"https://api.github.com/repos/lanza/devmountain/subscription","commits_url":"https://api.github.com/repos/lanza/devmountain/commits{/sha}","git_commits_url":"https://api.github.com/repos/lanza/devmountain/git/commits{/sha}","comments_url":"https://api.github.com/repos/lanza/devmountain/comments{/number}","issue_comment_url":"https://api.github.com/repos/lanza/devmountain/issues/comments{/number}","contents_url":"https://api.github.com/repos/lanza/devmountain/contents/{+path}","compare_url":"https://api.github.com/repos/lanza/devmountain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lanza/devmountain/merges","archive_url":"https://api.github.com/repos/lanza/devmountain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lanza/devmountain/downloads","issues_url":"https://api.github.com/repos/lanza/devmountain/issues{/number}","pulls_url":"https://api.github.com/repos/lanza/devmountain/pulls{/number}","milestones_url":"https://api.github.com/repos/lanza/devmountain/milestones{/number}","notifications_url":"https://api.github.com/repos/lanza/devmountain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lanza/devmountain/labels{/name}","releases_url":"https://api.github.com/repos/lanza/devmountain/releases{/id}","deployments_url":"https://api.github.com/repos/lanza/devmountain/deployments","created_at":"2018-07-06T20:56:14Z","updated_at":"2018-07-06T21:00:18Z","pushed_at":"2018-07-06T21:08:57Z","git_url":"git://github.com/lanza/devmountain.git","ssh_url":"git@github.com:lanza/devmountain.git","clone_url":"https://github.com/lanza/devmountain.git","svn_url":"https://github.com/lanza/devmountain","homepage":null,"size":2657,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lanza/devmountain/pulls/1"},"html":{"href":"https://github.com/lanza/devmountain/pull/1"},"issue":{"href":"https://api.github.com/repos/lanza/devmountain/issues/1"},"comments":{"href":"https://api.github.com/repos/lanza/devmountain/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/lanza/devmountain/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/lanza/devmountain/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lanza/devmountain/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/lanza/devmountain/statuses/42c8b36c045f5c94cd058669383c04db57d55474"}},"author_association":"NONE"}}
{"actor":{"display_login":"lanza"}}