this post was submitted on 11 Dec 2023
1128 points (98.5% liked)

Programmer Humor

32361 readers
301 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] neeeeDanke@feddit.de 126 points 10 months ago (4 children)

Nah, TCP is still just kicking the box over, but just kicking it over again, if the reciever doesn't kick back a box saying they got it.

[–] pivot_root@lemmy.world 64 points 10 months ago* (last edited 10 months ago) (1 children)

TCP is also deciding to ramp up the amount of boxes you kick over until the post worker gets crushed by boxes, at which point you decide to lower your box-kicking rate by half and try again.

[–] Gallardo994@sh.itjust.works 29 points 10 months ago

Best explanation of congestion I've seen in a while

[–] Enk1@lemmy.world 8 points 10 months ago

I wrote an anology up and hated it, so I discarded it. Glad someone else nailed it.

[–] CmdrKeen@lemmy.today 6 points 10 months ago

Well yes, internally that's what it does, but from a user perspective it just looks like being handed the package, you never see any of the failed attempts (unless delivery fails completely because the company went out of business). It's sorta more like having a butler who orders it for you and deals with any potential BS that might happen, and then just hands you the package when it finally arrives in one piece.

[–] MystikIncarnate@lemmy.ca 4 points 10 months ago

Like Jim Carey in Ace Ventura?

For those that may have forgotten: https://youtu.be/WjTDXatmzUE

[–] Bishma@discuss.tchncs.de 73 points 10 months ago* (last edited 10 months ago) (4 children)

UDP seems more like a ball fired from canon to me. You may not be prepared for it and you won't know what state it's in when it gets here, but that packet is making it to the gate no matter what. Or, in the rare case it doesn't, it means someone else is having a real bad time.

[–] bleistift2@feddit.de 31 points 10 months ago (2 children)

You forgot to mention that you might get it twice, or thrice, or more, and in different versions.

[–] Bishma@discuss.tchncs.de 28 points 10 months ago

You're right. I forgot that grapeshot is always something to worry about.

[–] Neato@kbin.social 9 points 10 months ago (2 children)

(novice) Why would you get UDP packets multiple times? UDP doesn't check for acceptance I thought.

[–] ByteWelder@lemmy.ml 21 points 10 months ago (4 children)

From StackOverflow:

Switches will send packets to all interfaces when using broadcasts or under extreme conditions (full MAC Address Table). This can lead to duplication if there is a loop between two or more switches and if the Spanning Tree Protocol is not used. So the answer is rarely.

https://stackoverflow.com/questions/9196791/duplicate-udp-packets-how-often-it-happens#9220574

[–] c0mbatbag3l@lemmy.world 8 points 10 months ago* (last edited 10 months ago) (1 children)

If you have no RSTP/MSTP you're just asking for trouble.

Switching loops are unlikely unless you have bad or non-existent documentation or someone new.

[–] Smc87@lemmy.sdf.org 5 points 10 months ago (2 children)
[–] MystikIncarnate@lemmy.ca 5 points 10 months ago

Fun story. I was tasked with figuring out a connection problem on a client's network. STP was enabled, but everyone having problems were all connected to one switch.

Some investigation later and STP's root port is not the expected root port....

After some investigation, a user took the ethernet cable for their computer (Daisy chained off their VoIP phone), and decided to store it, in the wall jack.... Across the office.

That was Jack was on a different switch, and it had a lower port cost than the primary root port between the switches, so naturally, let's send all inter-switch traffic over to this..... Telephone.

/Facepalm

[–] c0mbatbag3l@lemmy.world 2 points 10 months ago (1 children)

The only switching hardware they should have physical access to is a dumb switch if absolutely needed. Then control the cables.

[–] MystikIncarnate@lemmy.ca 3 points 10 months ago

Yep. That happened once. The user plugged the cable for their laptop, from the dumb switch, into the same dumb switch and took out most of the network.

[–] bleistift2@feddit.de 5 points 10 months ago (1 children)

Don’t the big internet-y routers also send packets to multiple interfaces if they don’t know how to correctly handle the target IP address?

