Requirements
Although projects that develop scientific software rarely start with a formal phase in which requirements are gathered and analysed, every programmer will have an informal list in mind at the start of the project.
Actually, you could argue that the more accurate the list of requirements, the better the chances that the project will be successful, and that it will be finished within the planned time. Many project are not delivered on time, or even fail due to problems caused by misconceptions about the requirements.
It is definitely worth to invest time and effort in this phase of a project, since it will save you trouble down the road. When drawing up a list, questions you should ask yourself are the following.
- Is the list complete, what is missing?
- Are the various requirements consistent, are there contradictions?
- Is the formulation clear, or is there ambiguity?
- What are the dependencies between the requirements, are some more important than others?
- Can all requirements be met, and at what cost?
- Are all requested features really required?
The requirements and these questions about them should be discussed with all the stakeholders for your project.
This may not seem to be a cause of bugs as such, since the code does what the programmer intends it to. However, if it is based on flawed requirements, it will not meet the expectations of the user, and this is a defect.
Good discussion and examples can be found in the literature on agile development.