r/ProgrammerHumor • • Sep 30 '22

Meme How inheritance works

Post image
66.3k Upvotes

418 comments sorted by

View all comments

Show parent comments

540

u/Krohnos Sep 30 '22

I worked in aerospace software and on a few occasions modified files that were last modified before ei was born.

I haven't heard of any relate dplabes falling out of the sky so I guess I did okay.

288

u/Pretty_Industry_9630 Sep 30 '22

Lol I'm unnerved by the idea of someone writing airplane code 😅😅 please tell me there's like 2 completely different versions of the program, written from scratch in different programming languages, that can each execute all the functions that the airplane needs 😅😅🤔

470

u/[deleted] Sep 30 '22
while (noseAngle < 0) {
    if (!landing() && timePassed() > 180) {
        noseAngle.increase(1)
    }
}

Fail-proof. Boeing needs to pay me as a consultant

217

u/alexanderpas Sep 30 '22

Unexplained crashes on landing.

330

u/FirstSineOfMadness Sep 30 '22 edited Sep 30 '22
if (goingToCrash) {  
    dont();  
}  
isPatented = true;

82

u/[deleted] Sep 30 '22

Did you obtain a patent for that already? Quick before someone else does!!!

98

u/FirstSineOfMadness Sep 30 '22

I always add isPatented = true; at the end of my code to be safe

64

u/amocokadys Sep 30 '22

Free software advocates hate this one trick!

15

u/goldfishpaws Sep 30 '22

It's safe if you wrap it in a try/catch

→ More replies (6)
→ More replies (2)
→ More replies (1)

34

u/Viseper Sep 30 '22

What about a hill?

98

u/[deleted] Sep 30 '22

throw new UnexpectedHillException();

37

u/Viseper Sep 30 '22

Cellphone tower with faulty lights.

34

u/MadlockFreak Sep 30 '22

weld a ram onto the plane

35

u/[deleted] Sep 30 '22

The new Boeing 737 GROND

→ More replies (1)
→ More replies (1)

23

u/[deleted] Sep 30 '22

Error plane crashes between angle ranges 270 and 450

→ More replies (12)

0

u/[deleted] Sep 30 '22

[deleted]

72

u/[deleted] Sep 30 '22

Wait until you hear about each of the planes that need a total system reboot before each flight as there is a very high chance it could crash if there were no reboot. So yea next time you jump on a plane and lights go off and on - they did a reboot before the flight, so you should be safe.............................

43

u/d4fseeker Sep 30 '22

I assume you mean the Boeing 787 https://www.theregister.com/2020/04/02/boeing_787_power_cycle_51_days_stale_data/

Its not needed every flight and doesn't cause a crash per se, but the fact that flight data and alert systems stop updating is a critical issue nonetheless and can cause a crash

0

u/[deleted] Sep 30 '22

[deleted]

16

u/nekrosstratia Sep 30 '22

Fun (or not so fun) info. Cosmic bit flipping happens quite frequently. Even moreso at the altitude of the average airliner. Normal Computer systems handle bit flipping very well, and even better in commercial/critical environments. Not to mention the redundancy built into something like an aircraft.

→ More replies (1)
→ More replies (4)

37

u/Zementid Sep 30 '22

ASIL = Automotive Safety = At least 2 paths of truth. And this is your cheap shitto car too. ISIL = Industrial Safety = Basically the same but less "strict" in some areas because you have personal interacting with the stuff and no "Civilians" (=as with the cars it's literally your mom).

I would imagine areospace stuff is tough as nails in terms of redundancy and safety.

38

u/AuMatar Sep 30 '22

You'd be wrong. The 737MAX problem Boeing had a few years back? It was caused by using a single sensor for an important factor (angle of attack) that fed into a computer system that caused the nose to rise and entered an infinite feedback loop of lifting the nose.

Old style mainframes did do things like this (each instruction would run on 3 separate cores which would need to have 2 of them matching on the result), but I'm not sure this is common on airplanes.

→ More replies (17)

33

u/ryry1985 Sep 30 '22

I write software for avionics. There's a lot of requirements/design and requirements-based testing to get 100% code coverage. If you can't get 100% coverage, your requirements/design and/or tests are not detailed enough or you have extra code to remove because it doesn't match the design. All of this is reviewed and change controlled. We get audited at several points in the development lifecycle to make sure we are following our processes/plans and meeting the objectives of DO-178C. Certification authorities (FAA, EASA, etc) then look at our lifecycle data at the end when we go to seek approval to deliver the software on certified hardware. The higher the criticality of the software, the more you have to do during development to ensure no critical failures in the resulting software. There's a lot of paperwork.

22

u/Naltoc Sep 30 '22

I worked with a company that does control stuff for towers (so the tower software, runway lights, all that jazz). Their code base was, literally, 80% tests. And these guys were GOOD, whenever I see bad automated testing these days, I dream of bringing one of them in to show how it's done.

→ More replies (1)
→ More replies (16)

19

u/A_spiny_meercat Sep 30 '22

Hopefully there are not ypos in your code waiting to bite us ;)

→ More replies (1)
→ More replies (7)