[–] c0mbatbag3l@lemmy.world 3 points 10 months ago (1 children)
load more comments (1 replies)
load more comments (2 replies)
[–] frezik@midwest.social 7 points 10 months ago

Protocols using UDP often dial in some features of TCP at the application layer, and resend packets as needed.

The meme is funny and all, but real world use of UDP is pretty sophisticated.

[–] WindowsEnjoyer@sh.itjust.works 23 points 10 months ago (1 children)

Sorry I didn't get this UDP joke...

[–] neeeeDanke@feddit.de 35 points 10 months ago

Well I ain't just gonna repeat it...

[–] agent_flounder@lemmy.world 11 points 10 months ago

Just keep tossing packages over a tall fence, say "I guess that'll do it", then shrug and walk away.

[–] wholeofthemoon@lemmy.world 3 points 10 months ago (1 children)

Because you're so prepared for a guy kicking a parcel over the fence. It's the same analogy my dude.

[–] Bishma@discuss.tchncs.de 5 points 10 months ago

The kick over the fence means they took enough care to carry it as far as your fence. UDP lobs it from one town over.

[–] IHeartBadCode@kbin.social 55 points 10 months ago (4 children)

I mean I've been trying to formally request that ISO change the C API for send() to yeet() for sockets where connection reliability is not required at the network interface level.

[–] Gallardo994@sh.itjust.works 10 points 10 months ago

Well, thank you, now I'm creating that exact macro in every company repo where send/sendto is used.

[–] peopleproblems@lemmy.world 8 points 10 months ago

that's fucking brilliant lol

[–] agent_flounder@lemmy.world 6 points 10 months ago

Welp, time for a new language!

[–] WindowsEnjoyer@sh.itjust.works 5 points 10 months ago

That would be awesome! xD

[–] aksdb@feddit.de 51 points 10 months ago (1 children)

There's nothing wrong with UDP. At least not that I know of.

[–] You999@sh.itjust.works 5 points 10 months ago (3 children)
[–] peopleproblems@lemmy.world 17 points 10 months ago (1 children)
[–] Klear@lemmy.world 2 points 10 months ago

You are unstoppable!

[–] konalt@lemmy.world 16 points 10 months ago (1 children)
[–] lud@lemm.ee 4 points 10 months ago

Not my problem.

[–] MooseBoys@lemmy.world 5 points 10 months ago (1 children)

Not really a problem with UDP itself, but with some very old protocols like DNS that rely on UDP but can’t be changed because of compatibility. If you’re writing a new service that uses UDP, there’s nothing stopping you from designing it so that it doesn’t provide an opportunity for bandwidth amplification.

[–] PreviouslyAmused@lemmy.ml 3 points 10 months ago

It’s technically not a bug if it’s operating as intended

[–] OmnislashIsACloudApp@lemmy.world 47 points 10 months ago (2 children)
[–] 3ntranced@lemmy.world 6 points 10 months ago

Jesus christ SSH

[–] DNOS@reddthat.com 3 points 10 months ago (1 children)

Can't understand the VPN one shouldn't the traffic pass through the VPN and then go to the user like the ssh one ...

[–] httpjames@sh.itjust.works 5 points 10 months ago (1 children)

The person on the right of the VPN image is the destination server

[–] neosheo@discuss.tchncs.de 5 points 10 months ago (1 children)

Isn't the can the vpn server and the guys are just vpn users?

[–] OmnislashIsACloudApp@lemmy.world 4 points 10 months ago

that what I assumed

[–] neidu@feddit.nl 18 points 10 months ago

Broadcast: dropping leaflets from an airplane

[–] mindbleach@sh.itjust.works 14 points 10 months ago

TCP is a process server.

UDP is a brick in flight.

[–] Illogicalbit@lemmy.world 11 points 10 months ago

These comments have been the highlight of my day. Thanks

[–] Enzy@lemm.ee 6 points 10 months ago (1 children)
[–] frezik@midwest.social 7 points 10 months ago

It's a postcard saying "hey, thinking of you!" and there's a picture of a wulrus on it.

[–] werefreeatlast@lemmy.world 1 points 10 months ago

You see pee?

Nah! You dah pee! Nah you dah pee!

You see pee!

load more comments
view more: next ›