r/ProgrammerHumor • • 1d ago

Meme explainUdpToMe

Post image
7.8k Upvotes

170 comments sorted by

3.3k

u/Single-Virus4935 1d ago • Bravo Popcorn

And Failed!

That is TCP

1.0k

u/TheTybera 1d ago

Yup failed.

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

322

u/The_Hunster 1d ago

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

65

u/lildobe 1d ago

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

18

u/wishful123 1d ago

"what are you waiting for?"

74

u/shaka893P 1d 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"

39

u/AlwaysHopelesslyLost 1d 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"

5

u/Maximum_Goat_54 1d 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 1d ago

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

6

u/Used-Net-9087 1d 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 1d 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.

8

u/Used-Net-9087 1d ago

Yes. Valid. So my point isn't correct. Apologies.

0

u/Maximum_Goat_54 1d ago

thats why its on the devs of the app to check if everything worked, if for whatever dumb reason udp was decided

6

u/AlwaysHopelesslyLost 1d ago

That is not how anything works. If you need to know that your data arrived you use TCP, not UDP with some hacky application layer bullshit that emulates TCP lol

1

u/Scolmann 20h ago

I mean there is QUIC, lol

-2

u/Maximum_Goat_54 1d ago

thats exactly what i said

1

u/AlwaysHopelesslyLost 1d ago

I dont think you really addressed my point, that the punchline describes reliability features UDP doesn't have.

Getting a bit too into the weeds in this chat with too many people for me to keep going back and rereading it so I will just concede...

19

u/SeriousPlankton2000 1d ago

It DOES have a checksum.

18

u/Roku-Hanmar 1d ago

But it doesn’t have a retransmission request

4

u/Prik_Nam-Pla 1d 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.

1

u/potwh0le 1d ago

If the checksum errors, it will fail

Does it do a request?

Also I guess both the message erring, then the checksum error ingredients so it matches the error edit message, is so astronomically unlikely to happen it has never happened.

2

u/SeriousPlankton2000 1d ago

It doesn't care about requests, it only cares about the checksum. Bad checksum, go away!

4

u/TwillAffirmer 1d 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.

77

u/2Tack 1d 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.

23

u/AlwaysHopelesslyLost 1d 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 1d 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 1d ago

I wish I could turn thinking off lol

1

u/alficles 1d ago

No, no, this was just the candidate displaying some quic thinking!

43

u/andrew_fobos 1d 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.

15

u/Single-Virus4935 1d 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 1d 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 1d ago

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

11

u/ElSucaPadre 1d ago

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

19

u/Single-Virus4935 1d ago

Nope, they asked about UDP which is Layer 4.

5

u/qqqrrrs_ 1d ago

There are protocols where the reliability is implemented in the application layer, over UDP

21

u/Single-Virus4935 1d ago edited 1d ago

Yes, they exists. I know. For.example QUIC. But that isnt UDP.

If I ask you about how roads are build you wount explain how a car works.

Man, folks.. Stay focused when explaining protocols.

Edit: QUIC is technically also Layer 4 

1

u/Kirides 1d ago

But isn't quick using TLS which makes it application layer? As it's not just a dumb transport?

2

u/Single-Virus4935 1d ago

Layer 4 is the Transport Layer.

Now you know why it is called T. L. Security

2

u/Kirides 1d ago

Is it transport layer security because it's inside the transport layer, or because it protects the data inside the transport layer?(Envelope type of thing)

1

u/Single-Virus4935 1d ago

It is in the transport layer. From layers above there is no difference if TLS is used or not. A TCP connection with TLS is treated the same as a standard TCP connection. TLS is often build into user space but that isn't necessary.

E.g.: there is no reason that the kernel couldn't handle all.of TLS just like plain TCP.

Furthermore the layer isn't a matter of where it is implemented. E.g. Browsers implement QUIC in userspace but it is Layer 4.

1

u/Kirides 1d ago

Maybe Im just bad at understanding, but to me that's like anything that every transports something over any kind of protocol is then transport layer? As long as it's abstraction is "transparent" to the one using it? I mean, quic is not transparent to UDP, you can't just sent bytes and assume it works, you need the windows to be correct and the signatures, a connection IDs etc. Which IMO is application layer, as the internals of the transport quic are transported via UDP and re-assembled on the other side, not via router UDP package assembly, but via userspace packet handling.

