codewars / codewars.com

Issue tracker for Codewars
https://www.codewars.com
BSD 2-Clause "Simplified" License
2.1k stars 220 forks source link

Ability to remove my solution #540

Open crackosok opened 8 years ago

crackosok commented 8 years ago

I accidentally submitted 2 duplicate solutions, it would be nice to have a possibility to remove one.

┆Issue is synchronized with this Clickup by Unito

jhoffner commented 8 years ago

I wouldnt worry too much about it. Solutions should be grouped together anyway, and you are always encouraged to retrain on kata you have already completed, even if you end up with the same solution each time.

ktonga commented 7 years ago

Why is not possible to just remove a solution? I tried only one kata with a PL that now I dont like and would like to remove it so it does not pollute my stats.

pochmann commented 6 years ago

I want to remove solutions as well. I keep finding improvements, so currently I'm polluting the solution space with obsolete suboptimal solutions just because I can't remove them :-(

Voileexperiments commented 6 years ago

Adding the ability to remove own solutions is a bad, bad idea when there are cheaters running about (typically at the rate of 1 per 1-2 weeks) and a certain person even posted an article online on how to cheat all Codewars katas.

In fact, if you don't submit final your solution won't even show up in the solutions page, which is incredibly annoying because for some katas there are significantly fewer solutions shown than the "number of solves" metric (mostly https://www.codewars.com/kata/tap-into-mr-mxyzinjins-brain), and I know lots of cheater have copied my solution and didn't submit final (so they aren't shown) because I once caught one of them.

pochmann commented 6 years ago

I don't know Codewars enough to see how that could be abused. I want people who look at my solutions to look at my best solutions, not obsolete less good ones. I do try to show good/interesting solutions (it's why I'm top-voted at LeetCode), and having obsolete solutions floating around hurts that effort. It also hurts others when my obsolete solutions pointlessly take screen space that could be better used for their solutions.

Could we maybe find some middle ground? Like, instead of completely deleting my obsolete solutions, let me mark them as obsolete. And show them in a section for obsolete solutions like the already existing section for invalidated "solutions". Or let me specify which of my current solutions made it obsolete, and add a "show obsolete versions" button under that solution. Might even be beneficial to see the evolution that way.

That would solve my issue of obsolete solutions polluting the space. Would it be a problem, helping cheaters?

Or instead of "obsolete", a more general "uninteresting" section, then I could also mark my solutions as such when I see other people's solutions that are better or equivalent. At LeetCode this is less of a problem because I check out other people's solutions before posting mine (and I don't post if I see a better or equivalent one already there), but at Codewars I apparently have to post mine before I can read others.

P.S. How do you know lots of people copied you just because you caught one?

pochmann commented 6 years ago

@Voileexperiments Fantastic. I just solved your "Tap Into Mr. Mxyzinjin's Brain" problem, but while still polishing my solution, I once accidentally hit the "submit" button because it's at the same frigging place as the "attempt" button. Now I have an ugly premature solution posted. And can't remove it. This is just awesome. I hate Codewars right now.

DonaldKellett commented 6 years ago

@pochmann FYI to avoid submitting final after you've clicked "Attempt" and passed all tests, you can press cmd-s instead on Mac (and probably ctrl-s on Windows but I can't verify that personally so take that with a pinch of salt) which re-runs the Submit tests against your (revised or otherwise) solution.

pochmann commented 6 years ago

@DonaldKellett Thanks, ctrl-s works for me on Windows. Always runs "attempt" even when the "submit" button is shown.

dinglemouse2250 commented 6 years ago

After you've regretted pressing "Submit" a few dozen times you will learn to take more care to refine your solution before pressing that button. You will get into the habit of proof-reading and optimising and refactoring and you will press the button once and be happy with it.

Being methodical and careful with code instead of rashly pushing buttons is good practice for real life :-)

pochmann commented 6 years ago

@dinglemouse2250 I do that already. But that doesn't help if I keep finding further improvements or press the button accidentally.

DanL12186 commented 6 years ago

If you're refactoring a second time you can always copy and paste the full test suite into the sample test area and do it that way.

I get why it's a bad idea to let people immediately delete their solution (re: cheating), but might it make sense to unlock the ability delete a solution after, say, a week or a month?

Dalusia commented 6 years ago

Isn't there a simple solution to this? Let people delete prior solutions for a kata only, never the latest. That way, even if they cheated, they can't delete the cheating answer unless they post another working solution - which they can't do, because they are cheats! (Unless you count re-posting the cheat solution). Meanwhile people can refactor a non-cheat solution, without leaving a trail of old solutions.

Voileexperiments commented 6 years ago

@Dalusia No, because solutions are unlocked once you submit a solution that passed tests. It's effortless to just copy another solution and submit it. In fact that's what cheaters has been doing all the time.

Please suggest something that at least passes a sanity check before suggesting one?

Dalusia commented 6 years ago

Easy there Voile, we're on the same side here - I'd like to help if I can. If it's the original (copied) solution that gets them caught, we can still allow removing an older kata solution so it doesn't show up, but is still recorded and available for cheat detection. Then a query of people who post second solutions (deleting the first), and doing this repeatedly would aid cheat detection - of course that output would need to include the original solution. That way if they don't change the solutions they get caught as now, and if they do, they get draw attention and get caught even quicker!

FiveCrayFish973 commented 6 years ago

@Dalusia I see a problem with this, do Power users or site admins have constant data on who deletes their solutions. How would you inform them ? Notif / email / or some other methods ? Or will the system keep it as an incrementing function like this user has deleted this many solutions ?

IMO they will opening a can of worms that will inevitably make it easier to cheat and harder to catch. How would you differentiate between random users with too many deletions and cheater this way ?

Dalusia commented 6 years ago

How do they differentiate now? Look at everything by hand? They could still do that, but having some better tools could only help. My point is that having one page that is there to showcase developers achievements AND allow power users/admins to catch cheaters is always going be ineffective at one or both. Clearly the former is already compromised for the sake of the latter (hence the thread). Also, although I don't know precisely how the page is used to catch cheaters, my intuition tells me much more could be achieved with something specifically designed for the purpose.

ghost commented 6 years ago

I wouldnt worry too much about it. Solutions should be grouped together anyway, and you are always encouraged to retrain on kata you have already completed, even if you end up with the same solution each time.

This is a good point! I have been spending some time refactoring some old solutions. Actually quite a useful exercise, and a good way to see how much you have improved since last time :)

