this post was submitted on 26 Feb 2026
423 points (95.9% liked)

Programmer Humor

30043 readers
2006 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] A_norny_mousse@piefed.zip 9 points 1 day ago (1 children)

int personality = sizeof(goals);

Feels a bit simplified to me.

[โ€“] ChaoticNeutralCzech@feddit.org 7 points 1 day ago* (last edited 1 day ago)

You are correct, that is simplified. The whole line is

int personality = sizeof(goals) / sizeof(goals[0]);

To get the length of an array in C, it's necessary to divide its memory footprint by the size of a single element!

BTW you can see what appears to be ASCII in the background of that image. You can decode it if you're bored.