→ More replies

-2

u/ElSucaPadre 1d ago

lol yes but if the application on level 5 is using udp it will surely know if they're missing something important

10

u/InDubioProReus 1d ago

You probably wouldn’t use UDP if there’s anything important to miss.
It’s meant for traffic where the latest state is gold, like multiplayer games, video calls etc.

4

u/yahluc 1d ago

But an application can have its own retry mechanism when using UDP with its own rules. Like sometimes old data is important, but not important enough to block the rest of transmission like TCP does.

1

u/Single-Virus4935 1d ago

Yes, but that has nothing to do with UDP. They didn't ask about $PROTOCOL over UDP. They aske d about UDP

0

u/rosuav 1d ago

"... where the latest state is gold, like multiplayer games". Sends UDP packet to notify the client that the player's gold has changed.

3

u/Memitim 1d ago

The app won't surely know anything, because it's not built into the protocol. You can technically make UDP seem mostly sort of like TCP with a bunch of extra shims in compute, but that has nothing to do with the protocol used.

Also, Layer 5 is Session layer, where stream connections are managed. Layer 7 is application, where additional logic would need to be added to get UDP to pretend to have reliability. There are elements at layer 4 that would be used for implementing the sequencing needed, but app code would actually perform the handling. As per the name, the Session layer just ensure reliability for the connected session itself and not the individual packets.

And obligatory acknowledgement that the OSI model is just a model.

3

u/Single-Virus4935 1d ago

Not necessarily and they didn't ask about another protocol, they ask about UDP. The Interviewer has to stay in this layer if he wants to demonstrate how it works.

1

u/ElSucaPadre 1d ago

yes but this isn't a real interview, it's a joke

1

u/Single-Virus4935 1d ago

Still a bad joke and people show that shows that people are missing fundamentals. Good oportunity to learn why this joke is just nonesense

1

u/capi1500 1d ago

Unless it's the first packet sent from a client to server

2

u/DoctorWhatTheFruck 1d ago

unironically having an exam that contains these two (on monday) and you all be right now giving me ways to remember the difference lol

2

u/Next-Post9702 21h ago

I am going to send you a question now

I am ready to receive the question now

Here comes the question

I'm ready for the question

Explain tcp to me

I have received the question

2

u/PiasaChimera 21h ago

don't be so QUIC.

2

u/shinobi500 20h ago

I have a good UDP joke but you might not get it .

5

u/ramdomvariableX 1d ago

Will be funnier if the candidate starts talking about Upper Peninsula (UP: Michigan, US) or Uttar Pradesh (UP: India). because he missed the 'D'.

5

u/Proper-Ape 1d ago

This is the brain layer having to make up for an unreliable transport layer.

0

u/Single-Virus4935 1d ago

That wasn't the question. If so, candidate mixed layers and failed 

0

u/Proper-Ape 1d ago

But he didn't get the question. How should he answer it?

3

u/Single-Virus4935 1d ago

The receiver wouldnt know that the Packets are missing. The udp stack wouldn't react at all.

1

u/The_Schwy 1d ago

damn it they farmed our engagement by posting something incorrect intentionally or are you in on it too!

1

u/mthlmw 21h ago

I think the "all" is trying to carry the joke. If something goes wrong on with UDP your only option is to request the whole thing again.

1

u/Single-Virus4935 17h ago

But that's not UDP but TCP. Even for TCP it is a far fetch because it is only implizity asked with newer additions.

1

u/mthlmw 11h ago

UDP doesn't have error correction, but that doesn't mean you can't request the data a second time. You can run nslookup against a DNS server however many times you want.

1

u/Single-Virus4935 11h ago

Yes, as discussed several times in this thread the upper protocol can and has to handle that but this isn't a property of UDP.

1

u/mthlmw 11h ago

So if you send a DNS request, and for whatever reason don't receive enough of the sent packets to put together the data you need, what should you do?

1

u/Single-Virus4935 11h ago

I get that you mean, but that isn't in UDP. That is the application handling.

Forget everything above Layer 4 because it is an abstraction and you need to learn to think in such abstractions 

