{"action":"created","comment":{"url":"https://api.github.com/repos/filipelbc/dit/pulls/comments/92706137","pull_request_review_id":13227272,"id":92706137,"diff_hunk":"@@ -0,0 +1,52 @@\n+# Refactor Plan\n+\n+## Issues of the Current Implementation\n+\n+1. The code is lacking orthogonality. Some examples are:\n+    * Modules are dependent on each other.\n+    * Code for parsing the stdin is tightly coupled with system logic code.\n+    * The use of global variables should be avoided.\n+\n+2. The code is lacking reversibility. Early decisions should be treated as\n+   configuration options. How hard it would be\n+    * to use sqlite instead of text files?\n+    * to have multiple group levels instead of two?\n+    * to add support to a second language?\n+\n+3. No contracts.\n+    * Every class should be designed with a clear invariant.\n+    * Every routine should have its pre- and post-conditions.\n+\n+4. No unit tests.\n+    * Test against contract.\n+    * Every routine should be decoupled and testable.\n+    * Tests (and the contracts) should be written before the implementation.\n+\n+## Pending Decisions/Research\n+\n+* Keep Python or change to another programming language?\n+* Database or plain text files?\n+* How completion should be implemented?\n+* Tags instead of groups?\n+* Multi-language support?\n+* Interactive mode?\n+\n+## Documentation\n+\n+* Textual use cases (with hierarchy, cross-links) before the refactor.\n+* Contracts and unit tests during the refactor.\n+\n+## Schedule\n+\n+One day ~ 2h. One week ~ 10h.\n+\n+1. Write textual use cases ~ 1 week.\n+2. Quick code review, with suggestions to fix the aforementioned issues ~ 3 days.\n+3. Define the major classes (some of them will be defined during the refactor) ~ 2 days.\n+4. Refactor stdin parser ~ 2 days.\n+5. Refactor index and previous ~ 3 days.","path":"dev-doc/refactor-plan.md","position":47,"original_position":47,"commit_id":"97963ef9148727915784170cf22c5a611a7b2fdc","original_commit_id":"97963ef9148727915784170cf22c5a611a7b2fdc","user":{"login":"filipelbc","id":14896418,"avatar_url":"https://avatars.githubusercontent.com/u/14896418?v=3","gravatar_id":"","url":"https://api.github.com/users/filipelbc","html_url":"https://github.com/filipelbc","followers_url":"https://api.github.com/users/filipelbc/followers","following_url":"https://api.github.com/users/filipelbc/following{/other_user}","gists_url":"https://api.github.com/users/filipelbc/gists{/gist_id}","starred_url":"https://api.github.com/users/filipelbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filipelbc/subscriptions","organizations_url":"https://api.github.com/users/filipelbc/orgs","repos_url":"https://api.github.com/users/filipelbc/repos","events_url":"https://api.github.com/users/filipelbc/events{/privacy}","received_events_url":"https://api.github.com/users/filipelbc/received_events","type":"User","site_admin":false},"body":"Why?","created_at":"2016-12-15T21:41:35Z","updated_at":"2016-12-15T21:41:35Z","html_url":"https://github.com/filipelbc/dit/pull/169#discussion_r92706137","pull_request_url":"https://api.github.com/repos/filipelbc/dit/pulls/169","_links":{"self":{"href":"https://api.github.com/repos/filipelbc/dit/pulls/comments/92706137"},"html":{"href":"https://github.com/filipelbc/dit/pull/169#discussion_r92706137"},"pull_request":{"href":"https://api.github.com/repos/filipelbc/dit/pulls/169"}}},"pull_request":{"url":"https://api.github.com/repos/filipelbc/dit/pulls/169","id":97356216,"html_url":"https://github.com/filipelbc/dit/pull/169","diff_url":"https://github.com/filipelbc/dit/pull/169.diff","patch_url":"https://github.com/filipelbc/dit/pull/169.patch","issue_url":"https://api.github.com/repos/filipelbc/dit/issues/169","number":169,"state":"open","locked":false,"title":"Draft of the refactor plan","user":{"login":"danielmoraes","id":1006963,"avatar_url":"https://avatars.githubusercontent.com/u/1006963?v=3","gravatar_id":"","url":"https://api.github.com/users/danielmoraes","html_url":"https://github.com/danielmoraes","followers_url":"https://api.github.com/users/danielmoraes/followers","following_url":"https://api.github.com/users/danielmoraes/following{/other_user}","gists_url":"https://api.github.com/users/danielmoraes/gists{/gist_id}","starred_url":"https://api.github.com/users/danielmoraes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielmoraes/subscriptions","organizations_url":"https://api.github.com/users/danielmoraes/orgs","repos_url":"https://api.github.com/users/danielmoraes/repos","events_url":"https://api.github.com/users/danielmoraes/events{/privacy}","received_events_url":"https://api.github.com/users/danielmoraes/received_events","type":"User","site_admin":false},"body":"Closes #168.","created_at":"2016-12-09T18:22:03Z","updated_at":"2016-12-15T21:41:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d684a87c7da327ad3307513d3b7349756506a97","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/filipelbc/dit/pulls/169/commits","review_comments_url":"https://api.github.com/repos/filipelbc/dit/pulls/169/comments","review_comment_url":"https://api.github.com/repos/filipelbc/dit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/filipelbc/dit/issues/169/comments","statuses_url":"https://api.github.com/repos/filipelbc/dit/statuses/97963ef9148727915784170cf22c5a611a7b2fdc","head":{"label":"filipelbc:refactor-plan","ref":"refactor-plan","sha":"97963ef9148727915784170cf22c5a611a7b2fdc","user":{"login":"filipelbc","id":14896418,"avatar_url":"https://avatars.githubusercontent.com/u/14896418?v=3","gravatar_id":"","url":"https://api.github.com/users/filipelbc","html_url":"https://github.com/filipelbc","followers_url":"https://api.github.com/users/filipelbc/followers","following_url":"https://api.github.com/users/filipelbc/following{/other_user}","gists_url":"https://api.github.com/users/filipelbc/gists{/gist_id}","starred_url":"https://api.github.com/users/filipelbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filipelbc/subscriptions","organizations_url":"https://api.github.com/users/filipelbc/orgs","repos_url":"https://api.github.com/users/filipelbc/repos","events_url":"https://api.github.com/users/filipelbc/events{/privacy}","received_events_url":"https://api.github.com/users/filipelbc/received_events","type":"User","site_admin":false},"repo":{"id":66735647,"name":"dit","full_name":"filipelbc/dit","owner":{"login":"filipelbc","id":14896418,"avatar_url":"https://avatars.githubusercontent.com/u/14896418?v=3","gravatar_id":"","url":"https://api.github.com/users/filipelbc","html_url":"https://github.com/filipelbc","followers_url":"https://api.github.com/users/filipelbc/followers","following_url":"https://api.github.com/users/filipelbc/following{/other_user}","gists_url":"https://api.github.com/users/filipelbc/gists{/gist_id}","starred_url":"https://api.github.com/users/filipelbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filipelbc/subscriptions","organizations_url":"https://api.github.com/users/filipelbc/orgs","repos_url":"https://api.github.com/users/filipelbc/repos","events_url":"https://api.github.com/users/filipelbc/events{/privacy}","received_events_url":"https://api.github.com/users/filipelbc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/filipelbc/dit","description":"CLI work time tracking tool","fork":false,"url":"https://api.github.com/repos/filipelbc/dit","forks_url":"https://api.github.com/repos/filipelbc/dit/forks","keys_url":"https://api.github.com/repos/filipelbc/dit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/filipelbc/dit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/filipelbc/dit/teams","hooks_url":"https://api.github.com/repos/filipelbc/dit/hooks","issue_events_url":"https://api.github.com/repos/filipelbc/dit/issues/events{/number}","events_url":"https://api.github.com/repos/filipelbc/dit/events","assignees_url":"https://api.github.com/repos/filipelbc/dit/assignees{/user}","branches_url":"https://api.github.com/repos/filipelbc/dit/branches{/branch}","tags_url":"https://api.github.com/repos/filipelbc/dit/tags","blobs_url":"https://api.github.com/repos/filipelbc/dit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/filipelbc/dit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/filipelbc/dit/git/refs{/sha}","trees_url":"https://api.github.com/repos/filipelbc/dit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/filipelbc/dit/statuses/{sha}","languages_url":"https://api.github.com/repos/filipelbc/dit/languages","stargazers_url":"https://api.github.com/repos/filipelbc/dit/stargazers","contributors_url":"https://api.github.com/repos/filipelbc/dit/contributors","subscribers_url":"https://api.github.com/repos/filipelbc/dit/subscribers","subscription_url":"https://api.github.com/repos/filipelbc/dit/subscription","commits_url":"https://api.github.com/repos/filipelbc/dit/commits{/sha}","git_commits_url":"https://api.github.com/repos/filipelbc/dit/git/commits{/sha}","comments_url":"https://api.github.com/repos/filipelbc/dit/comments{/number}","issue_comment_url":"https://api.github.com/repos/filipelbc/dit/issues/comments{/number}","contents_url":"https://api.github.com/repos/filipelbc/dit/contents/{+path}","compare_url":"https://api.github.com/repos/filipelbc/dit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/filipelbc/dit/merges","archive_url":"https://api.github.com/repos/filipelbc/dit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/filipelbc/dit/downloads","issues_url":"https://api.github.com/repos/filipelbc/dit/issues{/number}","pulls_url":"https://api.github.com/repos/filipelbc/dit/pulls{/number}","milestones_url":"https://api.github.com/repos/filipelbc/dit/milestones{/number}","notifications_url":"https://api.github.com/repos/filipelbc/dit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/filipelbc/dit/labels{/name}","releases_url":"https://api.github.com/repos/filipelbc/dit/releases{/id}","deployments_url":"https://api.github.com/repos/filipelbc/dit/deployments","created_at":"2016-08-27T21:10:25Z","updated_at":"2016-11-13T15:57:23Z","pushed_at":"2016-12-15T21:34:47Z","git_url":"git://github.com/filipelbc/dit.git","ssh_url":"git@github.com:filipelbc/dit.git","clone_url":"https://github.com/filipelbc/dit.git","svn_url":"https://github.com/filipelbc/dit","homepage":"","size":225,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":22,"forks":0,"open_issues":22,"watchers":2,"default_branch":"master"}},"base":{"label":"filipelbc:master","ref":"master","sha":"7a2a23eb9f0c15ced007688de12ab056f5d19a8e","user":{"login":"filipelbc","id":14896418,"avatar_url":"https://avatars.githubusercontent.com/u/14896418?v=3","gravatar_id":"","url":"https://api.github.com/users/filipelbc","html_url":"https://github.com/filipelbc","followers_url":"https://api.github.com/users/filipelbc/followers","following_url":"https://api.github.com/users/filipelbc/following{/other_user}","gists_url":"https://api.github.com/users/filipelbc/gists{/gist_id}","starred_url":"https://api.github.com/users/filipelbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filipelbc/subscriptions","organizations_url":"https://api.github.com/users/filipelbc/orgs","repos_url":"https://api.github.com/users/filipelbc/repos","events_url":"https://api.github.com/users/filipelbc/events{/privacy}","received_events_url":"https://api.github.com/users/filipelbc/received_events","type":"User","site_admin":false},"repo":{"id":66735647,"name":"dit","full_name":"filipelbc/dit","owner":{"login":"filipelbc","id":14896418,"avatar_url":"https://avatars.githubusercontent.com/u/14896418?v=3","gravatar_id":"","url":"https://api.github.com/users/filipelbc","html_url":"https://github.com/filipelbc","followers_url":"https://api.github.com/users/filipelbc/followers","following_url":"https://api.github.com/users/filipelbc/following{/other_user}","gists_url":"https://api.github.com/users/filipelbc/gists{/gist_id}","starred_url":"https://api.github.com/users/filipelbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filipelbc/subscriptions","organizations_url":"https://api.github.com/users/filipelbc/orgs","repos_url":"https://api.github.com/users/filipelbc/repos","events_url":"https://api.github.com/users/filipelbc/events{/privacy}","received_events_url":"https://api.github.com/users/filipelbc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/filipelbc/dit","description":"CLI work time tracking tool","fork":false,"url":"https://api.github.com/repos/filipelbc/dit","forks_url":"https://api.github.com/repos/filipelbc/dit/forks","keys_url":"https://api.github.com/repos/filipelbc/dit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/filipelbc/dit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/filipelbc/dit/teams","hooks_url":"https://api.github.com/repos/filipelbc/dit/hooks","issue_events_url":"https://api.github.com/repos/filipelbc/dit/issues/events{/number}","events_url":"https://api.github.com/repos/filipelbc/dit/events","assignees_url":"https://api.github.com/repos/filipelbc/dit/assignees{/user}","branches_url":"https://api.github.com/repos/filipelbc/dit/branches{/branch}","tags_url":"https://api.github.com/repos/filipelbc/dit/tags","blobs_url":"https://api.github.com/repos/filipelbc/dit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/filipelbc/dit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/filipelbc/dit/git/refs{/sha}","trees_url":"https://api.github.com/repos/filipelbc/dit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/filipelbc/dit/statuses/{sha}","languages_url":"https://api.github.com/repos/filipelbc/dit/languages","stargazers_url":"https://api.github.com/repos/filipelbc/dit/stargazers","contributors_url":"https://api.github.com/repos/filipelbc/dit/contributors","subscribers_url":"https://api.github.com/repos/filipelbc/dit/subscribers","subscription_url":"https://api.github.com/repos/filipelbc/dit/subscription","commits_url":"https://api.github.com/repos/filipelbc/dit/commits{/sha}","git_commits_url":"https://api.github.com/repos/filipelbc/dit/git/commits{/sha}","comments_url":"https://api.github.com/repos/filipelbc/dit/comments{/number}","issue_comment_url":"https://api.github.com/repos/filipelbc/dit/issues/comments{/number}","contents_url":"https://api.github.com/repos/filipelbc/dit/contents/{+path}","compare_url":"https://api.github.com/repos/filipelbc/dit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/filipelbc/dit/merges","archive_url":"https://api.github.com/repos/filipelbc/dit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/filipelbc/dit/downloads","issues_url":"https://api.github.com/repos/filipelbc/dit/issues{/number}","pulls_url":"https://api.github.com/repos/filipelbc/dit/pulls{/number}","milestones_url":"https://api.github.com/repos/filipelbc/dit/milestones{/number}","notifications_url":"https://api.github.com/repos/filipelbc/dit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/filipelbc/dit/labels{/name}","releases_url":"https://api.github.com/repos/filipelbc/dit/releases{/id}","deployments_url":"https://api.github.com/repos/filipelbc/dit/deployments","created_at":"2016-08-27T21:10:25Z","updated_at":"2016-11-13T15:57:23Z","pushed_at":"2016-12-15T21:34:47Z","git_url":"git://github.com/filipelbc/dit.git","ssh_url":"git@github.com:filipelbc/dit.git","clone_url":"https://github.com/filipelbc/dit.git","svn_url":"https://github.com/filipelbc/dit","homepage":"","size":225,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":22,"forks":0,"open_issues":22,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/filipelbc/dit/pulls/169"},"html":{"href":"https://github.com/filipelbc/dit/pull/169"},"issue":{"href":"https://api.github.com/repos/filipelbc/dit/issues/169"},"comments":{"href":"https://api.github.com/repos/filipelbc/dit/issues/169/comments"},"review_comments":{"href":"https://api.github.com/repos/filipelbc/dit/pulls/169/comments"},"review_comment":{"href":"https://api.github.com/repos/filipelbc/dit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/filipelbc/dit/pulls/169/commits"},"statuses":{"href":"https://api.github.com/repos/filipelbc/dit/statuses/97963ef9148727915784170cf22c5a611a7b2fdc"}}}}
{"actor":{"display_login":"filipelbc"}}