Difference between revisions of "376: Bug"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
m (Explanation: clean up)
(Explanation: INCOMPLETE, and WHY people always do two spaces instead of a single one?)
Line 9: Line 9:
  
 
==Explanation==
 
==Explanation==
 +
{{incomplete}}
 
In computer systems, time is measured starting from some arbitrarily chosen point. That particular time is known as the "epoch" for that system.  
 
In computer systems, time is measured starting from some arbitrarily chosen point. That particular time is known as the "epoch" for that system.  
The UNIX operating system internally uses an epoch of January 1, 1970, and measures time as a number of seconds from then. Since this was intended only for things internal to the OS (File last modified times and the like), using 1-Jan-1970 was safe as no UNIX systems existed before that date. However, since UNIX included a number of system functions to manipulate these dates, some developers mistook them for a general purpose date object, and misused them in applications requiring dates before the epoch. Such usage would inevitably fail (for example, the date might be considered to be far in the future, instead of in the past)
+
The UNIX operating system internally uses an epoch of January 1, 1970, and measures time as a number of seconds from then. Since this was intended only for things internal to the OS (File last modified times and the like), using 1-Jan-1970 was safe as no UNIX systems existed before that date. However, since UNIX included a number of system functions to manipulate these dates, some developers mistook them for a general purpose date object, and misused them in applications requiring dates before the epoch. Such usage would inevitably fail (for example, the date might be considered to be far in the future, instead of in the past)
  
In the comic, one developer has clearly misused the system date in this way, and the second developer is making a pun by combining "Epoch" with "Epic Fail" - a colloquial term meaning "a very big mistake was made".
+
In the comic, one developer has clearly misused the system date in this way, and the second developer is making a pun by combining "Epoch" with "Epic Fail" - a colloquial term meaning "a very big mistake was made".
  
 
==Transcript==
 
==Transcript==

Revision as of 20:11, 5 July 2013

Bug
The universe started in 1970. Anyone claiming to be over 38 is lying about their age.
Title text: The universe started in 1970. Anyone claiming to be over 38 is lying about their age.

Explanation

Ambox notice.png This explanation may be incomplete or incorrect:
Please include the reason why this explanation is incomplete, like this: {{incomplete|reason}}

If you can address this issue, please edit the page! Thanks.

In computer systems, time is measured starting from some arbitrarily chosen point. That particular time is known as the "epoch" for that system. The UNIX operating system internally uses an epoch of January 1, 1970, and measures time as a number of seconds from then. Since this was intended only for things internal to the OS (File last modified times and the like), using 1-Jan-1970 was safe as no UNIX systems existed before that date. However, since UNIX included a number of system functions to manipulate these dates, some developers mistook them for a general purpose date object, and misused them in applications requiring dates before the epoch. Such usage would inevitably fail (for example, the date might be considered to be far in the future, instead of in the past)

In the comic, one developer has clearly misused the system date in this way, and the second developer is making a pun by combining "Epoch" with "Epic Fail" - a colloquial term meaning "a very big mistake was made".

Transcript

[Cueball sits at a computer, staring at the screen and rubbing his chin in thought. A friend stands behind him]
Cueball: Weird - My code's crashing when given pre-1970 dates.
Friend [pointing at the computer]: Epoch fail!


comment.png add a comment! ⋅ comment.png add a topic (use sparingly)! ⋅ Icons-mini-action refresh blue.gif refresh comments!

Discussion

That is why on Unix epoch (the time_t type) is signed type, and covers dates before epoch. --JakubNarebski (talk) 19:52, 5 July 2013 (UTC)

Ohh, and much more is missing. I did mark it as incomplete. We also have to talk about the time frame the 32bit epoch does cover, and what would be changed by using a 64bit variable. What will happen on 19 January 2038?--Dgbrt (talk) 20:17, 5 July 2013 (UTC)
The general hope, it appears, is that 64-bit integers will be firmly in place, having ousted the feeble 32-bit integers from the system time. As has been demonstrated in innumerable instances, it's rather difficult to eliminate legacy code from systems due to attempts to support older systems in a backward-compatible methodology. In short, however, it will take time to resolve time. Thokling (talk) 05:34, 22 September 2013 (UTC)
I so look forward to seeing Epoch boom to hurriedly uplift 32 bit code before the 'end'. Similar to the Y2K boom. I might consider lending my expertise at a considerable markup. :) Puck0687 (talk) 17:57, 4 December 2015 (UTC)
Rewrite needed

The current explanation barely has to do with the actual topic of the comic. Instead it explains several unrelated qualities of Unix time, and petty much skips over the actual epoch thing. Needs a rewrite. --NeatNit 141.101.99.58 05:59, 8 February 2015 (UTC)

Why would anyone want to take the square root of a timestamp? It is much more likely that Cueballs program just handles negative time values incorrectly. Condor70 (talk) 07:15, 14 November 2016 (UTC)

I agree, I changed the page to reflect that PotatoGod (talk) 03:33, 14 December 2017 (UTC)


http://coolepochcountdown.com/ links to this site saying that XKCD captured moment when Unix time counter reached 1234567890, so maybe this comic is released at that moment 172.68.154.88 (talk) (please sign your comments with ~~~~)

No, that time would occur about a year from this comic's publication (13 February 2009 at 23:31:30 UTC). 607: 2038 was published 8 July 2009, which is about five months too late, and I have no idea how 543: Sierpinski Valentine had to do with Unix time. 172.68.59.144 22:34, 16 April 2019 (UTC)