hyf-javascript3's People
hyf-javascript3's Issues
Feedback final homework
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.
-
Your code must run without errors.
Meets requirement.
-
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.
-
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. -
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 namedstatusCode
but used a non-existing variable namedstatus
in line 53. -
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 beuserDetailsResponse
(the spelling checker for some reason missed this one). -
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. -
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.
-
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.
-
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. -
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.
Feedback homework JS3 Week 1
Hi Kemirdin, here is my feedback on your homework.
- Your
get...()
methods should just return the data without prefixing it with a string, like you did here:it should just do this:return `Movie title: ${this.title}`;
Why? Suppose I want to use your movie class in another application or web page and use Dutch as the main language. Then I would like to use the termreturn this.title;
Filmtitel
. So, add such string information at the point where your are going to present the information to the user, e.g. in console.log or where you are creating an HTML element and set itsinnerHTML
. - There can be more than one rating and more than one writer (these are arrays). So you should use a plural name:
this.ratings
,this.writers
. - Class names should start with an uppercase letter:
movieStaff
->MovieStaff
- Similar as I have mentioned under point 1 above, the
getStars()
should just returnthis.stars
. This is one reason why the code you commented out doesn't work. An other reason is that you forgot the parentheses aftergetAge
. The correct code is:console.log(PrisonBreak.getStars().map(actor => `${actor.getName()} ${actor.getAge()}`))
director
is not an array. You can't use.map()
on it.- Your
.eslintrc.json
file is invalid. The outer curly braces should be removed.
Updated Feedback Final Homework
Hi Kemirdin,
I'm pleasantly surprised by your latest homework. I must revise my earlier assessment of your progress. Well done!
Som minor comments:
-
In your
hyfListResponse
function you use thecreateAndAppend
function. However, in youruerDetailsResponse
function (which has BTW still the spelling error I noted before) you don't use thecreateAndAppend
function, but use separatecreaetElement
andappendChild
method. This is inconsistent. -
I wouldn't show the contributors for every repo of a user. This is less relevant and you can quickly reach the GitHub API request limit of 60 per hour.
I have already posted my implementation of the homework. Please check that one for details how you can chain promises together and catch errors at the end.
hey Kem
hey Kem,
1- on line 75 we only have one film so you don't array but you will need it for stars since we have many stars.
2- in the constructor, you can have only title and director:
constructor(title, director) { this.title = title; this.director = director; this.stars = []; this.ratings = []; }
3- The push method only for arrays
Week2 Feedback
Hi Kemirdin. Your page looks very pretty and cute. But it doesn`t work which I expected. I will recommend you to check your code again.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.