SamuliK commented 6 years ago

I was just trying to understand some other solutions better, so I ran them against some test cases. But now they show up as "mine", I never meant to press Submit and even less meant to "steal" other peoples solutions! Can I ask someone to remove them for me, or are they there forever?

Anvoker commented 6 years ago

I was just trying to understand some other solutions better, so I ran them against some test cases. But now they show up as "mine", I never meant to press Submit and even less meant to "steal" other peoples solutions! Can I ask someone to remove them for me, or are they there forever?

I've experienced the same problem. I tried running someone else's solution to see if the amount of time it took to resolve the code cases different significantly from mine and now that solution is forever on my profile along side an older version I wanted to refactor but accidentally made a separate submission instead. I was surprised to see people caring this much about cheaters. If that's a concern then @pochmann idea of having a category akin to "obsolete" where you can chuck unwanted solutions into sounds good. It still maintains a public history of solutions.

cm3z4 commented 5 years ago

I was just trying to understand some other solutions better, so I ran them against some test cases. But now they show up as "mine", I never meant to press Submit and even less meant to "steal" other peoples solutions! Can I ask someone to remove them for me, or are they there forever?

I've experienced the same problem. I tried running someone else's solution to see if the amount of time it took to resolve the code cases different significantly from mine and now that solution is forever on my profile along side an older version I wanted to refactor but accidentally made a separate submission instead. I was surprised to see people caring this much about cheaters. If that's a concern then @pochmann idea of having a category akin to "obsolete" where you can chuck unwanted solutions into sounds good. It still maintains a public history of solutions.

