If you're referring to MCAS in 737, the software itself wasn't the main problem; I'd say that the main problem was that it wasn't even a documented feature (let alone the engineering of the system itself).
The pilot couldn't even turn MCAS off originally. That's not a software thing, that's a "who the F designed this" thing.