{"id":79,"date":"2010-03-17T08:07:31","date_gmt":"2010-03-17T08:07:31","guid":{"rendered":"http:\/\/www.eqsim.com\/blog\/?p=79"},"modified":"2010-03-17T08:12:45","modified_gmt":"2010-03-17T08:12:45","slug":"why-software-fails-is-a-lot-like-why-simulations-fail","status":"publish","type":"post","link":"http:\/\/www.eqsim.com\/blog\/why-software-fails-is-a-lot-like-why-simulations-fail\/","title":{"rendered":"&#8216;Why Software Fails&#8217; is a lot like why simulations fail"},"content":{"rendered":"<p>I came across an article in Dr. Dobbs Journal entitled &#8220;<a title=\"Why Software Really Fails and What to Do About It\" href=\"http:\/\/www.drdobbs.com\/architecture-and-design\/223700002;jsessionid=O4VGMFYNC5OVLQE1GHOSKHWATMY32JVN?pgno=3\" target=\"_blank\">Why Software Really Fails And What to Do About It<\/a>&#8220;, by Chuck Connell (March 11, 2010).\u00a0 I think the most succinct answer to the provocative title question appears on page 3:<\/p>\n<blockquote><p>We fool ourselves about how well we understand the complex new software machines we are trying to build.<\/p><\/blockquote>\n<p>Wow.\u00a0 It hit me that this is the same sentiment I run into when I discuss building simulations with certain types of programmers&#8211;those inexperienced with creating simulations, but with egos that believe they can do anything just because they have the ability to program.\u00a0 I will call these people &#8216;naive simulation programmers.&#8217;\u00a0 I don&#8217;t mean they are necessarily naive or ignorant about programming or deficient in knowledge of programming languages, rather, they are naive about the true nature of simulation.\u00a0 To be honest, I used to fit in the latter category until I had a revelation during my PhD work, thanks to my advisors.<\/p>\n<p>The bottom line is that simulations express a model of some phenomenon (usually from the real world, like a device or a process),\u00a0but ALL models\u00a0intrinsically\u00a0have assumptions.\u00a0 Imagine, if a simulation\/model were made to be 100% accurate with the real-world manifestation, it could only be possible if the simulation WAS the manifestation itself&#8211;otherwise there would be some difference, albeit possibly small, which made it different.\u00a0 This is not simply anal retentive arguing.\u00a0 Once you internalize this fact and step back a bit, you realize that our goal with a model is to decide which are the important details of the real manifestation we need to replicate, and which we don&#8217;t have to, or which details we can simplify without losing our expected validity of the details we deemed important.<\/p>\n<p>Getting back to the connection with the quotation&#8211;I believe that the naive simulation programmers\u00a0value the objective of reproducing\u00a0fidelity to the real system, almost\u00a0like a macho benchmark,\u00a0over reasoning about the objective of the overall project and designing\u00a0a model with the right level of detail to meet that objective.\u00a0 That machoism gets people in trouble&#8211;more time, more resources, more cost, etc. than necessary, and sometimes the extra burden put on designing to an arbitrary but unnecessary fidelity can even sink the whole project.<\/p>\n<p>For example, I was brought in to oversee a project to convert a physical\u00a0computer with an 8-bit microprocessor (8088)\u00a0into a simulated computer with a simulated 8-bit microprocessor (should we call this a &#8216;mocku-processor&#8217;?\u00a0 wow, it&#8217;s late), to\u00a0enable students to perform calculations and to troubleshoot the computer.\u00a0 Rather than examine the types of tasks the students were asked to perform, the lead naive simulation programmer started off saying &#8220;we&#8217;re going to need an 8088 emulator for this.&#8221;\u00a0 This led to heated discussions about whether such detail was going to be necessary, and we really ought to look at what tasks students need to perform because there&#8217;s a good chance we don&#8217;t have to simulate all the functionality (and absorb the cost and integration time) of some fanciful &#8217;emulator&#8217; that is supposed to exist somewhere (because of course, even that emulator had assumptions that might not hold true for our tasks!).\u00a0 I certainly understood what he was thinking&#8211;solving the problem &#8216;in general&#8217; was going to give us coverage for the wide range of tasks needed.\u00a0 However, he was going to make this proclamation before bothering to understand the level of fidelity and modeling required for the tasks at hand.\u00a0 In the end, because he was the team leader and had the ultimate decision, he took his team through a completely wasted pursuit of the generality illusion before settling back to a more simplified solution, based on the specific needed tasks, that actually could solve the problem at hand.<\/p>\n<p>In brief, naive simulation programmers gravitate to the pursuit of grandiose models that are supposed to simulate behavior comprehensively, under the pretext that it is going to be able to address the current problem and beyond, without sufficiently understanding what assumptions are perfectly\u00a0reasonably to be made.\u00a0 In a form similar to the quote from Chuck, I would say:<\/p>\n<p style=\"padding-left: 30px;\"><em>We fool ourselves about how complex we have to make simulations to be effective.<\/em><\/p>\n<p>For example,\u00a0our CommandSim platform for training emergency responder officers\u00a0uses photographs, videos, and animations to present realistic incidents to the trainees.\u00a0 &#8216;Serious games&#8217; enthusiasts take a look and argue that a 3D immersive environment would\u00a0produce better training, by virtue of the fact that some of our competitors produce 3D environments for emergency responder training.\u00a0 However, we have demonstrated that the performance improvement with CommandSim, for its specific purposes&#8211;which happen to be the same purposes the competitors are aiming their products&#8211;has been seen to be comparable to live exercises.\u00a0 That begs the question, &#8220;what exactly is the additional contribution of the 3D immersiveness?&#8221;\u00a0 Certainly not in simplified technology, nor ease of distribution.\u00a0 By carefully understanding what problems you are seeking to solve, you can come up with solutions designed at the &#8216;right&#8217; level of detail, not just going full bore with all the detail possible.<\/p>\n<h3>Improving the Success Rate<\/h3>\n<p>At the end of the article, Chuck lays out good arguments for ways in which we can improve the success rate of software, which I think parallel the ways we can improve the success rate of simulations (for their specific purposes).\u00a0 Here are two of them:<\/p>\n<ul>\n<li>&#8220;Stop fooling ourselves about how much we know and how clever we are&#8221;.\u00a0 We must design tightly to the problems and objectives, otherwise risk the project spinning out of control.<\/li>\n<li>&#8220;Incremental improvement to existing systems is good&#8221;.\u00a0 If we go into a project thinking we&#8217;re going to simulate everything, it is very hard to know exactly where to stop and what is overkill.\u00a0 Sometimes adding more complexity increases the problems associated with using it for basic tasks.\u00a0 Critics may say that things become hodge-podge if we design specifically to the tasks presented, and the system will not be flexible enough to handle future extensions.\u00a0 I would argue that a good overall design of process modeling, like using statecharts, will go a long way in providing the foundation for extensibility of the model.\u00a0 We might find that one day the model&#8217;s assumptions are flawed for new tasks, but a good systematic process for developing simulations can help us redesign at that later stage, when we know so much more about the problems we need to face.\u00a0 Nothing teaches us more than actual experience!<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I came across an article in Dr. Dobbs Journal entitled &#8220;Why Software Really Fails And What to Do About It&#8220;, by Chuck Connell (March 11, 2010).\u00a0 I think the most succinct answer to the provocative title question appears on page 3: We fool ourselves about how well we understand the complex new software machines we\u2026 <span class=\"read-more\"><a href=\"http:\/\/www.eqsim.com\/blog\/why-software-fails-is-a-lot-like-why-simulations-fail\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21,13],"tags":[],"_links":{"self":[{"href":"http:\/\/www.eqsim.com\/blog\/wp-json\/wp\/v2\/posts\/79"}],"collection":[{"href":"http:\/\/www.eqsim.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.eqsim.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.eqsim.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.eqsim.com\/blog\/wp-json\/wp\/v2\/comments?post=79"}],"version-history":[{"count":4,"href":"http:\/\/www.eqsim.com\/blog\/wp-json\/wp\/v2\/posts\/79\/revisions"}],"predecessor-version":[{"id":83,"href":"http:\/\/www.eqsim.com\/blog\/wp-json\/wp\/v2\/posts\/79\/revisions\/83"}],"wp:attachment":[{"href":"http:\/\/www.eqsim.com\/blog\/wp-json\/wp\/v2\/media?parent=79"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.eqsim.com\/blog\/wp-json\/wp\/v2\/categories?post=79"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.eqsim.com\/blog\/wp-json\/wp\/v2\/tags?post=79"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}