Skip to content

Dummy-proof the source? #67

Description

@romoore

Some of the code could be made "simpler" by not being so clever. An example:

if (key.isConnectable()) if (!communicator.onConnectable()) continue;

Could be rewritten for noobs as

if(key.isConnectable() && !communicator.onConnectable()){ 
  continue; 
}

This has 2 advantages:

  • A single "if" which is still fail-fast
  • Explicit block statements in case nooblets want to change the behavior but don't realize what will be executed and what won't.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions