there's mostly only two relentless hardships in programming: networking issues, naming things, and off by one errors.

a month ago by gandalf_der_13te to c/programmer_humor

lime 74 points a month ago

what happened to cache invalidation?

path: 0 25828412, hotness: undefined, score: 74, children: 18
VegOwOtenks 47 points a month ago

Networking Issues is probably Cache Invalidation in Disguise.

path: 0 25828412 25828446, hotness: undefined, score: 47, children: 15
lime 48 points a month ago

...it's dns again isn't it

path: 0 25828412 25828446 25828473, hotness: undefined, score: 48, children: 4
VegOwOtenks 22 points a month ago path: 0 25828412 25828446 25828473 25828526, hotness: undefined, score: 22, children: 2
Monument 6 points a month ago

If you visit the site via its IP address, it says no.

Source: I made that up.

path: 0 25828412 25828446 25828473 25828526 25832405, hotness: undefined, score: 6, children: 1
OpenStars 12 points a month ago

No, definitely not!

...

...

^but^ ^actually^ ^yes^

path: 0 25828412 25828446 25828473 25830861, hotness: undefined, score: 12, children: 0
Ooops 4 points a month ago

Low TTL of dns entries is there to avoid classical Cache Invalidation, so kind of...

path: 0 25828412 25828446 25829991, hotness: undefined, score: 4, children: 0
aquovie 3 points a month ago

I keep seeing "networking is hard" come up here. Where is this coming from? Is it IPv6 or something?

path: 0 25828412 25828446 25828816, hotness: undefined, score: 3, children: 8
blargh513 12 points a month ago

I started in networks.

The volume of people who work in technology that don't understand networking is astonishing. I probably spent more time explaining how a web proxy works than I did actually setting things up.

Firewall rules? Spells and magic. Routing? Unpossible! DNS? Forget it, I'm going home.

path: 0 25828412 25828446 25828816 25829531, hotness: undefined, score: 12, children: 3
aquovie 2 points a month ago

People lack the necessary motivation. I explained DHCP, IP, and ports to my kids in like 10 minutes. Because otherwise they couldn't play Minecraft together.

path: 0 25828412 25828446 25828816 25829531 25836564, hotness: undefined, score: 2, children: 0
prettybunnys 1 point a month ago

Subnetting and the difference between /8 and /24 or /32 and how you allocate IP addresses between them has always been crazy for me to grasp.

I feel like if I could finally understand that after 20 years … I’d be happy but no here I am, effectively ignorant to it and looking at networking wizards as true wizards

path: 0 25828412 25828446 25828816 25829531 25833502, hotness: undefined, score: 1, children: 0
whoisearth 1 point a month ago

It's always DNS...

path: 0 25828412 25828446 25828816 25829531 25835254, hotness: undefined, score: 1, children: 0
brotundspiele 6 points a month ago

Networking is so easy nowadays. Just plug a network cable into your device and it mostly works out of the box. Don't you guys remember the bad old times of coax cables and token ring?

Imagine providing a public WiFi before 1993, even if you ignore the fact that WiFis had a cable back then.

path: 0 25828412 25828446 25828816 25829109, hotness: undefined, score: 6, children: 3
ignotum 7 points a month ago

WiFis had a cable back then

path: 0 25828412 25828446 25828816 25829109 25835118, hotness: undefined, score: 7, children: 0
HamsterRage 2 points a month ago

The most important technique to master: The Ping and Wiggle.

path: 0 25828412 25828446 25828816 25829109 25837888, hotness: undefined, score: 2, children: 0
Ooops 1 point a month ago

I'm not old enough to having been bothered by network rings and grew up with the high-tech that were end resistors.

path: 0 25828412 25828446 25828816 25829109 25835616, hotness: undefined, score: 1, children: 0
rounding_error 4 points a month ago

Distributed systems.

path: 0 25828412 25828679, hotness: undefined, score: 4, children: 0
who 3 points a month ago

OP might be suffering from cache misses. (Or maybe hasn't yet learnt about it.)

path: 0 25828412 25829440, hotness: undefined, score: 3, children: 0
who 38 points a month ago

There are only two hard things in Computer Science: cache invalidation and naming things.

β€” Widely attributed to Phil Karlton

There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors.

β€” Leon Bambrick 2010-01-01

path: 0 25828548, hotness: undefined, score: 38, children: 0
thoughtfuldragon 22 points a month ago

There's actually only one and it's my coworkers.

path: 0 25828445, hotness: undefined, score: 22, children: 2
Susaga 6 points a month ago

It's possible your coworkers are the ones dealing with those issues, and you just never notice.

path: 0 25828445 25828979, hotness: undefined, score: 6, children: 0
queerlilhayseed 6 points a month ago

Human-human interface configuration falls under networking issues. And naming things, now that I think about it.

And occasionally off-by-one issues :(

path: 0 25828445 25831619, hotness: undefined, score: 6, children: 0
weps 5 points a month ago

off by one is a margin not an error

path: 0 25829327, hotness: undefined, score: 5, children: 2
dohpaz42 15 points a month ago

Tell that to the array out of bounds exception!

path: 0 25829327 25829358, hotness: undefined, score: 15, children: 0
queerlilhayseed 3 points a month ago

Off-by-one errors are real errors. A common mistake rookie developers make (or used to make, anyway) is forgetting that arrays are zero-indexed when creating an array, then seeing the value that should be in array[n-1] when they read array[n].

Another common off-by-one error is double counting: Some accumulators don't do all their processing in the same function, and occasionally one thing will be checked for inclusion twice, causing the accumulator to have one more element than it should.

path: 0 25829327 25832163, hotness: undefined, score: 3, children: 0
cantstopthesignal 4 points a month ago

The more I get into the more I'm convinced that the most important skill in programming is lexicography.

path: 0 25837003, hotness: undefined, score: 4, children: 1
gandalf_der_13te 1 point a month ago

yeah i agree ... many people can write good software, but to make it stick around, you need a good name for it

path: 0 25837003 25847915, hotness: undefined, score: 1, children: 0
humanspiral 2 points a month ago

0 based indexing of course, so what's the joke? oh, mixing up count and max index is a hardship you get over after a couple of years, but it comes back sometimes.

path: 0 25831787, hotness: undefined, score: 2, children: 2
RustySharp 2 points a month ago

The more you move through the networking stack, the more you start seeing OB1 error potentials.

Many protocols have packet ids starting from (and wrapping back to) 1. Modbus registers start from 1, but stored in memory offset 0.

Packet lengths can either include or exclude the length itself. E.g. packet length 200 in a protocol could either mean the length is followed by 200 bytes of data; or 1 byte containing the length + 199 data; or even 4 bytes length + 196 data (off by four!)

It's a wild world out there.

path: 0 25831787 25835706, hotness: undefined, score: 2, children: 0
gandalf_der_13te 1 point a month ago

it's not just zero-based indexing though. i've had situations like these a couple of times: write a for ... of loop to iterate through the elements of an iterable. a lot of the times, there's an unwanted first / last element in the list (that doesn't actually belong there) and i forget to remove it, then end up with garbage data in the result set.

path: 0 25831787 25848722, hotness: undefined, score: 1, children: 0
olafurp 2 points a month ago

Caching and race conditions

path: 0 25836875, hotness: undefined, score: 2, children: 0
Modern_medicine_isnt 1 point a month ago

Relentless problems... leadership

path: 0 25838258, hotness: undefined, score: 1, children: 0

thanks for using Leebra!

go to feed...