Presumably the developer in this scenario is not responsible for guaranteeing to and/or misleading a customer that his code adequately renders a deadly weapon safe, more likely that responsibility falls on the managers whose project it was to implement such a digital "safety" and instructed the developer to write the code in the first place.
Assuming the developer did not write the code with the intent of bringing about a person's death, which might involve fooling his superiors as to the efficacy of his work, I'd wager he can't be guilty of a crime. Outside of that, I believe vicarious liability applies.
Perhaps he was a one-man department of this hypothetical gun manufacturer, implementing, deploying, and marketing his product himself and of his own initiative; I don't think there's any doubt he'd be liable in this case, the extent of which is dependent on his intention.
Perhaps our developer was self-employed as a contractor, and warranted to his client (the hypothetical gun manufacturer) that the code was safe; assuming the manufacturer used it as warranted, and it failed, I'd assume the developer would be mostly liable for the result.
What about heavy machinery, like construction plant? Or power tools? Or common kitchen utensils? Would they satisfy the analogy?