-
-
Notifications
You must be signed in to change notification settings - Fork 35.9k
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
fix(curriculum): added test to allow any order solution #38771
fix(curriculum): added test to allow any order solution #38771
Conversation
Sorry, it seems I did something wrong... I am starting to learn how this works. |
@ieahleen , no worries. I appreciate the extra approval 😃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think someone might have those numbers (from the new test) in their code as comments @SKY020? Preventing them from passing. Probably not, I guess. You could use the removeJSComments thing to ensure it doesn't cause a problem.
Side note - almost all of the Euler problems can be passed by simply returning the expected result and not creating any algorithm. Wonder if we should add a quick test for many of the others that check for something similar? Maybe an issue is in order for that.
@moT01, yes, the comments could be a problem, for some. I will look into adding the removeJSComments, as we do get some forum posts of users not passing because of comments.
Sure, let us get that up so we can list the culprit challenges. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @SKY020 🎉
I like the extra test for checking that users aren't directly returning the expected results. But I'm having second thoughts about how easy it is to get around it, and wondering if it's worth it. It's fine for this one, better than nothing. But it's pretty easy to get around, and I was thinking more about the rest of the Euler challenges that we were talking about.
@moT01 , I cannot think of a decent method to test for cheating without some sort of comparison to the/a solution. That is, looking for the use of specific methods... |
Given that this is intended to help with interviews, people really would be shooting themselves in the foot if they cheat. It seems fine to use simple checks like this, but ultimately we can't stop users, say, copying other people's solutions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
…#38771) * added test to allow any order solution * add removeJSComments for tests
Checklist:
Update index.md
)master
branch of freeCodeCamp.Closes #38769
Changed test to include all solution orders. Added test to prevent simple cheating.