Editing 1926: Bad Code

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 8: Line 8:
  
 
==Explanation==
 
==Explanation==
This comic is the fourth in the [[:Category:Code Quality|Code Quality]] series:
+
{{incomplete|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.}}
* [[1513: Code Quality]]
 
* [[1695: Code Quality 2]]
 
* [[1833: Code Quality 3]]
 
* [[1926: Bad Code]]
 
* [[2138|2138: Wanna See the Code?]]
 
  
[[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 {{w|Haskell (programming language)|Haskell}}. Haskell is a {{w|purely functional programming}} language, a concept that has a debatably steep learning curve, which causes it to be somewhat obscure, as referenced in [[1312: Haskell]]. It is explained that ''this'' code will, in turn, {{w|Parser|interpret}} ''more'' source code, specifically code written in {{w|HTML}}.  Parsing HTML is notoriously tricky without a dedicated software library for several reasons, including frequent changes to web pages, a nested structure of tags and quotes that frustrates {{w|regular expression}}s, allowing new lines to be started almost anywhere, and different standards that are followed or not followed to varying degrees.
+
[[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 {{w|Haskell (programming language)|Haskell}}.  
  
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 {{w|load-bearing wall}} is a wall that plays a role in supporting the building. Damaging such a wall would threaten the structural integrity of the entire building, and could potentially cause a collapse. In contrast, walls that aren't load-bearing are designed only to separate spaces within the building, and do not contribute to keeping the building up. Damaging or destroying such walls wouldn't endanger the overall structure of the building. However, supporting the building is just ''one'' of the functions which could depend on having an intact wall, and non-load-bearing walls are still there for a purpose. Walls serve many other important purposes, from creating opaque and sound blocking barriers (desirable for privacy purposes, particularly for bedrooms and bathrooms), to containing and protecting water pipes and electrical wiring. Ponytail's analogy suggests that, even though poorly written-code wouldn't cause the entire program to fail, it's still not a good idea.
+
Haskell is a somewhat obscure programming language by itself, as referenced in [[1312: Haskell]].
 +
 
 +
It is explained that ''this'' code will in turn interpret ''more'' source code, specifically markup in {{w|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 the wall that supports main structure of the building. Damaging it may cause serious issues. Typically, not all walls in the building are load-bearing; as such, they can 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 (necessary 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 have no consequence beyond upsetting Ponytail.
  
 
Immediately after, Ponytail appears to have {{tvtropes|Main/OhCrap|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 [[905: Homeownership|tragedy]].
 
Immediately after, Ponytail appears to have {{tvtropes|Main/OhCrap|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 [[905: Homeownership|tragedy]].
  
This is most likely a continuation of the [[:Category:Code Quality|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.
+
This is most likely a continuation of the [[:Category:Code Quality|Code Quality]] series, but it differs slightly. For one thing, all of the previous strips were name "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.
+
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.
  
 
==Transcript==
 
==Transcript==
:[Cueball is at his desk on a swivel chair, using his computer. Ponytail walks towards him.]
+
:[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?
+
: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 swivels his chair to face Ponytail in a frameless panel.]
Line 33: Line 33:
 
:Cueball: It just looks bad because it's a spreadsheet formula.
 
:Cueball: It just looks bad because it's a spreadsheet formula.
  
:[Cueball is turns back towards the computer while Ponytail looks over his shoulder at the computer screen.]
+
:[Cueball is facing his computer again.]
 
:Cueball: ...which assembles a Haskell function.
 
:Cueball: ...which assembles a Haskell function.
 
:Ponytail: Uhhh.
 
:Ponytail: Uhhh.
Line 39: Line 39:
 
:Ponytail: ...oh my God.
 
:Ponytail: ...oh my God.
  
:[Ponytail points away from the scene while still looking at the computer screen.]
+
:[Ponytail is pointing away from the scene.]
 
:Cueball: It's ok! Nothing depends on this.
 
: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?
 
:Ponytail: That wall isn't load-bearing. Does that mean we can just throw hammers at it?
Line 51: Line 51:
 
[[Category:Programming]]
 
[[Category:Programming]]
 
[[Category:Computers]]
 
[[Category:Computers]]
[[Category:Code Quality]]
 
 
[[Category:Cueball Computer Problems]]
 
[[Category:Cueball Computer Problems]]
[[Category:Spreadsheets]]
 

Please note that all contributions to explain xkcd may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see explain xkcd:Copyrights for details). Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel | Editing help (opens in new window)