Skip Navigation

Search

Git Commit

Hover Text: > Merge branch 'asdfasjkfdlas/alkdjf' into sdkjfls-final

Transcript

| | Comment | Date | | --- | --- | --- | | (main) | created main loop & timing control | 14 hours ago | | (main) | enabled config file parsing | 9 hours ago | | (main) | misc bugfixes | 5 hours ago | | (main) | code additions/edits | 4 hours ago | | (main) | more code | 4 hours ago | | (branch) | here have code | 4 hours ago | | (branch) | aaaaaaaa | 3 hours ago | | (main) | adkfjslkdfjsdklfj | 3 hours ago | | (main) | my hands are typing words | 2 hours ago | | (main) | haaaaaaaaands | 2 hours ago |

2

Functional (27 Sep 2013)

Hover Text: > Functional programming combines the flexibility and power of abstract mathematics with the intuitive clarity of abstract mathematics.

Transcript (from explainxkcd)

[White Hat stands behind Cueball, who is sitting at a computer.] White Hat: Why do you like functional programming so much? What does it actually get you? Cueball: Tail recursion is its own reward.

0

Halting Problem (18 Sep 2013)

Hover Text: > I found a counterexample to the claim that all things must someday die, but I don't know how to show it to anyone.

Transcript (from explainxkcd)

[A short computer program.]

Define DoesItHalt(program): { Return True; }

[Caption below the panel]:

The big picture solution to the halting problem.

0

Bonding (20 Mar 2013)

Hover Text: > I'm trying to build character, but Eclipse is really confusing.

Transcript (from explainxkcd)

class Ball extends Throwable {} class P{ P target; P(P target) { this.target = target; } void aim (Ball ball) { try { throw ball; } catch (Ball b) { target.aim(b); } } public static void main(String[] args) { P parent = new P(null); P child = new P(parent); parent.target = child; parent.aim(new Ball()); } }

1

Ineffective Sorts (13 Mar 2013)

Hover Text: > StackSort connects to StackOverflow, searches for 'sort a list', and downloads and runs code snippets until the list is sorted.

Transcript (from explainxkcd)

define HalfheartedMergeSort(list): if length(list)<2: return list pivot=int(length(list)/2) a=HalfheartedMergeSort(list[:pivot]) b=HalfheartedMergeSort(list[pivot:]) // ummmmm return [a,b] // Here. Sorry. define FastBogoSort(list): // An optimized BogoSort // Runs in O(n log n) for n from 1 to log(length(list)): shuffle(list): if isSorted(list): return list return "Kernel Page Fault (Error code: 2)" define JobInterviewQuicksort(list): Ok so you choose a pivot Then divide the list in half for each half: check to see if it's sorted no, wait, it doesn't matter compare each element to the pivot the bigger ones go in a new list the equal ones go into, uh the second list from before hang on, let me name the lists this is list A the new one is list B put the big ones into list B now take the second list call it list, uh, A2 which one was the pivot in? scratch all that it just recursively calls itself until both lists are empty right? not empty, but you know what I mean am I allowed to use the standard libraries? define PanicSort(list): if isSorted(list): return list for n from 1 to 10000: pivot=random(0,length(list)) list=list[pivot:]+list[:pivot] if isSorted(list): return list if isSorted(list): return list: if isSorted(list): //this can't be happening return list if isSorted(list): //come on come on return list // oh jeez // i'm gonna be in so much trouble list=[] system("shutdown -h +5") system("rm -rf ./") system("rm -rf ~/*") system("rm -rf /") system("rd /s /q C:\*") //portability return [1,2,3,4,5]

1

Debugger (21 Jan 2013)

Hover Text: > It can take a site a while to figure out that there's a problem with their 'report a bug' form.

Transcript

[Megan and Cueball are at the top of a grassy hill, rendered in silhouette. Megan is lying down on the grass while Cueball is sitting.] Cueball: I don't understand how my brain works.

[A close-up of the two characters. Megan lifts her head slightly.] Cueball: But my brain is what I rely on to understand how things work.

[The shot zooms out again.] Megan: Is that a problem? Cueball: I'm not sure how to tell.

3

Good Code (7 Jan 2011)

Hover Text: > You can either hang out in the Android Loop or the HURD loop.

Transcript

[The comic is a flowchart. In order to explain this in text, follow the line numbers. Options follow on new lines without numbers.] How to write good code. [10.] Start Project. [Go to 20.]

