1
225
2
104
[xkcd] Git Commit (programming.dev)
submitted 3 months ago by mac@programming.dev to c/comics@programming.dev

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 |

3
122
submitted 3 months ago by mac@programming.dev to c/comics@programming.dev
4
391
submitted 3 months ago by mac@programming.dev to c/comics@programming.dev
5
32
submitted 3 months ago by mac@programming.dev to c/comics@programming.dev

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.

6
25
submitted 3 months ago by mac@programming.dev to c/comics@programming.dev
7
281
submitted 3 months ago by mac@programming.dev to c/comics@programming.dev
8
42
submitted 3 months ago* (last edited 3 months ago) by mac@programming.dev to c/comics@programming.dev

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.

9
90
submitted 3 months ago by mac@programming.dev to c/comics@programming.dev
10
501
11
183
submitted 7 months ago by mac@programming.dev to c/comics@programming.dev
12
10
13
85
submitted 7 months ago by mac@programming.dev to c/comics@programming.dev
14
53
submitted 7 months ago by mac@programming.dev to c/comics@programming.dev

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());
    }
}

15
44
submitted 8 months ago by mac@programming.dev to c/comics@programming.dev
16
62
submitted 8 months ago by mac@programming.dev to c/comics@programming.dev

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]

17
110
submitted 8 months ago by mac@programming.dev to c/comics@programming.dev
18
162
submitted 8 months ago by mac@programming.dev to c/comics@programming.dev

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.

19
32
submitted 8 months ago by mac@programming.dev to c/comics@programming.dev
20
165
submitted 8 months ago by mac@programming.dev to c/comics@programming.dev

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.

21
78
submitted 8 months ago by mac@programming.dev to c/comics@programming.dev
22
163
[xkcd] Tree (17 Dec 2010) (programming.dev)
submitted 8 months ago by mac@programming.dev to c/comics@programming.dev

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.

23
71
[xkcd] DFS (2 Jul 2010) (programming.dev)
submitted 8 months ago by mac@programming.dev to c/comics@programming.dev

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.

24
141
submitted 8 months ago* (last edited 8 months ago) by mac@programming.dev to c/comics@programming.dev

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.]

25
37
submitted 9 months ago by mac@programming.dev to c/comics@programming.dev
view more: next ›

Comics

450 readers
1 users here now

A community for sharing comics related to programming

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 10 months ago
MODERATORS