0

u/mthlmw 10h ago

That's how most people interact with UDP though. Explaining something doesn't only mean saying how it works, you can also explain how it's used, the general idea behind it, or how it relates to similar things.

1

u/Single-Virus4935 10h ago

For UDP the answer is "The upper layer has to deal with it". Period.

If the discuss DNS then it is another protocol which uses different transports.

0

u/mthlmw 10h ago

The mechanics of a pair of scissors doesn't include paper, but I'd bet 80%+ of people you asked on the street to "explain scissors" would use the word paper.

→ More replies

1

u/otkpro 1d ago

okay I can hear you now

4

u/Single-Virus4935 1d ago

Another one who doesn't understand udp

1

u/lukasbradley 1d ago

2

u/Single-Virus4935 1d ago

Maybe, but if I look at the comments I am not so sure

0

u/ItsIllak 1d ago

Explain TCP to explain TCP explain explain explain TCP to me

0

u/Impossible_Dog_7262 20h ago

In fairness I think even UDP will respond with an error if you request something it cannot provide or parse. It's only once you make a successful request for data that it stops listening to you.

1

u/Single-Virus4935 17h ago

No it doesn't. That is not how UDP works. 

" It does not make any guarantee of successful delivery, indicate the original ordering, or detect duplication, thus exposing the user's program to any unreliability of the underlying network. It also provides no feedback to the sender ." https://en.wikipedia.org/wiki/User_Datagram_Protocol

0

u/[deleted] 1d ago

[deleted] — view deleted comment

7

u/Single-Virus4935 1d ago

Nope, he just pretended that he didn't got all packets. On UDP that wouldnt get noticed at all. On TCP an unsolicited packet would result in a RST

0

u/[deleted] 1d ago

[deleted] — view deleted comment

1

u/Single-Virus4935 1d ago edited 1d ago

UDP doesnt have connections and TCP sends RST also for non existing connections on a open port.

The whole thing falls apart because a UDP packet wount end up in the TCP Stack.  If a packet with TCP proto is sent with UDP structure it wouldnt decode correctly and be dropped. Your scenario has no technical foundation.

0

u/[deleted] 1d ago

[deleted] — view deleted comment

2

u/VictoryMotel 1d ago

This is just hardcore rationalization.

1

u/Single-Virus4935 1d ago

I dont think there is a deeper layer. The canidate failed to understand the protocol. What we dont know is if the creator intended the canidate to pass or fail

1.0k

u/robin_888 1d ago

"Can you explain UDP to me?"

silence "And that's the core concept of UDP."

195

u/cabbagesweetner 1d ago

Much better punchline

9

u/BroBroMate 21h ago

"Fire and forget", unless you try to replicate TCP-esque acking/retry on top of it, poorly.

0

u/[deleted] 1d ago

[deleted] — view deleted comment

3

u/robin_888 1d ago

How do you differentiate between "A didn't send it" and "B didn't receive it" from B's point if view?

And how does A make B "fail to hear it probably" other than not sending it probably?

420

u/winter-m00n 1d ago

there is no repeat in udp, is it?

368

u/sirkubador 1d ago

nope

if this was a udp joke, you wouldn't get it

34

u/mattsl 1d ago

You mean if I were telling a udp joke I wouldn't care whether or not you got it. Which is in fact how my humor usually works.

19

u/Feisty_Manager_4105 1d ago

perhaps repeatedly ask him every 5 seconds

3

u/TraditionalYam4500 1d ago

I see what you did there.

1

u/Tomahawkist 14h ago

and you wouldn’t know if they got it

6

u/TheG00dF1ght 1d ago

no acknowledgement, no resend of lost packets. Just spray and pray.

217

u/Martin-Hatch 1d ago

Interviewer: Can you explain TCP?

Candidate: Can we shake hands first?

150

u/23Silicon 1d ago

“Can you explain TCP?”
“I can explain TCP.”
“Okay, begin your explanation.”

Done

50

u/dewiniaid 1d ago

Hello, would you like to hear a TCP joke?

Yes, I'd like to hear a TCP joke.

OK, I'll tell you a TCP joke.

OK, I'll hear a TCP joke.