I'm in the same boat. I tested code that wasn't mine and accidentally hit the submit button. I later submitted my solution that's not even close to the code I accidentally submitted. Glad to know I'm not the only person that made this mistake.

phil-obrien commented 5 years ago

At the very least having a "Confirm/Cancel" popup after you've clicked on "Submit" (accidentally or on purpose) would be a good idea. The server tends to run a bit slowly so having the "Attempt" and "Submit" buttons in the same place is accident prone.

The "Archive/Obsolete" solution sounds like a good idea.

I like to comment my code in detail so anyone reading it can understand what I've done and why. It's a more professional approach (or at least it should be - I have met some professional coders who write quasi-incoherent code and don't comment it at all). The odd time on Codewars I've submitted by accident and even though the code itself was the final version, the comments were a bit botched.

Not to be a negative-ninny entirely though, I'm very grateful to the Codewars team for all their efforts as I get my Python skills somewhere near a level where I might get paid for it (been a Cobol coder up until now...caveman drawings anyone?! :-) )

brobert83 commented 5 years ago

I would like one of my solutions to be removed since it is not correct, it passed but after I ran it again it failed and then I found the problem

The issue was that the tests were not covering the full spectrum of problems

Is there a way to do that, or at least invalidate the solution?

Voileexperiments commented 5 years ago

@brobert83 If the kata tests are missing edge cases that would make some faulty solutions pass it's an kata issue, so you should raise it in the kata comments. After the tests are added to the fixture and republished your solution should be invalidated later.

brobert83 commented 5 years ago

@Voileexperiments Thank you, I already raised the issue for that specific kata

PavloSholom commented 5 years ago

I accidentally submitted a solution with many strings of console.log(). I want to remove this kata from my solutions list becaouse of I don't want to show it anyone especially FOR EMPLOYER!

For removing I suggest:

  1. marked this kata as like user push "UNLOCK SOLUTIONS (FORFEIT ELIGIBILITY)"
  2. subtract points from user Honor
  3. and if need subtract from"number of solves" metric

It's possible to do?

PavloSholom commented 5 years ago

And one more: Sometimes after click on "SUBMIT FINAL" my Honor increase but site redirected me to this page: https://imgur.com/TUMd1Lr I must train this kata again. As a result I get this (SOLUTIONS NOT GROUPED): https://imgur.com/T5QT6Lg

How to avoid this? Why it happen? What to do with the needless solutions?

hobovsky commented 5 years ago

@PavloSholom Ad 1: I guess not, unless someone (kazk?) explicitly deletes your solution from DB. Ad 2: #1683

VFDan commented 4 years ago

How about this: if you delete a solution, it will act like you never submitted that solution; you don't get honor, you don't get kyu, etc. That way, any cheaters that submit solutions and then delete them don't get anything from that solution.

I personally want to be able to do this since I want to remove languages from my profile. I solved a Hello World kata in a lot of languages I didn't know and want to remove them from my profile. I don't care a bit about getting anything from these solutions.

kuchaguangjie commented 4 years ago

I think it would satisfy both groups (A -> want delete, B -> want keep all records), if codewars could impl such a feature that:

So that people only your latest revision by default, and then can also check all your revisions.

This is more like what git does, via git log, git diff.

Does this sound like a good idea? Or, do you think it's over complicated, or maybe takes too much to impl based on current code.

VFDan commented 4 years ago

That doesn't really solve the problem I mentioned above, where you only solve a kata once, but want to delete your solutiion anyway.

kuchaguangjie commented 4 years ago

@VFDan In case you refactor the old solution instead of create a new one, and they are shown as one with revisions, then you don't need to delete I guess. Anyway, you are right, if you want to delete a solution despite why then that's a separate feature.

yonetmen commented 4 years ago

Versioning the solution would require much more effort, time & space, which is unnecessary IMHO. If you want to show a different solution then just submit a new one. Otherwise, it's better to let the people refactor their solutions. If all tests pass, replace the old solution with the new one, otherwise preserve the old one.

dani-boo commented 3 years ago

It's terrible UX to not allow a user to delete something they posted/submitted by accident. You wouldn't be allowed to release a feature missing these basic capabilities for a real product (i.e. where users aren't devs - professional or aspiring). At least make it possible to delete a solution if someone has submitted more than one. It's not hard.

DanL12186 commented 3 years ago

It's terrible UX to not allow a user to delete something they posted/submitted by accident. You wouldn't be allowed to release a feature missing these basic capabilities for a real product (i.e. where users aren't devs - professional or aspiring). At least make it possible to delete a solution if someone has submitted more than one. It's not hard.

Right, unless there's an underlying reason for doing so-- see Voile's comment.

(Also, as far as it not being difficult, you have absolutely no idea whether it is or not. You don't know how what the pertinent models, controllers and/or front end looks like, and it may or may not be difficult. This is an app that's been around for a long time, and probably more than a few versions of Rails. Libraries have likely come and gone, and to my knowledge, it's mostly one person who maintains it. None of that screams "easy")

dani-boo commented 3 years ago

Right, unless there's an underlying reason for doing so-- see Voile's comment.

It doesn't matter what the reasons are: users should be able to delete things they put up, especially if they didn't mean to do so.

To avoid cheaters gaining points, add some conditions: if the solution does not match another person's solution then allow the user to delete it straight away. If it is a copy of someone else's answer because the user was trying to figure out how the solver got there, then allow people to admit that it's not theirs and that they hit submit by accident, which will subtract any points they may have gained from a correct answer but won't count against them ethically as they weren't trying to cheat.

My issue is that I have one massive ugly comment-ridden WIP solution, which I, for the life of me, don't remember submitting, and I can't get rid of it.

DanL12186 commented 3 years ago
VFDan commented 3 years ago

I just say let users delete a solution and have whatever they got from it removed, no matter if the solution is cheating or not.

hobovsky commented 3 years ago

And what if they submit another solution afterwards?

DanL12186 commented 3 years ago

I just say let users delete a solution and have whatever they got from it removed, no matter if the solution is cheating or not.

Yeah, this probably wouldn't work well either. In fact I don't think there really is a good solution for this problem, with the possible exception of allowing users to hide their own solutions solely from themselves, or possibly allowing them to mark solutions they don't like as "obsolete" (or "old" or something), placing them in another section but still leaving them extant and searchable.

Part of the issue surrounding this is if cheaters can flat out delete things, they're harder to catch, regardless of the combination of circumstances surrounding the deletion.

It's also unlikely many people would want to delete their old/messy solutions but lose all possibility of credit for the kata.. unless you're saying only for that solution, in which case hobovsky's point applies.

v-poghosyan commented 3 years ago

Is Codewars trying to be annoying to honest users just to weed out the cheaters? Who seriously uses this platform to make admissions or hiring decisions anyway? Let people delete their previous solutions... If an artist is painting a landscape, he always has the option to rip up the canvas and throw it in the trash. It's part of his creative freedom. Same should apply here...

ShreckYe commented 3 years ago

I believe I have a very strong argument for this function or the ability to hide my solution: I came up with a generalized solution for a low-level Kata that could be easily adapted for a generalized high-level Kata, and then anyone completing the low-level Kata could easily copy my solution to complete the high-level one. In this way hiding my solution prevents cheating.

Or maybe taking into consideration the cheating issue mentioned above, there can be a generalization relationship between Katas, and I can make my low-level solution only visible to those who have completed the related high-level one.

Blind4Basics commented 3 years ago

This feature won't happen on users' side.

@ShreckYe : drop the link to the solution to a mod (PM on gitter). We can hide it.

jokerosky commented 3 years ago

+1 would like to have ability to delete solutions (at least if there are more than one)

spiderman-idog commented 3 years ago

+1

wverdese commented 2 years ago

+1

Can't believe this 🙈