Kemirdin / hyf-javascript3

0 stars 0 forks source link

Feedback final homework #4

Open remarcmij opened 6 years ago

remarcmij commented 6 years ago

Hi Kemirdin, here is my feedback on your final homework.

Your homework does not completely implement the requirements from the homework assignment. It looks like you didn't get any further than step 3.7. And in particular I don't see the responses from GitHub being displayed as HTML elements in your web page. Instead, you just console.log the output.

As a potential employer I would probably not be satisfied with this result.

The code that you did write, in particular the XMLHttpRequest with promises is correct, albeit that I would prefer using the load event that we did in class rather than the more laborious onreadystatechange event handler.

I will now go through the criteria I have set for this final assignment.

  1. Your code must run without errors.

    Meets requirement.

  2. Your web page must be fit-for-purpose and well-designed. Place yourself in the role of an end-user: is the web page attractive and useful, or will you quickly click away?

    Your web page does not display any results. Therefore it does not meet this requirement.

  3. Your code must be well-formatted.

    It looks like all your code is indented apart from 'use strict'. Perhaps you had curly braces after 'use strict' and at the end of the file to create a local scope, but removed them later. If I reformat your file all code shifts to the left. Apart from this minor point the code looks well formatted.

  4. Your repo must contain an .eslintrc.json file. There should be no avoidable ESLint warnings in your code. If you can fix the warning, do so. Please be prepared to account for any remaining warnings.

    Your repo contains the required .eslintrc.json file. I do see an ESLint warning in line 52, where you have specified a parameter named statusCode but used a non-existing variable named status in line 53.

  5. There should be no spelling errors in variable and function names, text strings and comments. If the VSCode spelling checker flags certain words as incorrect (and sometimes that is inevitable) you should be able to explain why that is. If you are uncertain about some word, consult an English dictionary.

    In line 24 a spelling error is flagged that you did not correct: succesfully -> successfully.

    There is also a spelling error in function uerDetailsResponse which should be userDetailsResponse (the spelling checker for some reason missed this one).

  6. _Variable and function names must conform to these naming conventions._

    The variable name URL in lines 33 and 40 should be spelled in lowercase: url. All other variable and function names are correct.

  7. Consider blank lines to convey a meaning, similar to using blank lines to separate paragraphs in a piece of written text. A blank line between function/method definitions is fine. A blank line that breaks up a piece of code that actually belongs together is wrong. Whenever you add a blank line, carefully consider whether the blank line helps or hurts readability. Keep it in only if it helps.

    Meets requirement.

  8. There should be no commented out code in your final homework. (Just like you wouldn't leave crossed out text in your CV).

    Meets requirement.

  9. There should be no unnecessary console.log statements in your final code. These statements are fine when developing and debugging, but not in your final product (and, as per point 8 above, don't just comment them out).

    You still have console.log statements in the makeMyXHR function that should not be present in final code.

  10. Review your own code as if you were an employer yourself. Would you offer yourself an internship or job when running and looking at the code?

    I'll let you be the judge of that.

Kemirdin commented 6 years ago

Thank you for your feedback Sensei, sorry I was late to respond to you, I was sick (chalazion), that's why I couldn't correct my homework, I will fix it ASAP

Kemirdin commented 6 years ago

Dear, Sensei, After 2 days struggling, I have finished my homework but I couldn't modify my script.js file with a display function ( I mean the result on my page), then I have made another script file named script2.js file, I think now that is working.