{"action":"created","comment":{"url":"https://api.github.com/repos/PileProject/drive/pulls/comments/92939662","pull_request_review_id":13462666,"id":92939662,"diff_hunk":"@@ -181,16 +186,16 @@ public void whenMotorSpeedsAreNotInitialized_thenMovesForwardWithDefaultValue()\n \n         controller.moveForward();\n \n-        verify(leftMotor).setSpeed(NxtController.INIT_MOTOR_POWER);\n-        verify(rightMotor).setSpeed(NxtController.INIT_MOTOR_POWER);\n+        verify(leftMotor).setSpeed(CarControllerBase.MotorProperty.INIT_MOTOR_POWER);","path":"app/src/androidTest/java/com/pileproject/drive/execution/NxtCarControllerTest.java","position":91,"original_position":91,"commit_id":"92fd10e3cb1dd6ea5d83a62fb01790d80defd6a9","original_commit_id":"f3fcef17f2726649660a3f3f29dd80e5d5eeb25a","user":{"login":"tiwanari","id":2739915,"avatar_url":"https://avatars.githubusercontent.com/u/2739915?v=3","gravatar_id":"","url":"https://api.github.com/users/tiwanari","html_url":"https://github.com/tiwanari","followers_url":"https://api.github.com/users/tiwanari/followers","following_url":"https://api.github.com/users/tiwanari/following{/other_user}","gists_url":"https://api.github.com/users/tiwanari/gists{/gist_id}","starred_url":"https://api.github.com/users/tiwanari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiwanari/subscriptions","organizations_url":"https://api.github.com/users/tiwanari/orgs","repos_url":"https://api.github.com/users/tiwanari/repos","events_url":"https://api.github.com/users/tiwanari/events{/privacy}","received_events_url":"https://api.github.com/users/tiwanari/received_events","type":"User","site_admin":false},"body":"oh i didn't see other lines. thanks","created_at":"2016-12-18T11:56:12Z","updated_at":"2016-12-18T11:56:12Z","html_url":"https://github.com/PileProject/drive/pull/59#discussion_r92939662","pull_request_url":"https://api.github.com/repos/PileProject/drive/pulls/59","_links":{"self":{"href":"https://api.github.com/repos/PileProject/drive/pulls/comments/92939662"},"html":{"href":"https://github.com/PileProject/drive/pull/59#discussion_r92939662"},"pull_request":{"href":"https://api.github.com/repos/PileProject/drive/pulls/59"}}},"pull_request":{"url":"https://api.github.com/repos/PileProject/drive/pulls/59","id":95631993,"html_url":"https://github.com/PileProject/drive/pull/59","diff_url":"https://github.com/PileProject/drive/pull/59.diff","patch_url":"https://github.com/PileProject/drive/pull/59.patch","issue_url":"https://api.github.com/repos/PileProject/drive/issues/59","number":59,"state":"open","locked":false,"title":"Standardize controllers","user":{"login":"tiwanari","id":2739915,"avatar_url":"https://avatars.githubusercontent.com/u/2739915?v=3","gravatar_id":"","url":"https://api.github.com/users/tiwanari","html_url":"https://github.com/tiwanari","followers_url":"https://api.github.com/users/tiwanari/followers","following_url":"https://api.github.com/users/tiwanari/following{/other_user}","gists_url":"https://api.github.com/users/tiwanari/gists{/gist_id}","starred_url":"https://api.github.com/users/tiwanari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiwanari/subscriptions","organizations_url":"https://api.github.com/users/tiwanari/orgs","repos_url":"https://api.github.com/users/tiwanari/repos","events_url":"https://api.github.com/users/tiwanari/events{/privacy}","received_events_url":"https://api.github.com/users/tiwanari/received_events","type":"User","site_admin":false},"body":"This PR standardizes the `MachineController` to make it has the union of its children's methods.\r\n\r\n## Background\r\nWe talked over the design of controllers again and again offline, and we had two options;\r\n\r\n- Make controllers for each machine (Nxt, Ev3, Pile, etc.) so that they have their specific methods (e.g., Pile Robot doesn't have `ColorSensor`, thus it doesn't have `getColorSensorValue` or something like that) and keep the `MachineController` as it is.\r\n- Make the common `MachineController` that has the union of methods of these controllers.\r\n\r\nThey actually have pros & cons and our opinions conflicted. But finally, at present, we decided to choose the latter.\r\n\r\n### Pros & Cons of the former\r\n#### Pros\r\n- Straightforward way and thus readable. This is very important for developers.\r\n- They can be easily tested.\r\n\r\n#### Cons\r\n- There will be many duplications of codes because these controllers use [our library](https://github.com/PileProject/drivecommand)'s `MachineBase` that provides the same interface to control machines (so, we will have very similar codes in blocks like [ForwardSecBlock](https://github.com/PileProject/drive/blob/develop/app/src/nxt/java/com/pileproject/drive/programming/visual/block/sequence/ForwardSecBlock.java) in each build variant) but we currently can't make the most of it because of the design.\r\n- It doesn't follow the design of [our library](https://github.com/PileProject/drivecommand). **But we can fix that of our library easily.**\r\n\r\n\r\n### Pros & Cons of the latter\r\n#### Pros\r\n- It follows the design of [our library](https://github.com/PileProject/drivecommand).\r\n- It commonizes the blocks through `MachineController` interface. Thus, it reduces the duplicated codes not only `*.java` but also `*.xml`. \r\n- Easy to maintain because the codes are unified. \r\n\r\n#### Cons\r\n- It is difficult to test each variant.\r\n- Not straightforward way. \r\n- Users can't know what kinds of methods each controller has, and make it worse, calling wrong methods lead to `RuntimeError` not `CompileError`.\r\n- Poor extensibility. We should add/remove a method to/from `MachineController` itself if new machines with new methods. So, maybe we should make an another layer for other machines something like `MachineController` -> `CarController`, `DroneController` (i.e., not use the `MachineController` as the current `NxtController`'s parent).\r\n\r\n## Why we chose the latter\r\nThis was a very difficult problem for us but we took the pros of the latter. Maintaining duplicated codes `*.java` and `*.xml` is very annoying and we can easily change our mind when a new type of machine comes if we keep the unified codes clean.","created_at":"2016-11-29T06:09:04Z","updated_at":"2016-12-18T11:56:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6a81642a2aea6fbb322f28a7d22de99103f85be5","assignee":{"login":"tiwanari","id":2739915,"avatar_url":"https://avatars.githubusercontent.com/u/2739915?v=3","gravatar_id":"","url":"https://api.github.com/users/tiwanari","html_url":"https://github.com/tiwanari","followers_url":"https://api.github.com/users/tiwanari/followers","following_url":"https://api.github.com/users/tiwanari/following{/other_user}","gists_url":"https://api.github.com/users/tiwanari/gists{/gist_id}","starred_url":"https://api.github.com/users/tiwanari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiwanari/subscriptions","organizations_url":"https://api.github.com/users/tiwanari/orgs","repos_url":"https://api.github.com/users/tiwanari/repos","events_url":"https://api.github.com/users/tiwanari/events{/privacy}","received_events_url":"https://api.github.com/users/tiwanari/received_events","type":"User","site_admin":false},"assignees":[{"login":"tiwanari","id":2739915,"avatar_url":"https://avatars.githubusercontent.com/u/2739915?v=3","gravatar_id":"","url":"https://api.github.com/users/tiwanari","html_url":"https://github.com/tiwanari","followers_url":"https://api.github.com/users/tiwanari/followers","following_url":"https://api.github.com/users/tiwanari/following{/other_user}","gists_url":"https://api.github.com/users/tiwanari/gists{/gist_id}","starred_url":"https://api.github.com/users/tiwanari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiwanari/subscriptions","organizations_url":"https://api.github.com/users/tiwanari/orgs","repos_url":"https://api.github.com/users/tiwanari/repos","events_url":"https://api.github.com/users/tiwanari/events{/privacy}","received_events_url":"https://api.github.com/users/tiwanari/received_events","type":"User","site_admin":false},{"login":"amiq11","id":3426676,"avatar_url":"https://avatars.githubusercontent.com/u/3426676?v=3","gravatar_id":"","url":"https://api.github.com/users/amiq11","html_url":"https://github.com/amiq11","followers_url":"https://api.github.com/users/amiq11/followers","following_url":"https://api.github.com/users/amiq11/following{/other_user}","gists_url":"https://api.github.com/users/amiq11/gists{/gist_id}","starred_url":"https://api.github.com/users/amiq11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amiq11/subscriptions","organizations_url":"https://api.github.com/users/amiq11/orgs","repos_url":"https://api.github.com/users/amiq11/repos","events_url":"https://api.github.com/users/amiq11/events{/privacy}","received_events_url":"https://api.github.com/users/amiq11/received_events","type":"User","site_admin":false},{"login":"myusak","id":5147779,"avatar_url":"https://avatars.githubusercontent.com/u/5147779?v=3","gravatar_id":"","url":"https://api.github.com/users/myusak","html_url":"https://github.com/myusak","followers_url":"https://api.github.com/users/myusak/followers","following_url":"https://api.github.com/users/myusak/following{/other_user}","gists_url":"https://api.github.com/users/myusak/gists{/gist_id}","starred_url":"https://api.github.com/users/myusak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myusak/subscriptions","organizations_url":"https://api.github.com/users/myusak/orgs","repos_url":"https://api.github.com/users/myusak/repos","events_url":"https://api.github.com/users/myusak/events{/privacy}","received_events_url":"https://api.github.com/users/myusak/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/PileProject/drive/pulls/59/commits","review_comments_url":"https://api.github.com/repos/PileProject/drive/pulls/59/comments","review_comment_url":"https://api.github.com/repos/PileProject/drive/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PileProject/drive/issues/59/comments","statuses_url":"https://api.github.com/repos/PileProject/drive/statuses/92fd10e3cb1dd6ea5d83a62fb01790d80defd6a9","head":{"label":"tiwanari:feature/standardize_controllers","ref":"feature/standardize_controllers","sha":"92fd10e3cb1dd6ea5d83a62fb01790d80defd6a9","user":{"login":"tiwanari","id":2739915,"avatar_url":"https://avatars.githubusercontent.com/u/2739915?v=3","gravatar_id":"","url":"https://api.github.com/users/tiwanari","html_url":"https://github.com/tiwanari","followers_url":"https://api.github.com/users/tiwanari/followers","following_url":"https://api.github.com/users/tiwanari/following{/other_user}","gists_url":"https://api.github.com/users/tiwanari/gists{/gist_id}","starred_url":"https://api.github.com/users/tiwanari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiwanari/subscriptions","organizations_url":"https://api.github.com/users/tiwanari/orgs","repos_url":"https://api.github.com/users/tiwanari/repos","events_url":"https://api.github.com/users/tiwanari/events{/privacy}","received_events_url":"https://api.github.com/users/tiwanari/received_events","type":"User","site_admin":false},"repo":{"id":53859541,"name":"drive","full_name":"tiwanari/drive","owner":{"login":"tiwanari","id":2739915,"avatar_url":"https://avatars.githubusercontent.com/u/2739915?v=3","gravatar_id":"","url":"https://api.github.com/users/tiwanari","html_url":"https://github.com/tiwanari","followers_url":"https://api.github.com/users/tiwanari/followers","following_url":"https://api.github.com/users/tiwanari/following{/other_user}","gists_url":"https://api.github.com/users/tiwanari/gists{/gist_id}","starred_url":"https://api.github.com/users/tiwanari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiwanari/subscriptions","organizations_url":"https://api.github.com/users/tiwanari/orgs","repos_url":"https://api.github.com/users/tiwanari/repos","events_url":"https://api.github.com/users/tiwanari/events{/privacy}","received_events_url":"https://api.github.com/users/tiwanari/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tiwanari/drive","description":"The drive project","fork":true,"url":"https://api.github.com/repos/tiwanari/drive","forks_url":"https://api.github.com/repos/tiwanari/drive/forks","keys_url":"https://api.github.com/repos/tiwanari/drive/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tiwanari/drive/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tiwanari/drive/teams","hooks_url":"https://api.github.com/repos/tiwanari/drive/hooks","issue_events_url":"https://api.github.com/repos/tiwanari/drive/issues/events{/number}","events_url":"https://api.github.com/repos/tiwanari/drive/events","assignees_url":"https://api.github.com/repos/tiwanari/drive/assignees{/user}","branches_url":"https://api.github.com/repos/tiwanari/drive/branches{/branch}","tags_url":"https://api.github.com/repos/tiwanari/drive/tags","blobs_url":"https://api.github.com/repos/tiwanari/drive/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tiwanari/drive/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tiwanari/drive/git/refs{/sha}","trees_url":"https://api.github.com/repos/tiwanari/drive/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tiwanari/drive/statuses/{sha}","languages_url":"https://api.github.com/repos/tiwanari/drive/languages","stargazers_url":"https://api.github.com/repos/tiwanari/drive/stargazers","contributors_url":"https://api.github.com/repos/tiwanari/drive/contributors","subscribers_url":"https://api.github.com/repos/tiwanari/drive/subscribers","subscription_url":"https://api.github.com/repos/tiwanari/drive/subscription","commits_url":"https://api.github.com/repos/tiwanari/drive/commits{/sha}","git_commits_url":"https://api.github.com/repos/tiwanari/drive/git/commits{/sha}","comments_url":"https://api.github.com/repos/tiwanari/drive/comments{/number}","issue_comment_url":"https://api.github.com/repos/tiwanari/drive/issues/comments{/number}","contents_url":"https://api.github.com/repos/tiwanari/drive/contents/{+path}","compare_url":"https://api.github.com/repos/tiwanari/drive/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tiwanari/drive/merges","archive_url":"https://api.github.com/repos/tiwanari/drive/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tiwanari/drive/downloads","issues_url":"https://api.github.com/repos/tiwanari/drive/issues{/number}","pulls_url":"https://api.github.com/repos/tiwanari/drive/pulls{/number}","milestones_url":"https://api.github.com/repos/tiwanari/drive/milestones{/number}","notifications_url":"https://api.github.com/repos/tiwanari/drive/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tiwanari/drive/labels{/name}","releases_url":"https://api.github.com/repos/tiwanari/drive/releases{/id}","deployments_url":"https://api.github.com/repos/tiwanari/drive/deployments","created_at":"2016-03-14T13:44:05Z","updated_at":"2016-07-18T10:31:59Z","pushed_at":"2016-12-18T07:30:59Z","git_url":"git://github.com/tiwanari/drive.git","ssh_url":"git@github.com:tiwanari/drive.git","clone_url":"https://github.com/tiwanari/drive.git","svn_url":"https://github.com/tiwanari/drive","homepage":null,"size":1664,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"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":"PileProject:develop","ref":"develop","sha":"9b9dcdcd821b3c956581e4723710901017b85ebb","user":{"login":"PileProject","id":4993284,"avatar_url":"https://avatars.githubusercontent.com/u/4993284?v=3","gravatar_id":"","url":"https://api.github.com/users/PileProject","html_url":"https://github.com/PileProject","followers_url":"https://api.github.com/users/PileProject/followers","following_url":"https://api.github.com/users/PileProject/following{/other_user}","gists_url":"https://api.github.com/users/PileProject/gists{/gist_id}","starred_url":"https://api.github.com/users/PileProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PileProject/subscriptions","organizations_url":"https://api.github.com/users/PileProject/orgs","repos_url":"https://api.github.com/users/PileProject/repos","events_url":"https://api.github.com/users/PileProject/events{/privacy}","received_events_url":"https://api.github.com/users/PileProject/received_events","type":"Organization","site_admin":false},"repo":{"id":40538806,"name":"drive","full_name":"PileProject/drive","owner":{"login":"PileProject","id":4993284,"avatar_url":"https://avatars.githubusercontent.com/u/4993284?v=3","gravatar_id":"","url":"https://api.github.com/users/PileProject","html_url":"https://github.com/PileProject","followers_url":"https://api.github.com/users/PileProject/followers","following_url":"https://api.github.com/users/PileProject/following{/other_user}","gists_url":"https://api.github.com/users/PileProject/gists{/gist_id}","starred_url":"https://api.github.com/users/PileProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PileProject/subscriptions","organizations_url":"https://api.github.com/users/PileProject/orgs","repos_url":"https://api.github.com/users/PileProject/repos","events_url":"https://api.github.com/users/PileProject/events{/privacy}","received_events_url":"https://api.github.com/users/PileProject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PileProject/drive","description":"The drive project","fork":false,"url":"https://api.github.com/repos/PileProject/drive","forks_url":"https://api.github.com/repos/PileProject/drive/forks","keys_url":"https://api.github.com/repos/PileProject/drive/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PileProject/drive/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PileProject/drive/teams","hooks_url":"https://api.github.com/repos/PileProject/drive/hooks","issue_events_url":"https://api.github.com/repos/PileProject/drive/issues/events{/number}","events_url":"https://api.github.com/repos/PileProject/drive/events","assignees_url":"https://api.github.com/repos/PileProject/drive/assignees{/user}","branches_url":"https://api.github.com/repos/PileProject/drive/branches{/branch}","tags_url":"https://api.github.com/repos/PileProject/drive/tags","blobs_url":"https://api.github.com/repos/PileProject/drive/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PileProject/drive/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PileProject/drive/git/refs{/sha}","trees_url":"https://api.github.com/repos/PileProject/drive/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PileProject/drive/statuses/{sha}","languages_url":"https://api.github.com/repos/PileProject/drive/languages","stargazers_url":"https://api.github.com/repos/PileProject/drive/stargazers","contributors_url":"https://api.github.com/repos/PileProject/drive/contributors","subscribers_url":"https://api.github.com/repos/PileProject/drive/subscribers","subscription_url":"https://api.github.com/repos/PileProject/drive/subscription","commits_url":"https://api.github.com/repos/PileProject/drive/commits{/sha}","git_commits_url":"https://api.github.com/repos/PileProject/drive/git/commits{/sha}","comments_url":"https://api.github.com/repos/PileProject/drive/comments{/number}","issue_comment_url":"https://api.github.com/repos/PileProject/drive/issues/comments{/number}","contents_url":"https://api.github.com/repos/PileProject/drive/contents/{+path}","compare_url":"https://api.github.com/repos/PileProject/drive/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PileProject/drive/merges","archive_url":"https://api.github.com/repos/PileProject/drive/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PileProject/drive/downloads","issues_url":"https://api.github.com/repos/PileProject/drive/issues{/number}","pulls_url":"https://api.github.com/repos/PileProject/drive/pulls{/number}","milestones_url":"https://api.github.com/repos/PileProject/drive/milestones{/number}","notifications_url":"https://api.github.com/repos/PileProject/drive/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PileProject/drive/labels{/name}","releases_url":"https://api.github.com/repos/PileProject/drive/releases{/id}","deployments_url":"https://api.github.com/repos/PileProject/drive/deployments","created_at":"2015-08-11T11:48:17Z","updated_at":"2016-10-22T08:23:01Z","pushed_at":"2016-12-18T07:31:00Z","git_url":"git://github.com/PileProject/drive.git","ssh_url":"git@github.com:PileProject/drive.git","clone_url":"https://github.com/PileProject/drive.git","svn_url":"https://github.com/PileProject/drive","homepage":null,"size":1788,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":11,"forks":2,"open_issues":11,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/PileProject/drive/pulls/59"},"html":{"href":"https://github.com/PileProject/drive/pull/59"},"issue":{"href":"https://api.github.com/repos/PileProject/drive/issues/59"},"comments":{"href":"https://api.github.com/repos/PileProject/drive/issues/59/comments"},"review_comments":{"href":"https://api.github.com/repos/PileProject/drive/pulls/59/comments"},"review_comment":{"href":"https://api.github.com/repos/PileProject/drive/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PileProject/drive/pulls/59/commits"},"statuses":{"href":"https://api.github.com/repos/PileProject/drive/statuses/92fd10e3cb1dd6ea5d83a62fb01790d80defd6a9"}}}}
{"actor":{"display_login":"tiwanari"}}