Ad
  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    There's nothing ingenious about swiping test answers. It's something anyone can do when presented the opportunity, and is nothing more than a replacement for actual applied knowledge and creativity

    I believe we are not talking about 2 different things here: if I can find out (looking at historical data, asking former students, etc) that the teacher will only asks problems of kind A, B and C - ignoring topics D, E and F - I will focus on preparing in that direction.

    You call it "lazy cheating", for some reason, I call it "optimisation", the bread and butter of being a decent engineer. And I would do that if I am not interested too much in those classes - "boring" being an apt keyword spotted by Voile.

    because they are quite clearly against the entire purpose of the kata and CodeWars as a whole.

    What would exactly be the "whole purpose" of CW, then? I thought it was for the creators to generate critical mass, muster coders offering them a stimulating environment in which they can grow and exchange ideas.

    We might discuss on how successful was the execution, but I don't perceive your ideal "sportmanship", nowehere noted - much less recommended -, as the major point of CW. Or is it?

  • Custom User Avatar

    Someone chooses to abuse the tests (or lack thereof), and that person is allowed or even encouraged to do so while the fault lies solely on the author because they allowed it to happen?

    I'm saying that those solutions shouldn't be treated as though they good ones (or frankly even acceptable)

    You do not simply judge what is "lazy and unimaginative". You are not in a position to dictate how others should code, or what is considered cheating. Stop being such an elitist. You're no different than the people who bitch about solutions being UUN (unreadable, unmaintainable, not for production).

    As far as CW system goes, as long as a solution is not hacking the runtime/testing framework it is legal, so it's kata author's fault for not catching bad solutions. You can keep arguing the opposite, but note that basically nobody in CW would agree with you, and you're just wasting your time.

    In what backwards world does that logic make sense? The person chose to write a lazy and unimaginative solution; what sense does it make to blame the kata author for that?

    This is called TDD, mate. CW kata runs on TDD. Look it up.

    The kata author has their responsibility to make sure everything is tested and only good solution passes. Otherwise what would the kata authors be doing? Keep talking crap in the description while writing incomplete tests that can be passed easily? They might as well just put Test.expect(true) in the tests since tests are not needed! You're judged by some pesky, draconian "coder" people instead of code! We're back to college again!

    Now that'd be funny.

    I'm saying that a good solution to a kata is one that accurately addresses the problem that the kata outlines, and bonus points for doing it in a creative way, so one that ignores the problem entirely in favor of just hardcoding the correct results is a poor solution.

    because they are quite clearly against the entire purpose of the kata and CodeWars as a whole.

    That's your opinion, which again, nobody around would agree with you because it's not a "core difference in philosophy", it's CW's official policy. If you disagree, go make a kata about "solving 3-SAT in polynomial time", then only put a Test.expect(true) in the tests, and see what happens.

  • Custom User Avatar

    The issue is when your kata consists solely of a lookup table, as you are making no attempt to solve the problem as presented and are just mining the answers from the error logs. It's a carbon-copy solution that can be used for every kata on the site (that doesn't have random tests, anyway), so it's lazy and uninventive.

    Then either the kata is boring, or the tests are lacking. It's still not the user's fault. Why do you always want to label this as "user cheating"? Your focus is entirely wrong.

    The addition of mandatory random test policy means lookup table solutions are frowned upon by CodeWars as a whole, does it not?

    You're thinking it backwards. The one and only one requirement of test suite is that it should accept answers that completes the task correctly, and reject all answers that doesn't (this is what TDD is about). If it doesn't do this correctly, the tests are flawed. Nobody has any obligations to play along with the kata author (after all, the kata author can demand you to solve 3SAT in polynomial time and then not put any tests on it). We only hold obligations to what is being tested. Arguably you can even write a description that is completely unrelated to the tests, though that'd be really, really bad idea.

  • Custom User Avatar

    Simply mapping all known inputs to a corresponding output is a pretty lazy way to solve the kata.

    False. Lookup table is a valid and widely used technique to solve problems, especially if you already know the result.

    This solution makes no attempt to actually solve the problem, but rather just mines the correct answers to specific test cases and forms a canned set of responses. It's the equivalent of stealing the answer set to a math test.

    Then go complain at the kata author/translator and raise an issue about the lack of random tests. Complaining at people submitting pattern-matching solutions as "cheating" is the least productive action you can take out of the situation. And random tests are mandatory nowadays anyway, so it's the kata author/translator's fault, not user's fault.

  • Custom User Avatar

    Well, we might agree to disagree, then: I personally find this approach still less trite than going for a naive solution; similarly, going for a smart(er) approach trying to prepare for a problem/exam, still shows ingenuity, at least.

    Sure, once better tests are out (I opened an issue for that) this one will surely fail, but downvoting a comment is not like downvoting a solution (which I am not sure if I would endorse as a practice).

  • Custom User Avatar

    Well, downvoting me for this is not very productive, is it? Btw, I beg to disagree: this would not be stealing the results of a math test, but scout, find all the possible problems and prepare a template for it.

    On top of that, most other solutions just brute-force it, so I fail to see them much smarter...

  • Custom User Avatar

    How is that lazy? I wrote me own code to generate all of them, then left only the required ones in . the final version, to golf it.

    In Python I made it more complex, storing only the base cases and deriving the others from it, just to have fun, but here I just took the chance to hack the kata a bit.