Knowing the requirements of software is very important, it helps keep you in line when coding. Additionally, knowing the requirements of software gives you much more clarity on clean code and programming principles. You’ll be able to understand programming principles much better and you’ll be able to invent your own solutions even if programming principles don’t clearly point to one.
On the other hand, if you don’t know about them, then you may be applying programming principles because someone said you should, rather than really understanding why they’re important.
Definition of software
The definition of the word "software" gives us some obvious hints, so let’s start with that.
"Software" is a combination of two words:
Soft means malleable, easy to change etc. In terms of programming, it means that the code we produce must be easy to change.
Ware means a product, goods, etc. In our case, the product we produce is a system of code. Obviously, as with any product, it must work correctly.
Both of the words from the definition perfectly describe the requirements of software from a coding point of view:
- The product is a system of code, which must work as intended.
- It must be easy to modify.
Explanation for the requirements
The "ware" part should be pretty clear. Obviously we produce systems of code and the code has to work as intended.
The "soft" part might not be immediately obvious.
Why is it that code needs to be easy to change?
It’s because as we work we change code all the time, for many reasons.
- Requirements change all the time.
- We constantly revise and modify the code during development.
- Software needs constant maintenance and improvement, both in terms of bugs and new features.
So since code needs to change all the time, we should make it easy to change to make our lives easier.
In more detail, here’s each reason with a bit more explanation:
Requirements change all the time
We constantly revise and modify the code during development
This is how we work.
If we could design the code upfront perfectly and then just write it, we would be done significantly faster. We would also probably use waterfall and everything would be much better. Unfortunately, it’s not possible for us to do that.
Experience has shown us that working in iterations is much more effective. This is also what agile advocates. It’s just the nature of our work that we constantly need to revise our code and modify it.
Gall’s law also supports this. It essentially states that we can’t create a (propriotary) system of code in one go, we have to continually revise and build it up.
Software needs constant maintenance
Even after initial development is finished and the stakeholders have accepted the product, software still needs constant maintenance and improvement. See software evolution.
This means we have to continue making changes to the code, potentially indefinitely.
The requirements of software are:
- It should work as intended.
- It should be easy to modify.
If we want to write good code and apply programming principles effectively, we should remember these requirements.