Skip to content

Instantly share code, notes, and snippets.

@joelgallant
Last active December 18, 2015 01:19
Show Gist options
  • Save joelgallant/5703114 to your computer and use it in GitHub Desktop.
Save joelgallant/5703114 to your computer and use it in GitHub Desktop.
Checks for ATALibJ Classes
Security:
_ Internally used objects are private
_ All fields that can be final are final
_ All methods that are depended on in other methods should be final
_ Classes that are not final should not use its non-final methods inside of any of its own methods
_ Classes that should not be extended should be final
_ Internal classes should be static whenever possible
_ Enums should have private constructors
_ Minimize accessibility
_ Minimize mutability
_ Prevent accessibility of composing objects
_ Check parameters for validity
_ Make defensive copies when needed
_ Include failure information in exceptions
_ All non-settings functions in modules must call ensureEnabled() before starting
Structure:
_ Overrides toString() when applicable
_ Implement Comparer when possible
_ Refer to and use interfaces instead of implementations whenever it is possible
Naming:
Functionality:
Documentation:
_ Document all public and protected elements
_ Fully document every checked and unchecked exceptions thrown
@joelgallant
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment