1695: Code Quality 2

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
Code Quality 2
It's like you tried to define a formal grammar based on fragments of a raw database dump from the QuickBooks file of a company that's about to collapse in an accounting scandal.
Title text: It's like you tried to define a formal grammar based on fragments of a raw database dump from the QuickBooks file of a company that's about to collapse in an accounting scandal.


This comic is the second in the Code Quality series:

It is because it is so clearly a continuation of the first that it is clear that it is Cueball who answers from off-panel.

As in the first we again see Ponytail being introduced to the source code Cueball has written, and where he is warning her that he is self-taught so his code probably won't be written the way she is used to. In the first comic she continues to describe poetically the total mess of a code she encounters, using references to a child building houses, recipes created by corporate lawyers or the transcript of a couple arguing at IKEA, as well as using emojis in the code (title text).

In this comic she continues this trend in four more abusive comments, after starting this sequel with a short remark on how she hates reading Cueball’s code. Cueball is not even shown in this comic, only replying twice off-panel, but as the title makes it clear this is a sequel there can be no doubt that it is Cueball. With the four remarks here as well as a fifth in the title text, she has now managed to make no fewer than nine derogatory remarks on Cueball's programming skills.

In the second panel Ponytail makes a reference to "OCR" (Optical Character Recognition), a technique for recognizing text in a picture using software. In this case she is referring to a picture of a Scrabble game, which is a popular word-making game in which players have a pseudo-randomized set of letters and must arrange them on a grid to form interlocking words. OCR software is notoriously imperfect at the time of writing, and the criss-crossing semi-random words on a Scrabble board fed through an OCR program would likely produce dubious results, certainly not fit for current code standards.

Ponytail observes that Cueball’s code includes the JavaScript reserved words more often than a typical Scrabble board would, a concession that the code looks at least vaguely code-like. Reserved words such as ‘function’, ‘if’ and ‘return’ are fundamental building blocks of code, and most code uses them often. (They are called “reserved” because those words are reserved for their actual meanings such as defining a function — programmers may not create variables with those names.) As for why “triple points” translates to a prevalence of those words, Scrabble's point system is based on the value of individual letters, combined with certain modifier squares on the game board which can boost points. "Triple points" is the highest class of modifier available in the game (though it can be for triple points on a specific letter, or the entire word) and is highly-sought-after by players.

The third panel continues Ponytail's rant, this time referencing naval weather forecasts, avian interference and indentation. A weather forecast is a complex, multidimensional array of data used in predicting or assessing the atmospheric conditions of a geographical area over a set time. Naval weather forecasts (archive) use an extremely condensed code to send their information, rendering them unintelligible to an untrained reader. Transcribing it would be further complicated by a woodpecker (a bird noted for its rapid successive pecking motions) "hammering" (pecking) the Shift key on the keyboard, which would result in many letters being randomly capitalized. Indentation is the practice of shifting a section of text further from the starting margin, which in coding is typically used to organize functions and statements, but if done "randomly" would only serve to scramble the code hierarchy.

The fourth panel references famous poet E. E. Cummings and user name suggestions. Edward Estlin Cummings was a poet who used capitalization, punctuation, and line breaks in unconventional ways. Websites that offer membership often also require that users create a pseudonym (known as a "username") for use in tracking/authenticating their actions on the site, as well as identifying them to the site's community. Many of these sites also require usernames be unique. On popular sites, many common words, phrases and names have already been reserved by users, so when signing up for them many people run into situations where the name they want has already been taken. On many sites where this happens, the site may suggest alternate usernames, usually based on the one that was entered to begin with. For example, if the username "Hedgeclipper" is already reserved, the site may recommend "Hedgeclipper1234" or "H3dg3clipp3r" instead, depending on the algorithm behind the suggestions. In other cases, websites requiring users to enter personal information such as their name may suggest a username based on their name with a string of digits after it, such as "Joshua1128". An E. E. Cummings poem written entirely out of these semi-random suggestions would make the resulting poem even more "unusual" than his work is already considered.

The last panel's simile involves Markov chaining, chat-bots (presumably), bus schedules and potential gross vehicular negligence. Applied Markov chaining is a process used in many computer algorithms that try to simulate real-world concepts such as speech simulation and decisions-making. Its inherent randomness also makes it a candidate for unpredictable things such as stock market analysis and speech recognition. Bus schedules are often complicated and full of notation, and are notorious for confusing people who are not used to reading them. Chat-bots using applied Markov chains to recognize and respond to speech/text rely on the input being clear and well-organized in plain language. "Feeding" bus schedules to such a bot would likely result in the returns being complete gibberish and unreadable, especially if the reason that the buses crash constantly is because the bus schedules are too incoherent for the bus drivers to understand. The issue is further complicated when Ponytail suggests that the schedules are from a city where "the buses crash constantly", which would be horrifying if it happened so regularly that the schedules actually took crashes into account. However, the reason for the crashes is not stated, and it is not clear whether the passengers are in any danger. The buses might be safe if the problem is pedestrian suicides. Even more horrifying would be the further unpredictability of the output of the chat-bot from such unpredictable input.

Cueball finally comments that "… it runs fine for now" which indicates he knows the code has problems but is reluctant to fix them because it's more-or-less serving its function. Ponytail quips back that "So does a burning bus", which is technically true, but the "for now" part implies that disaster and injury could result at any moment, as would likely happen on a burning bus.

