Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant code + add type checker #234

Merged
merged 8 commits into from Feb 1, 2019

Conversation

Projects
None yet
2 participants
@c-w
Copy link
Member

commented Feb 1, 2019

This pull request contains several changes that will make maintenance of the project easier going forward:

  • Inline simple wrapper methods.

  • Remove unnecessary statements such as pass or return.

  • Remove comments that only re-state information that's already in method names, parameter names, class names or type annotations.

  • Make interface method signatures more specific so that all subclasses must expect the same arguments and return the same values.

All Submissions:

  • Have you followed the guidelines in our Contributing document?

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

  • Does your PR follow our Code of Conduct?

  • Have you added an explanation of what your changes do and why you'd like us to include them?

  • Does each method or function "do one thing well"? Reviewers may recommend methods be split up for maintainability and testability.

  • Is this code designed to be testable? Not applicable: refactor

  • Is the code documented well? Not applicable: refactor

  • Does your submission pass existing tests (or update existing tests with documentation regarding the change)?

  • Have you added tests to cover your changes? Not applicable: refactor

  • Have you linted your code prior to submission?

  • Have you updated the documentation and README? Not applicable: refactor

  • Is PII treated correctly? In particular, make sure the code is not logging objects or strings that might contain PII (e.g. request headers). Not applicable: refactor

  • Have secrets been stripped before committing? Not applicable: refactor

@c-w c-w changed the title Remove redundant code Remove redundant code + add type checker Feb 1, 2019

@margaretmeehan

This comment has been minimized.

Copy link
Collaborator

commented Feb 1, 2019

Many of the comments you removed are certainly redundant, though I think commenting code can be helpful for people trying to understand a code base. Would like to hear better practices for how we can comment well.

@c-w

This comment has been minimized.

Copy link
Member Author

commented Feb 1, 2019

@margaretmeehan Here's a concise "styleguide" for comments that I've seen successful on many projects in the past: ncrcoe/java-for-small-teams/style/comments. Other authors (e.g. Robert Martin in Clean Code) say similar things but with more words. In general, I'd try to avoid comments as much as possible since they tend to drift from the code over time as they're often not updated when the code is changed. I've often seen higher level documentation (e.g. diagrams of how the code interacts or how the architecture maps to the code) be more valuable and require less maintenance effort over time.

@margaretmeehan
Copy link
Collaborator

left a comment

Thanks for the responses @c-w

@c-w c-w merged commit b421798 into master Feb 1, 2019

3 checks passed

agogosml-ci Build #20190201.4 succeeded
Details
agogosml-cli-ci Build #20190201.4 succeeded
Details
license/cla All CLA requirements met.
Details

@c-w c-w deleted the remove-redundant-code branch Feb 1, 2019

sayar added a commit that referenced this pull request Feb 1, 2019

@sayar sayar restored the remove-redundant-code branch Feb 1, 2019

sayar added a commit that referenced this pull request Feb 1, 2019

@c-w c-w deleted the remove-redundant-code branch Feb 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.