Editing 426: Geohashing
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 7: | Line 7: | ||
}} | }} | ||
− | == Explanation == | + | ==Explanation== |
− | |||
{{w|Geocaching}} is a sport where you have to find things hidden by other people based on geographical coordinates. Randall has had a similar idea before in [[201: Christmas GPS]]. | {{w|Geocaching}} is a sport where you have to find things hidden by other people based on geographical coordinates. Randall has had a similar idea before in [[201: Christmas GPS]]. | ||
− | [ | + | [http://wiki.xkcd.com/geohashing/ Geohashing] is a sport created by Randall based on reaching a random location determined by an [http://wiki.xkcd.com/geohashing/Algorithm algorithm] that uses a {{w|hash function}} that involves the current date, location and {{w|Dow Jones Industrial Average|Dow}} opening price (the Dow Jones Industrial Average is a {{w|stock market index}}). |
The algorithm is built in a way that: | The algorithm is built in a way that: | ||
− | * Makes it impossible to plan a meeting in advance | + | *Makes it impossible to plan a meeting in advance - because of the Dow. |
− | + | *Changes every day. | |
− | * Changes every day | + | *Gathers people that are nearby - everyone within the same 1°×1° grid square gets the same position. |
− | |||
− | * Gathers people | ||
The algorithm works as follows: | The algorithm works as follows: | ||
− | # Take the current date in the format yyyy-mm-dd and append the most recent opening value for the Dow Jones Industrial Average. | + | # Take the current date in the format yyyy-mm-dd- and append the most recent opening value for the Dow Jones Industrial Average. |
− | # Pass this | + | # Pass this sting through the MD5 algorithm. |
# Divide the hash value into two 16 character halves, and convert each half to a decimal. | # Divide the hash value into two 16 character halves, and convert each half to a decimal. | ||
− | # Take the integer portions of your current coordinates and append the decimal hash values | + | # Take the integer portions of your current current coordinates and append the decimal hash values. |
− | |||
− | |||
− | + | {{w|MD5}} is a cryptographic hashing algorithm, and converts plaintext data into a seemingly random 128-bit (32 character) string. A good hashing algorithm should have three main properties: it is non-reversible (you cannot generate any plaintext data from the hash), a given sample of data will always produce the same hash value, and even a tiny change to the original plaintext should produce an entirely different hash. | |
− | + | The example co-ordinates are for the Google headquarters in California, as you can see here: [https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=37.421542+-122.085589&aq=&sll=37.0625,-95.677068&sspn=73.209607,135.263672&vpsrc=0&ie=UTF8&t=m&z=17&iwloc=A 37.421542 -122.085589]. | |
− | + | Originally intended as a joke, there are people which do geohashing regularly. Please see the link to the xkcd wiki above. | |
==Transcript== | ==Transcript== | ||
Line 48: | Line 43: | ||
==Trivia== | ==Trivia== | ||
− | * In response to comic [[353: Python]], the Python developers implemented the module <code>antigravity</code> in version 2.7+. This module contains a reference geohashing function | + | *In response to comic [[353: Python]], the Python developers implemented the module <code>antigravity</code> in version 2.7+. This module contains a reference geohashing function. |
− | |||
{{comic discussion}} | {{comic discussion}} | ||
[[Category:Comics with color]] | [[Category:Comics with color]] | ||
− | |||
− |