What is a software bug?
A bug is an issue with software that makes it unusable, unstable and/or leads to faulty (undesired) results while using it. That’s of course within reason and specific context.
What’s the cause?
There exists one cause for bugs – the people who write the code. Creating software always leads to bugs. It is inevitable, regardless how good an engineer is, what “best” practices are used & etc.
I see a lot of posts stating, incorrectly, that the cause of software bugs is in ambiguous / changing requirements, miscommunication, software complexity, inadequate testing & etc. Some of those may increase the likelihood of a bug but are not causes on their own. The cause is the creator. This fact is no reason to blame anyone given that blame has never solved anything. On the contrary, this is a starting point of how to lessen the chances for serious bugs.
-= Edit =-
Somehow this puny post managed to create unexpected discussions (not here). I’ll elaborate more.
- ‘Bug’ has a lot of interpretations. Some engineering teams have a tendency to use very narrow, and as consequence – incorrect, definition – like if it was not in the requirements – then it is not a bug but a “feature” or because it was not implemented then it is not a bug. That’s bullshit which is usually driven by weird internal processes or (love this part) the desire of engineering managers to show they ship code with less bugs. For all practical purposes – anything that stays between the customer and him realizing a meaningful, sensible business process and/or adds up to inadequate usability – it is a fucking bug. How that bug will be solved is entirely different matter.
- Product managers, Business Analysists or whatever you wish to call the people who create the stories used to implement the features – they do introduce “bugs” in the sense they write inadequate requirements, miss vital parts of the requirements or introduce contradicting requirements. However that is not a bug because it is not code. As simple as that. It is outright wrong and incorrect indeed but it is up to the engineering team to catch such issues during the so called planning or grooming, just like it is up to the PM or the BA or whatever – to catch issues while testing the feature and accepting it (and that my dears does not exclude the QA at all).
- There are people who write code with their asses, just like there are PMs who write requirements with theirs. Those people totally suck and they are totally to be blamed but getting blamed does not solve anything. Either train those people and enable them to become better (strangely but a lot lack just that – a little push) and fire the ones who are beyond training – because there are people who never learn.