Explain xkcd: It's 'cause you're dumb.
This comic satirises the mythical Real Programmer. To quote Wikipedia, "the term Real Programmer is computer programmers' folklore to describe the archetypical 'hardcore' programmer who eschews the modern languages and tools of the day in favour of more direct and efficient solutions". The implication is that modern programmers are coddled by today's tools of the trade, which eschew detailed understanding for simple workflows. GNU nano is a text editor - a program often used to edit the source code of other programs; it is modern, simple, and easy-to-use. Emacs and Vim are also text editors, and ed is a line editor. These represent progressively more "old school" solutions to the problem of editing code. cat is a Unix program that concatenates and outputs the contents of files. Things get steadily more ridiculous from here. Using a magnetised needle to flip bits on a hard drive requires nanometric precision and intuitive mastery of binary code, but in the early days of programming people did use needles sometimes to fix bugs on Punched cards. The use of a magnetized needle may also be a reference to the Apollo AGC guidance computer, whose instructions were physically written as patterns of wires looped around or through cylindrical magnets in order to record binary code.
The final character suggests the utterly surreal idea of using butterflies; he is just using the Butterfly effect, a "phenomenon whereby a minor change in circumstances can cause a large change in outcome". The joke at this point relies on stretching the connection between the ideas of "difficult-to-use" and "requires detailed understanding of underlying principles", to suggest that not only do Real Programmers know everything about how computers work, but they know how to manipulate the ambient physical environment in elaborate ways to cause computers to do what they want, akin to performing trick shots that accomplish feats of programming.
GNU Emacs is a popular editor known for its vast profusion of features and extensions to perform all sorts of functions beyond simple text editing, and is widely regarded as one of the best examples of software which succeeds despite being totally riddled with featuritis. Emacs commands are usually referred to by the key sequence required to activate them, such as "C-x M-c" (Control-x Meta-c, though this exact key sequence is a bit different from most Emacs commands). The macro referenced is a pun on the play/movie titled "M. Butterfly". The butterfly programmer saying "Dammit, Emacs" plays on Emacs' notoriety for its kitchen sink design approach of tossing in all the features and options that anybody might ever conceivably want. By way of example, later versions of Emacs actually added a totally useless "M-x butterfly" command as an easter egg, in reference to this very comic: see the youtube demo and screenr demo.
To cap this the title text suggests manipulating the universal constants in order to create a universe in which the required computer data will exist. The programmers shown may even represent the fulfilment of this master programmers plan. The universe may have been designed in such a way that the programmers ancestry would result in his parents, who would meet and have a child, who would learn programming and eventually find himself in a position where he undertakes the task of creating a program, which fills the disk with the desired data. In tandem, of course, all of the people involved with creating and developing all the required hardware, software, raw materials, computer science, electricity, logic (etc etc etc) would have to be part of the master plan. Put simply, it would probably be simpler just to use Emacs.
505: A Bunch of Rocks features Cueball as a Real Programmer, who designs the universe so as to allow his programs to be written in it.
- [A man sits at a computer, programming. Another man behind him looks over his shoulder.]
- Man: nano? REAL programmers use Emacs.
- [A dark haired woman appears behind him.]
- Woman: Hey. REAL programmers use Vim.
- [Another man appears behind her.]
- Man: Well, REAL programmers use ed.
- [Another man appears behind him.]
- Man: No, REAL programmers use cat.
- [A woman with a bun appears behind him.]
- Woman: REAL programmers use a magnetized needle and a steady hand.
- [A man enters, facing them all.]
- Man: Excuse me, but REAL programmers use butterflies.
- [Holding out a butterfly in front of the computer.]
- Man: They open their hands and let the delicate wings flap once.
- Man: The disturbances ripple outward, changing the flow of the Eddy currents in the upper atmosphere.
- [Diagrams of flowing currents.]
- Man: These cause momentary pockets of higher-pressure air to form,
- Man: Which act as lenses that deflect incoming cosmic rays, focusing them to strike the drive platter and flip the desired bit.
add a comment! ⋅ refresh comments!
- Emacs User: Nice. 'Course, there's an Emacs command to do that.
- Cat User: Oh yeah! Good ol' C-x M-c M-butterfly...
- [Butterfly man slaps forehead.]
- Butterfly man: Dammit, Emacs.
I was going to edit the above description, but it was taking too much time to edit it into a suitable format, so here's the long version.
In the beginning was UNIX. And it was good. And it was written by some very clever people.
One of the first very useful tools they wrote was ed, a "line-editor" (i.e. it works one line at a time). It uses some simple commands, and was created to work on very-old-school teletype machines, where you type a command, and ed types a response back.
It was a lovely bit of code. Using very little the way of resources, it allowed you to create a text document of any length, including source code in whatever language you wanted to program in.
Eventually, a more sophisticated version called ex (short for EXtended) was written by a clever man named Bill Joy. While it has some great improvements over ed, it was still a line-editor.
The trouble was, using a line-editor like ed or ex requires you to have a very good mental model of the document you are creating. Unfortunately, humans aren't very good at this, so they constantly need to refresh their mental model by printing out big chunks of the document (or program) they are working on. This took a LOT of paper using teletypes.
Eventually, teletypes were replaced with terminals. This saved a lot of paper. But the people who created the terminals began making them smarter than teletypes, so that magic character sequences could be used to move the cursor around, rather that simply going character-by-character across the line, then scrolling down to the next line, and so on. This opened up a whole new world.
The very clever Bill Joy took advantage of these magic character sequences to create his wonderful "full-screen" text editor vi. vi was the "VIsual mode" of ex. With vi, the user could see a screen-full of text at once. Entire forests were saved.
Emacs was developed at the same time as vi, using the same magic characters, and was also a full-screen text editor. I've never used it, so I can't speak to its merits, but there are many people who still find it more useful than any GUI they've tried.
On the one hand, vi and emacs are more sophisticated tools, and thus take longer to learn to use than ed. However, once you learn to use them, they make writing code EASIER, and they are therefore considered a less praise-worthy way of writing code by those concerned with defining what a "Real Programmer" is. (In other words, those programmers suffering from testosterone poisoning.)
Using cat to write a program looks like this: (Note that the $ is the prompt provided by the computer. The rest is typed by the user. And the ^D means the user held down the control key while typing the letter "d".)
$ cat | cc
The user types C code here, and ends with ^D. Assuming all goes well, the compiler silently finishes after creating the executable program a.out in the user's current working directory.
The reason this is considered a more praise-worthy way of coding is that, in those early days, doing this meant that your code was lost the instant you typed it. If you made a mistake, you would have to type the whole thing again. So doing this for code of any sophistication was considered an act of courage, confidence, and conviction. (I myself did it several times, for the fun of it, when no-one was watching, though never for a program that took more than about 30 lines of code. I was delighted that it worked all 3 times, but since I love to write re-usable code, this wasn't really something I wanted to keep doing.)
NOW PAY ATTENTION. VI IS NOT VIM! Vim was written in 1991, long after more sophisticated shells were created that made it possible to copy and paste text from one part of the screen to another. This ability greatly reduced the risks of using cat to pass your source code directly to the compiler, so it was no longer a praise-worthy stunt. Thus the line "Real programmers use vim" was NEVER considered true by any UNIX programmer.
Whether this was a mistake of the author, or the character (possibly Megan?) is unclear. It seems possible that it was a simple typo, but since I've never seen one in the strip before, I'm somewhat skeptical.
--MisterSpike (talk) 07:12, 17 June 2013 (UTC)
cat | cc doesn't work on my system. My
cc is simply a symlink to
gcc; what's yours? --Lucaswerkmeister (talk) 10:16, 7 August 2013 (UTC)
- One can also use
- $ cat | gcc -xc -
- The program will be an a.out file. 18.104.22.168 (talk) (please sign your comments with ~~~~)
I would never claim to be an emacs expert, but I'm reasonably proficient in it. Command of the form M-x (whatever) are a way of calling commands (or, really, arbitrary functions in the emacs code) by name. SO 'M-x butterfly' means that there is a function named "butterfly" somewhere, but that it has not been assigned a keyboard shortcut (or it has, but you're calling it the long way).
Also, three are still advanced Linux programmers today who swear by vim or emacs being superior to IDEs. There are specific technical reasons for this: emacs is basically an IDE construction kit that's incredibly easy to extend and customize, and is more customizable than pretty much any other program in the history of software with the exception of a Smalltalk installation. And vim has highly evolved commands to give experts a superhuman typing and editing speed when coding.
So when someone claims that "real programmers use vim," they are claiming that RIGHT NOW, vim is the best possible editor for developers of sufficient competence. There's a community of very smart people that basically thinks this.
) 04:19, 15 December 2013 (UTC)