Comics

586 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 2 years ago
1
 
 

cross-posted from: https://lemmy.ml/post/42935548

2
 
 

Artist: @MrSebSin@lemmy.world

Watch the video version here… https://youtube.com/shorts/Jqt32V4Ym2g

3
 
 

Artist @MrSebSin@lemmy.world

Watch the video version here… https://youtube.com/shorts/kZt1D0ZZeuA

4
 
 
5
 
 

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 |

6
7
 
 
8
 
 

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.

9
10
 
 
11
41
submitted 2 years ago* (last edited 2 years 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.

12
13
 
 
14
 
 
15
 
 
16
17
 
 

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

18
19
 
 

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]

20
 
 
21
 
 

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.

22
23
 
 

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.

24
25
 
 

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.

view more: next ›