Skip to content

word-count: Simplify by removing quotation aspect #726

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

Closed
wants to merge 1 commit into from

Conversation

behrtam
Copy link
Contributor

@behrtam behrtam commented Mar 16, 2017

In #403 the exercise was extended with a completely new aspect (the removal of single quotations but not apostrophes) which is not mentioned in it's minimalistic description.

Especially in the last months we tried to simplify exercises in a way that they try to tackle at best one problem (or at least not too many different ones). Right now we test splitting on different characters, counting, case normalization and removing some but not all punctuation.

So, I would like to see this exercise simplified just a bit by removing those two quotation test cases.

In #403 the exercise was extended with a completely new aspect (*the removal of single quotations but not apostrophes*) which is not mentioned in it's minimalistic description. This removes the two related test cases to simplify this exercise.
@ErikSchierboom
Copy link
Member

So basically the options are:

  1. Remove the quotations test cases.
  2. Update the documentation.

Personally, I don't really have an opinion either way, but perhaps other people do?

@kotp
Copy link
Member

kotp commented Mar 19, 2017

This extension happened within the last 6 months, are we finding that there is a decrease in completion, a negative change in the discussions about the exercise, a general failure to solve these tests in solutions submitted?

  1. No Change Necessary
  2. Document the requirement (arguably this is already done via the tests as a "Did you also consider that words with apostrophes are single words?")
  3. Remove the extension

@behrtam
Copy link
Contributor Author

behrtam commented Mar 19, 2017

I saw very complex implementations because they didn't know regular expressions. So they wrote a lot of if statements and accessed the the single chars of the string after they already did all the splitting and counting.

@m-dango
Copy link
Member

m-dango commented Mar 24, 2017

How about keeping quotations but removing apostrophes? i.e. Change can't to cannot.

@kotp
Copy link
Member

kotp commented Mar 24, 2017

Contractions are common enough in documents to warrant having this included as part of the problem. It can be solved without regular expressions. It happens that regular expressions happen to be a good tool to extract that apostrophe pattern. But it isn't the only thing. Many languages support regular expressions either directly or provided through libraries, but many languages do not.

Indeed, even with those using regular expressions, it seems that there are solutions with pretty complex logic. I am not sure that is a bad thing. It lets us talk about the choices for the solutions.

What I would be more concerned about is a decrease in the attempt rate on this exercise. And then finding out why.

@ErikSchierboom
Copy link
Member

Actually, I quite like the added apostrophe precisely because it makes the exercise just a bit more difficulty. Without this, the exercise would almost be too trivial I feel.

@behrtam
Copy link
Contributor Author

behrtam commented Mar 30, 2017

I agree that this change maybe would make it too easy.

So, we have the problems of splitting and counting. Now one way to make this exercise more challenging is to add (or not remove) a totally new problem domain with normalization and complex punctuation removal.

Or, as most languages have some built-in functions to split on whitespace, we could just make the splitting more interesting and also split on other chars like underscore.

word_count('hey,my_spacebar_is_broken.') -> {'hey': 1, 'my': 1, 'spacebar': 1, 'is': 1, 'broken': 1}

But if most of you are fine with so many different problem areas in on exercise. I can deal with that, too.

@rpottsoh
Copy link
Member

I am for not removing....

@behrtam behrtam closed this Apr 29, 2017
@petertseng petertseng deleted the word-count-simplify branch April 29, 2017 16:02
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.

5 participants