Assignment 5
What to Do
- Open this Google Doc.
- Make a copy of the Google Doc in your own Google account by choosing File → Make a Copy.
- Answer each of the questions below in the Google Doc by filling in the blanks marked TODO. Your answers, if not code, should be no more than a few sentences in length each.
Questions
-
Even though HTML is, per its own acronym, a language, why would it be incorrect to call HTML a programming language?
-
Why might it be good practice to keep CSS in an external
.cssfile instead of usingstyle="..."attributes? -
In the context of web development, why might a company’s JavaScript code be more susceptible to theft by competitors than, say, Python?
- Suppose that a classmate (not in CS50 for JDs) needs a website for their business. Using each of the terms below at least once in such a way that makes clear the meaning of each, explain in a paragraph the process by which your classmate can achieve that goal.
- CSS
- domain name
- HTML
- JavaScript
- registrar
- web server
-
When you visit google.com and start inputting a search query, Google tries to “autocomplete” your thought. Hypothesize how they have implemented that feature, making clear how events and JavaScript might be involved.
-
When you visit google.com/maps, Google only sends you part of a world map, a part that fits within your browser’s window. If you start clicking and dragging, though, your browser will download more and more of the map. Hypothesize how they have implemented that feature. And hypothesize why they have implemented that feature, rather than send you the entire map at once.
- When you visit a website, your actions are often tracked not only by that website but by Google itself, whose Google Analytics service the website might be using. Review the documentation at developers.google.com/analytics/resources/concepts/gaConceptsTrackingOverview and explain, in the context of HTML and JavaScript, how Google Analytics might be tracking your actions.
Debrief
- About how many MINUTES would you say you spent on this assignment? Just to set expectations for future students.
How to Submit
- Download your completed assignment as a PDF by choosing File → Download → PDF Document, and save it to your computer.
- Go to CS50 for JDs’s Gradescope page.
- Click Assignment 5.
- Click Submit PDF.
- Click Select PDF and choose your assignment file.
- Click Upload PDF.
- Click the first question in the Question Outline at left, then click the page (or pages) on which your response to that question is located. Repeat this process for the remaining questions.
- Click Submit.
You should see a message that says “Assignment 5 submitted successfully!”
If you run into any trouble with the above steps, email hls@cs50.harvard.edu!