Difference between revisions of "2200: Unreachable State"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
(Transcript: complete transcript and fixing the error that it seemed like Cueball was writing not reading.)
(Transcript)
(9 intermediate revisions by 8 users not shown)
Line 8: Line 8:
  
 
==Explanation==
 
==Explanation==
{{incomplete|Created by a BOT in an UNREACHABLE STATE. Please mention here why this explanation isn't complete. Do NOT delete this tag too soon.}}
+
{{incomplete|Created by a BOT in an UNREACHABLE STATE, which is also tired. Please mention here why this explanation isn't complete. Do NOT delete this tag too soon.}}
  
An {{w|error message}} is information shown when a computer program encounters a problem that the programmers did not anticipate, such as if the URL given to a web browser does [[404|not correspond]] to any page on a website. Most sites have customized error pages, from the {{xkcd|404|simple}} to the [https://www.kualo.co.uk/404 creative].
+
When writing a computer program, developers often need to make assumptions about what state the system could potentially be in at the time the program is executed. For example, a program designed to fetch data from a database requires that the database be accessible at the time it tries to fetch data; if it is not, then the program needs to know how to handle that state, or it might simply hang or crash the system. A good developer will have accounted for this possibility and may give the program a way to fail gracefully; often, this is done by outputting an {{w|error message}} to the user, to tell them what is wrong.
  
This comic shows [[Cueball]] trying to write an error message for his site. However, he is tired, so his message seems rather hopeless, bordering on the existential. The idea behind it is that the author of any error code hopes that no one will have to see it, because that would mean that the site was working perfectly, but the fact that they are writing it means they know the site will eventually fail. This makes the whole idea of writing a site rather hopeless; that hopelessness is associated with tiredness in the caption.
+
Sometimes, cautious developers will identify states that, in theory, should never be reachable ''at all'' - if they were, it would imply that something has gone fundamentally wrong. A paranoid developer might still decide to handle this case anyway, perhaps including a note that the situation should ''theoretically'' never happen, but they aren't confident enough to state with absolute certainty that it cannot.
 +
 
 +
This comic shows [[Cueball]] reading (or possibly writing) just such an error message from a program he is using. The developer has evidently written this text while tired (possibly from overwork), and did not trust themself enough to be sure that the state is truly unreachable. The hopeless tone of the message supports this lack of confidence in their work.
  
 
The title text refers to the common trope of a character being given a "magic" item and winning something because of it, then being told that the item was not actually magic and that the magic was [https://tvtropes.org/pmwiki/pmwiki.php/Main/MagicFeather?from=Main.TheMagicWasInsideYouAllAlong inside them all along]. It is often used as a fable to tell people to follow their dreams. The title text puts the fable in a place where it doesn't belong, saying that finding the "unreachable state" that is the error code implies that the finder can do anything.
 
The title text refers to the common trope of a character being given a "magic" item and winning something because of it, then being told that the item was not actually magic and that the magic was [https://tvtropes.org/pmwiki/pmwiki.php/Main/MagicFeather?from=Main.TheMagicWasInsideYouAllAlong inside them all along]. It is often used as a fable to tell people to follow their dreams. The title text puts the fable in a place where it doesn't belong, saying that finding the "unreachable state" that is the error code implies that the finder can do anything.
  
 
==Transcript==
 
==Transcript==
:[Cueball, sitting on an office chair at his desk, with his hands over his laptop computer is reading an error message on the screen. What he reads is displayed above him with a zigzag line from the screen to the text. The exclamation mark at the top is shown in white on a black triangle.]
+
:[Cueball, sitting on an office chair at his desk with his hands over his laptop computer. There is an error message on the screen which is displayed above him with a zigzag line from the screen to the text. The exclamation mark at the top is shown in white on a black triangle.]
:If you're reading this, the code is in what I thought was an unreachable state.
+
:! Error
 +
:If you're seeing this, the code is in what I thought was an unreachable state.
 
:I could give you advice for what to do. But honestly, why should you trust me? I clearly screwed this up. I'm writing a message that should never appear, yet I know it will probably appear someday.
 
:I could give you advice for what to do. But honestly, why should you trust me? I clearly screwed this up. I'm writing a message that should never appear, yet I know it will probably appear someday.
:On a deep level, I know I'm not up to this task. I'm sorry.
+
:On a deep level, I know I'm not up to this task. I'm so sorry.
  
 
:[Caption below the panel:]
 
:[Caption below the panel:]
Line 28: Line 31:
  
 
[[Category:Comics featuring Cueball]]
 
[[Category:Comics featuring Cueball]]
[[Category:Computers]]
+
[[Category:Programming]]

Revision as of 21:26, 14 September 2019

Unreachable State
ERROR: We've reached an unreachable state. Anything is possible. The limits were in our heads all along. Follow your dreams.
Title text: ERROR: We've reached an unreachable state. Anything is possible. The limits were in our heads all along. Follow your dreams.

Explanation

Ambox notice.png This explanation may be incomplete or incorrect: Created by a BOT in an UNREACHABLE STATE, which is also tired. Please mention here why this explanation isn't complete. Do NOT delete this tag too soon.
If you can address this issue, please edit the page! Thanks.

When writing a computer program, developers often need to make assumptions about what state the system could potentially be in at the time the program is executed. For example, a program designed to fetch data from a database requires that the database be accessible at the time it tries to fetch data; if it is not, then the program needs to know how to handle that state, or it might simply hang or crash the system. A good developer will have accounted for this possibility and may give the program a way to fail gracefully; often, this is done by outputting an error message to the user, to tell them what is wrong.

Sometimes, cautious developers will identify states that, in theory, should never be reachable at all - if they were, it would imply that something has gone fundamentally wrong. A paranoid developer might still decide to handle this case anyway, perhaps including a note that the situation should theoretically never happen, but they aren't confident enough to state with absolute certainty that it cannot.

This comic shows Cueball reading (or possibly writing) just such an error message from a program he is using. The developer has evidently written this text while tired (possibly from overwork), and did not trust themself enough to be sure that the state is truly unreachable. The hopeless tone of the message supports this lack of confidence in their work.

The title text refers to the common trope of a character being given a "magic" item and winning something because of it, then being told that the item was not actually magic and that the magic was inside them all along. It is often used as a fable to tell people to follow their dreams. The title text puts the fable in a place where it doesn't belong, saying that finding the "unreachable state" that is the error code implies that the finder can do anything.

Transcript

[Cueball, sitting on an office chair at his desk with his hands over his laptop computer. There is an error message on the screen which is displayed above him with a zigzag line from the screen to the text. The exclamation mark at the top is shown in white on a black triangle.]
! Error
If you're seeing this, the code is in what I thought was an unreachable state.
I could give you advice for what to do. But honestly, why should you trust me? I clearly screwed this up. I'm writing a message that should never appear, yet I know it will probably appear someday.
On a deep level, I know I'm not up to this task. I'm so sorry.
[Caption below the panel:]
Never write error messages tired.


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

Discussion

When I tried to go here originally, it was unreachable. 162.158.107.61 03:54, 11 September 2019 (UTC)

Yes that was really a funny coincidence, although it lasted a bit too long. --Kynde (talk) 09:37, 11 September 2019 (UTC)
Any relation to the user database breach & DDOS attacks that hit some other xkcd community this week?ProphetZarquon (talk) 15:00, 11 September 2019 (UTC)

Nothing about the comic suggests a website. it looks more like the error message of a program. also, i don't think CB is typing it, just reading. 172.68.50.124 06:20, 11 September 2019 (UTC)

Im positive you are right, Cueball's hands are hovering over the keyboard while he reads this message. The caption is a note to programers not to leave this kind of message to users by writing them when tired. I will correct the explanation and the transcript. --Kynde (talk) 09:45, 11 September 2019 (UTC)
"Can't happen"

This comic is not about "a problem that the programmers did not anticipate", but rather a situation that the programmer rules out as impossible, which is technically called "Can't happen" or "Impossible Error" in the hacker/programmer's jargon. See http://catb.org/jargon/html/C/can-t-happen.html

For example:

for ($i=1;$i<=5;++$i) {echo $i." - ";}
if ($i<10) {echo "Bye!";} else {echo "Can't happen!";}

ElfQrin (talk) 07:14, 11 September 2019 (UTC)

Also it helps not to be too cute even with impossible error messages. A colleague left a message along the lines of Application rubbish bin has broken. once. Cue a somewhat perplexed user call several years later…

“Scientists have calculated that the chances of something so patently absurd actually existing are millions to one. But magicians have calculated that million-to-one chances crop up nine times out of ten.”

Who is genuinely surprised that Cueball managed to reach the unreachable error condition?

― Terry Pratchett, Mort

--Kventin (talk) 07:51, 11 September 2019 (UTC)

Do you mean "garbage collector"? Because that's not being cute, that's the actual technical term. 162.158.122.30 13:24, 11 September 2019 (UTC)

The "anything can happen" may be reference to undefined behavior in some programming languages (most famous are C and C++) https://en.wikipedia.org/wiki/Undefined_behavior. And the error message is rather about assertion failure https://en.wikipedia.org/wiki/Assertion_(software_development) 162.158.92.54 08:03, 11 September 2019 (UTC)

Undefined behaviour can even result in time travel! Ahiijny (talk) 18:44, 11 September 2019 (UTC)

I rewrote the intro from a developer's perspective, since I'm pretty sure this is more about coding than about websites. Would be nice to add something about assertions there too. Hawthorn (talk) 12:37, 11 September 2019 (UTC)

It's relatively common to include assertions for certain invariants because it can potentially allow compilers to make better optimizations, though this is usually a sign of premature optimization. Probably not Douglas Hofstadter (talk) 15:11, 11 September 2019 (UTC)

In the picture, Cueball seem to be writing the comment, instead of reading it, which seems to me a bit more logical (the surprise of someone finding such comment is less funny than the weird state of mind of the tired develloper that takes the time to put such an elaborate and self describing as useless message, but that may just be me) 172.68.198.130 11:36, 12 September 2019 (UTC)

I think the image does not support this interpretation. The presence of the !Alert suggests that this is a dialog or warning that has popped up, and the speech lines suggest that the computer is "saying" (ie. displaying) the error message to Cueball. I also think that Randall would have made it more clear that Cueball is typing, if that was the case. Hawthorn (talk) 11:51, 12 September 2019 (UTC)

I want to clarify on why one would write an "impossible" error message. This isn't because one sits around thinking of conditions the program could be in and writing messages for them. It's because one can add a sort of "try/fail" condition to any line of code one is adding, and pass along a message in case it fails. Some programmers will do this constantly. So it's not that they anticipated the conditions of an impossible state the program is in when it fails, they simply wrote a "try/fail" around a line of code even though they think could never fail. This is also why the programmer can't suggest anything useful to the end-user: When writing it, he simply can't imagine why that "try" would ever fail. — Kazvorpal (talk) 16:22, 12 September 2019 (UTC)