Skip to content

Update policy around language constructs - #685

Merged
stkent merged 2 commits into
masterfrom
stkent-patch-1
Jul 7, 2017
Merged

stkent merged 2 commits into
masterfrom
stkent-patch-1

Conversation

@stkent

@stkent stkent commented Jul 4, 2017

Copy link
Copy Markdown
Contributor

@Smarticles101 @FridaTveit please check!


Reviewer Resources:

Track Policies

@Smarticles101 Smarticles101 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@FridaTveit FridaTveit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks @stkent :) I have one small question, but I'm happy for it to be merged :)

Comment thread POLICIES.md Outdated

> Starter implementations and test classes should not include the `final` keyword in class declarations as it isn't strictly necessary and could be confusing to people unfamiliar with Java.
> Minimize (within reason) the number of Java language constructs a user is exposed to simultaneously at the beginning of the track. Instead, introduce those constructs with examples and hints in an appropriate later exercise. Specific applications of this policy include:
> - avoiding use of the `public` keyword in user-facing class declarations, method signatures, and parameter signatures;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion we're leaving out public not just because of minimising complexity (especially since public is more familiar to most people and therefore adds less complexity than final) but also because it's best practice to limit access to classes, methods and variables where possible. So if something can be made package private or private, then it should be. Do you agree? Is this worth mentioning here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point; I think that's worth calling out in a separate policy entry (that we aim to follow best practices); the minimization of visibility would then be an instance of that policy. If you concur, I'll make the change later today.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good :)

@stkent

stkent commented Jul 5, 2017

Copy link
Copy Markdown
Contributor Author

Pushed with proposed changes; let me know what you think! Writing this is hard :P

@stkent
stkent force-pushed the stkent-patch-1 branch 2 times, most recently from 08cfa48 to 8f9ad75 Compare July 5, 2017 17:51
Comment thread POLICIES.md Outdated
### Adhere to best practices

> Ensure that all Java code adheres to the best practices listed below:
> - minimize the accessibility of classes and members (Effective Java, item 13)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps a link to an explanation of this would be nice.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately there's no way to link to content of the book itself, as far as I know. I could link to some kind of proxy like http://jtechies.blogspot.com/2012/07/item-13-minimize-accessibility-of.html?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me

@stkent

stkent commented Jul 7, 2017

Copy link
Copy Markdown
Contributor Author

Updated and rebased!

@Smarticles101 Smarticles101 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it looks good now :)

@stkent

stkent commented Jul 7, 2017

Copy link
Copy Markdown
Contributor Author

👍 thanks for the eyes, @Smarticles101!

@stkent
stkent merged commit 2cb2a5a into master Jul 7, 2017
@stkent
stkent deleted the stkent-patch-1 branch July 7, 2017 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants