You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The other day in a Code Nation classroom, a student had written out a simple jQuery function, but their code wasn’t working. One of the teachers couldn’t see anything wrong, and thought maybe popcode wasn’t working. Eventually, I spotted the problem: the word function was misspelled, I think as fucntion or some reversal of two letters.
Describe the solution you'd like
A small solution would be adding a specific check for misspellings of function, perhaps in contexts where we could deduce the intended word.
A bigger scope but possibly a better solution would be a code “spellchecker,” which would be super helpful in cases like this. Simple typing/spelling errors where key words are off by one letter are super common, especially for beginners (but possible for anyone and hard to debug). Other common issues are missed capitalization or hyphenation, and I believe we should try to capture these if possible, as well.
The text was updated successfully, but these errors were encountered:
outoftime
changed the title
Check spelling of “function” in jQuery
Check for misspelled JavaScript keywords
Jan 13, 2020
Good call! Weʼd probably need some pretty nuanced heuristics—for instance, itʼs entirely possible to have a perfectly good function name that happens to look like a misspelling of function, so at a minimum we would only want to apply the spell check if there is an overall syntax error in the code. Even better would be to see what happens when the misspelling is corrected, and only suggest that correction if it resolves a syntax error. So in that sense this is part of a larger class of enhancements to the error checker that would operate by trying out certain fixes for problems and then tailoring the error output based on the outcome.
Anyway, overall Iʼd love to see this but it would be a pretty big project! Happy to advise anyone who wants to dive in on it.
Is your feature request related to a problem? Please describe.
The other day in a Code Nation classroom, a student had written out a simple jQuery function, but their code wasn’t working. One of the teachers couldn’t see anything wrong, and thought maybe popcode wasn’t working. Eventually, I spotted the problem: the word
function
was misspelled, I think asfucntion
or some reversal of two letters.Describe the solution you'd like
A small solution would be adding a specific check for misspellings of
function
, perhaps in contexts where we could deduce the intended word.A bigger scope but possibly a better solution would be a code “spellchecker,” which would be super helpful in cases like this. Simple typing/spelling errors where key words are off by one letter are super common, especially for beginners (but possible for anyone and hard to debug). Other common issues are missed capitalization or hyphenation, and I believe we should try to capture these if possible, as well.
The text was updated successfully, but these errors were encountered: