22
Midterm October 28

Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

  • View
    216

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

Midterm

October 28

Page 2: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

16: Dithering

Dithering is using two different colored pixels to produce a third color in between.

It is used when the color needed is not the palette

Or, to reduce the number of colors in the palette.

Or, because the file format does not support enough colors

Page 3: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

17:Web Crawlers

Web crawlers start with an initial list of pre-determined web pages which they cache, then visiting and caching all the pages which are linked to that page. This process continues recursively.

Or, Mentioning the 4 policies, and the idea of caching and visiting pages

Or caching pages, and the pages linked to them.

Page 4: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

Web Crawlers, Common Mistakes

• The idea that web crawlers work when you begin a search– Remember this is too slow

• That web crawlers are the ones searching the database for the search engine

Page 5: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

18: Logical Markup

• It makes it faster to change the appearance of web pages because you can change the appearance of all of the same element at once.

• Helps search engines to classify your page more correctly

• Provides clues about the structure of your document to non-traditional browsers– Visually-impaired– Text-to speech browsers

• Allows a developer to design an alternate look to the site, perhaps for handicapped users

Page 6: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

Logical Markup Mistakes

• Just saying things like “easier to edit”

• Separates content from appearance– Both physical and logical markup do this– But, if you gave another reason other than

easy to change the appearance, I accepted this.

Page 7: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

19: Design Principles

• Proximity, Alignment, Contrast, Consistency (repetition)

• Had to also provide an example– If you provided a website instead of an example of

how it could be used on a website it was accepted provided the websites were all different

• Could not put www.cs.sfu.ca down for all 4 principles

• Alignment isn’t just indenting or left-justified– It is creating a strong visual or horizontal virtual line

by aligning items of equal importance

Page 8: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

Design Principles, cont.

• Proximity: keep related items close, separate unrelated items– Separating unrelated items is not contrast.

• Contrast: not just for colors– If items are different, make them really, really different.

• Headings and text should look different• Text and links

• Consistency: not just repeating colors or a navigation bar– Repeating ANY elements from one page to the next – Colors and navigation bars are examples of consistency

Page 9: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

20: 10710 to base 3

• Answer: 102223

• Those of you who used the division method often forgot the “0”– Which is what I did when I used that method

• If you CLEARLY showed your work you received most of the credit

• Had to show you understood how the value for the individual digits (30, 31, 32 )

• Simple multiplication or math errors lost you 2 points

Page 10: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

21: 110100112 to Decimal

• Answer: 21110

• Almost everyone got this one correct

• Common mistake was to use the values: 256, 128, 64, 32, 16, 8, 4, 2 and forget 1.

• Remember when doing this to go from left to right as you write out the numbers

• Left to right will cause problems

Page 11: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

22: Classes and Identifiers Differ

• Classes can be used more than once per page, id’s can only be used one

• You can create general classes which can be applied to many different tags in the same page

• Identifiers can be used as fragments or anchors to jump users to parts of a page, classes cannot

Page 12: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

Classes and Identifiers

• If you said that classes were defined with a “.” and identifiers were defined with a “#” this was considered trivial and you lost 1 point

• A common mistake was that classes were used inline and identifiers were block-level

• Also that classes could be used to make changes to the whole page, identifiers just a part of the page– All depends on how it’s defined.

Page 13: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

23: Generic Class

• Answer:.bigblue {

color: blue; (or #00F, or #0000FF)

font-size: 200%; (double was not accepted)

font-family: Times; (or Times New Roman)

}

Page 14: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

Generic Class Common Mistakes

• Forgetting to put a “;” at the end of each line

• Using font-color, instead of just color

• Using color = “blue” (like an attribute)

• Using p.bigblue (not generic)– Can only be applied to paragraphs

• Using div#bigblue which is an identifier

• People did pretty good on this one

Page 15: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

24: Table HTML<table border = “1”>

<tr><td colspan = “2”> apple</td>

</tr><tr>

<td rowspan = “2”>pear</td><td>Cherry</td>

</tr><tr>

<td> Grapefruit</td></tr>

</table>

*each of the <tr> should be <tr align = “center”>

Page 16: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

Table Common Mistakes

• Not understanding there were 3 separate rows

• Switching <td> with <tr>

• Using <td> and <th> with no <tr>

• Just general confusion about what tags do what

• Many people forgot the rowspan and colspan

Page 17: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

Table, Cont.

• If you at least had the table correct except for the rowspan and colspan of the two tags, you got 7 points

• Nesting tables was not acceptable. It would not look like this

• Did not take off points for not having the border attribute– (I used it so the table lines would appear)

• Did not take off points for not centering the text– Or for trying to center with the wrong tag– Or for using the wrong attribute– Or in the wrong place

Page 18: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

Bonus: XML

• XML stands for extensible markup language• It is very similar to HTML• It is used to markup data, while HTML is used to

display data• XML can be transferred easily from one

computer to another and from one system to another

• Plain text format is readable by humans and computers

Page 19: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

25: HTML Mistakes

• There were 15 mistakes in this document • I will post a version with all of them shown• You lost points if you pointed out the

mistake but did not correct it.• Even though you do not have to use

entities to display the quote marks, I accepted it– Showed the potential for needing them and

that you were thinking

Page 20: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

Midterm Marks

• The average mark is a 62– This mark is currently a C

• High mark was a 92– Low was a 0 but partially because a few people did

not yet take the midterm• I deliberately want the marks to be low, rather

than high– Easier for me to curve up than down– Better idea of your grade

• The average final mark for this course should be between a C+/B- average

Page 21: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

Grade Disputes

• If you want to dispute your marks on the midterm:– See me, and only me

• The TAs cannot give you more credit

• If I made a mistake in summing your marks– See me or the TA

• The TAs can change the marks if it was an error in addition on my part

• You must come see me in the next week to dispute your marks (before Friday Nov 4)– You must come see me during office hours or make an

appointment

• Do NOT show up to class on Friday and try and dispute your marks

Page 22: Midterm October 28. 16: Dithering Dithering is using two different colored pixels to produce a third color in between. It is used when the color needed

Questions?