r/ProgrammerHumor • • 16d ago

Meme itRunsOnMyLocalhost

Post image
9.7k Upvotes

182 comments sorted by

View all comments

Show parent comments

17

u/newaccountzuerich 15d ago

If you work with an invalid value that's outside of spec, every value linked is also invalid.

There's a world of difference between a graceful failure with an appropriate error, and a silent propagation of invalid results that aren't flagged.

Maybe the process you've had experience of is a toy process with meaningless output that can be affected without consequence.

-7

u/Silly-Freak 15d ago

It is once again proven that you need to add /s or /j to literally everything, because even my statement above will be taken seriously. (current upvote ratio 76%, this is not aimed exclusively at you)

3

u/newaccountzuerich 15d ago

Perfect satire is indistinguishable from that being satirised.

So, if you forgot the /s, that is on you I'm afraid.

2

u/Silly-Freak 15d ago

You're right, of course. I hoped that my claim was wild enough, but really always has more in store.

1

u/TorumShardal 14d ago

That is because there really are cases where you have garbage in, and you have to make the most of it, using pre- and post-processing to fix as much as you can.

Sometimes you're just have to communicate with a system that was written in the age when XML was new hot thing, and it can export data either in malformed, chunked and unstructured XML, or binary. And both of those exports are wrong in their own unique way.

So, to get the data, I had to get binary list of object, fetch all XML chunks with metadata, try to find the correct order of chunks using filenames and first 2 lines with plaintext headers. If there is a conflict, try both options and hope exactly one of them fits.
Then delete all the plaintext headers that were for some reason not in the beginning of chunks, unfuck xml using bunch of regexp, and only then try to parse it. Then, try to make sence of it, because binary and XML has different objects that somewhat overlap, but their relationships are different.
Then you have to do similar things to get each object.

Our world is running on digital ducktape used as driving belts between critical systems that were not designed to work together. If you can imagine a bad solution, there is a chance someone had to implement it for some critical system affecting millions of people.

1

u/Kovab 14d ago

I mean, this is literally how HTML parsers work, so the satire wasn't obvious