Skip to content
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

Deduplicate - String repeat #109

Closed
5 tasks done
hobovsky opened this issue Aug 8, 2022 · 10 comments
Closed
5 tasks done

Deduplicate - String repeat #109

hobovsky opened this issue Aug 8, 2022 · 10 comments
Assignees
Labels
discussion/deduplicate Discussion and vote what to do with duplicate kata

Comments

@hobovsky
Copy link
Contributor

hobovsky commented Aug 8, 2022

If not stated otherwise, all kata take a string and a count as arguments and expect a return value of the string repeated requested amount of times.

  1. String repeat
  • 8kyu
  • 88% with ~160k solutions
  • 4 pending issues
  • 34 languages, 1 pending translation
  • Published Aug 2016, author last active May 2022
  1. Thinkful - String Drills: Repeater
  • 7kyu, but seems to not follow rank votes (15x8kyu, 2x7kyu)
  • 86% with 17k solutions
  • 2 pending issues, one about being a duplicate
  • 16 languages, no pending translations, none unique
  • Published Dec 2016, author inactive.
  1. Thinkful - String Drills: Repeater level 2
  • 7kyu
  • The returned answer needs to be formatted in a specific way
  • 88% with 2k completions
  • No pending issues
  • 5 languages + 2 pending translations, none exclusive
  • Published Dec 2016, author inactive
  1. (Don't) Make Me Repeat Myself
  • 7kyu
  • JS only, repeat forbidden but ejini reports it can be bypass easily
  • 86% with 3.4k solutions
  • 1 pending issue
  • 1 language
  • Published Sep 2013, author inactive
  1. Multiply characters
  • 7kyu
  • bug fixing kata, but the presented bug is of (arguably) a dubious value and heavily varies between languages
  • 88% with ~7.2k solutions
  • No pending issues
  • 7 languages
  • Published Jan 2014, author inactive
  1. Contamination #1 -String-
  • 8kyu
  • Repeats a single character a given amount of times. Task is slightly concealed. The main logic is the same as all other kata for languages which treat characters as one-character-long strings (Python, JS), but can be significantly different for languages which strongly distinguish between strings and characters (C, C#, Java, ...).
  • 92% with 4.8k solutions
  • 1 pending issue
  • 6 languages + 2 pending translations, none unique
  • Published Jul 2017, author inactive

ADDED:

  1. repeatIt
  • 8 kyu
  • Same as 1., with addition of potentially invalid inputs of incorrect types
  • 92% with 10,5k solutions
  • 4 pending issues
  • 8 approved languages, 0 pending translations, none unique
  • Published Jun 2015, author active

Conclusion

Since kata 1. covers all languages available in other kata, there's no need to move any translations.

@hobovsky hobovsky added the discussion/deduplicate Discussion and vote what to do with duplicate kata label Aug 8, 2022
@hobovsky hobovsky moved this to Discussing in Deduplication process Aug 8, 2022
@hobovsky
Copy link
Contributor Author

hobovsky commented Aug 8, 2022

My opinion:

  • Keep 1. as most complete. It covers all languages available in all other kata.
  • Retire 2. as a duplicate of 1.
  • No strong opinion on retirement of 3. I can see how newbies might like it. I am fine with either keeping it, or retiring.
  • Retire 4. I don't like "recreate a built-in" kata too much, I also dont think the task is interesting enough to deserve a separate kata.
  • I don't like 5., but I am fine with keeping it. It's a bug fixing kata, but every language presents different "bug".
  • No opinion on 6. It can be kept if it would properly focus on languages where single chars require a different approach than one-character-long strings. There's NASM translation which does this, but unfortunately approved C# translation does not.
  • EDIT: after 7. was added I still vote to keep 1. as the most complete and to retire 7., even though 7. has been published before 1. Maintenance cost to move languages from 1. to 7. would be too high.

I did not check edge cases in any of the kata, but following tests could be interesting:

  • Repetitions of empty strings,
  • Count of repetitions being 0,
  • Performance tests for potentially costly concatenation of immutable strings (for languages where applicable).

I don't know if any of the listed kata contains such tests.

@monadius
Copy link

monadius commented Aug 8, 2022

Keep 1 and 6. Retire 2, 3 (it is just a combination of two existing 8 kyu tasks), 4, 5.

I vote to keep 6 because it is a slight variation of 1 (which is fine for an 8 kyu kata) and I like its Haskell solution.

@ejini6969
Copy link

ejini6969 commented Aug 8, 2022

Regarding 4, tests cannot be bypassed easily since require && vm have been disabled and some old solutions were not invalidated but have been proven to not pass the current tests!

Retire

  • 2 due to being exact dup of 1
  • 3 due to above reason + dup of many string formatting katas (Rank is also inappropriate)
  • 5 due to many solutions exploit in 1 and inappropriate rank

I have no strong opinion in retiring or keeping 4. since some solutions in 1. can indirectly expose solution of 4. but only a few.

Since 6 involves handling different data types (strings & characters) in typed languages, I think it can be kept.

EDIT: Woops missed that one, sry 😅 Yeah, retired 7. too due to useless input validation

@akar-0
Copy link

akar-0 commented Aug 8, 2022

Keep 1 and 6, retire the others.

@CiprianAmza
Copy link

CiprianAmza commented Aug 8, 2022

I agree with keeping 6, but I don't actually see any difference between any of the 1 - 5 katas. Keeping also 1, if everyone agrees with it, seems fair.

@Blind4Basics
Copy link

Keep 1 only. But I'm not against keeping 6 if the opinion is general

@akar-0
Copy link

akar-0 commented Aug 8, 2022

I think this kata should be added to the list: https://www.codewars.com/kata/557af9418895e44de7000053

I didn't examine it, seems a mere duplicate of 1, with extra input validation.

@hobovsky
Copy link
Contributor Author

hobovsky commented Aug 8, 2022

Oh ejini how could you :D
I added it to the list, and I will try to reach out to people who already cast their vote to update it.

@Kacarott
Copy link

Kacarott commented Aug 8, 2022

Keep 1 and 6. monadius is right, 6 deserves to be kept if only for the haskell translation.

@EloiseRosen
Copy link

keeping 1 and 6 sounds fine to me

@hobovsky hobovsky moved this from Discussing to Waiting for admin actions in Deduplication process Aug 14, 2022
@kazk kazk closed this as completed Aug 15, 2022
Repository owner moved this from Waiting for admin actions to Done in Deduplication process Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion/deduplicate Discussion and vote what to do with duplicate kata
Projects
Development

No branches or pull requests

9 participants