this post was submitted on 08 Jun 2026
549 points (94.2% liked)

Programmer Humor

31938 readers
332 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 3 years ago
MODERATORS
top 50 comments
sorted by: hot top controversial new old
[–] lime@feddit.nu 108 points 2 weeks ago

they used to call him the deref king back in college

[–] lian_drake@lemmy.world 73 points 2 weeks ago (2 children)
[–] ZILtoid1991@lemmy.world 6 points 2 weeks ago

Null termination is no longer recommended, use fat pointers instead!

[–] mbp@slrpnk.net 4 points 2 weeks ago (2 children)

Why would I want to be shown the concept of pointers by an eight year old?

[–] WrathEnchanter 16 points 2 weeks ago (2 children)

I'll have you know, she's canonically 300 years old

[–] wieson@feddit.org 15 points 2 weeks ago (3 children)

Nah, she's 5 or younger. She lied about being 6 (school age) to get adopted. It's a very wholesome story (if you disregard the war, political intrigue and terrorism).

[–] mnemonicmonkeys@sh.itjust.works 5 points 2 weeks ago (1 children)

And the fact that Anya's best friend is trying to break up Anya's parents because she has a crush on the dad

load more comments (1 replies)
load more comments (2 replies)
load more comments (1 replies)
[–] rizzothesmall@sh.itjust.works 5 points 2 weeks ago

It's a good reference (lol) even if it's getting downvoted

[–] NullPointerException@lemmy.ca 66 points 2 weeks ago (4 children)

Wait. It’s been a long time but shouldn’t be int*** -> int** -> int* -> int ?

[–] Susaga@sh.itjust.works 84 points 2 weeks ago (2 children)

I think int*** is meant to be pointing at int**, but the image is just unclear about where everything is in perspective.

[–] dohpaz42@lemmy.world 28 points 2 weeks ago (8 children)

Pretty sure the image is clear:

int*** -> int*
int** -> int
Int* -> int

Clarity doesn’t mean correct. But that’s probably why it’s posted here. 🤷‍♂️

[–] mexicancartel@lemmy.dbzer0.com 9 points 2 weeks ago

int** is inside a TV, and persumably int* must be inside another TV(even though uts not edited in). The image perespective is showing one thing inside the other, inside the other. So when when int*** points the TV it reference int**, which reference int* which reference int. Its just edited very bad

[–] Susaga@sh.itjust.works 8 points 2 weeks ago (1 children)

RT*** isn't pointing at RT*, he's pointing at the TV showing RT**. The fact you think otherwise is what makes the image unclear. I'm not sure why you insist on them being wrong.

load more comments (1 replies)
load more comments (6 replies)
[–] obviouspornalt@fedinsfw.app 15 points 2 weeks ago

I mean, that's pretty much what happens to me every time I try to use pointers, so the meme checks out.

[–] terranoid@lemmy.cafe 7 points 2 weeks ago

yep this is just someone misunderstanding pointers lol

[–] Dialectical_Specialist@quokk.au 3 points 2 weeks ago

That's not the end of the chain either, right?

Because : int -> &int -> &&int

Or can you not use the address operator like that? It also might be int& &, I failed cs2200 on this exact type of technicality

[–] DrCake@lemmy.world 41 points 2 weeks ago (1 children)

Rumble Tumble Games in the wild

Seeing him break containment is wild

[–] MrNesser@lemmy.world 30 points 2 weeks ago (1 children)

Didn't expect to see the Drift King here

[–] Jumi@lemmy.world 9 points 2 weeks ago* (last edited 1 week ago)

Drift King? You mean Dan the Villian

[–] dangrousperson@feddit.org 11 points 2 weeks ago

as a python script kiddie, this is way over my head, but upvoted because of RT Game

[–] MonkderVierte@lemmy.zip 8 points 2 weeks ago* (last edited 2 weeks ago) (3 children)

So, googling it, the general premise is you should use smart pointers instead to avoid crashes. Got it.

[–] DahGangalang@infosec.pub 10 points 2 weeks ago (1 children)

Smart pointers implies C++, which is not the right answer.

[–] MonkderVierte@lemmy.zip 6 points 2 weeks ago (1 children)

Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a well-written C++ book. It is way too big and complex for doing this. In fact, it is so big and complex, that there are very many very bad C++ books out there. And we are not talking about bad style, but things like sporting glaringly obvious factual errors and promoting abysmally bad programming styles.

https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list

[–] mnemonicmonkeys@sh.itjust.works 6 points 2 weeks ago* (last edited 2 weeks ago)

Considering that most of the "answers" I've found on StackOverflow were complete dogshit, I'm wary of this reading list

Uh

I think I'll just let the cat drive instead

[–] CanadaPlus@lemmy.sdf.org 4 points 2 weeks ago* (last edited 2 weeks ago) (3 children)

They all have footguns that cause different crashes.

If you want to do explicit memory access without inevitable safety problems, you need Rust. That's the whole hype with Rust.

load more comments (3 replies)
[–] 14th_cylon@lemmy.zip 8 points 2 weeks ago (2 children)

Why should the left one in the rectangle be int**? It doesn't make sense to me, they are both clearly just int*

What am i missing?

[–] ImgurRefugee114@reddthat.com 9 points 2 weeks ago

I they're supposed to be pointing at each other but the edit didn't really work because his arm is pointing too far away

[–] Skipcast@lemmy.world 4 points 2 weeks ago

Perspective innit

[–] Technus@lemmy.zip 7 points 2 weeks ago (1 children)

Real talk: is there any practical use-case for T*** of any pointee type?

[–] palordrolap@fedia.io 22 points 2 weeks ago (5 children)

Dynamically allocated multidimensional arrays.

[–] Technus@lemmy.zip 12 points 2 weeks ago (1 children)

Ah right, so that would be a 3D array.

  • T* is a single row of T
  • T** is a list of rows
  • T*** is a list of "layers" in the third dimension

This would be incredibly hazardous to pass around as a bare pointer with no context, though. I'd expect to see this in a struct that, at minimum, also includes fields for the size of each dimension.

[–] BartyDeCanter@piefed.social 8 points 2 weeks ago

This ~~Sparta~~ C. We live for danger.

[–] Auth@lemmy.world 8 points 2 weeks ago

Tesseract Array

load more comments (3 replies)
[–] LovableSidekick@lemmy.world 5 points 2 weeks ago

C# delegates enter the chat and nod.

[–] Flames5123@sh.itjust.works 5 points 2 weeks ago (2 children)

Now that explain the & part of the pointers that I never really understood.

[–] ZILtoid1991@lemmy.world 6 points 2 weeks ago (12 children)

The & operator references the value.

int i;
int* p = &i;

In C++, the & at the function argument makes it a reference type (safe pointer).

void someFunction(int& refVal) {
    [...]
}
load more comments (12 replies)
[–] dejected_warp_core@lemmy.world 4 points 2 weeks ago* (last edited 2 weeks ago)

*x = dereference or "point to". Treats the variable x as containing a pointer value. Evaluates to a variable existing at the address in x.

&x = reference or "get address of". Evaluates to the address of x.

They're complimentary operators, so *(&x) cancels out and is equvalent to just x.

[–] Quibblekrust@thelemmy.club 4 points 2 weeks ago (1 children)

Am I a computer scientist now?

load more comments (1 replies)
[–] refalo@programming.dev 4 points 1 week ago

that's not LaurieWired

[–] itkovian@lemmy.world 3 points 2 weeks ago

So, confusing, nonetheless.

load more comments
view more: next ›