Are you ready to hear a TCP joke?

Yes, I am ready to hear a TCP joke.

OK, I'm about to send the TCP joke. It will last 10 seconds, it has two characters, it does not have a setting, it ends with punchline.

OK, I'm ready to hear the TCP joke that will last 10 seconds, has two characters, does not have a setting and will end with a punchline.

I'm sorry, your connection has timed out... ...Hello, would you like to hear a TCP joke?

6

u/initiald-ejavu 1d ago

It doesn’t handshake except the beginning and end tho no? Been a while since I thought of it

4

u/dewiniaid 1d ago

This Is not my original joke, I just remembered hearing it years ago. 

The last time I deep dived into this was trying to figure out why I'd randomly get instantly disconnected from WoW while everything else kept working.  I ended up getting escalated up to an actual engineer at Blizzard when I discovered via Wireshark that incoming packets were randomly being flagged FIN; I.e. the server was literally hanging up on me mid-conversation.  I ended up emailing them actual packet logs.

13

u/sabotsalvageur 1d ago

Are you prepared for my explanation of tcp?

13

u/Single-Virus4935 1d ago

They have already established a connection as the handshake at the first contact. So basically there is no point in demonstrating UDP in an interview. Your point also hints at why people in the comments are confused.

9

u/Zeikos 1d ago

Be QUIC about it

3

u/psamathe 1d ago

Interviewer: Can you explain TCP?

How many hands do you got?

239

u/Kidplayer_666 1d ago

“Can you tell me a udp joke?”

“You might not get it”

9

u/bythenumbers10 1d ago

But I'll keep telling the joke until you do!

12

u/pocketshape 1d ago

That’s TCP again.

UDP is “if you don’t get it that’s fine, we’ll just keep the conversation going”

9

u/xxNemasisxx 1d ago

UDP IS: If you that's fine don't get it conversation going we'll just keep

3

u/FetusExplosion 1d ago

I can tell you a UDP joke, and I dont care you if you get it.

30

u/TheFel0x 1d ago

This has got to be ragebait.

47

u/GreatArtificeAion 1d ago

Interviewer: Explain UDP to me.

Candidate: Sorry, I may not have gotten all of that. What's your next question?

10

u/Gen_Hospital 1d ago

Technically, they should just wait untill the interviewer repeats themselves, or the interviewer should just ask 3 (or 5) times unprompted.

7

u/sainglend 1d ago

It is the place few Michiganders live.

6

u/jeffrecode 1d ago

No, that's DUP

3

u/mcprogrammer 1d ago

That's what they tried to say, but they used one packet for each letter.

2

u/seabutcher 1d ago

Isn't that the Irish political party?

42

u/qengineer 1d ago

No, the candidate passed. The interviewer was using UDP and refused to repeat themselves.

43

u/AkodoRyu 1d ago

Asking for repeat is not part of the protocol to begin with.

8

u/TohveliDev 1d ago

But then if the interviewer does repeat the question, it becomes TCP.

5

u/Skycl4w 1d ago

They should also agree that they are talking to each other before asking questions. Consent matters.

1

u/rosuav 1d ago

Doesn't have to. You can, for example, send a DNS request on port 53 UDP and get back a response (also UDP) that tells you that you can't get that information (eg SERVFAIL). Though, if you asked for *too much* information, then the correct response is to switch to TCP, so in a very different sense, it would in fact become TCP.

1

u/dinklezoidberd 1d ago

That’s a good point! I’d like to shake your hand.

0

u/seabutcher 1d ago

Only if you answer.

4

u/regidud 1d ago

I will tell you once, I don't care if you get it

4

u/diadmer 1d ago

My preferred version of this joke is: “I would tell you a joke about UDP, but I can’t be certain you would get it.”

7

u/AtheIstan 1d ago

What's upd?

2

u/Homeless_Appletree 1d ago

Stands for User Datagram Protocol. It is a communication protocol which, unlike TCP, does not require your to set up data paths. Instead of confirming everything you send and receive you just send and don't worry about how it gets there.

It is faster since it avoids a lot of overhead but it is also more prone to errors if the connection is unreliable. It is possible for example for packages to arrive out of order.

2

u/murdochi83 5h ago

