It depends on the bug, doesn&#x27;t it?<p>Most software is poorly defined to begin with and so the programmer is responsible for figuring out what the program <i>should</i> do in the absence of a spec.  That&#x27;s one class of bug.<p>Another is when the spec says to do a particular thing, but that thing is wrong relative to what is actually desired by the people writing the spec.<p>Another is a correct spec but wrong interpretation on the part of the programmer and so the code does what the programmer wanted it to, but not what the spec said it should do.<p>Another is correct spec and correct interpretation, but an error in the translation from programmer&#x27;s brain to code.<p>Another is correct spec and correct interpretation and correct translation to code but some kind of particular underlying problem with the compiler, architecture, OS, whatever that by using a different (but supposedly equivalent) incantation the problem disappears.<p>The last class of bug I mentioned is <i>incredibly</i> rare, though, so in many cases what you write is what you get.  That&#x27;s not at all the case with many, many other things.<p>In most engineering you design a thing and the design is as perfect as you care to make it.  And then all the quality leaks out translating the design from theory to practice.  That&#x27;s because the physical world is messy relative to mathematical designs.  I can specify the length of a part as 1.0000000000&quot; but it&#x27;s very difficult to make a part that&#x27;s accurate to more than 1.000&quot;, trying to make one that&#x27;s 1.0000&quot; long means that you have to specify the temperature!<p>In software engineering or programming, there&#x27;s rarely an actual design and that&#x27;s why the quality isn&#x27;t there.  Once you have a &quot;design&quot; (the source code of the program) it gets translated with near absolute fidelity into the &quot;product&quot; (the binary executable).  If you design it wrong, well, sorry.<p>If I make a program and I say that a number should be 1 and I specify it as an int, it&#x27;s <i>exactly</i> 1.