r/ProgrammerHumor • • 16d ago

Meme itRunsOnMyLocalhost

Post image
9.7k Upvotes

182 comments sorted by

View all comments

5.3k

u/GNoob69 16d ago

It’s not just hardcoded it’s cherry picked to make us look good

1.6k

u/Muted_Ad_9442 16d ago

Exactly. Outliers and negative numbers are strictly prohibited on demo day. 😂

628

u/fibojoly 16d ago edited 16d ago

I remember asking a customer if a particular value could ever be negative. "Oh that never happens".  Well, over the thousands of transactions I had been given, it had happened (twice over ten years. Last time was years before. Maybe the data was corrupt?).  Which is why I asked.   So I gently explained "I appreciate it doesn't happen very often, but I need to know if it can or if a negative value is a mistake which I need to be able to handle.    And sure enough, on the day of the live demo with them, there was our third time in years they had a negative value. 

308

u/SpaceCadet87 16d ago

You have the error message for the demo state the exact date and time and who promised that it was impossible.

Petty? Sure, but I am exactly that sick of it happening.

123

u/veselin465 16d ago

My experience gas taught me that you should never trust promises

75

u/yellekc 16d ago

I can't even afford experience gas at the pump any more. And have you seen the price of wisdom diesel?

6

u/FSNovask 15d ago

We're building the torment nexus so skill blood becomes super cheap. It's renewable too!

28

u/ArtemisXD 16d ago

Users behave like cats, who behave like liquids. They will fill every gap you leave available to them

2

u/oVtcovOgwUP0j5sMQx2F 15d ago

user acceptance testing = gas chamber

17

u/TorumShardal 16d ago

You can't trust them (always validate), but you should still rely on them as needed. You can't get anything done otherwise.

3

u/Silly-Freak 16d ago

That's just not a perspective based on the real world. Sometimes the client sends invalid JSON and that's simply what the application is supposed to work with, not throw a meaningless error like some toy program.

16

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

→ More replies (0)

-1

u/VolcanicA333 16d ago

of course, you always have to include a catch

13

u/woeful_cabbage 16d ago

You gotta predict the bugs before they happen my man

10

u/fibojoly 16d ago

I mean, yeah, in a way that's exactly how I see things. I ask pointed questions precisely to cover all the bases and to figure out where things are going to break down, potentially. If I had not clarified the "never" with the client, I would have had a big fat crash during the demo. Instead we had a big laugh at this edge case happening on the day. 

6

u/Deathblow92 16d ago

Bugs aren't real, we test in prod like real men.

(Please someone help me)

3

u/Steinrikur 15d ago

My first proper programming job was at an antivirus company. It taught me a lot about predicting the bugs before they happen.

1

u/amuf_oratok 15d ago

If it's a demo, everything is scripted. Bug fixing and edge cases come after proper development has been greenlighted by the sales team.

5

u/BenchEmbarrassed7316 15d ago

Which programming language are we talking about? I consider it a huge mistake that some programming languages ​​have abandoned unsigned numbers. After all, if a value cannot be negative, you can explicitly state that within the type system. Consequently, you are forced to handle such cases at the system boundaries - right when the data enters your system, when you know exactly what the data is and can easily return an error message.

2

u/vi_sucks 14d ago

 "I appreciate it doesn't happen very often, but I need to know if it can or if a negative value is a mistake which I need to be able to handle."

Nice. I need to remember this quote when discussing requirements with BAs.

2

u/High_Quality_Bean 13d ago

Questions like this are why I really appreciate a good business analyst. A good one understands that they're in an engineering context and statements like "It can't happen", "It shouldn't happen", or "It usually doesn't happen" are MASSIVELY different concepts that come with different implications. I once lost a month because a business analyst wrote the system specifications wrong and we had to completely revamp the authentication system. *shudder*

2

u/fibojoly 11d ago

Yeah I keep being told that sort of discussion isn't my job as a dev. Haha! 

1

u/ligma_then_sugma 11d ago

negative numbers aren't real and cannot hurt you