Programming's Greatest Mistakes • Mark Rendle • GOTO 2023
Ғылым және технология
This presentation was recorded at GOTO Amsterdam 2023. #GOTOcon #GOTOams
gotoams.nl
Mark Rendle - Creator of Visual ReCode with 7 Microsoft MVP Awards & 30+ Years of Experience Building Software @MarkRendle
RESOURCES
/ markrendle
github.com/markrendle
/ markrendle
ABSTRACT
Most of the time when we make mistakes in our code, a message gets displayed wrong or an invoice doesn’t get sent. But sometimes when people make mistakes in code, things literally explode, or bankrupt companies, or make web development a living hell for millions of programmers for years to come.
Join Mark on a tour through some of the worst mistakes in the history of programming. Learn what went wrong, why it went wrong, how much it cost, and how things are really funny when they’re not happening to you. [...]
TIMECODES
00:00 Intro
01:35 The med file unf*cker
05:51 Y2K
14:39 The Kennel club "Dog 38" bug
17:00 EnTErpRIsE
20:43 The Pentium FPU
23:45 NULL
26:43 Hartford Center
29:20 Knight Capital
35:32 Mariner 1
38:11 Mars Climate Orbiter
40:25 Ariane 5
42:01 The big rewrite
43:57 JavaScript
49:39 The Soviet early warning system
51:07 Outro
Read the full abstract here:
gotoams.nl/2023/sessions/2466
RECOMMENDED BOOKS
Tomasz Lelek & Jon Skeet • Software Mistakes & Tradeoffs • amzn.to/45Nf1u3
Henney & Monson-Haefel • 97 Things Every Software Architect Should Know • amzn.to/3pZuHsQ
Merih Taze • Engineers Survival Guide • amzn.to/40hPmZd
/ gotocon
/ goto-
/ goto_con
/ gotoconferences
#ProgrammingMistakes #Programming #SoftwareEngineering #WorstMistakes #MarkRendle #Linebreakers #ALGOL #MarsClimateOrbiter #NULL #PentiumFPU #Ariane5 #Y2K #Mariner1
Looking for a unique learning experience?
Attend the next GOTO conference near you! Get your ticket at gotopia.tech
Sign up for updates and specials at gotopia.tech/newsletter
SUBSCRIBE TO OUR CHANNEL - new videos posted almost daily.
kzread.info...
Пікірлер: 69
This might be my favorite talk ever. The attitude toward programmers and those otherly business folk, the anecdotes I know, the anecdotes I've suffered from, and the anecdotes I'd never heard, all presented with utmost charm.
As a young engineer, I learned an important lesson: We need to remember that no one ever does a stupid thing intentionally.... Everyone does what they believe is right at the time. (Note that the Pentium floating point problem, was originally in the DEC alpha chip -- DEC discovered it and corrected it. This proved that Intel's design was not their own, which resulted in a large out-of-court settlement. Naughty!)
@tumunu
5 ай бұрын
For the benefit of the younger crowd here, Intel got rid of the DEC lawsuit by *buying* DEC. I'm sure a small handful of executives got mighty rich, everybody else got screwed.
@DocTrinsOGrace
5 ай бұрын
@@tumunu A better memory than mine.
@RobBCactive
5 ай бұрын
Compaq bought DEC in 1998
@tumunu
5 ай бұрын
@@RobBCactive Yes, sorry, my memory is failing as I age. Intel bought the technology.
@RobBCactive
5 ай бұрын
I found the time to look up that 1994 Pentium fp bug "fdiv" and it was caused by 5 constant values not getting copied into a machine that prepped fabrication and the algorithm was STR which I believe was published research that used a lookup table on partial bit ranges. So despite 90's Intel having stolen designs, being criminally inclined, found guilty of bribery and other illegal practices, I don't believe this story about DEC Alpha. Back then I was in regular contact with DEC pros and it's not the kind of story I'd forget.
I was there in Amsterdam, and can myself hear laughing in the recoring 😅 The event is amzing to attend, loved meeting the people organising and attending!
Excellent talk - made me feel instantly better about some of the coding "decisions" I've made over the years! I also got pulled up on the naming of stuff - my manager pulled me into a meeting to discuss why the team were seeing a "Big Whopper Error" on screen. I explained that I'd put a last resort error handler into the code to stop it outright crashing like it used to (this was VBA)... there were calls to change it but the team using the product quite liked it so we kept it! Ah - the "Big Whopper Error" - much more fun to fix than a standard error 😁
"y2k was nothing" no, we fixed it. "We don't hear about the ozone hole anymore" no, we fixed it. "We don't hear about acid rain and tree death anymore" no, we fixed it. Lets hope my grandchildren get to say "We don't hear about global warming anymore" ...
@blenderpanzi
6 ай бұрын
We do hear about the ozone hole again this year, though. See e.g.: 2023 ozone hole ranks 12th largest on record, find NOAA and NASA (for a single day, 16th largest when averaged from September 7 to October 13) So that's sadly not quite fixed yet. :/
I'm a grey beard. I started programming as a teenager in 1976. I stayed awake for nearly 48 hours as a Unix support engineer for Sequent Computer Systems during Y2K turnover. We didn't get any calls for help related to Y2K. I spent all of that time working on my `top2` performance monitoring program. I was particularly amused by the kennel club anecdote where they were storing a number as a hexadecimal string and "fixed" the limitation of the maximum being 37 by adding two roman numeral characters to the string rather than implementing a proper fix that would have reduced the storage requirements.
The speaker, Mark Rendle, is entertaining, and I admire the honesty of self-reflection. I was a CS student at the time of the Pentium bug and wasn't concerned about the implications. The only reason that I eventually took advantage of the replacement was because the newer revision was claimed to run cooler. WIkipedia has the following about Petrov "... he was also reprimanded for improper filing of paperwork with the pretext that he had not described the incident in the military diary. [...] He received no reward. According to Petrov, this was because the incident and other bugs found in the missile detection system embarrassed his superiors and the influential scientists who were responsible for it, so that if he had been officially rewarded, they would have had to be punished. "
A good programmer doesn’t make mistakes, he corrects bugs.
I was a newbie and the author of a comment about naming conventions that was funny and self deprecatory, asked me to watch him writing something and say what I thought. He’d coded for early parallel processors at British Aerospace and had a suck it and see approach which I didn’t appreciate at the time. So I’m trying to evaluate his code and I don’t have an idea of what he wants me to see. And eventually he says neither do I, run it and we’ll both figure it out. I had a chip on my shoulder and that was very nice. He introduced me to the paradigms of keep it simple stupid and don’t fix if not broken.
It bears repeating that type coercion was NOT in the first version of JS. It was added later at the insistence of the devs using JS and Eich of the 90s didn't say no like a more experienced Eich of today would have.
Would Knight Capital have survived if they'd taken a short position on themselves?
+a is definitely not the same as math.abs. Try `let a = -3; console.log(+a)`. but it does attempt to perform coercion, so + '1' is 1, so +'a' is NaN.
@wiseman9960
6 ай бұрын
No one claims it is
@tropicaljupiter
6 ай бұрын
@@wiseman9960 the guy in the video did. The thing this comment section is for.
@blenderpanzi
6 ай бұрын
In the JavaScript section where multiple other inaccuracies. "In every other language that's a syntax error." Not in Ruby (Baaa), Python (runtime error), PHP (runtime error), or Perl (0). And the stuff about document.all is of course true and every browser implements it, but that's not a Netscape invention (kinda implied because Netscape/Brendan Eich is credited for JavaScript and no other credit is given), but a Microsoft invention, and it's not in the standard except for being deprecated. But fun and interesting talk otherwise.
First computer was a 486 DX.. that floating point was clutch. Still remember dropping 16 megs in chip by chip. Felt like a wizard.
Great talk.
SystemD and Rust. Next topic.
@arkeynserhayn8370
Күн бұрын
And wayland
As a seasoned enterprise software developer, I can confirm this is 100% accurate.
Small correction, the mars climate orbiter failed because the results from Lockheed Martin returned values in pound-force seconds, while NASA expected newton-seconds
@the_real_ch3
2 ай бұрын
Yes the biggest takeaway from the MCO is about clarity of communication and making sure units are always labeled.
fun stories about programming
I feel like he’s got the Knight Capital story backwards on a few points - going to have to go and read a bit more about it to see if my memory is dodgy or his.
"In any other programming language this is an error, in Javascript it's a 🍌"
If null is considered a mistake then what is the solution?
@nexusxe
19 сағат бұрын
The Option and Result monads
I feel like this talk is just a short summary of a bunch of other goto talks.
@RoamingAdhocrat
6 ай бұрын
it is! a greatest hits compilation :D
Crazy that out of all these he doesn’t mention the Therac 25
@MarkRendle
14 күн бұрын
It’s a deliberate choice: the talk is supposed to be lighthearted and fun, so I don’t want to talk about people dying.
@LuealEythernddare
14 күн бұрын
@@MarkRendle ah. Makes sense. Yeah I do feel like the therac 25 is probably the greatest mistake in programming, but the reason it is is because it did cost people’s lives.
Javascript gets so much shade. But the inference makes Javascript ultra powerful. If he had more time, it may have just been another language gobbled up by Java.
so, what would be better solution for null reference? 0?
@MeriaDuck
5 ай бұрын
A type-safe alternative, which is part of Algol 68, is extending the reference type with something explicitly meaning 'nothing here', which would required explicit handling of that case. I think it could look something like: Type T = Ref A | Nothing; And wherever your type T shows up, you have to be prepared for both cases: the Ref to A, or Nothing.
@Fiyaaaahh
Ай бұрын
@@MeriaDuck How is that any different. That's just a typed null and you still get the same amounts of null (or "nothing") check code.
@dashinblu
13 күн бұрын
@@Fiyaaaahh The point of typed null is to give more context to what a variable is . Let's say a function returns Nullable, the programmer knows that it can either be a null or a value. If it returns String, it must always be a string. It helps reduce programmer errors and remove the null problem entirely.
46:25 "In every other language that's a syntax error." Not really. In Ruby it gives: Baaa In Python it gives a *runtime* error: TypeError: bad operand type for unary +: 'str' In PHP it gives a *runtime* error: Uncaught TypeError: Unsupported operand types: string + string in php shell code:1 In Perl it gives: 0 (Note that PHP and Perl don't have a + operator that concatenates strings. They use . for that.) So none of these dynamic languages give a syntax error, but two give runtime errors. Then he says that the unary + in JavaScript is the same as Math.abs(). No it's not. It's the same as Number() (not new Number(), just Number(), and not like parseFloat() because of edge cases). But +-1 just gives -1. The differences in behavior between Number() and parseFloat() are the actual WTF here. Compare empty string and string containing a number followed by garbage between the two functions. And the existence of boxed numbers (new Number()) also makes no sense at all and just confuses people. And document.all was invented by Microsoft, is deprecated now, and I *think* it never was part of the official standard? Not sure about that. I also never saw that one used anywhere. No, I'm *not* a JavaScript fan. Just have to use it for work. Just like Ruby, Python, PHP, etc. I just try to know my tools (programming languages), even if I don't like them. I don't like a lot of them. (Wonder a bit about the accuracy of the rest of the talk now.) Still a fun talk that I get the feeling I have seen before already?
@Adowrath
6 ай бұрын
He's given it before, I think this might even be the third time.
@blenderpanzi
6 ай бұрын
@@Adowrath Which all the more increases my criticism if after holding this talk several times he didn't correct these mistakes.
@Adowrath
6 ай бұрын
@@blenderpanzi He changed stuff, means there's sometimes new errors introduced in changes - he himself mentions this at the start that people pointed out previous mistakes. The 'syntax error' line does not appear in e.g. the NDC Copenhagen 2022 version of the talk, neither does the Math.abs thing. And document.all being like that doesn't depend on it being part of the standard, the fact that it's possible to have such a weird edge case with document.all means the language semantics allowed for this to be possible, that is all he's saying, really.
Shaggy, that's not wid !
In the earlier part of the talk, Mark expresses his preference for .NET, but in his later section 'The Big Rewrite' he exposes its biggest problem: by signing up to use .NET, you agree to become Microsoft's bitch, and I don't mean that in a good way. He's lucky it only cost him six weeks in the hospital.
Did he say HALF A TRILLION!?
It's interesting to see that inheritance isn't a section on this list.
Wouldn't 38 in Roman numerals be "XXXIIX"?
@DirkieB
4 күн бұрын
No
limies....
much high level bullshit because in assembler/machine code "goto" is all there is: "jump" and/or "branch" instructions depending on the PSW/PSR condition code...
@rhone733
13 күн бұрын
Like many things in coding, there is nothing wrong with goto when used responsibly.
Was enjoyable up until the sudden racism.
@MarkRendle
14 күн бұрын
Sorry, what?
Historical core memory price: "costs began at roughly US$1.00 per bit and dropped to roughly US$0.01 per bit." In essence the price is quoted pr. bit - not byte. ;-) 👍