garote: (Default)
[personal profile] garote
This 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:
  1. Declare a canvas element and draw a circle on it using JavaScript.
  2. Construct one artificially in HTML from scaled table segments.
  3. Use inline SVG code to describe a circle inside a div.
  4. Embed an object - Java, Flash, video, etc - and draw a circle using that.
  5. Print a unicode character of a circle, really really large.
  6. Reference an image of a circle, in HTML or in an associated stylesheet.
Any I missed?

Date: 2012-03-26 10:50 pm (UTC)
From: [identity profile] juan-gandhi.livejournal.com
You can also have divs of varying size, having a color that is different from the background div, thus producing a circle. Small circles are ok this way (or just rounded corners); the browser will probably die of you draw a large circle this way.

Date: 2012-06-26 02:02 am (UTC)
From: [identity profile] ethan thompson (from livejournal.com)
Well I suck at HTML, so somebody will probably bitch me out for being wrong, but can you upload data from QBASIC into a browser?

Profile

garote: (Default)
garote

January 2026

S M T W T F S
    123
45678910
11121314151617
1819202122 2324
25 262728293031

Most Popular Tags

Page generated Feb. 5th, 2026 04:10 pm