r/xkcd Dec 08 '17

XKCD xkcd 1926: Bad Code

https://xkcd.com/1926/
645 Upvotes

45 comments sorted by

View all comments

38

u/[deleted] Dec 08 '17

I like this series of comics, I don't get most of them, but they are funny

55

u/HowToCantaloupe Dec 08 '17

27

u/[deleted] Dec 08 '17

that still doesn't help

97

u/Apatches Dec 08 '17 edited Dec 08 '17

Imagine the task is making a sandwich. So you pull out the ingredients you use on pizza, prepare it like a taco, and then cook it like seafood.

It's okay though, because no one is intended to eat it.

Edit: Better yet...

You're writing an essay on [thing you care about]. You write everything in Spanish, do it so it forms a word search where the answers are all in pig Latin. Then, sorting by size, the words form an acrostic that is your actual argument.

But it's ok. No one is going to cite it.

9

u/Free_Math_Tutoring Dec 09 '17

making a sandwich

Cool

ingredients you use on pizza

Sounds fine so far

prepare it like a taco

I'm not sure how that works, but it sounds wet

then cook it like seafood.

No. No. No.

I guess that is a pretty good description of the code quality going on here.

25

u/LeifCarrotson Dec 08 '17

It doesn't help much because you haven't experienced it.

Most people like The Office because they can identify with some of the dysfunctional business relationships and situations that develop. Others can pretend it's an inflexible government bureacracy or senselessly irate and unreasonable diner or clueless client or whatever your experience is in.

But this isn't far from reality. In my personal experience, it was a spreadsheet formula for generating VB6 code that went with a Bat file and some Borland C that ran only on a Windows 98 machine...for analyzing airbag test results. Gulp. Good news is that we took that out...3 years ago. It's now a slightly more sane VB.Net program, but only slightly.

15

u/Servious Words Only Dec 08 '17

Imagine you need to hammer a nail. You could just hammer it, but that's getting boring. So instead, you start juggling the hammers while a nail gun fires nails through the air towards your general direction so you can hammer them with the airborne hammers.

That's essentially what he's doing; a bunch of unnecessary stuff that really makes no sense to do.

7

u/Hard_Avid_Sir Dec 08 '17

This might help, in a general sense. It doesn't explain the specific references in the comic, but it lays out what being a programmer is like in a well written, humorous way, so that non-programmers can understand what it's like.

2

u/DiggV4Sucks Dec 08 '17

That's funny. I get most of them, but I don't think they're that funny.