Closed Voileexperiments closed 3 years ago
Trailing zeros in factorial: https://www.codewars.com/kata/number-of-trailing-zeros-of-n https://www.codewars.com/kata/factorial-tail https://www.codewars.com/kata/trailing-zeros-in-factorials-in-any-given-integer-base Proposal: Drop 2 (2 and 3 are exactly the same except 3 is slightly more performance heavy), and maybe 1 since it's a subset of 3.
I disagree that 1 is a subset of 3; It covers a more narrow domain which can be modeled a lot more simply than the arbitrary base problem and is a good stepping stone for the relevant algorithms (another common task is to find largest k
such that n! mod p^k == 0
where p
is some prime number input, which I haven't seen, but I also haven't done many problems on codewars (please link to me if you see it)), not to mention that it has wider translation coverage (can't judge if it's better, though) which is not matched by either 2 or 3, so it's more readily available to more users to practice.
2 probably deserves the retirement though.
Proposals for treatment as low quality katas:
https://www.codewars.com/kata/text-align-justify/discuss 28 open issues nonexistent sample tests, translations are apparently even worse than the source; proposition: clean up needed
https://www.codewars.com/kata/ip-validation/discuss/ 16 open issues <- although it's not really that bad. 4kyu is vastly overrating it for current standards since it's a simple validation problem, and it's missing sample tests in CoffeeScript, Javascript etc; proposition: rewrite needed, possibly retire old kata in favour of realigning the score
https://www.codewars.com/kata/base64-encoding/discuss 18 open issues ...
@Unihedro those katas can be boiled down to ~3 unique issues: others are just people keep raising the same issue again without adding anything new (yes, people like to do that all the time). And the issue boils down to, unsurprisingly, broken translations. If I have time to clean up all those duplicate issues I'd probably have just fixed the translation, but I didn't do the latter, so ;-)
The following kata can also be retired: https://www.codewars.com/kata/regular-expression-check-if-divisible-by-0b101-5 It's an exact duplicate of: https://www.codewars.com/kata/regular-expression-for-binary-numbers-divisible-by-5
Low quality kata (still in beta) to retire: https://www.codewars.com/kata/52f5f8757c461de6310001e8 (writing the sum of a and b... / 20 issues / no random tests / ...)
in the low quality katas to retire:
https://www.codewars.com/kata/zero-fill-dot-dot-dot-for-the-queen
This is now obsolete since padStart
is available from Node 8.
This is now obsolete since padStart is available from Node 8.
But not all Kata are applicable for all languages. And on the other side of the coin, just because one language has a library function does not make it a bad Kata for other languages....
Yes, but my point there is that lots people make katas that are language-specific, and so they're not portable to most other languages and, hence, the status of other languages does not apply to the kata.
I know at least 4 published white katas that exhibits this, but we'll see.
https://www.codewars.com/kata/grasshopper-debug
Or, in general: all the bs "bugfix" katas that just dumps "code" in alien syntax and nonsense errors (that is so horribly broken that you can't run them without seeing a dozen errors) in the initial code section.
They don't teach anything and are really best described as attempts to shitpost katas.
These kata failed tests when I tested against the new runner. I haven't looked into them much, so some might be caused by the changes in the runner.
It seems like assertSimilar
is causing lots of issues for JS. I think it's a bad idea to use the output of util.inspect
for testing... The output isn't standardized as far as I know, so it could've changed over the years. cw-2.js
needs to be fixed in general.
Need to use my_any() function
<FAILED::>Sorry. Unlucky this time.<:LF:>Failed asserting that 80 matches expected 85.
<FAILED::>Expected: '[\'John Brown\', \'Bill Webb\', \'Jane Webb\', \'Doe Bradley\', \'Bill Lawrence\', \'Doe Lawrence\', \'Jane Watts\', \'Jane Lawrence\']', instead got: '[\'John Brown\', \'Jane Webb\', \'Doe Bradley\', \'Bill Lawrence\', \'Doe Lawrence\', \'Jane Watts\', \'Jane Lawrence\']'
TestError: Oops, it seems that you have not used recursion in your function. Please try again.
TestError: Expected: '', instead got: undefined
TestError: 212.228 × 164.964 ↺ 32° 35043 ̷≈ 35009.979792
Expected: '[{ siddneni: \n { attributes: {},\n sub: \n [ [Object],\n \'mwrfjwfml cpwrwp novymc qfpeou llyejcu\',\n [Object] ] } }, { wmwgs: { attributes: {}, sub: [ [Object], [Object], [Object] ] } }, { code: \n { sub: \n [ [Object],\n \'ktqyfy obigjppi idcgc cfudjj ejknhr\',\n [Object] ] } }, \'kpoimx qtxtxk xufgthgynls dglid xumddimsfyw\']', instead got: '[{ siddneni: \n { attributes: { undefined: undefined },\n sub: \n [ [Object],\n \'mwrfjwfml cpwrwp novymc qfpeou llyejcu\',\n [Object] ] } }, { wmwgs: \n { attributes: { undefined: undefined },\n sub: [ [Object], [Object], [Object] ] } }, { code: \n { sub: \n [ [Object],\n \'ktqyfy obigjppi idcgc cfudjj ejknhr\',\n [Object] ] } }, \'kpoimx qtxtxk xufgthgynls dglid xumddimsfyw\']'
<FAILED::>Expected: [:+, :-, :*, :/, :%, :>, :<, :~, :&, :|, :^, :i, :!], instead got: [:%, :&, :*, :+, :-, :/, :<, :>, :^, :|, :~, :i, :!]
<FAILED::>Error: you have had more than 60 tries! - Expected: 2, instead got: 1
<FAILED::>Something fishy going on. Make sure your solved function is correct.
<FAILED::>what if 2nd parameter is not provided? - Expected: '[null, null]', instead got: '[undefined, undefined]'
<FAILED::>Expected: '\'2\'', instead got: '2'
AssertionError: GiftSent should not be called when funds are insufficient
<FAILED::>Test Failed<:LF:>expected: "2018-03-18T16:13+0900"<:LF:> got: "2018-03-18T16:13+09:00"<:LF:><:LF:>(compared using ==)<:LF:>
CoffeeScript kata that just wraps JavaScript with backticks. These are broken for a while. See https://github.com/Codewars/codewars-runner-cli/issues/406
mkdir -p has a test case that tries to create '/usr/share/man/man1'. This will now fail with EACCESS: permission denied
.
<ERROR::>Error: EACCES: permission denied, mkdir '/usr/share/man/man1'
I think this used to work because the directory existed.
Another FizzBuzz: https://www.codewars.com/kata/multiples/
Another "range extraction": https://www.codewars.com/kata/summarize-ranges/
Also, #1342 should be part of this issue (although most of those katas are now retired)
@kazk I've mostly fixed the katas you've listed above for those I can.
The problem is: Most of those Python katas are passing through a global object through user code and test fixture (and sometimes preloaded too) and do things on them. Because concatenation is not used anymore there is no way to pass any kind of global variables around and have changes reflected on all sides.
Thanks @Voileexperiments!
@Bubbler-4 do you know any workarounds for global states? Maybe import setup
(instead of from setup import *
) and mutate setup.shared_variable
?
@kazk The current problem with Recursive Replication and Recursive reverse string is actually still the global scope problem: The tests try to patch the user solution function to include a counter. But since the reference to the user function within its code is not pointing to the one in global space anymore, the patching breaks and the counter always ends up with 1
.
Also I've just fixed Lexicographic Permutations (Just came up with a fix myself): I deleted modules['itertools']
in Preloaded. Users trying to import itertools
will still fail the tests.
Retired the following:
Because concatenation is not used anymore there is no way to pass any kind of global variables around and have changes reflected on all sides.
I think the way @kazk mentioned is a possible workaround for it.
The idea is to mutate the module object directly so that the loaded modules can see its own scope changed. import x
reveals a module object named x
which acts as a "scope" for the inner objects. Mutating x.y
then makes the change to y
visible inside the module x
.
https://www.codewars.com/kata/hypercube-lists
typing
is not available in the new runner anymore?
typing
was introduced in Python 3.5 as far as I know. Sometimes Codewars has incorrect Python version associated with the kata. It should be available if 3.6 is specified.
Well, but as far as I know:
So I guess that means the previous Python 3.4 version somehow has typing
?
I just checked the log and the request has languageVersion
set to 3.x
meaning 3.4
at the moment.
So I guess that means the previous Python 3.4 version somehow has
typing
?
That might be possible. The old runner's environment was not isolated well causing lots of issues. The kata should be republished with language version set to 3.6.
It can't be republished with Python 3.6 at the moment because it sets number 3.6
as version number instead of string "3.6"
:expressionless:
EDIT: Republished
Happy numbers: https://www.codewars.com/kata/happy-numbers-5 (js) https://www.codewars.com/kata/happy-numbers-6 (haskell, python) (should be merged?)
betas:
https://www.codewars.com/kata/happy-numbers-3 done
https://www.codewars.com/kata/happy-numbers-4 done
drafts (if they matter): https://www.codewars.com/kata/happy-numbers https://www.codewars.com/kata/happy-numbers-1
@kazk someone reported that the Rust version of Boolfuck Interpreter kata is broken under 1.25 due to unused import, and I fiddled with the code for a long time and didn't come up with a solution (Rust is not my thing ;-)). Can you please take a look?
Yeah, I'll take a look.
Just for the record, Rust 1.25 is not always compatible with contents written for Rust 1.15 on Codewars. If it was, then we didn't have to wait for the new runner to add it. I don't know if it's possible to make it work in both versions. I recently learned that Codewars doesn't allow multiple language versions to coexist. This limitation comes from how Codewars stores kata in the database. Languages like JS and Python works because the same code can be used across versions.
I made that one work with 1.25 and dropped 1.15.1 support. Existing solutions should work as long as it's not using deprecated stuff.
strong suspicion of a required retirement: https://www.codewars.com/kata/5452113c699b538c18000b01/discuss
in java at least, this kata is full of shit. It actually tests almost nothing (and I don't even talk about the number of tests... See the issue I posted)
@Blind4Basics Nah, it's just the Java version that's completely bogus. The translator is long gone so someone will have to rewrite the Java version (or nuke it, but only author can do that).
https://www.codewars.com/kata/55c353487fe3cc80660001d4
This one is just bullshit: description lacking almost everything, 5 tests only, the "only" way to pass the tests is to implement something that would NEVER be a good idea on the field.... One of the poorest experience a warrior could encounter on CW...
@kazk Can you do a hotfix to the Ruby version of this kata? Or I can do it after a week.
Yeah, I'll fix it soon.
Fixed. The auto upgrade script shouldn't have enabled Ruby 2.5 with warning printed to stderr
:/
Can we instead collect all the Ruby versions that has warning printed to stderr
? Because this is a mild issue (like xrange
/range
for Python 2/3) and is easily fixable.
Something I just recalled: https://www.codewars.com/kata/data-types-a-la-carte-fork was a fork (aka with the exact same content) of https://www.codewars.com/kata/data-types-a-la-carte which used to be broken a long, long time because we used to couldn't edit approved katas. Since the latter has already been fixed, the former should be retired.
This has vote ranking of 32% only and has been inactive for over 2 years and was published 4 years ago :
https://www.codewars.com/kata/binary/discuss/javascript
I think this should be retired.
This has vote ranking 0% of 3 (is not retired for some reason) has been inactive for 3 years and was published 4 years ago :
https://www.codewars.com/kata/inverse-function
Probably needs to be retired now.
This has 57% vote ranking, has been inactive for 4 years and was published 4 years ago.
https://www.codewars.com/kata/n-queen-problem/javascript
This will now be a duplicate to Kata published after that. Needs to be retired
This has 50% vote ranking, inactive for 3 years and was published 4 years ago
https://www.codewars.com/kata/simple-bbcode-parser/discuss/javascript
Probably best to put it to sleep now.
Great Kata, but duplicate of a million Kata's by now. Inactive for 3 years and was published 4 years ago
No more fibonacci Kata's are required. My vote is on retire
IDK if this thread is still relevant, but I think I will drop something here sometimes. Duplicated katas are really annoying thing.
Add big integer as strings: https://www.codewars.com/kata/sum-strings-as-numbers/ https://www.codewars.com/kata/adding-big-numbers
I believe there's a few more identical katas, but these two share some things in common:
For duplicates, please contribute to https://github.com/Codewars/codewars.com/wiki/List-of-Possible-Duplicate-Kata instead of commenting here.
Closing because we now have https://github.com/codewars/content-issues.
While #1301 is being idle for a while, let's collect all the duplicates/low quality katas out there that should be retired/revamped/de-duplicated.
Duplicates
Rot-13: https://www.codewars.com/kata/rot13/ https://www.codewars.com/kata/rot13-1/ https://www.codewars.com/kata/rot13-2/ beta: https://www.codewars.com/kata/hail-caesar https://www.codewars.com/kata/caesars-cypher-2 Proposal: Drop all betas, and all but one published katas
Ceasar cipher: https://www.codewars.com/kata/caeser-encryption https://www.codewars.com/kata/dbftbs-djqifs https://www.codewars.com/kata/caesar-cipher-helper beta: https://www.codewars.com/kata/caesar-cipher-1 https://www.codewars.com/kata/unofficial-fcc-challenge-basic-algorithm-scripting-caesars-cipher https://www.codewars.com/kata/cryptography-caesar-cipher https://www.codewars.com/kata/caesars-cipher https://www.codewars.com/kata/caesars-cipher-1 https://www.codewars.com/kata/caesar-cipher https://www.codewars.com/kata/casear-cypher https://www.codewars.com/kata/caesar-cipher-1 Proposal: Drop all the betas, and all but one published katas
Fizzbuzz: https://www.codewars.com/kata/fizz-buzz https://www.codewars.com/kata/pre-fizzbuzz-workout-number-1 betas: https://www.codewars.com/kata/tiy-fizzbuzz https://www.codewars.com/kata/if-less-fizzbuzz-1 https://www.codewars.com/kata/fizzbuzz-4 https://www.codewars.com/kata/pre-fizzbuzz-workout-number-2 https://www.codewars.com/kata/fizz-buzz-2 https://www.codewars.com/kata/fizz-buzz-1 https://www.codewars.com/kata/your-basic-fizzbuzz-kata Proposal: DROP ALL THE BETAS (Note that there are more of them, I just searched along "fizzbuzz" keyword. I know there are more because I've encountered more disguised ones in beta). Maybe we should only keep one of the published ones, I mean, they're pretty much the same, no? Except for the return type
Church numerals: https://www.codewars.com/kata/church-numbers-1 https://www.codewars.com/kata/church-numbers-ii https://www.codewars.com/kata/church-numbers https://www.codewars.com/kata/church-numbers-add-multiply-exponents https://www.codewars.com/kata/church-numbers-find-the-predecessor-and-subtract Proposal: Only one of
1, 3, 4
should be kept.2
is the most comprehensive but it's only in JS. Preferably we should have one version that covers all of2
and are still available in most functional languages (and maaaaybe JS? But I don't think JS is a good idea for this).Arithmetic expression parser: https://www.codewars.com/kata/arithmetic-expressions-evaluator https://www.codewars.com/kata/calculate-the-expression https://www.codewars.com/kata/evaluate-mathematical-expression https://www.codewars.com/kata/parsing-and-evaluation-of-mathematical-expressions https://www.codewars.com/kata/calculator https://www.codewars.com/kata/no-math-expression-evaluator https://www.codewars.com/kata/route-calculator beta: https://www.codewars.com/kata/advanced-calculator https://www.codewars.com/kata/my-bedmas-approved-calculator Proposal: Drop all but one. We already have tons of arithmetic expression parser kata who are all pretty much the same except with a million variations. The problem is, all of them are pretty much the same and the quickest way to do them is to
eval
them via JS/Python/etc, and it's unstoppable this way (or you can just drop in the standard parser already available and tweak from there). They stop being interesting a long time ago.Sudoku board validation: https://www.codewars.com/kata/did-i-finish-my-sudoku https://www.codewars.com/kata/sudoku-solution-validator https://www.codewars.com/kata/validate-sudoku-with-size-nxn Proposal: Drop 1 and 2, they have incredibly weak tests anyway and is covered by 3. 3 needs to revamped and added better tests and random tests, but that's after 500 limit is lifted.
Sudoku solver: https://www.codewars.com/kata/hard-sudoku-solver https://www.codewars.com/kata/hard-sudoku-solver-1 https://www.codewars.com/kata/sudoku-solver https://www.codewars.com/kata/finish-this-mini-sudoku https://www.codewars.com/kata/easy-sudoku (beta) https://www.codewars.com/kata/sudoku-solver-number-1 (beta) https://www.codewars.com/kata/sudoku-solver-number-2 (beta) https://www.codewars.com/kata/sudoku-solver-number-3 (beta) https://www.codewars.com/kata/sudoku-solver-number-4 (beta) https://www.codewars.com/kata/sudoku-solver-number-5 (beta) Proposal: Drop all of them and rewrite one that actually has good tests and random tests. Especially those betas: those 5 betas are duplicate of themselves
Fibonacci numbers: https://www.codewars.com/kata/complete-fibonacci-series https://www.codewars.com/kata/fibonacci-reloaded https://www.codewars.com/kata/n-th-fibonacci https://www.codewars.com/kata/memoized-fibonacci https://www.codewars.com/kata/fast-fibonacci https://www.codewars.com/kata/recursion-number-2-fibonacci https://www.codewars.com/kata/big-fibonacci-numbers-1 betas: https://www.codewars.com/kata/fibonacci-number https://www.codewars.com/kata/the-fibonacci-sequence https://www.codewars.com/kata/fibonacci-numberd https://www.codewars.com/kata/efficient-recursive-fibonacci Proposal: Drop all but one
Reverse fibonacci numbers: https://www.codewars.com/kata/reverse-fibonacci-series https://www.codewars.com/kata/the-iccanobif-sequence Proposal: Drop all. They are pretty much the same as the fibonacci numbers katas anyway
Fibonacci number generators: https://www.codewars.com/kata/custom-enumerators-fibonacci https://www.codewars.com/kata/fibonacci-generator https://www.codewars.com/kata/fibonacci-generator-function https://www.codewars.com/kata/fibonacci-streaming Proposal: Drop all but one
Fibonacci rectangle: https://www.codewars.com/kata/perimeter-of-squares-in-a-rectangle https://www.codewars.com/kata/perimeter-of-fibonacci-rectangle Proposal: Drop the 2nd kata (okay, this was my fault, I approved it)
Sum of even fibonacci numbers: https://www.codewars.com/kata/sum-even-fibonacci-numbers https://www.codewars.com/kata/even-fibonacci-sum https://www.codewars.com/kata/sumfibs Proposal: Drop all but one
Factorial: https://www.codewars.com/kata/recursion-number-1-factorial https://www.codewars.com/kata/factorial-1 https://www.codewars.com/kata/factorial https://www.codewars.com/kata/factorial-factory https://www.codewars.com/kata/big-factorial beta: https://www.codewars.com/kata/factorializing-a-number https://www.codewars.com/kata/factorial-fun https://www.codewars.com/kata/unofficial-fcc-challenge-basic-algorithm-scripting-factorialize-a-number Proposal: Drop all but one
Pascal triangle: https://www.codewars.com/kata/pascals-triangle-number-2 https://www.codewars.com/kata/pascal-problem https://www.codewars.com/kata/simple-fun-number-214-pascal-matrix https://www.codewars.com/kata/pascals-triangle beta: https://www.codewars.com/kata/pascals-triangle-2 Proposal: Drop all but one. The last approved one must be dropped though because of its ridiculous requirement (all rows concatenated into one) and early kata overranking
Primality check: https://www.codewars.com/kata/check-for-prime-numbers https://www.codewars.com/kata/prime-numbers https://www.codewars.com/kata/is-a-number-prime https://www.codewars.com/kata/check-if-number-is-prime-without-loops https://www.codewars.com/kata/is-a-prime beta: https://www.codewars.com/kata/is-it-prime https://www.codewars.com/kata/is-prime-number https://www.codewars.com/kata/check-if-a-number-is-prime
Prime counting: beta: https://www.codewars.com/kata/count-prime https://www.codewars.com/kata/count-primes-easy (Variant: n-th prime): https://www.codewars.com/kata/prime-number-generator-intermediate-with-inputs-version https://www.codewars.com/kata/nth-prime-number (Variant: prime counting in an interval): https://www.codewars.com/kata/count-primes-easy https://www.codewars.com/kata/count-primes https://www.codewars.com/kata/finding-a-prime-number-in-an-interval
Prime generator: https://www.codewars.com/kata/prime-numbers https://www.codewars.com/kata/get-n-first-prime-numbers https://www.codewars.com/kata/simple-prime-number-generator https://www.codewars.com/kata/array-of-all-primes-up-to-number-n https://www.codewars.com/kata/prime-number-generator-simple-version https://www.codewars.com/kata/array-of-primes https://www.codewars.com/kata/first-n-prime-numbers beta: https://www.codewars.com/kata/prime-finder
Sum of primes: https://www.codewars.com/kata/sum-of-primes-1 beta: https://www.codewars.com/kata/sum-of-primes
Sieve: https://www.codewars.com/kata/master-your-primes-sieve-with-memoization https://www.codewars.com/kata/sieve-of-eratosthenes beta: https://www.codewars.com/kata/sieve-of-eratosthenes-1 Proposal: Revamp and prune all these prime katas. There are only 3 algorithms involved:
So in some sense, all of them are boring and kind of a duplicate.
Integer factorization: https://www.codewars.com/kata/prime-factorization https://www.codewars.com/kata/prime-factors https://www.codewars.com/kata/primes-in-numbers beta: https://www.codewars.com/kata/prime-factors-1 https://www.codewars.com/kata/prime-factorisation-in-index-notation https://www.codewars.com/kata/prime-factorisation https://www.codewars.com/kata/factorization-1 Proposal: Drop all but one
Trailing zeros in factorial: https://www.codewars.com/kata/number-of-trailing-zeros-of-n https://www.codewars.com/kata/factorial-tail https://www.codewars.com/kata/trailing-zeros-in-factorials-in-any-given-integer-base Proposal: Drop 2 (2 and 3 are exactly the same except 3 is slightly more performance heavy), and maybe 1 since it's a subset of 3.
Goldbach conjecture: https://www.codewars.com/kata/goldbachs-conjecture-1 https://www.codewars.com/kata/goldbachs-conjecture-prime-numbers https://www.codewars.com/kata/goldbachs-conjecture Proposal: Drop all but one
Girls are updating, Please wait warmly...Low quality katas
Base91 encoding: https://www.codewars.com/kata/base91-encoding-and-decoding ...Okay, it was my mistake to approve this. It should really be sent back to beta/retired. (Though one has to wonder why beta testers are giving it very satisfied in the first place when the kata description is far from adequate and they're just all copying the same piece of code from the web. I was naive back then. If it was me now I'd probably have raised like 3 issues to it.)
Subtract the sum: https://www.codewars.com/kata/subtract-the-sum Highly controversial for obvious reasons
Girls are updating, Please wait warmly...Broken katas
Girls are updating, Please wait warmly...