Taking a step back from the coding errors and even a step back from software development errors, there is a fundamental where failure to adhere to it will produce bad results from start to finish. This idea is not unique to software development but I see large software development projects that do not follow it fail on many levels. Problem statement: Automation is required to solve a specific problem. Each and every part of the project has a problem statement (or should). Gratuitous features are gold-plating. Take Microsoft Word, for instance. A large majority of the problem-solving features (WYSIWYG, spell-checking, grammar checking, etc ) were solved years ago. That means that most of what was left to provide had not much to do with solving the basic problem that the tool is designed for: Editing and printing documents. Yet Microsoft has to create an illusion of need so that consumers will be willing to shell out $400 for the next upgrade. Basically, this is gold plating on a huge scale. So, with no problem to solve, the developers have no fundamental rule to follow. Taking Microsoft Word to illustrate what happens with gold plating: Every single person in our company dislikes Office 2007. Microsoft completely changed the interface forcing the user to re-learn the most basic tasks. The code for the new interface functions perfectly. There are no apparent coding errors. The error was made at the top of the decision ladder. After several years of learning, users had no trouble navigating the tools and options. There was no problem to solve. Microsoft needed to feed its illusion machine so it created eye candy at the expense of the users.
Microsoft just happened to be the biggest target, but this issue is apparent throughout the industry.