1926: Bad Code

Explain xkcd: It's 'cause you're dumb.
(Redirected from 1926)
Jump to: navigation, search
Bad Code
"Oh my God, why did you scotch-tape a bunch of hammers together?" "It's ok! Nothing depends on this wall being destroyed efficiently."
Title text: "Oh my God, why did you scotch-tape a bunch of hammers together?" "It's ok! Nothing depends on this wall being destroyed efficiently."

[edit] Explanation

Ambox notice.png This explanation may be incomplete or incorrect: Created by a bad coder, very incomplete, added (possibly excessive) explanation for load-bearing wall. Please change this comment when editing this page. Do NOT delete this tag too soon.
If you can address this issue, please edit the page! Thanks.
Ponytail has caught Cueball in the act of writing some messy code - code in the form of a spreadsheet formula, which in turn produces another program in a language called Haskell.

Haskell is a purely functional programming language, a concept that has a debatable steep learning curve, which causes Haskell to be a somewhat obscure programming language, as referenced in 1312: Haskell.

It is explained that this code will, in turn, interpret more source code, specifically markup in HTML. After Cueball excuses his bad code by stating that "nothing depends on this" (meaning that no other projects rely on this code being good to operate properly), Ponytail uses the analogy of breaking a non-load-bearing wall to ridicule Cueball's excuse.

A load-bearing wall is a wall that supports the main structure of the building. Damaging it may cause serious issues. Typically, not all walls in the building are load-bearing: they can therefore be destroyed fairly safely, because "a building doesn't depend on it". However, supporting the building is just one of the functions which depends on having an intact wall; walls serve many other important purposes, from creating opaque and soundproof barriers (desirable for privacy purposes, particularly for bedrooms and bathrooms[citation needed]), to containing and protecting water pipes and electrical wiring. Thus Ponytail's analogy does not bear much relation to Cueball's code, which really does appear to have no consequence beyond upsetting Ponytail.

Immediately after, Ponytail appears to have realized that she's only inspired Cueball to go ahead and break the wall, instead of swaying him away from writing ugly code. If left unchecked, this will only end in tragedy. Hilarious, knee-slapping tragedy.

This is most likely a continuation of the Code Quality series, but it differs slightly. For one thing, all of the previous strips were named "Code Quality <number>", with the exception of the first, which was just named "Code Quality". Also note that, unlike the previous Code Quality strips, Ponytail does not start using similes like "This is like being in a house built by a child using nothing but a hatchet and a picture of a house". It's also the longest explanation of Cueball's code by Cueball himself.

The title text suggests that Cueball's approach to breaking the wall - scotch-taping a bunch of hammers together - is as good as his code. And his excuse is similar.

[edit] Transcript

[Cueball is at his desk in a swivel chair, using his computer. Ponytail walks towards him.]
Ponytail: That's the ugliest mess of code I've ever seen! What on earth are you working on?
[Cueball swivels his chair to face Ponytail in a frameless panel.]
Cueball: It's nothing weird this time, I swear.
Cueball: It just looks bad because it's a spreadsheet formula.
[Cueball is facing his computer again.]
Cueball: ...which assembles a Haskell function.
Ponytail: Uhhh.
Cueball: ...for parsing HTML.
Ponytail: ...oh my God.
[Ponytail is pointing away from the scene.]
Cueball: It's ok! Nothing depends on this.
Ponytail: That wall isn't load-bearing. Does that mean we can just throw hammers at it?
Cueball: ...I mean...
Ponytail: Wait. Crap.

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


Is it just me or is the fact that this page was created by a bad coder slightly funny? Halo422 (talk) 16:56, 8 December 2017 (UTC)

Sometimes on this wiki we change the created by text to something relevant to the comic Halo. DPS2004 (talk) 16:58, 8 December 2017 (UTC)
Slightly, yes. :oP141.101.76.16 14:13, 11 December 2017 (UTC)

"MAY be the same Cueball and Ponytail as the Code Quality series"???!?! As far as I'm concerned, this is the latest entry in the Code Quality series! Oh, and my interpretation of her "Wait, crap." was her saying she realized he's actually done that before, thrown hammers at that wall. I feel like the giving-him-bad-ideas explanation makes more sense, though. NiceGuy1 (talk) 17:56, 8 December 2017 (UTC)

I don't see this that way. Cueball from Code Quality series was a beginner, self-taught coder. This one seems much more mature with programming skills.kshksh (talk) 20:45, 11 December 2017 (UTC)
That happens sometimes. I.e. people get better over time. But in this case I'd agree with Ponytail that Cueball is not showing "programming skills and is not showing maturity. 20:35, 11 December 2017 (UTC)
I know that people get better over time, but I'm picking more on indirect clues here. Cueball comments that "it's nothing wierd THIS TIME", which means he's written many wierd projects. This means that he likes programming, and possibly have written some non-wierd projects. He also says "nothing depends on it", which means that he has written something that could depend on it. And while we have no direct indication of how much time passed in between comics, all of the Code Quality seems to happen in one sitting, while this is obviousely different situation.kshksh (talk) 20:45, 11 December 2017 (UTC)
I've usually understood that Cueball isn't so much a beginner (in other Code Quality strips), but that he never bothered learning GOOD programming (format, syntax, efficiency, etc). He slaps together code and tries to nudge it and twist it into working, ending up needing assistance to get it done. Brute force programming, no finesse... Instead of using a loop, copies a command sequence 10 times over. That kind of thing. Besides, if he's always just a beginner, why is he always programming? Seems to me he has a passion for it and as such he keeps trying, but never bothers trying to improve (and, honestly, I feel like it takes a large, robust program to inspire such colourful comments from Ponytail. A simple beginner Hello, World progam couldn't have much to say other than "Put a semicolon here" and "You should indent these lines", stuff like that). And part of why his code is usually bad is because he writes programs to do weird things, hence his describing this one as not so bad. Actually, in this respect I wonder if this is ALSO related to the "Cueball has the weirdest computer problems" series, essentially tying those two series together: Cueball gets weird problems because he writes bad code to do weird things which has unexpected results. NiceGuy1 (talk) 04:49, 12 December 2017 (UTC)

The hammer-throwing may also be a call-back to xkcd 905, "Homeownership", where Cueball accidentally destroys his home by getting carried away drilling holes in the walls?

Wait, so nobody thinks calling it "Bad Code" instead of the prior "Code Quality" is a veiled reference to Mr Robot? Randall clearly watches the show; I thought he was referring to the show's repeated assertion that careless people are like bad code, their actions dangerously in need of revision. IE that some people have a knack for really messing stuff up which reaches far beyond the minimal effort they put into choosing their actions.

I'm almost certain that "parsing html" is a reference to this: https://stackoverflow.com/a/1732454 Waterlubber (talk) 20:16, 8 December 2017 (UTC)

Isn't it ponytail who tries to destroy the wall, since by Cueball's logic it doesn't matter if she does it?

Without the title text, I'd believe the wall is actually (already) bearing some kind of dependency into Cueball's spreadsheet, hence the reaction from Ponytail. Rather than giving him ideas to destroy it. It still makes sense because he's the kind of person to do messy things like that. 00:29, 10 December 2017 (UTC)

Personal tools


It seems you are using noscript, which is stopping our project wonderful ads from working. Explain xkcd uses ads to pay for bandwidth, and we manually approve all our advertisers, and our ads are restricted to unobtrusive images and slow animated GIFs. If you found this site helpful, please consider whitelisting us.

Want to advertise with us, or donate to us with Paypal?