In the title text, Ponytail makes a final remark. A formal grammar is a way of describing the structure of text such that computers can recognize or generate such text. A raw database dump is an export of the data from a database for the purposes of transferring it to another database or importing it into a program, viewed “raw” without processing to make it easy for humans to read. QuickBooks is an accounting software package. The company collapsing in an accounting scandal implies their accounting database would be a mess even in a human-readable format.


[Zoom in on Ponytail sitting in front of a computer screen typing. Cueball speaks only off-panel, but since this is a direct continuation of comic 1513: Code Quality where Cueball is shown, there can be no doubt it is him.]
Ponytail: Ugh, I hate reading your code.
Cueball (off-panel): I know, I know.
[Zoom out of Ponytail in an office chair in front of the computer on a desk.]
Ponytail: It's like you ran OCR on a photo of a Scrabble board from a game where Javascript reserved words counted for triple points.
[Zoom in on Ponytails head.]
Ponytail: It looks like someone transcribed a naval weather forecast while woodpeckers hammered their shift keys, then randomly indented it.
[Zoom out back to the setting of the second panel.]
Ponytail: It's like an E E Cummings poem written using only the usernames a website suggests when the one you want is taken.
[Zoom in to Ponytails head and the screen in a wider panel. Finally Cueball again answers off-panel.]
Ponytail: This looks like the output of a Markov bot that's been fed bus timetables from a city where the buses crash constantly.
Cueball (off-panel): Whatever, it runs fine for now.
Ponytail: So does a burning bus.

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


Edward Estin Cummings was a poet (pseudonym e e cummings) who used capitalization, punctuation, and line breaks in unconventional ways. When a new user creates an account that duplicates an existing user name, many websites will suggest a user name with the user's first name followed by a string of digits. The Dining Logician (talk) 14:42, 17 June 2016 (UTC)

I really love these ones :) I hope there will be a part 3. Can we please make a contest for these? 15:22, 17 June 2016 (UTC)

Yes please! How about:

"It's as if you used a kaleidoscope while following a style-guide written in Rongorongo & applied a pseudo-random number generator to the Unicode table for all your regular expressions. Also, you're not supposed to use line-breaks to draw letters using pipe symbols when defining your variables." (A nice example of the Reverse Boustrophedon format used in Rongorongo) 22:05, 17 June 2016 (UTC)

My brother made up this one: "It's as if you ran a sponge through a punch-card reader." -- 00:10, 12 March 2021 (UTC)

I know Ponytail is female but I keep reading her voice as TJ Miller's character from the movie Deadpool.--R0hrshach (talk) 15:45, 17 June 2016 (UTC)

Are you also a fan of Dr. Mrs. The Monarch, from Venture Bros? 22:05, 17 June 2016 (UTC)

"This is further compounded by Ponytail's suggestion that Cueball made rampant use of JavaScript reserved words in his declarations, which is strictly forbidden by the language." I don't think Ponytail made any such suggestion. I think all Ponytail is suggesting is that reserved words occur more often than they would in an ordinary scrabble game. A "house rule" giving triple points for using particular words would explain their high frequency.

Of course in pretty much any program reserved words do occur with high frequency, it's hard to write without them. There is also heavy overlap in the list of reserved words in different languages, so that the program might not be in javascript. A typical C program uses lots of javascript reserved words.-- 16:12, 17 June 2016 (UTC)

I agree, and as "the program runs fine for now" it appears to be at the very least a syntactically correct program. -- 21:17, 17 June 2016 (UTC)
I also agree that it's highly speculative to assume that Cueball's use of reserved words is necessarily erroneous; However, that may be the funnier interpretation, as it indicates an even higher level of improper usage. 22:05, 17 June 2016 (UTC)
I interpreted it quite differently: that he uses variable names very similar to reserved words. For example, "stririg" or "strlng" for a string. 11:12, 19 June 2016 (UTC)

Do we really need the "funny bus crash" photos in the transcript? 20:01, 17 June 2016 (UTC)

"Funny" bus crash is redundant, in my antisocial opinion. 22:05, 17 June 2016 (UTC)
No we do not need them. Feel free to delete them. They are though not in the transcript (where they would for sure not belong). The transcript shoudl genreally have no links. They are in the explanation above the transcript as is also the case with the crash photos. --Kynde (talk) 14:43, 18 June 2016 (UTC)

"It works fine for now" is the reason we still have such a hard time figuring out genetics. 05:57, 18 June 2016 (UTC)

Somehow the "OCR on the photo of a Scrabble board" line reminded me of 1685: Patch. Tepples (talk) 22:43, 18 June 2016 (UTC)

Much shorter insult, courtesy StackOverflow: "The garbage collector is broken". "What? Impossible!" "Surely. Your program is still there." 08:37, 20 June 2016 (UTC)

"Navy weather forecast"

The link given in the explanation to a navy weather forecast is to a graphical weather forecast product. This doesn't make sense, since Randall was clearly referring to a textual weather forecast product. I believe the type of weather forecast Randall intended to reference is an aviation weather forecast, which is textual, not graphical, and is indecipherable to a lay person (pilots must learn how to read them during their training). An example of such a forecast is the blue text on this page explaining how to decode themSaxTeacher (talk) 14:14, 21 June 2016 (UTC)

In the 1st panel her hands are on desk but others are on the drawer underneath :) 20:36, 14 November 2016 (UTC)

That's easily explained away as she is also hunched over in panel 1 trying to read his code. Holding onto the desk like that would make sense as she would not currently be using her hands to type and correct things (not that it's possible to correct Cueball's code). (talk) (please sign your comments with ~~~~)