Difference between revisions of "303: Compiling"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
m (Explanation: Copy edited.)
(repairing damage by vandal 173.245.50.140)
(18 intermediate revisions by 8 users not shown)
Line 8: Line 8:
  
 
==Explanation==
 
==Explanation==
Simply writing the source code is not sufficient. You have to {{w|Compiler|compile}} this, turning it into {{w|executable}} files. At large projects, this will take a long time. Depending on the power of the computer it could be more than one hour. As of 2013, the {{w|Linux Kernel}} contains over 15 million lines of code, a hard job for the compiler.
+
Programming is essentially writing instructions for a computer to follow, in a specific {{w|programming language}}, which is designed to be human readable to make the programmers' job easier. However, for the computers to follow these instructions, they need to be translated into {{w|machine code}} — a "language" that computers "speak". Such conversion from human-readable source code into {{w|computer-executable files}} is performed by ({{w|compilers}}), and takes certain time — depending on the size of the project and the power of the computer doing the compilation, it may measure in hours. As of 2015 the {{w|Linux Kernel}} contains over 19 million lines of code, a massive job for any compiler.
  
In general, programming languages are implemented in two ways: interpreters and compilers. Interpreters convert the code at the time when it is currently running ({{w|PHP}} is only one example), but compilers convert the source code all at once into executable files. After compiling, the resulting code will run much faster than interpreted code, since it has already all been translated into the proper binary language. But compiling code can be a long task, including to fix some {{w|syntax error|syntax errors}}. Cueball does not care about this so far, because he is only waiting for a slow machine to finish its job.
+
In general, programming languages are implemented in two ways: interpreters and compilers. Interpreters convert the code at the time when it is currently running ({{w|PHP}} for one example), but compilers convert the source code all at once into executable files. After compiling, the resulting code will run much faster than interpreted code, since it has already been translated into the proper binary language. However, compiling code can take a long time, especially if the compiler is set up to correct {{w|syntax errors}}. When Cueball is caught wasting time at work, he argues that such pastime is not any worse than any other at this moment, as no modifications can be made to the code that he should otherwise be working on until it finishes compiling, anyway.
  
In the title text, Cueball admits that he did steal LCD displays, but only because he had to wait for the compiler.
+
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}} monitors.
  
 
==Transcript==
 
==Transcript==
:The #1 Programmer Excuse for Legitimately Slacking Off: “My code's compiling.
+
: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!
:Programmer: Compiling!
+
:Cueball: 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]]

Revision as of 05:37, 6 April 2015

Compiling
'Are you stealing those LCDs?' 'Yeah, but I'm doing it while my code compiles.'
Title text: 'Are you stealing those LCDs?' 'Yeah, but I'm doing it while my code compiles.'

Explanation

Programming is essentially writing instructions for a computer to follow, in a specific programming language, which is designed to be human readable to make the programmers' job easier. However, for the computers to follow these instructions, they need to be translated into machine code — a "language" that computers "speak". Such conversion from human-readable source code into computer-executable files is performed by (compilers), and takes certain time — depending on the size of the project and the power of the computer doing the compilation, it may measure in hours. As of 2015 the Linux Kernel contains over 19 million lines of code, a massive job for any compiler.

In general, programming languages are implemented in two ways: interpreters and compilers. Interpreters convert the code at the time when it is currently running (PHP for one example), but compilers convert the source code all at once into executable files. After compiling, the resulting code will run much faster than interpreted code, since it has already been translated into the proper binary language. However, compiling code can take a long time, especially if the compiler is set up to correct syntax errors. When Cueball is caught wasting time at work, he argues that such pastime is not any worse than any other at this moment, as no modifications can be made to the code that he should otherwise be working on until it finishes compiling, anyway.

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 LCD monitors.

Transcript

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.]
Manager: Hey! Get back to work!
Cueball: Compiling!
Manager: Oh. Carry on.


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

Discussion

I was sooo amused when I heard about the most common error report when Delphi was released to the linux platform: "the compile button doesn't do anything"...

The "fix" was to introduce a checkbox that defaulted to not close the compile window once complete :-)

For being so open-sourced they are quite close-minded ;-)

Usually interpreters don't create any code but use the source language as instructions to the interpreter. The situation is complicated by the existence of compilers which compile to an intermediate code (Java byte code for example), then compile the byte code to machine code.

Jstout (talk) 21:54, 13 December 2013 (UTC) 141.101.81.4 07:04, 10 November 2013 (UTC)Nicklas

(In response to the JavaByte thing, whoever said that) I just revamped the explanation (because it looked like two different explanations mashed together). Now it's not repetitious, but longer than I had intended it to be. It would have been even longer had I gone into Java, so I left that out. However, I would say that Java (human writable) source code is 'compiled' into Javabyte code, which is then 'interpretted' by the Java Engine on the end-user's machine. But the original compilation puts it in an easier-to-interpret form than any human-written version would be, even whilst being still flexible across differing platforms. However, it can be a fuzzy line, these days, what exactly does what. YMMV. 141.101.99.114 00:30, 8 September 2015 (UTC)

"Liquid Crystal Display Displays" This bothers me. 173.245.55.85 19:59, 13 March 2014 (UTC)

https://en.wikipedia.org/wiki/RAS_syndrome -- Wesha (talk) 19:36, 11 May 2015 (UTC)

Made it into a wiki link and removed Displays. Kynde (talk) 20:10, 28 March 2014 (UTC)

must admit back when i was in high school learning how to code i played minesweeper and when the teacher passed by i said "it's compiling!" An user who has no account yet (talk) 15:49, 5 September 2023 (UTC)