jiebi/CodeConvo huggingface dataset:
in step 43 of the js beta music player project, we are asked to: add an if to check if userData?.currentSong is falsey. But if you type an if like below, it is accepted even though that's not a falsey check? I also looked at the code in step 44 and the condition doesn't seem to be a general falsey check there either, so maybe this step 43's instructions should be updated to say "add an if to check if userData?.currentSong is null"? a rewrite of the instructions is needed to be clearer about not requiring a falsey check but just a check against null. No response N/A No response
iirc the tests were updated to be more accepting of conditions that would still work for the project but weren't what the user stories ask
Hmm. I am not sure this issue fits the behaviour? It is really the description that is too restrictive in this case and doesn’t match the test?
There was change from requiring to falsey Further steps still have in the seed code.
It looks like when someone tried to fix the tests to allow the falsey answer they also changed the description in reverse to make it more restrictive than it was? (That is, a falsey condition requires that many conditions like false “” null and undefined are checked, but a null check is much simpler?)
Allowing any falsy value, through type coercion, implicitly allows all falsy values. However, we are not expecting the value to be an empty string or , so allowing explicit falsy value checks that isn't wouldn't be correct. is the explicit falsy value used by the code to denote "not set" or "unset", so allowing an explicit check for that value is fine. But I don't think the test should allow for an explicit value check. I don't believe there is a code path where the property being means the same as it being . If it is , I would assume something went wrong. Not that I thoroughly looked at the code. So if anything, we should update the test to not allow an explicit check but keep the check. Edit: Just to be super clear. I understand allowing is implicitly the same as allowing any explicit falsy value check. However, when reading code, explicit value checks signals something to the reader which a implicit check does not.
So if I was reviewing the code, I would ask for an implicit falsy or an explicit check.
My confusion remains with the description. Someone sees this step’s description and posts on the forum with their code only checking for null, my first instinct is to say: hey, the instructions said check for a falsey not check for null. (This actually happened by the way which is why I opened this). Then I found out that actually the test didn’t care that the person wrote code that only checked for null. My point is this; if the test wants a null check then pls make the step ask for a null check and not a falsey check.
I assume we wanted to allow a falsy check instead of only a literal check, and in doing so we also change the written requirements to say a falsy check. I don't have an issue with removing the literal and part of the regex test. But the requirement doesn't state how the falsy check should be preformed, that is, it doesn't say it has to be an implicit coercion. So we might want to allow using as well.
I'm in the opposite camp (lasjorg's original camp?). There are other conditional points in the code flow that use an explicit check, and the property is initialised to in the code. It does not make sense to then allow a falsy condition in the step. We should revert the tests to require an explicit comparison.
I'm inclined to agree, but it is more an opinion. Strictly speaking, is used as an intentional value and other falsy values are not expected. Could you check for a by using implicit coercion? Sure. But in doing so, you are allowing potentially unexpected values to pass the check.
I will give my vote to revert the change back to a strict check. A falsy check seems too broad and allows for unexpected values.
I'm going to open this up for contribution. A PR which resolves this issue will update the instructions and tests for the linked step to require an explicit null check.
/assign
We typically do not assign issues. Instead, we accept the first pull request that comprehensively solves the issue. Issues labeled with or are open for contributions. Please make sure you read . We prioritize contributors following the instructions in our guide. Join us in or if you need help contributing - our community will be happy to assist you.
A sentence in the description is missing the word "object". It currently says: It should say: The word "object" is missing. The sentence should say, "A NodeList is an array-like object..." ! Device: MacBook Air OS: MacOS 12 Browser: Opera Version: 112.0.5197.53 No response
Would love to be assigned to this issue. I am a first-time contributor and fixing a typo seems like a great first contribution to make to freeCodeCamp! Thanks!
Thanks for opening this issue. This looks something that can be fixed by "first time" code contributors to this repository. Here are the files that you should be looking at to work on a fix: List of files: Please make sure you read , we prioritize contributors following the instructions in our guides. Join us in or if you need help contributing, our moderators will guide you through this. Sometimes we may get more than one pull requests. We typically accept the most quality contribution followed by the one that is made first. Happy contributing.
Looking forward for reporting a security issue: Please report security issues by following our security policy: Describe the bug When using the challenge editor, upon saving changes, the confirmation alert that pops up reads: . It should instead read simply: . Affected Pages Error will appear after saving on on any challenge editor challenge. For example: (http://localhost:3300/07-scientific-computing-with-python/learn-string-manipulation-by-building-a-cipher). To Reproduce the challenge editor with to (http://localhost:3300) to any specific challenege. the save changes button will then produce the alert with the unformatted message. Expected behavior The alert should display: . Screenshots Currently, the alert displays like this: <img width="448" alt="broken" src=""When instead it should look like: <img width="452" alt="fixed" src=""System Device: Macbook Pro OS: Ventura 13.1 Browser: Chrome Version: 123.0.6312.59 (Official Build) (x86_64) Recommended fix or suggestions The code that handles requests for the challenge editor does not correctly handle saveRoute requests because it expects the incoming object to have the fields and . I propose a fix where we edit the route handler to check if the incoming objeect posses a field, and if so, the message directly instead of using . Additional context I will be monitoring this issue closely for the next few hours and I am ready and willing to fix this issue.
Sounds good I think we would accept this change. Feel free to make a PR.
<!-- FreeCodeCamp Issue Template --<!-- NOTE: ISSUES ARE NOT FOR CODE HELP - Ask for Help at --<!-- Please provide as much detail as possible for us to fix your issue --<!-- Remove any heading sections you did not fill out --<!-- Insert link to challenge below -- <!-- Describe below when the issue happens and how to reproduce it --In the discussion and questions concerning big-o notation, O(N^2) is referred to as "exponential time", which is wrong. O(N^C), where C is any constant greater than 1 (e.g. 2) is called "polynomial time". Exponential time looks like O(C^N), where the input variable (N) is in the exponent. Roughly speaking, the complexity class P (polynomial time solvable) is what we (or complexity theorists) consider "easy" - or at least solvable. Exponential time algorithms typically have no hope of being solved on large inputs (and therefore are good candidates for heuristics, or approximations). For a bit more intuition, an algorithm with O(N^2) complexity may not be a good candidate for real-time processing in your web app - but it may be perfectly suitable for less time critical tasks. With an algorithm like this, you might decide to pre-compute some solutions as a workaround. With an exponential time algorithm O(C^N), on the other hand, the sun may burn out before your computation ends. Concerning O(infinity) - notice the lack of an input variable (N), and that infinity isn't a number. It's probably best to replace that idea with a statement about non-terminating routines. This might lead into a discussion about the halting problem, for example.
To contributors, needs to be changed to
Hi, I would like to work on this issue.
I wonder if this lesson might need more done to it than just a simple one sentence fix. The lesson text and quiz questions map directly to the video lesson, so correcting them while the video is saying something different would probably be confusing. This text fix might need to wait until there's a video fix. Or maybe we could add an errata at the top or bottom of the lesson text until the video is corrected?
I can work on creating a new video tomorrow afternoon.
Originally reported by the editor region doesn't render when camper submits a challenge. https://user- This hide the instruction and lowerJaw, whenever this bug occurs
What browser/OS were you using to trigger this? I'm not able to replicate with either FF or Chrome on Windows/Linux. Or perhaps there is some trick to this that I'm not seeing in the video?
To be honest, I don't think this is a browser specific. she mentioned that chrome was used, my guess is that somewhere in the JavaScript files, it has if statement that stop editor region from rendering, because old PRs do account for this failing. The true solution is to findout, what changed and what isn't pleased. Otherwise, we can add , that fallback to a basic component with instruction and submit button. Or we can add another tab in the upperJaw, for instruction if editor region is It won't have editor region, but it's better than the current nothing. Sorry, I can't include all of it, but here is the discord discussion.
my user agent info (on Windows 11) User Agent is: <codeMozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36</code
Here's a report on the forum with a similar issue (but on a different project) and the user had to move to their cell phone to complete the step and a recent one with the same issue but again, different project and step:
This should hopefully be fixed when gets in.
Here is a brand new report of someone having the same issue on the forum
Another report of this issue:
Usually, people can fix it by clearing the cache and closing and reopening the browser. Switching browsers also helps (likely for the same reason, fresh code). I get the feeling that this bug might not be reproducible in dev mode. It also seems like skipping steps and returning to them later is somehow involved. But I'm not sure what the exact steps are. Is there any information we can gather from people having this issue that can help debug it? Should we try sending people to this issue so we can collect information?
not reproducible. Feel free to open this issue again if it occurs.
I don't think this is completed just because we can't reliably reproduce it. It still happens, I have had it happen recently in one of the Python curriculum steps. I still have the step in the bugged state. 'm not sure it is reproducible in dev mode. 'm almost positive skipping steps, going back using the browser history (back button), and other such actions are involved. only affects a single step at a time. It is not like it happens and all your steps are broken. The one before and the next are fine. the cache is not enough you have to clear the cookies and other site data (Chrome wording). The storage (, etc.) is cleared when doing so. localStorage: Chrome bugged - and are empty Chrome working - and have content. Is there anything else I should look at? I'm almost positive if I clear the localStorage the bug will go away. But before I confirm that I will keep it as is in case someone has a suggestion for anything I should post that might help debug this. Fairly sure, the order of the event was I skipped a step forward and used the back button. But I can't really remember and I don't know if I did anything else. I suggest we keep this open to acknowledge the issue. As I suggested, it might be helpful if we gather information from people to help debug it.
Weird, I just randomly reproduced it in my test browser. Clearing the fixed it. I can do it reliably. With the dev tools open, completed the challenge, reset it, and resized the window by dragging the border. Edit: it is on this step It looks like the same bug but it is triggered by the layout change which I hadn't seen before. I'm guessing the reload when going back to the previous challenge can trigger it as well.
without your reliable way to reproduce, none of this would be possible. My findings doesn't show that submitting is necessary for the problem to appear. It's all in resetting challenge, with a twist. It's possible this is still not the original problem, but looking the same and caused by something different. Reproducing: anything in the initial contents. challenge. and are empty - invalid. This is the point when error can appear. everything still looks okay.
At this point: If anything is modified in editor contents - and are going back to normal. Crisis averted! Any action that makes editor reload (if that's right word here) results in missing editable region. This includes layout change as shown above. More code involved rundown: is reset. action is performed - and boundaries are filled from seed. prop is set to . of triggers effect is called. It changes the value (contents) of the editor , to the initial text contents. triggers of the Monaco editor. updates props of the challenge. Because the function uses the current state of the , which just had contents changed. There's no editable regions (decoration ranges) that are relevant for that at this time. Therefore is empty array. is performed, writing empty and to props for the challenge. 'm not entirely sure how's the timing for the other calls from the change effect. That effect triggers the change of . My tests suggests that is still when executes. is laying in wait.
<!-- freeCodeCamp Issue Template --<!-- Please provide as much detail as possible for us to fix your issue --<!-- Remove any heading sections you did not fill out --<!-- NOTE: If your issue is CodePen Project / Test Suite related, please open it using the below URL instead --<!-- --<!-- Insert link to challenge below -- <!-- Describe below when the issue happens and how to reproduce it --Correct solution doesn't pass. Maybe I am missing something but code does exactly what is asked in challenge description but last test doesn't pass. "When text is entered into the input element and the button is clicked, the MagicEightBall component should return a p element that contains a random element from the possibleAnswers array." - this test appears failed. <!-- Describe your workspace in which you are having issues--Browser Name, Version: Chrome, Version 64.0.3282.140 (Official Build) (64-bit) Operating System: Windows 10 Mobile, Desktop, or Tablet: Desktop <!-- If relevant, paste all of your challenge code in here --<!-- Add a screenshot of your issue --!
You have the correct solution. This should be an error with the challenge tests. I've reproduced this both in production and locally, on staging. I will start working on a fix—the PR should be opened tomorrow morning (Feb 4, EST).
I found the bug. Can I submit a PR?
customarily, you would give the original responder a day or two to propose his/her solution. I had made my intentions clear in my previous comment. Nevertheless, I've tested his solution locally and it works well.
Hey ! Thanks guys, for pitching in and reporting and fixing this. Sorry about the delay, we will review and merge soon. Happy coding!
seems fix solution doesn't pass for the challenge.
The fix has not been deployed yet, it may take us a while to get into the beta server.
Still a bug on main site. Its keeping me from passing this exercise.
I thought I was going crazy. I cannot pass this challenge even with the correct answer either.
It might be helpful for you guys so I'm reporting that the bug is still there when using safari (logged in and out). When I tried to test with Chrome it just passed.
Same with this challenge: Browser User Agent String: Mozilla/5.0 (Macintosh; Intel Mac OS X ) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.1 Safari/605.1.15
You used the solution shows above? If so, can you confirm this? I just tested this on production and seems to work fine (at least in Chrome, Edge, and Firefox).
safari is not passing with the code in the OP, firefox does pass. It only fails the last test
Any guess why?
I'm not sure what's happening here, I tried taking a closer look at the last test (the one that always fails). And when logging the info used in the assert, it looks like it should pass.... ! ! The two conditions in the assert are true, and it still fails. The test is complex and difficult to pinpoint what the problem is, or why it only seems to be failing in safari. By lowering the timeout at the beginning of the test from 250ms to 50ms it will pass some of the time, but still fail sometimes as well. I don't know, that's where I'm at.
<!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. --Describe your problem and how to reproduce it: I have gone through the Guides of freeCodeCamp and I think there should be Guides on Some Static Site Generator like Hugo, Jekyll, Next, Hexo etc The guides have already which is also used to generate the static site
Hi I think it is fine to do that. If you really want to do it write, I would suggest first creating a new article on Static Site Generators that would be located at . Then, in the same PR, I would suggest moving the existing to be a sub folder of the folder you create like . Then, you contributors can create other folders/files like: However, please do a quick search of the repo to see if you can find existing articles which may already cover these. I believe I have seen some of these mentioned in detail in some existing Guide articles, so we don't want to be duplicating content if we can keep from it. In fact, before creating a PR, I suggest you document here where you find any of these and we will figure out the best strategy of how to organize everything.
Any progress on this
yeah I have gone through the guides I think the only static site generator based file in freeCodeCamp is I am working on to add more guides on static site generator like and
Take the time you need. It was just a while since any activity here so I thought I would check in.
Describe your problem and how to reproduce it: The test "Call functionWithArgs with two numbers after you define it." doesn't passes if the function call doesn't end with semi column. As in js semi columns are not required it should pass even if user doesn't add semi column Add a Link to the page with the problem: Tell us about your browser and operating system: Browser Name: Chrome Browser Version: latest Operating System: windows 10 If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box): ! !
There has been an on and off discussion for a while about whether to enforce the use of end-of-line statement semi-colons. W FYI - This debate about semi-colons is not new to FCC. This is a debate that has been going on for a long time. See the following link how not using semi-colons could cause unexpected errors. This debate is similar to whether or not you should require { and } if there is only one statement in the code block. For example: is the same as: but FCC's current linter settings expect the { and } to be used. Both are valid JavaScript, but it is thought using { and } makes it clear especially when you have a line after like below: OR Both of the above accomplish the same thing, but reading the code could get confusing especially if indentation of the second line was accidentally written as: Someone coming from Python might thing the second line is far of the if statement block when it is not. As far as the semi-colon debate goes, I don't care which way it is done, just as long as it is consistent throughout the curriculum. Currently, there are challenges which do not require the semi-colon and some which do (which you have observed).
Well as these tutorials requires user to type regular JavaScript code. It would make sense to treat the code same as regular javascripts treats it's. If the function returns correct result. Code should pass the test.
Are you referring to semi-colons or the curly brackets now?
I have eleborate my answer. And I am taking about semicolons.
I have asked those in charge to make a final decision about this issue. Once I get some feedback, I will let you know the verdict. This decision will affect many challenges.
Hi, By any chance have they took a decision about this issue? I can confirm that this is still an issue after 3 months. When you get used to code using the standardJS style(), for example, it's not immediately obvious that the "Call function" test is not passing due to a missing semicolon. I don't mind whether you decide to keep the semicolons or let them be optional, as it comes to coding style. But a failing test should indicate the real problem, and I feel that failing a test named "Call function after you define it" when you actually called your function properly, can be confusing to new developers. Cheers, Mike
Yes, would you be interested in making the semi-colon optional for this challenge to pass the tests?
sure! Just let me get familiar with the code base and as soon as I have a better grasp, I will send the pr's for this challenge and the next one (that is under the same situation).
Any progress on this I agree that the semi-colons should be optional - If a camper is failing a challenge with valid javascript, that seems like a problem that might confuse them.
Lesson text repeats itself: "You can use radio buttons for questions where you want the user to only give you one answer. Radio buttons are a type of input. Each of your radio buttons should be nested within its own label element. All related radio buttons should have the same name attribute. Here's an example of a radio button: <label<input type="radio" name="indoor-outdoor"Indoor</label. Add to your form a pair of radio buttons. Each radio button should be nested within its own label element. They should share a common name attribute. One should have the option of indoor and the other should have the option of outdoor."
It is a style choice of whoever wrote this lesson. A bug would be error in the code that stopped the script or program from executing as intended.
For , the answer is already provided for them. The starting seed code needs to just be the button element without the onclick. Here is the file that needs changing If you are interested in working on this please read through the first We do not assign issues. If you are interested, work on the issue and then create a PR for the fix. Happy coding! incorrect start code This should be the correct starting seed code No response Device: [e.g. iPhone 6, Laptop] OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04] Browser: [e.g. Chrome, Safari] Version: [e.g. 22] No response
I think the video for this challenge should be updated. It does not show the proper nesting of both the p elements inside the main element. It also has one error as one of the p elements are not closed properly.
Any comments?
Agreed with lasjorg, In this exercise a new paragraph should be below the first, with a main tag then to wrap around both paragraphs. In the video, the main tag is around the newly second paragraph only, plus the newly paragraph has an opening p tag at the end instead of a closing p tag. For contrast, the very next video has the main and paragraph tags the way they should be. Discovered this error when my daughter ran into difficulty with this exercise, and when she watched the video became even more confused.
Any thoughts?
I will redo that video.