I’m in Introduction to Algorithms (577) this semester at UW, and I’ve been enjoying hearing Renault explaining how to prove program correctness, DP, network flow, and the circumstances under which Dijkstra invented his shortest-path algorithm.
However… algos is a somewhat unique class for me, given that it’s the first course I’ve taken that mandates being present during lectures by taking attendance. It accomplishes this through a platform called TopHat, who many students will recognize through its use of displaying participation questions.
TopHat asks you to provide it a four-length numerical code (that’ll be provided to you by your lecturer) in order to verify that you’re actually in the location where the attendance is being taken. You type that code into the student TopHat page, and, bam, you’re marked present.
However, I suppose they caught on to the unpatchable strategy of Having Friends, who, given that they are in the same class section as you, can be sent messages begging for the code from the comfort of your bed.
So, for the paranoid lecturer, TopHat allows “secure attendance”, a feature which, according to them, determines your location as “…determined by [your] device geolocation or by both geolocation and proximity (to the classroom and other students).”
The first time I heard about this system, I wondered how much leeway this “geolocation” would afford you. There exist a plethora of traditional “IP geolocation” services, which use your IP address and ASN — both semi-unique identifiers sent to the webpage upon load — to try and identify your location. This provides… varied results depending on where you’re located. When in Madison and NYC, popular IP geolocation services have been able to pin me within a mile or so of my actual location. In any suburban area, the error jumps to city-level.1 Surely TopHat wouldn’t be relying on such an inaccurate measure of detecting location when determining attendance — students living in Chadbourne Hall taking lectures in Mosse Humanities (approx. 250ft apart) would be able to skirt the attendance requirement. That could be catastrophic!
#The Geolocation API
Alas, it is not IP geolocation being used by TopHat. As aforementioned, IP geolocation is a pretty implicit flow — webpages are able to see your IP when you connect to them. However, when trying to determine your location, TopHat pops up a big scary dialogue past the line of death!
Clearly this is asking something else entirely — something that’s presumably so precise as to require my explicit consent.
I’ll spare you the suspense. This is the Geolocation API, a feature of all modern browsers that allows the retrieval of your location to a much more precise degree (hence the permission pop-up). As of writing this post, IP geolocation is enough to place me somewhere in the Lakeshore neighborhood of Madison (1-2 miles long), but Chrome’s Geolocation API is enough to pin me to the exact building — Morgridge Hall — I’m sitting in. That’s orders of magnitude more accurate.
... continue reading