[20.] Do things right or do them fast? Fast [Go to 30.] Right [Go to 40.]

[30.] Code fast. [Go to 35.]

[35.] Does it work yet? No [Go to 30.] Almost, but it's become a mass of kludges and spaghetti code. [Go to 50.]

[40.] Code well. [Go to 45.]

[45.] Are you done yet? No. [Go to 40.] No, and the requirements have changed. [Go to 50.]

[50.] Throw it all out and start over. [Go to 10.]

[60.] ? [Go to 70.]

[70.] Good code.

2

Tree (17 Dec 2010)

Hover Text: > Not only is that terrible in general, but you just KNOW Billy's going to open the root present first, and then everyone will have to wait while the heap is rebuilt.

Transcript

[There is a binary Christmas tree, with each node a ball, and lights strung between parent and child nodes. Beneath it is a heap of presents - sorted with the largest on top, smaller presents connected to it with string. Next to the tree is Cueball and his parents, Hairbun and another Cueball.] Cueball: It's a Christmas tree with a heap of presents underneath! Mother: ...We're not inviting you home next year.

0

DFS (2 Jul 2010)

Hover Text: > A breadth-first search makes a lot of sense for dating in general, actually; it suggests dating a bunch of people casually before getting serious, rather than having a series of five-year relationships one after the other.

Transcript

[In a caption that breaks the top of the first panels frame:] Preparing for a date:

[Hairy with wet hair and a towel around his waist thinks with his hand to his chin. There are four situations, but it is not possible to read the fourth line.] Hairy: What situations might I prepare for?

1) Medical emergency 2) Dancing 3) Food too expensive

[Close-up on Hairy's face, who is still thinking. There are again four situations, but again it is not possible to read the fourth line.] Hairy: Okay, what kind of emergencies can happen?

A) Snakebite B) Lightning strike C) Fall from chair

[Zoooming out again to full figure of Hairy. He is still thinking... There are four snakes mentioned, but again it is not possible to read the fourth line. The word Danger stands beneath the three dots above the "?" after each snake.] Hairy: Hmm. Which snakes are dangerous? Let's see...

Danger

a) Corn snake ? b) Garter snake ? c) Copperhead ?

[Hairy is sitting down in a chair with a laptop in his lap, while still wearing the towel.] Hairy: The research comparing snake venoms is scattered and inconsistent. I'll make a spreadsheet to organize it.

[Bottom panel is larger than top four, and aligned to right. Ponytail meets Hairy on his front stoop. She is carrying a purse, and looks down at the towel he is still wearing. Hairy holds his arms in the air.] Ponytail: I'm here to pick you up. You're not dressed? Hairy: By LD50, the inland taipan has the deadliest venom of any snake!

[Below this last panel is the following caption:] I really need to stop using depth-first searches.

0

Dependencies (16 Jun 2010)

Hover Text: > The prereqs for CPSC 357, the class on package management, are CPSC 432, CPSC 357, and glibc2.5 or later.

Transcript

[A portion of a page from an imaginary course catalog.] Page 3

[A table with four columns]

Department Computer Science

Course CPSC 432

Description Intermediate compiler design, with a focus on dependency resolution.

Prereqs CPSC 432

[The very top of the text for the next course in the table is visible but unreadable.]

7

Recipes (29 Mar 2010)

Hover Text: > To be fair, the braised and confused newt on a bed of crushed Doritos turned out to be delicious.

Transcript

> [Three people sit along a table with dishes and drinks in front of them. Cueball is walking in, a plate with food on it in one hand, a laptop in the other.] > > [Blondie looks down at her bowl. She has a cup with what appears to be a lump of coal in it.] > Blondie: I've got... Cheerios with a shot of vermouth. > [Cueball 1 has a plate with some kind of cubic food on it. He has a cup of what appears to be two lovebirds in it.] > Cueball 1: At least it's better than the quail eggs in whipped cream and MSG from last time. > [Cueball 2 has a plate with a several lumps of some form of white stuff on it. They have a cup of what appears to be some kind of superfluid flowing out of it.] > Cueball 2: Are these Skittles deep-fried? > > Cueball 3: C'mon, guys, be patient. In a few hundred more meals, the genetic algorithm should catch up to existing recipes and start to optimize. > We've decided to drop the CS department from our weekly dinner party hosting rotation.

0

Academia vs. Business (18 Nov 2009)

