Skip to content

rectangles: polish example implementation#254

Merged
jtigger merged 1 commit into
masterfrom
rectangles-polish
Jan 27, 2017
Merged

rectangles: polish example implementation#254
jtigger merged 1 commit into
masterfrom
rectangles-polish

Conversation

@stkent
Copy link
Copy Markdown
Contributor

@stkent stkent commented Jan 20, 2017

Following on from #243.

Renames Grid.Entry to Grid.Element and adds a couple query methods to the Grid.Element type for readability.

Copy link
Copy Markdown
Contributor

@jtigger jtigger left a comment

Choose a reason for hiding this comment

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

The "mandatory" change is to reconcile that some variables are named ...entry when now referring to a value from the Element enum.

I have a suggestion for another name for Element. :)

SPACE;

private static Entry fromChar(final char rawGridEntry) {
private static Element fromChar(final char rawGridEntry) {
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.

I sense an intent to want to pair-up the input and the output, by picking a similar name; if so, that got lost in the rename of the output type.


tl;dr — Piece?

I couldn't help myself... I had to attempt to suggest names for these little bits of the diagram (not that Element isn't "right"... just nice having options). In that journey I discovered that the Dictionary/Thesaurus that comes OOTB with OS X has a neat little section on some words called "Choose the right word". There's one such entry for "part". It reads like this:

The whole is equal to the sum of its parts — part being a general term for any of the components of a whole. But how did the whole come apart? Fragment suggests that breakage has occurred (fragments of the vase) and often refers to a brittle substance such as glass or pottery. Segment suggests that the whole has been separated along natural or pre-existing lines of division (a segment of an orange), and section suggests a substantial and clearly separate part that fits closely with other parts to form the whole (a section of the bookcase). Fraction usually suggests a less substantial but still clearly delineated part (a fraction of her income), and a portion is a part that has been allotted or assigned to someone (her portion of the program). Finally, the very frequently used piece is any part that is separate from the whole (we're missing two pieces from the jigsaw puzzle).

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.

I'm sick, so apologies for the abbreviated reply; but your Piece made me think of another option: Tile! I'm happy to use whichever of those two you prefer :)

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.

I'm sick, so apologies for the abbreviated reply ...

Unacceptable; sickness is for the weak. 😷

Oooohhh I love Tile too! I dig the physicality of it. Seems like the best names are those that are the most concrete but not overly-so.

Hope you're feeling better, soon, Stuart! 🤒


private boolean isVerticalConnector() {
return this == CORNER || this == VLINE;
}
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.

ooh! I ❤️ ...Connector, here!

@jtigger jtigger self-assigned this Jan 23, 2017
@stkent stkent force-pushed the rectangles-polish branch from b4bd746 to bc4aa49 Compare January 25, 2017 17:50
@stkent stkent force-pushed the rectangles-polish branch from bc4aa49 to 5119e20 Compare January 25, 2017 17:51
@stkent
Copy link
Copy Markdown
Contributor Author

stkent commented Jan 27, 2017

Updated!

@jtigger
Copy link
Copy Markdown
Contributor

jtigger commented Jan 27, 2017

Tile looks GREAT! 🥇

@jtigger jtigger merged commit 01cb7e1 into master Jan 27, 2017
@jtigger jtigger deleted the rectangles-polish branch January 27, 2017 05:53
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.

2 participants