Editing 303: Compiling

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 4: Line 4:
 
| title    = Compiling
 
| title    = Compiling
 
| image    = compiling.png  
 
| image    = compiling.png  
| titletext = 'Are you stealing those LCDs?' 'Yeah, but I'm doing it while my code compiles.'
+
| titletext = Are you stealing those LCDs?' 'Yeah, but I'm doing it while my code compiles.
 
}}
 
}}
  
 
==Explanation==
 
==Explanation==
Computer programming involves writing instructions for a computer to follow, in a specific {{w|programming language}}, which is largely human readable and writable, at least to programmers who understand that language.  However, for the computers to follow instructions, they need to be given {{w|machine code}} — the actual "language" that computers "speak" and one that ''can'' be written directly with the correct tools, but would be too tedious and error-prone for just about any practical modern project where alternatives exist, where anything more than a {{w|%22Hello,_World!%22_program|Hello World}} could be awkward to implement straight into machine-code.
+
Simply writing source code is not sufficient: you need to turn the source code into something executable. Programming languages implement two ways: compilers and interpreters. While interpreters convert the line of code that is currently running, compilers convert the source code all at once, which takes a lot of time... time for you to goof off. After compiling the resulting code will run faster than interpreted code, since it's already all been translated.
 
+
{{Incomplete}}
Conversion from the more conveniently human-writable code into {{w|computer-executable files}} is performed by {{w|Interpreter_(computing)|interpreters}} or {{w|compilers}}. Interpreters (e.g. that for {{w|PHP}} for one example) generally read through the code, or script, each line at a time as and when required, and has to do a lot of work with various processing overheads and the risk of hitting an invalid instruction or mistake in syntax that it can't handle.  It also requires that a relevant version of the interpreter exist on any machine that has to run the script and perhaps some additional knowledge by the end-user.
 
 
 
For widely distributed (and especially commercial) programs, some form of compilation will instead be used.  Compiling may have just one computer system read through the man-written code and (barring errors) produces the equivalent stand-alone and direct machine-readable code, suitable for a given range of computers. This process might involve several passes to check for 'obvious' errors in the code, as well as converting some programming concepts that are easiest for humans to understand into equivalent concepts that may be far easier for the computer to work with.
 
 
 
As such, compiling takes a certain amount of time at the time of production. Normally, this takes a few seconds, but, depending on the size of the project and the power of the computer doing the compilation, the time required to compile a program may measure in minutes, or even hours. As of 2015, the {{w|Linux Kernel}} contains over 19 million lines of code, arguably a massive job for any compiler, but if done correctly, it saves time for all the people who will ultimately be using its output.
 
 
 
Thus, when Cueball is caught wasting time at work, he argues that such activities are not worse than any other possible ones, at this moment.  If his job is writing code and compiling it, then there may be nothing else that he ''can'' do right now.  He cannot usefully tweak the code before it finishes compiling and the expected result checked.
 
 
 
The title text takes this a step further.  Cueball claims that ''all'' activities are equally benign while the code is compiling — and that includes committing illegal acts, such as stealing {{w|LCD}}s.
 
 
 
Nine years after this comic was released, [[Randall]] made a comic called [[1755: Old Days]] about how compiling worked in the old days. It was Cueball who asked. The next comic after that, [[1756: I'm With Her]], was released the Monday before the {{w|2016 United States presidential election}}. And in that comic, a Cueball with a sword on an office chair like in this comic is featured. Seems realistic that Randall had that politically loaded comic ready for some time, and when finding and deciding to use this old version of Cueball, he may have gotten inspired by the compiling theme to make Old Days.
 
 
 
 
==Transcript==
 
==Transcript==
:The #1 Programmer Excuse for Legitimately Slacking Off: "My code's compiling."
+
:Title: The #1 Programmer Excuse for Legitimately Slacking Off: “My code's compiling.
 
:[Two programmers are sword-fighting on office chairs in a hallway. An unseen manager calls them back to work through an open office door.]
 
:[Two programmers are sword-fighting on office chairs in a hallway. An unseen manager calls them back to work through an open office door.]
 
:Manager: Hey! Get back to work!
 
:Manager: Hey! Get back to work!
:Cueball: Compiling!
+
:Programmer 1: Compiling!
 
:Manager: Oh. Carry on.
 
:Manager: Oh. Carry on.
 
 
{{comic discussion}}
 
{{comic discussion}}
 
[[Category:Comics featuring Cueball]]
 
[[Category:Comics featuring Cueball]]
 
[[Category:Programming]]
 
[[Category:Programming]]

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)