An interesting interview question
Mar. 26th, 2012 03:48 pmThis morning in the shower I came up with this question for interviewing a web developer: "How many ways can you come up with, to draw a circle in a web browser?"
Here's my list:
Here's my list:
- Declare a canvas element and draw a circle on it using JavaScript.
- Construct one artificially in HTML from scaled table segments.
- Use inline SVG code to describe a circle inside a div.
- Embed an object - Java, Flash, video, etc - and draw a circle using that.
- Print a unicode character of a circle, really really large.
- Reference an image of a circle, in HTML or in an associated stylesheet.
no subject
Date: 2012-03-26 10:50 pm (UTC)no subject
Date: 2012-03-26 11:31 pm (UTC)Draw a period "." in a very large size, the same color as the background, but with a thick drop shadow style applied to it.
Something like:
<DIV STYLE="font-size:100px;color:white;text-shadow:0px 0px 2px black;">.</DIV>
Too bad the LJ comment system strips style information. :/
no subject
Date: 2012-06-26 02:02 am (UTC)no subject
Date: 2012-06-26 07:44 pm (UTC)