This will be the last of these stories for a while. The previous two stories pretty much sank without trace, so I thought I'd finish and submit this one, then stop writing them up and re-think the effort. In case you're interested: http://news.ycombinator.com/item?id=996250 http://news.ycombinator.com/item?id=994358
Greybeard Stories: The Jamming Gyro
11–20 of 47 posts
Re: Greybeard Stories: The Jamming Gyro
#12Earlier quoted context omitted.
I know it's a joke, but the truth is that this is exactly the kind of bug that unit tests won't find. The unit tests would have simulated a bunch of gyro settings, with and without a single gyro failure (but not two gyro failures, as that was an accepted design limitation). Running the gyros with the torpedo still on the boat, however, would not have been tested because the designers didn't think of it. If they had t…
Testing can verify that your software works within the space of behavior that you already know about. It can't make up for your failure to understand the problem fully. Thinking about correctly testing software is generally one of the best ways to improve your understanding of the problem. I quite often find bugs during unit testing simply because I'm forced to think about how the software will break, rather than thi…
No amount of testing the former will lead you to realize the latter. Sure, you might happen to come to the realization while writing the test, but you might do so over breakfast too.
I'm not saying "don't do testing". I'm trying to point out that it has limits. The fact that you've written tests and they pass doesn't get you off the hook for design bugs.
Re: Greybeard Stories: The Jamming Gyro
#13Earlier quoted context omitted.
Testing can verify that your software works within the space of behavior that you already know about. It can't make up for your failure to understand the problem fully. Thinking about correctly testing software is generally one of the best ways to improve your understanding of the problem. I quite often find bugs during unit testing simply because I'm forced to think about how the software will break, rather than thi…
Sure, writing tests can find design bugs. But that's not really the question at hand here. The specifics are that we have a clear and obvious requirement ("torpedo should self-destruct if it turns a full 360 degrees") that turns about to be missing an important point ("EXCEPT IF IT IS ON THE BOAT"). No amount of testing the former will lead you to realize the latter. Sure, you might happen to come to the realization…
You're a bit more likely to do it during a time you've set aside to fully consider potential failure scenarios.
Re: Greybeard Stories: The Jamming Gyro
#14"Sometimes because of the nature of my work I get to hear stories from a greybeard with a past that is, well, "interesting." And again, because of the nature of my work, or more accurately, because of the nature of their work, the stories can't be verified."
What's the nature of your work?
Re: Greybeard Stories: The Jamming Gyro
#15Interesting (and depressing) story. On one of your posts you say: "Sometimes because of the nature of my work I get to hear stories from a greybeard with a past that is, well, "interesting." And again, because of the nature of my work, or more accurately, because of the nature of their work, the stories can't be verified." What's the nature of your work?
Re: Greybeard Stories: The Jamming Gyro
#16This will be the last of these stories for a while. The previous two stories pretty much sank without trace, so I thought I'd finish and submit this one, then stop writing them up and re-think the effort. In case you're interested: http://news.ycombinator.com/item?id=996250 http://news.ycombinator.com/item?id=994358
"D. E. Stevenson attributes this story to Nancy Leveson, Software System Safety, STAR '93, Ontario at Darlington, Ontario. 1993.
A torpedo was designed to self-destruct if it turned 180 degrees. Unfortunately for the test ship the torpedo stuck in the tube and the captain turned the ship around for port "
It sounds mildly more plausible since it doesn't begin with the rather improbable torpedo design problem of 'submarines shooting themselves with their own torpedo'.
Still, if tasked with designing a reasonably safe torpedo, one of the very first things you're likely to come up with are 'armed' and 'safe' modes with the torpedo staying in 'safe' mode until it is about to be launched. The next obvious safety feature would be to make the torpedo return to 'safe' mode the moment significantly abnormal conditions are encountered - say, stuck in tube, wildly off-course, etc.
Adding a self destruct mechanism seems highly unsafe - there's the problem of the self-destruct mechanism malfunctioning and activating at an inopportune time. Additionally, if the torpedo has no idea where it is, the last thing you probably want is having it blow up - possibly near you or a friendly.
The actual stories of the difficulties developing WWII torpedoes are quite interesting and offer plenty of lessons in complex systems design, testing and deployment - see:
http://www.ww2pacific.com/torpedo.html
A design flaw that must have been particularly galling: "The conventional contact exploder was designed for the earlier, slower, 33 knot, Mk 13 torpedo. The newer, faster, 46 knot, Mk 14 torpedo had higher inertial impacts that would cause the firing pin to miss the exploder cap. " In other words, the more squarely you hit your target, the more likely the torpedo would fail.
Re: Greybeard Stories: The Jamming Gyro
#17This will be the last of these stories for a while. The previous two stories pretty much sank without trace, so I thought I'd finish and submit this one, then stop writing them up and re-think the effort. In case you're interested: http://news.ycombinator.com/item?id=996250 http://news.ycombinator.com/item?id=994358
This will be the last of these stories for a while.
RiderOfGiraffes, I urge you to reconsider...
The previous two stories pretty much sank without trace
Which probably means nothing. There are many reasons stories do or do not get votes, with quality and interest only two of them. You must also consider time of day, day of week, competition from other stories, competition from other sites, competition from non-internet activities, competition from work, mix of people on-line at that time, mix of lurkers, mix of people who don't vote yet, etc., etc., etc.
Over the years I have made the exact same comment multiple times just to see if the reaction would vary, and it always did. One comment got over 60 up-votes and 6 months later got none.
What does this mean? Nothing. Just keep on posting.
...then stop writing them up and re-think the effort
It's perfectly normal to re-think the effort, but don't stop writing while you're rethinking.
This is a place for builders and entrepreneurs. We may eventually quit, but usually long after others would.
I have 2 signs over my desk, "It Doesn't Matter" and "Jabez Wolffe". When things get tough, the former keeps me from having a stroke and the latter keeps me from quitting. Jabez Wolffe attempted the English Channel 22 times without success. Once, when he didn't know where he was and conditions were dangerous, he quit 100 yards from shore.
Don't be Jabez Wolffe. Your next story may make a big difference in someone's life. If I'm on-line at the time, I'll vote it up. Keep 'em coming.
Re: Greybeard Stories: The Jamming Gyro
#18Despite this, I take the point of the story to be that self-corrective failure detection mechanisms should not be capable of causing greater harm than the maximum plausible damage of the problem they were intended to correct.
Re: Greybeard Stories: The Jamming Gyro
#19Re: Greybeard Stories: The Jamming Gyro
#20Earlier quoted context omitted.
Sure, writing tests can find design bugs. But that's not really the question at hand here. The specifics are that we have a clear and obvious requirement ("torpedo should self-destruct if it turns a full 360 degrees") that turns about to be missing an important point ("EXCEPT IF IT IS ON THE BOAT"). No amount of testing the former will lead you to realize the latter. Sure, you might happen to come to the realization…
No amount of testing the former will lead you to realize the latter. Sure, you might happen to come to the realization while writing the test, but you might do so over breakfast too. You're a bit more likely to do it during a time you've set aside to fully consider potential failure scenarios.
What you're talking about is something I'd call white box QA. Which is valuable, though it's essentially just an extension of design, and has the same limits.
My broad point still stands: you can't "process" your way out of this with extra testing. Some bugs are just inherent, and stem from the fact that we're human.