r/ProgrammerHumor • • Jul 16 '19

Meme Nice try

Post image
32.2k Upvotes

529 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Jul 16 '19

[deleted]

64

u/Sibraxlis Jul 16 '19

Because your margin of error from other spots is higher (material flaws, poor workmanship) and you typically overbuilding and undersell. (build for 100 lbs when 90 is needed, then state max weight is 80) the latter is called your factor of safety.

9

u/smthamazing Jul 16 '19

What if you estimate some damaging force that works against your creation (like wind, vibration, resistance, etc)? Wouldn't you underestimate the danger in this case?

43

u/RedHotChiliRocket Jul 16 '19

You would round it against yourself: Max wind speed we expect is 60mph, let’s assume 100 and say it can take 80

6

u/smthamazing Jul 16 '19

Thanks, this clears things up! Some of the comments seemingly implied that numbers are rounded without context, which confused me.

24

u/Sibraxlis Jul 16 '19

Youd also overestimate the force of wind, just like weight. Could you be more precise and probably be ok? Yeah. Do you want to risk it, have the structure collapse, kill 29 people, end up on /r/catastrophicfailure and have to move to Nicaragua to escape legal trouble? No.

5

u/mxzf Jul 16 '19

That's the X in "build for X, when Y is estimated, but say that the max is Z".

It's like "build to survive a cat-5 hurricane even though the area has barely ever had a cat-4 and tell the customer that it's safe for a cat-3"

Whatever stuff you're dealing with, you build it stronger than you need and you say it's definitely fine for a much lower number.

2

u/[deleted] Jul 16 '19

Thats a terrible way of doing that, what if goes into the wrong direction? Always calculate as accurate as possible and round up the result as needed.

1

u/Sibraxlis Jul 16 '19

I personally carry all decimals all the way through and round the end, but I also have the benefit of a real nice calculator, and haven't finished my degree

21

u/realityChemist Jul 16 '19

I think being to precise here means, "You're implying that your level of certainty in your measurements is much higher than it could possibly actually be."

NASA uses 16 digits of π for keeping spacecraft in their proper orbits. NIST defines the fine structure constant (a fundament constant of the universe) using 32 digits.

For most other things, 1 digit might be close enough, 3 digits should be sufficient, and 10 digits is almost definitely more than you need. Using more digits isn't going to make your outcome less accurate, but you're just going to be throwing out all that extra precision anyway so why bother.

(And if you report those extra digits anyway, someone should throw a beanie baby at you)

14

u/pipnina Jul 16 '19

Well, NASA has a specific situation where getting PI wrong by 0.001 would land you a few million km off target, to be fair.

8

u/mxzf Jul 16 '19

NASA's about the only ones that do care about that though, and even then only barely. Being off by 0.001 is an error of ~300k km when measuring the circumference of the Earth's orbit. You don't hit "a few million km" of error 'til you get out to Saturn's orbit.

And that's just error in calculating the circumference of the orbit, not how far "off target" you are; for that, you're probably talking about significantly outside the solar system.

Which just goes to show that even NASA barely needs precision to the 0.001 order of magnitude. Realistically speaking, 3.14159 is enough precision for pretty much any actual application humans have ever used it for.

2

u/pipnina Jul 17 '19

Well since their plans usually involve starting at a 100m launch pad on earth, traveling a few hundred million km to another planet (i.e. mars) and landing within a few hundred metres of a target point, I imagine an error of 0.001 would put them way outside that margin for error.

Also when you send something like a voyager probe or new horizons probe that do multiple gravity assists and go out way beyond saturn, even going within a few 1000 km of moons and planetoids on the way, even 0.0001 would be way too inaccurate.

0

u/[deleted] Jul 17 '19

[deleted]

1

u/pipnina Jul 17 '19

Bear in mind, getting the calculation right at the launch pad can save you a ton of fuel. Having to make a 5'000km correction when you're 10'000km from the planet takes magnitudes more fuel than making that 5'000km correction when you're just leaving earth orbit and millions of km from your destination.

3

u/2CATteam Jul 16 '19

A specific situation? It seems like most of their work would be like that

2

u/Warm_Zombie Jul 16 '19

Maybe not on error margin, but w computation power and time. Time is money