3 ms·
> Toyota had more than 10,000 global variables. “And in practice, five, ten, okay, fine. 10,000, no, we're done. It is not safe, and I don't need to see al
by michaelfeathers 11y ago
> Toyota had more than 10,000 global variables. “And in practice, five, ten, okay, fine. 10,000, no, we're done.
It is not safe, and I don't need to see all 10,000 global
variables to know that that is a problem,” Koopman testified.
I wonder why people want to believe 5 or 10 are okay.
- jfoutz 11y agoCheck engine light? Passenger without a seatbelt? I mean, it's an embedded system, resources are scarce. There are more elegant solutions, yes. But a pattern of setting an error condition from a bunch of different sensors, that's checked from a bunch of locations seems reasonable. At least, not insane.
- ericye16 11y agoFor simple configurations that have global affects, global variables might be easier than some other methods of keeping track of settings. It's a bit more frequent in embedded software than other software though.
- icelancer 11y agoHe's not sanctioning 5-10 globals, only saying he could deal with that number of them without freaking out. Which is certainly true.