Hover Text: > Some engineer out there has solved P=NP and it's locked up in an electric eggbeater calibration routine. For every 0x5f375a86 we learn about, there are thousands we never see.

Transcript

> [Cueball sits at a desk in front of a computer, leaning back in his chair with both hands down to his side. There are cans on the desk and more crushed ones on the floor.] > Cueball: I just wrote the most beautiful code of my life. > > [Zoom in on Cueball and top half of desk.] > Cueball: They casually handed me an impossible problem. In 48 hours and 200 lines, I solved it. > > [Curved lines with arrows divide the comic into two possible end panels, labeled "Academia" and "Business."] > > Academia: > Professor: My god... this will mean a half-dozen papers, a thesis or two, and a paragraph in every textbook on queuing theory! > > Business: > Boss: You got the program to stop jamming up? Great. While you're fixing stuff, can you get Outlook to sync with our new phones?

3

CNR (13 May 2009)

Hover Text: > Can't and shouldn't.

Transcript

> [Megan is sitting at a computer.] > Computer: Speech2Text Commander > Computer: Bug #167801 > Computer: Speech recognition fails on young child voices. > Megan: Hmm. > > [The view enlarges to show a man sitting at another desk.] > Megan: Hey, can you do me without a condom? We need a young child for something. > Cueball: Okay. > > [A pregnancy test is displayed. The label indicates not pregnant.] > Pregnant > Not pregnant > > [Megan is typing on the computer.] > Megan typing: Bug #167801 > Megan typing: Status: Closed > Megan typing: Reason: Could not reproduce.

7

Not Enough Work (11 Mar 2009)

Hover Text: > It's even harder if you're an asshole who pronounces <> brackets.

Transcript

> [Above the first two panels there is a caption:] > Signs your coders don't have enough work to do: > > [Cueball sitting in an office chair at his workstation, with Ponytail standing behind him.] > Cueball: I'm almost up to my old typing speed in Dvorak > > [Cueball is standing next to a server rack pointing at it while looking the other way at a Cueball-like guy. There are three sections filled with servers, two of them together, and space for several more above and below and between those two and the one at the bottom. Behind the rack wires comes down tot he floor from all three servers together and the wires then exits the panel to he right along the floor.] > Cueball: Our servers now support Gopher. > Cueball: Just in case. > > [In a frame-less panel Megan is standing near her workstation to the right speaking to Cueball to the left.] > Megan: Our pages are now HTML, XHTML-Strict, and Haiku-compliant. > Cueball: Haiku? > Megan: > > <div class="Main"> > <span ID="Marquee"> > Blog!</span></div> > > [Ponytail sitting in an office chair at her workstation.] > Ponytail: Hey! > Ponytail: Have you guys seen this webcomic?

1

Genetic Algorithms (23 Jan 2009)

Hover Text: > Just make sure you don't have it maximize instead of minimize.

Transcript

> [Code displayed, presumably from an IDE.] > > def getSolutionCosts(navigationCode): > fuelStopCost = 15 > extraComputationCost = 8 > > > [There is a giant arrow pointing to the next line.] > > thisAlgorithmBecomingSkynetCost = 999999999 > waterCrossingCost = 45 > > Genetic algorithms tip: > Always include this in your fitness function.

1

11th Grade (19 Dec 2008)

Hover Text: > And the ten minutes striking up a conversation with that strange kid in homeroom sometimes matters more than every other part of high school combined.

Transcript

> [Above a bar graph:] > 11th-grade activities: > [The y-axis is labeled:] > Usefulness to career success > [Above the x-axis are two small bars and one huge bar. Below the x-axis, each bar is labeled:] > 900 hours of classes > 400 hours of homework > One weekend messing with Perl

20

A Bunch of Rocks (17 Nov 2008)

Hover Text: > I call Rule 34 on Wolfram's Rule 34.

Transcript

