Editing 1467: Email

Jump to: navigation, search

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 8: Line 8:
  
 
==Explanation==
 
==Explanation==
A [[:Category:New Year|New Year comic]], where [[Megan]] asks [[Beret Guy]] if he has any {{w|New Year's resolutions}}, and even though this is just before {{w|new year}} 2015, his resolution is to find out what an email is!
+
Despite being in popular use since 1998 (when free email providers appeared) and having existed since before 1982 (when {{w|SMTP}} was established), [[Beret Guy]] apparently doesn't understand what {{w|email}} is, even though he maintains a web page that includes his email address.  [[Megan]] is visibly appalled and wonders how else he expects electronic messages to be sent.  She attempts to explain that, unlike {{w|voicemail}}, email must be checked regularly, though her reasoning is unclear.
  
Despite being in popular use since 1998 when free email providers appeared and having existed since before 1982 when {{w|SMTP}} was established, Beret Guy apparently doesn't understand what {{w|email}} is, even though he maintains a web page that includes his email address. Megan wonders how else he expects electronic messages to be sent. She explains that one must check email regularly, making a slight at {{w|voicemail}}, which she implies is not worth ever checking.
+
Beret Guy offers two alternatives: {{w|Fax}} and {{w|Snapchat}}. Megan points out, with poor pronoun use, that Snapchat has been primarily used to send naked pictures over the Internet, to which Beret Guy implies that he considers faxes to have been the more naked laden communication stream - referring to this practice as "faxting" (a made-up term similar to {{w|sexting}}).
  
Beret Guy offers two alternatives: {{w|Fax}} and {{w|Snapchat}}. Megan refers to Snapchat as "the naked pic thing", calling to mind how many of its users send naked pictures of themselves over the Internet. Beret Guy replies that people use fax machines for more than just "faxting" (a made-up term similar to {{w|sexting}}), implying not only that many people send sexual content via fax, but also that he associates fax machines with such acts rather than Snapchat, despite faxing being a technology that predates SMTP by more than a century. Beret Guy knows what a fax is, which implies he is very behind in the technology world, so it makes sense he doesn't know what email is. But he also knows what Snapchat is, which was very popular around the time of this comic. Either Beret Guy heard about it in a similar way to email, or he definitely knows what it is and/or uses it. What's strange is that if Beret Guy knows what Snapchat is, he should know what email is as well, since you need to provide an email account in order to create a snapchat account.
+
The title text, which could be [[Randall]]'s New Year's resolution for 2015, refers to various date/time formats.  In programming, a specific time (most often the current system time) is usually stored and processed as a single number that represents the count of seconds since a given starting time (eg. January 1, 1970 at midnight).  In order to make sense to people, this number must be converted to a human-readable format.  However, numerous standard formats exist that all express the date and time differently. Programmers often must decide between using the commonly-used format for a given region (eg. "Month/Day/Year" in the United States) or a format that can be easily sorted (eg. "Year/Month/Day") but might not be as easy to understand.  They also usually must decide whether the given date/time is expressed in the user's local time zone (eg. Pacific Standard Time) or in {{w|Universal Time}}, whether to include millisecond precision or to include the time at all, etc..
  
The title text, which could be [[Randall]]'s New Year's resolution for 2015, refers to various date/time formats. In programming, a point in time (e.g. the current system time) is usually stored and processed as a single number that represents the count of seconds that have elapsed since a given starting time known as "epoch" (the Unix standard epoch is January 1, 1970 at midnight, {{w|UTC}}). In order to make sense to people, this number must be converted to a human-readable format, but programmers must choose a format that best meets the needs of their users. This can be a complicated problem to solve, given that there are many different standard formats for different regions, different levels of precision for different applications, and differences between "universal time" and a user's local time zone. Randall has previously advocated for widespread adoption of the {{w|ISO 8601}} format as a universal standard.
+
Most programming languages provide generic functions to create a custom date-format string using "tokens" that represent different parts of the date/time. Here, Randall appears to have used one of these functions to format the then-current time with the string: "%Y-%M-%D %h:%m:%s". He apparently expected his string to be in the format "Year-Month-Day Hour:Minute:Second", but he used the wrong tokens for this:
  
The title text also probably references a twitter outage that took place on December 29, which was blamed on an [http://www.theguardian.com/technology/2014/dec/29/twitter-2015-date-bug error in a date format string].
+
*%Y = 4-digit year
 +
*%M = minute
 +
*%D expands to %m/%d/%y, which is "month/day/(2-digit)year" in the user's local time zone rather than UTC.
 +
*%h = abbreviated month name
 +
*%m = 2-digit month
 +
*%s = Unix timestamp (count of seconds since "epoch")
  
Most programming languages provide functions to create a custom date-format string using "tokens" that represent different parts of the date/time. Here, Randall appears to have used one of these functions with the string "%Y-%M-%D %h:%m:%s", which looks like it should produce a date and time as "Year-Month-Day Hour:Minute:Second". However, he used the wrong tokens for this:
+
The "%s" token shows us the actual {{w|Unix time|Unix timestamp}} used (1420001642), which corresponds to 2014-12-31 at 04:54:02 {{w|UTC}}.  The format string shown above thus yields "2014-54-12/30/14 Dec:12:1420001642".  Note that the middle portion of this string shows "12/30" instead of "12/31" - this is due to the %D token expressing the date in Randall's local time zone, which is evidently at least 5 hours off from UTC.  (In Pacific Standard Time, for example, the time was 20:54:02, or just before 9:00 PM, on the previous day.)
  
*%Y = 4-digit year (2014)
+
The correct formatting string for Randall's apparent desired result is "%Y-%m-%d %H:%M:%S", which gives the string "2014-12-31 04:54:02". Given the similarity between Randall's string and the correct one, it is easy to see how this type of formatting is confusing and often frustrating for programmers - particularly those not intimately familiar with these functions.
*%M = minute (54)
 
*%D expands to %m/%d/%y, which is "month/day/2-digit year" in the user's local time zone rather than UTC. ("12/30/14" - see below)
 
*%h = abbreviated month name ("Dec")
 
*%m = 2-digit month (12)
 
*%s = Unix timestamp (1420001642 seconds since epoch)
 
 
 
The "%s" token shows us the actual {{w|Unix time|Unix timestamp}} used (1420001642), which corresponds to 2014-12-31 at 04:54:02 UTC. The format string shown above thus yields "2014-54-12/30/14 Dec:12:1420001642". Note that the middle portion of this string shows "12/30" instead of "12/31" - this is due to the %D token expressing the date in Randall's local time zone (Eastern Standard Time, or EST), which is 5 hours before UTC. The time there was 23:54:02, or just before midnight, on the previous day.
 
 
 
The correct format string for Randall's apparent desired result is "%Y-%m-%d %H:%M:%S", which gives the string "2014-12-31 04:54:02" (UTC) or "2014-12-30 23:54:02" (EST). Given the similarity between Randall's string and the correct one, it is easy to see how this type of formatting is confusing and often frustrating for programmers - particularly those not intimately familiar with these functions.
 
  
 
Randall previously addressed date/time formatting in [[1179: ISO 8601]] and [[1340: Unique Date]] (the latter of which uses a formatting string correctly).
 
Randall previously addressed date/time formatting in [[1179: ISO 8601]] and [[1340: Unique Date]] (the latter of which uses a formatting string correctly).
 
This was the second comic in a row with Megan holding a smart phone, the first being [[1466: Phone Checking]]. The comic before that one was also about smart phones: [[1465: xkcd Phone 2]].
 
  
 
==Transcript==
 
==Transcript==
Line 56: Line 50:
  
 
==Trivia==
 
==Trivia==
The Unix timestamp is a standard method of keeping time by counting the absolute number of seconds that have elapsed since a set point in time known as "epoch", defined as midnight on January 1, 1970, Coordinated Universal Time (UTC). Epoch, in {{w|ISO-8601}} format, is "1970-01-01T00:00:00Z", where Z indicates UTC.
+
The Unix timestamp is a standard method of describing the absolute number of seconds that have elapsed since "epoch", defined as midnight on January 1, 1970, Coordinated Universal Time (UTC). (Epoch, in {{w|ISO-8601}} format, is "1970-01-01T00:00:00Z", where Z indicates UTC.)
 
+
* The timestamp in this comic's title text (1420001642) is 1,420,001,642 seconds since epoch. To convert that into a human-readable time:
The timestamp in this comic's title text (1420001642) is 1,420,001,642 seconds since epoch. The process of converting that number into a human-readable time is as follows:
+
** Years = 1,420,001,642 seconds / 60 seconds per minute / 60 minutes per hour / 24 hours per day / 365.25 days per year
 
+
*** This yields 44 years plus 31,467,242 seconds.
*Years since 1970 = 1,420,001,642 seconds / 60 seconds per minute / 60 minutes per hour / 24 hours per day / 365.25 days per year
+
*** The year for the timestamp is 1970 + 44 years = '''2014'''.
**This yields 44 years plus 31,467,242 seconds.
+
** Number of days = 31,467,242 seconds / 60 seconds per minute / 60 minutes per hour / 24 hours per day
**The year for the timestamp is 1970 + 44 years = '''2014'''.
+
*** This yields 364 days plus 17,642 seconds.
***Note: The year calculation specifies 365.25 days per year to account for {{w|leap year|leap years}} (every fourth year adds an extra day).  Also note that 2014 is not a leap year.
+
*** The 364th day of a non-leap year is '''December 31'''. December is the '''12th month''' in the Gregorian calendar.
*Days since start of year = 31,467,242 seconds / 60 seconds per minute / 60 minutes per hour / 24 hours per day
+
** The remaining seconds can be converted into a time:
**This yields 364 days plus 17,642 seconds.  Given January 1 is considered the ''first'' day of the year, this means we are on the 365th day of 2014.
+
*** Hours = 17,642 seconds / 60 seconds per minute / 60 minutes per hour = '''4 hours''' plus 3,242 seconds
**The 365th day of a non-leap year is '''December 31'''. December is the '''12th month''' in the Gregorian calendar.
+
*** Minutes = 3,242 seconds / 60 seconds per minute = '''54 minutes''' plus '''2 seconds'''
*The remaining seconds can be converted into a time:
 
**Hours since start of day = 17,642 seconds / 60 seconds per minute / 60 minutes per hour = '''4 hours''' plus 3,242 seconds
 
**Minutes since start of hour = 3,242 seconds / 60 seconds per minute = '''54 minutes''' plus '''2 seconds'''
 
  
 
Thus, Randall's timestamp represents the time "'''2014-12-31'''T'''04:54:02'''Z" (again in ISO-8601 format).
 
Thus, Randall's timestamp represents the time "'''2014-12-31'''T'''04:54:02'''Z" (again in ISO-8601 format).
  
 
{{comic discussion}}
 
{{comic discussion}}
 
[[Category:New Year]]
 
 
[[Category:Comics featuring Beret Guy]]
 
[[Category:Comics featuring Beret Guy]]
 
[[Category:Comics featuring Megan]]
 
[[Category:Comics featuring Megan]]
[[Category:Email]]
 

Please note that all contributions to explain xkcd may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see explain xkcd:Copyrights for details). Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel | Editing help (opens in new window)