Isaac: I'm Isaac Askew.
Jeffrey Sherman: And I'm Jeffrey Sherman, and today we're gonna talk about Out of the Crisis by Demi. So this is another book that is not about software engineering particularly or at all, because it's from the early eighties. And it's a classic and it is still very relevant to software engineering, and ever more relevant than even more relevant that today than it used to be. and if you've never Or you don't know who Demin is, he had this amazing career where in the 30s he basically invented statistical sampling to help with the US census. And then in the 50s, he went to Japan and he basically had all the leaders of Japan, all the economic factory people from Japan, he explained statistical sampling to them and helped them invent just-in-time delivery systems. And then In the eighties, when he was like eighty or seventies, he wrote this book, Out of the Crisis, about how American manufacturing was in the dumps and why it was in the dumps. and he came back, he got called in by Ford. if if you are old enough you might remember that Ford had quality as job one. In the eighties that was our slogan. They to try and win back because the the automate American auto manufacturers were getting slaughtered by the Japanese manufacturers because the quality was shit.
Isaac: that's why I all my people who hate Ford say it. Stands for fix or repair daily. Right. So
Jeffrey Sherman: Yeah. Right? It they they fixed that thirty, forty thirty five years ago and it sticks. Like that's so that's just how hard it is to shake it
Isaac: Mm-hmm.
Jeffrey Sherman: a reputation when you've got when you fuck it up so badly. So this book, Out of the Crisis, if you d if you took the the introduction out of context, it's like a thirty page introduction, you would think he was talking about software engineering. It talks about the crisis of you produced stuff and it doesn't work the spec, it doesn't work correctly. It isn't even when it does work correctly, it's not what anybody would want to use. and it's it's just this blistering attack that it's about ma American manufacturing, but it reads as if it was about software development. And it's that's the easiest part of the book. I I recommend everyone check it out in the library and read it. The rest of the book is not so easy.
Isaac: I like that just like last time we talked, i these these things kinda tend to boil down to like factories as the most easy to understand concept. Like the Phoenix Project was the other one we called back to, and I forget the last episodes one
Jeffrey Sherman: The goal.
Isaac: Yeah. So it seems like in general the and the analogy of the factory and the bottle next to you physically can see seem to translate well. into software throughout the years, to the point people want to keep going back and writing some books that are calling back to that.
Jeffrey Sherman: Right. In this case, yeah, I mean these are classic books, they're forty plus years old. And the reason that they're still rel like they were originally written about factories, like it wasn't an analogy, but yes. Factory as a analogy where you've got an assembly line of ideas. It in a lot of the ways what they're talking about with Deming especially is the idea is entirely wrong. Like the the assembly line through to producing a a product at the end i is wrong. And the core idea of what Demon is trying to get through to people is it's really, really expensive to test products at the end and verify that they're correct and then you know accept them or reject them and if they're you reject them, you go back and fix them. It's way more expensive, even if you do like a hundred percent coverage, test coverage at that very final step, that's way more expensive than if you did statistical sampling to ensure that you were building the stuff correctly all along the chain. Yeah. And so that that's like the key piece. The other key pieces are you have to make it clear to the people involved in the process that quality is sort of the w it it's not that quality is the most important part, it's that consistency is the most important part. and so he's got this idea of, you know, something is under control, where you know something is under control if you can get very, very consistent results. And it's not under control if you get very inconsistent results. And so we like if you had a a system and it was supposed to produce you know, if supposed to like weigh out a hundred grams of cookies or something, it it would be much better to have a system that consistently weighed out ninety grams of cookies, you know, it's like eighty nine, ninety one, eighty nine, ninety-one, than a system that did you know ninety-five, one hundred, one hundred five, one hundred two, ninety-three. Like the you want those error bars to be very, very tight.
Isaac: Right.
Jeffrey Sherman: even if they're not right, it would be much because then if you know that your system's gonna outproof ninety instead of a hundred, then you can change it and you can adjust it. But if you don't have the system under control, under test control, then you don't know that the impact of anything you're doing is actually doing anything. Like if you look in the example of that I just gave, if you've got an error bar of ten percent and you make a change that should tighten things up five percent. You need to do a lot of testing to actually understand whether or not your change made any impact at all. Whereas if you have something that's you've got a 1% fluctuation, even if it's wrong, then it's much easier to say, okay, I'm gonna make a change to the system and then I make another change and then another change. and this goes back to a lot of what we talk about with the the iterations of you measure you've got the system, you've got it measured, you make a change, measure the change. And then decide on the next change. And the book is a whole long discussion about that topic and the idea of like one of the examples that he gives, it's a terrible thing that people do is they've got an operator on a machine, re that the guy runs the machine, e examines the output and then adjusts the machine. Then runs the machine, examines the output, and adjust and he's hit the point is this isn't under any kind of statistical sampling. So If you don't know how much the machine can fluctuate in between runs, adjusting the machine after every run is useless. You're just twiddling the fit.
Isaac: Yeah, adjust it to what? Yeah. What kind of threshold essentially do you know you need to be operating in so that you can counter the instrumentation to be like closer to that or adjust like to know what you're adjusting to.
Jeffrey Sherman: A and to me, sort of one thing that's striking to me in this day and age, so I've always thought the book was relevant, but now I feel it's relevant again because one thing that's somewhat difficult even in this day and age is instrumentation and observability. Like even now, you can get the instrumentation, get all the logs, but companies that I've worked with still pretty bad at aggregating the logs and determining, you know, is this system under statistical control? You know, it's like well, okay, do you Are your messages getting through? What's your retry rate? Look, what's the failure rate? Any of these things they don't know. and now that you have AI, it can do a lot of that, you know, just basic stuff. You can instead of having to write the code or have a statistics package, and then have somebody you you could literally just ask the ad, like, hey, what is this and what is like the ranges that we're getting here? And is this thing under statistical control?
Isaac: Right. So I in a in a a prior episode there was one I was talking about where I connected where I was going to work on connecting like my ground cover logs to Claude essentially to get more stats around what was going on in the system. And so ground cover not only had like info logs and debugs in some cases for some environments. but it also had access logs and just like how often things were hit. and before that was too much data to really look at and see if it's useful. Like you could maybe like look and see how much logging occurred over a beer a period of time and realize, there's a lot more logging now after release. Did we add more logging or did we do something that triggers a lot of chains of logs like a bad thing, right? and that was kind of what you had to work with. But you could even catch it earlier and say like whenever you deploy something, what is the traditional amount of logging that happens within five minutes at this time period over the last seven days to know, okay, did I somehow goof up some of my functionality or whatever? so that that that was really easy to do now. And before like w before I would kinda like manually monitor the logs essentially. And be like, okay, we just we just
Jeffrey Sherman: Right, eyeball it.
Isaac: released it, eyeball it, yeah, let's just check, I'm gonna babysit it for a little bit. Now you can have a process that just kinda like automatically does that for you. And it's super, super useful. So w b one other thing you I kind of was thinking about earlier w when you were saying it's a lot more expensive. to have to fix it later than just to kind of measure it and tweak it and catch it early. To me, that's like a very it's kind of funny that we have to say this again because that's like the old like the fuck the first thing I was told as a child when I was trying to help out somebody was like measure twice,
Jeffrey Sherman: Mm-hmm.
Isaac: cut once, because the idea is
Jeffrey Sherman: Yes.
Isaac: it's really expensive. If you cut too far, up, and now you need a longer board or whatever. You know, that should be obvious. That that carries across many different trades. And so if that hasn't gotten through your skull at this point, that you should measure and in this case measuring twice is good in this analogy because you're measuring once to start to establish a threshold that we need and tw measuring twice to kind of compare it against it two. But I feel like at this point everyone should be using all these tools available to us because even testing, like to to a previous episode two, we were talking about how much even just not even just QA, but like automated testing for unit tested is has made made so much simpler. So there's not really an excuse at this point not to be using AI for at least, at very least, quality assurance.
Jeffrey Sherman: Right, and part of it I think is a philosophical gap that is it used to be shrinking and now I feel like it's widening again where it's not enough to QA the pieces that you're assembling. But it's it's whether the whole piece whether the whole assembly works together. So you have your piece, but you're also responsible for did the whole thing come together. 'cause some of the stuff that he that that means we'll talk about is no spec can ever be precise enough that you will get Consistent results if you swap out pieces all the time. Right? No
Isaac: Yeah.
Jeffrey Sherman: interface for any kind of library is going to work exactly the same enough that you could just willy-nilly swap it out. And so Even there and and part of that he was talking about procurement, like you know, somebody sh shopping around for you know, components to your in your inputs to your components, even if you get something that's somebody else makes it and it's matches the spec, it's gonna be slightly different and you're gonna have to retool your processes a little bit to deal with that slightly different thing because it's slightly different.
Isaac: Yeah.
Jeffrey Sherman: And y you know, they're just the consistency of look, the the guy who made that purchasing decision doesn't realize just how much chaos that he just caused and then all the savings he thought he was making he lost because now they had they had to retool the system and so it was down for three hours because the you know the new widgets were slightly thicker.
Isaac: This kind of reminds me r loosely of a conversation I had years ago actually. where we were changing so many things so frequently, like t to your point, like you have to keep some stability in there. If if all the pieces are changing all the time, there's chaos. So I I called it like the Yahtzee effect where like if you're trying to play Yahtzee
Jeffrey Sherman: Mm-hmm.
Isaac: You know, you gotta save some of the dice because you're trying to actually like form a certain pattern, right? To mark it off on your little checklist of the games. Like, if you've played it before, kids these days. So but if you keep tossing all five dice each time, you know, you're kinda like just gambling at this point. You're hoping that you're gonna get you're gonna land on something, rather
Jeffrey Sherman: Yeah.
Isaac: than like, you know, try to go with a consistent pattern or keep rolling the two you've got remaining as free one to like kinda like get the the the full pattern established for for the for marking that off your list. So I think a lot of companies do move do change too many things at the same time. so yeah. Same thing with the thresholds, like knowing what you're measuring against is nice and if too many things are jumping around, you don't know what you're measuring against because you can't tell if that change I just made affected the logs because you just deployed a service or because five services happened at the same time. Five five different changes happened at the same time that weren't measured. So big, big changes should get correct measurements essentially and correct threshold.
Jeffrey Sherman: Right. And you could imagine d I mean, try to imagine, especially you to your listener, what it would be like if you had a rule of, well, because we need to measure each ch the impact of each change, we can only release one change at a time. Right? Like
Isaac: Yeah.
Jeffrey Sherman: you know, that's continuous deployment. And I've worked at one place in twenty six years that has ever done continuous deployment. in in like five Work to places that were deployed quarterly.
Isaac: Mm-hmm.
Jeffrey Sherman: And those would always be disasters. And so this is the same thing of if you want to get something under control and keep it under control, you need to be able to gate your releases. You need to iterate continu like continuously iterate. Don't be like, well I it's under control now, so now it's set. It's like, no, you can always improve it, but not until you know what it is.
Isaac: That and and also having early detection for when things go wrong. So even if you do have you know, you gated a release, like r you know, reverting that release or, you know, turning on that flag is super easy and quick to to you understand that the thing that you release is broken fast and you're
Jeffrey Sherman: Mm-hmm.
Isaac: able to turn it off fast. It doesn't require a lot of time.
Jeffrey Sherman: So yeah, that's out of the crisis. It's as relevant for software engineering now as it was for manufacturing forty years ago. Highly recommend it. and if you want to watch a great video, watch a recording of Deming and the red-white bead experiment. he goes into the the toxicity of the idea of you've got star performers and that you have, you know, like the employee of the month. he's bas he's it's basically gambling. Because it the the if you don't have a system under control, then whoever is the best is just totally random.
Isaac: Whoever saved from the emergency that happened that month.
Jeffrey Sherman: Right, or whoever's gonna produce the most. It's gonna be a totally random thing of whoever drew the most red balls. but if you don't have any control i this is the experiment, it's great to watch. But i if you don't have any control over the input, right? How many white balls, how many red balls, and people are drawing balls, whoever is gonna be the best or most efficient or have the fewest mistakes, it's just gonna be totally random. and that's what he's trying to get through to you. It's like if if you don't have your inputs under control, the employees will your results be random and also the AI is gonna be random. Like if you don't have your inputs under control and you ask the AI to analyze what went wrong
Isaac: Pattern.
Jeffrey Sherman: Awesome. Well thank all for listening. I'm Jeffrey Sherman.
Isaac: And I'm Isaac Askew, and this is Never Rewrite.