Not much, what's up with you?

2

u/plz-no-b4n 1d ago

Unsolicited dick picks

-2

u/TraditionalYam4500 1d ago

IMO this is the best answer! That or “UP could mean the Upper Peninsula of Michigan or Uttar Pradesh.”

6

u/sirkubador 1d ago

You definitely can develop tcp on top of udp, it is in fact quite quic

1

u/seabutcher 1d ago

ver, you really shouldn't.

1

u/sirkubador 1d ago

google already did

1

u/seabutcher 11h ago

Wait, seriously? I thought you were joking.

1

u/sirkubador 11h ago

it's called quic

1

u/seabutcher 11h ago

I see. I literally thought you were just joking about how well it works by cutting off your comment mid-word. 😅

1

u/rvanpruissen 1d ago

This often happens when using VPN tunneling I think.

1

u/UnseenTardigrade 1d ago

It's much more common to go the other way and run UDP traffic through TCP on port 443 to make it look like HTTPS.

I think I've heard of people obscuring their TCP traffic by making it look like UDP video conferencing to get past some firewalls, but it's far less common.

1

u/FranseFrikandel 1d ago

I see what you mean for busting through firewalls, but VPN tunnels usually use UDP, otherwise connecting to a TCP service would be TCP overtop another layer of TCP, which causes a lot of overhead.

Apparently dropped packets can cause even more issues, causing so called 'TCP meltdown' where both TCP layers are trying to resend the same dropped packet.

3

u/seabutcher 1d ago

I'm imagining being asked this in an interview and proceeding to close my eyes and spin on my chair while saying that I don't care if they understand what I'm saying.

3

u/cheezballs 1d ago

2400 upvotes and the joke isn't even the right protocol.

3

u/JerryAtrics_ 1d ago

I could tell you a UDP joke, but you might not get it.

3

u/Enverex 1d ago

ProgrammerHumor once again shows that it is indeed, just LARP.

2

u/jshusky 1d ago

These are my network protocol jokes

TCP packet: Id like to order a beer. Bartender: A beer? TCP packet: A beer!

Id try to tell you my UDP joke but im afraid you wouldnt get it.

2

u/dlegatt 1d ago

I’ll tell you a joke about UDP, but I won’t know if you’ll get it.

2

u/wwabc 1d ago

"It's similar to upd, which stands for 'updog'"

2

u/Baardi 22h ago

You're not supposed to respond or aknowledge his existence at all

6

u/cdtoews 1d ago

I once answered this question like this "I'd tell you a joke about UDP, but I'm not sure you'd get it"

1

u/PM-ME-UR-DARKNESS 1d ago

Oh that's funny

1

u/ramriot 1d ago

So a failed interview question either way

1

u/OnceMoreAndAgain 1d ago

You're not the boss of me now and you're not so big.

1

u/caguru 1d ago

Candidate opens conference room door and shouts into open floor plan office: sorry I didn’t get all that. Can you repeat the question?

FTFY

1

u/__Demyan__ 1d ago

Regarding udp jokes, I never care if my audience get them, or not.

1

u/gerbosan 1d ago

Dr Who?

1

u/RyuXnet_7364 1d ago

"DP stands for DeadPool which is a fictional Marvel character."

1

u/Wentyliasz 1d ago

TCP - when the delivery guy walks up to your front door and asks for your signature UDP - when the delivery guy meets the package in the general direction of your house

1

u/matthewsAccount23 1d ago

A jogger saying "Hi" to a passerby without caring if the passerby heard him and responded or no, the jogger keeps on jogging and saying "Hi".

1

u/alwaysasillyplace 1d ago

Also acceptable punchline:
It's been great working with you.

1

u/CoshgunC 10h ago

i don't think UDP would ask "could you repeat again"

1

u/BestBadFriend 4h ago

Throw a handful of salt at the interviewer and yell "catch!"

1

u/Emergency-Soft1301 2h ago

better reply to fit would be like "explain what?" or just nothing at all as udp doesnt care about it, so just say nothing

0

u/ahf95 1d ago

”not much, udp, what’s up with you?”

4

u/NoteBlock08 1d ago

UDP: Unsolicited Dick Pics TCP: Tasteful Consensual Photos