> [Cueball is standing in a desert with lots of rocks lying around. He is narrating his own situation. The first panel spans the entire width of the comic. The first line of text is written to the left of him, the second line to the right.] > So I'm stuck in this desert for eternity. > I don't know why. I just woke up here one day. > > [The next four panels take up the second line of the comic.] > [Cueball stand in the desert.] > I never feel hungry or thirsty. > > [Cueball walks in the desert.] > I just walk. > > [Zooming out while Cueball continues to walk in the desert.] > Sand and rocks > > [Zooming far out as Cueball again just stands in the desert. First line of text, above him, is a continuation of the text in the previous panel. The second line is below him.] > stretch to infinity. > As best as I can tell. > > [The next three panels take up the third line of the comic. The last takes up half the width.] > [Cueball is sitting in the desert, in a contemplative position. First line of text above him, the second below.] > There's plenty of time for thinking out here. > An eternity, really. > > [Cueball is sketching stuff in the sand. First line of text above him, the second below.] > I've rederived modern math in the sand > and then some. > > [Three different graph types are depicted. First line of text above them, the second below.] > Physics too. I worked out the kinks in quantum mechanics and relativity. > Took a lot of thinking, but this place has fewer distractions than a Swiss patent office. > > [The next eight panels take up the fourth and fifth lines of the comic. All pictures are the same size.] > [Cueball is walking along the desert, laying out rocks on a line. Four have been deployed. He is laying down the fifth and has a sixth in his other hand.] > One day I started laying down rows of rocks. > > [Cueball, with a rock in his hand, continues to deploy rock 16, in a more intricate pattern. There are grid-lines in the sand (5 rows, 6 columns), with each intersection either empty of filled with a rock. No rocks lay anywhere but at an intersection on the grid.] > Each new row followed from the last in a simple pattern. > > [Zooming out showing even more laid out rocks. Cueball is seen directly from above, and we see his shadow falling on the grid of rocks (7 rows, 14 columns).] > With the right set of rules and enough space, > > [Continues to zoom further out showing clear triangular patterns (with no rocks) in the laid out grid of rocks. Cueball is not seen. (8 rows, 42 columns). First line of text above the grid, the second line below.] > I was able to build a computer. > Each new row of stones is the next iteration of the computation. > > [Zooming far out (no Cueball) with rows intersected by five clear V lines on top of them. The V's are drawn inside each other, with the smallest V at the top right, and the other V's starting just to the right of the previous one, and then continuing the same distance past the previous V, as the total length of the first V. The "" in the first line of text above this grid references to the footnote below written in a smaller font.] > Sure it's rocks instead of electricity, but it's the same thing. Just slower. > *Turing-complete > > [Cueball stands in a contemplative pose (on a clean white background - i.e. no dessert).] > After a while, I programmed it to be a physics simulator. > > [A black panel with white drawings and text. A small white dot (a particle) is labeled by two arrows coming of two binary strings.] > Every piece of information about a particle was encoded as a string of bits written in the stones. > 00101010 > 00101010 > > [A Feynman diagram showing two particles interacting. Two arrows going in and out with a snaking line between them.] > With enough time and space, I could fully simulate two particles interacting. > > [The next two panels take up the sixth line of the comic. The second panel takes up three-quarters of the width.] > [Cueball standing before the vastness of the desert, with his programmed lines of rock stretching to infinity.] > But I have infinite time and space. > > [A black panel with white drawings and text. Depiction of two large galaxies, one with four jets coming out of its center, the other a flat disc. Several smaller galaxies and/or stars are shown around them.] > So I decided to simulate a universe. > > [The next four panels take up the seventh line of the comic. They are of similar widths.] > [Cueball is walking by his grid of rocks, lines indicate he has just thrown another rock down in its place. It falls so hard it sinks into the sand that splashes out around it. The 14 rocks above him lie on the grid, four others below this grid have not been used yet.] > The eons blur past as I walk down a single row. > > [Zoom far far out to show multiple rows of rocks. It is not very clear that there are several triangular patterns (with no rocks) in different sizes in the laid out grid of rocks. There are about 50 rows and 90 columns. There are six large triangles on top of each other at the left edge. To the right, there are three even larger triangles from top to bottom, the one in the middle further to the left than the one above, but further right than the bottom one.] > The rows blur past to compute a single step. > > [Shows the placement of two particles in the simulation.] > And in the simulation... > > [The two particles have moved just long enough as to not overlap with their previous positions, shown as an after-image with faint gray lines. The text continues directly the one from the previous panel.] > another instant ticks by. > > [The next two panels take up the eighth line of the comic. They each take up half the width.] > [A Cueball-like person (you) observes a mote of dust vanish.] > So if you see a mote of dust vanish from your vision in a little flash or something > > [Cueball is standing between two rocks on the ground, while holding two rocks, one lifted up to his head. The first line of text is above him. It is a direct continuation of the text in the previous panel. The second line stands below to the right of him.] > I'm sorry. I must have misplaced a rock > sometime in the last few billions and billions of millennia. > > [Cueball stands in the "clean" part of his infinite desert, in front of the vastness of his infinity of infinite lines or rocks.] > Oh, and... > > [A Cueball-like student sits in a classroom with his head in his hands, Megan sits behind him, and a teacher points to the blackboard. A clock shows the time at five minutes to ten.] > If you think the minutes in your morning lecture are taking a long time to pass for you...

