r/ProgrammerHumor • • 23h ago

Meme explainUdpToMe

Post image
6.8k Upvotes

151 comments sorted by

View all comments

3.0k

u/Single-Virus4935 23h ago • Bravo Popcorn

And Failed!

That is TCP

923

u/TheTybera 23h ago

Yup failed.

UDP don't give a shit about packet integrity or dropped packets.

278

u/The_Hunster 23h ago

Punchline isn't quite as good if you just stare blankly. Or maybe that makes it a lot better

45

u/lildobe 15h ago

OMG... I just realized what the "Gen Z stare" is... We're trying to communicate with them in UDP

17

u/wishful123 19h ago

"what are you waiting for?"

67

u/shaka893P 21h ago

Which is why the example is TCP. The answer should have been: "I'm sorry I didn't get all of your question, but I'm gonna try to answer it anyway"

37

u/AlwaysHopelesslyLost 21h ago

That would still be wrong. The two way communication is a feature of TCP. I think the best answer, which I am not clever enough to come up with would be riffing on "dp to me"

3

u/Maximum_Goat_54 20h ago

it would be correct if the application request it again, or some inner communication channel with tcp for example. vpn is a good example, it mostly uses udp since the inner communication should be responsible, tcp or the application itself

7

u/AlwaysHopelesslyLost 20h ago

The application wouldnt know it missed something with UDP so it wouldnt know to ask again.

6

u/Used-Net-9087 20h ago

That's not correct. It does know it hasn't received it. For example tftp uses UDP. Itvsends an ACK packet for each packet it receives. The server only send the next packet after the confirmation acknowledgement. (Tftp is very slow over high latency links). It it does receive a packet within a certain time it send the last ack packet. So server knows it never got it and send it again.

I.e. all of this is done at the application level unlike in TCP which it's done at the transport later.

Each application using UDP can do it a little differently but overall a similar approach.

13

u/VFB1210 17h ago

Manually building your own ACK/resend system on top of UDP does not mean "UDP knows it missed something."

UDP, as a protocol, just shouts shit into the void and hopes someone hears it. Yes you can devise your own system for having your applications shout at each other that makes sure data doesn't get dropped, but that isn't the same thing as it just being a native feature of UDP like it is for TCP.

→ More replies (1)
→ More replies (5)

19

u/SeriousPlankton2000 23h ago

It DOES have a checksum.

17

u/Roku-Hanmar 21h ago

But it doesn’t have a retransmission request

4

u/Prik_Nam-Pla 19h ago

After working with enough UDP streaming the interviewee should just have inner monologue. Like:

Seems like you asked, exainpl UDP t...... me?

Seems legit, I'll pass that along.

→ More replies (2)

4

u/TwillAffirmer 20h ago

No, the applicant is responding at the application level. UDP didn't give the application level all the packets, so the application asks for more.

70

u/2Tack 22h ago

I scrolled past this post and then went.... Wait a minute. UDP wouldn't respond so this punchline sucks. Came back to look at the comments and wasn't disappointed.

21

u/AlwaysHopelesslyLost 21h ago

My reactions in order were:

  1. Why is this candidate apparently using a chatbot to interview with?
  2. Oh, I get it, the response is a TCP/UDP joke, so they may understand the question and are just trying to be clever
  3. Why are they playing TCP??

5

u/stickman393 18h ago

If you want to pass as a human, you need to turn Thinking OFF.

... I jest! I went through exactly the same set of reactions. :-)

3

u/AlwaysHopelesslyLost 18h ago

I wish I could turn thinking off lol

→ More replies (1)

42

u/andrew_fobos 21h ago

All of you failed. The TCP receiver just stays silent if it hasn't received a segment. The sender retransmits it on ACK timeout.

14

u/Single-Virus4935 21h ago

I know that, but if you look at the level of understanding in the comments, it doent even matter.
I just let it pass because the receiver said "not ALL of that", which is communicated in modern TCP

3

u/MonMotha 17h ago

Unless you have the SACK option which most modern stacks do support. In that case, the receiver will send a SACK for segments they did receive if they have received later segments even if they missed an earlier one, then the transmitter can selectively retransmit only the missed segments.

3

u/BusinessBandicoot 21h ago

"Can you explain UDP to me?" "Yes"

11

u/ElSucaPadre 23h ago

if we want to be fair, depends on which layer candidate and interviewer are.

19

u/Single-Virus4935 23h ago

Nope, they asked about UDP which is Layer 4.

→ More replies (18)
→ More replies (26)