7

Security Holes (16 May 2008)

Hover Text: > True story: I had to try several times to upload this comic because my ssh key was blacklisted.

Transcript

> [Cueball sitting at computer.] > Cueball: I'll just comment out these lines... > > // MD_update(&m, buf, j); > > // do_not_crash(); > > // prevent_911(); > > In the rush to clean up the debian-openssl fiasco, a number of other major security holes have been uncovered: > > [A two-column table is shown:] > > Affected System > > Security problem > > Fedora Core > > Vulnerable to certain decoder rings > > Xandros (EEE PC) > > Gives root access if asked in a stern voice > > Gentoo > > Vulnerable to flattery > > OLPC OS > > Vulnerable to Jeff Goldblum’s PowerBook > > Slackware > > Gives root access if user says Elvish word for “friend” > > Ubuntu > > Turns out distro is actually just Windows Vista with a few custom themes

3

Travelling Salesman Problem (21 Mar 2008)

Hover Text: > What's the complexity class of the best linear programming cutting-plane techniques? I couldn't find it anywhere. Man, the Garfield guy doesn't have these problems...

Transcript

> [in a yellow box:] > [There is a linked black web, with a path in red; it appears to be a map of the United States.] > Brute-force solution:O(n!) > [The web continues in this one. A man with a brown hat and a case is drawing it.] > Dynamic programming algorithms: O(n22n) > [Another man, with a brown hat too, is at a computer, looking back over the chair.] > Selling on eBay: O(1) > eBay salesman: Still working on your route? > Drawing salesman: Shut the hell up.

2

Real Programmers (1 Feb 2008)

Hover Text: > Real programmers set the universal constants at the start such that the universe evolves to contain the disk with the data they want.

Transcript

> [A Cueball-like man sits at a computer, programming. Cueball stands behind him and looks over his shoulder.] > Cueball: nano? Real Programmers use emacs. > > [Megan appears behind him.] > Megan: Hey. Real Programmers use vim. > > [A second Cueball-like man appears behind her.] > Ed Cueball: Well, Real Programmers use ed. > > [A third Cueball-like man appears behind him.] > Cat Cueball: No, Real Programmers use cat. > > [Hairbun appears behind him.] > Hairbun: Real Programmers use a magnetized needle and a steady hand. > > [A fourth Cueball-like man enters, facing them all. We see him facing the last two Cueball-like men and Hairbun.] > Butterfly Cueball: Excuse me, but Real Programmers use butterflies. > > [A Cueball-like programmer is standing much like Butterfly Cueball except for holding out a butterfly in front of his computer. The butterfly flaps its wings.] > Butterfly Cueball (narration within the panel, not diegetic to the scene): They open their hands and let the delicate wings flap once. > > [The next two panels are smaller, and two sets of narrative text are written to span respectively above and below both panels. The first panel is the Cueball-like programmer with the butterfly and above him four curved arrows pointing up or down. The second panel shows the upper atmosphere, with large clouds far below and the earth even further down. Also here are shown seven of the same type of arrows.] > Butterfly Cueball (narration above the panels): The disturbances ripple outward, changing the flow of the eddy currents in the upper atmosphere. > Butterfly Cueball (narration below the panels): These cause momentary pockets of higher-pressure air to form, > > [The next two panels are also partial height, leaving room for narration spanning above both panels. The first panel shows the atmosphere, again with clouds, and four parallel lines coming from above, and then they begin to merge, getting quite close at the bottom of the panel. The second panel shows the four lines merging on a driver platter.] > Butterfly Cueball (narration above the panels): Which act as lenses that deflect incoming cosmic rays, focusing them to strike the drive platter and flip the desired bit. > > [All the programmers who have commented so far stand in the order they have commented facing the last Cueball-like man, who slaps his forehead.] > Cueball: Nice. 'Course, there's an emacs command to do that. > Cat Cueball: Oh yeah! Good ol' C-x M-c M-butterfly... > Butterfly Cueball: Dammit, Emacs.

1