Requirement analysis in the Software world

Let's understand why requirement analysis is so important, we all know it is important but why????

Why can’t we just go ahead and write the code for the requirement that’s in front of us?

If we get stuck we have StackOverflow, Google, or some blogs for sure so who cares about requirement analysis let’s save some time and jump into coding right away and get this feature done 👍.

If you agree with what you just read then my friend let me break it to you, the software world does not work like that.

What would be the quality of the code written by the developer who thinks like this? What if a small feature comes in and when you go and implement it you break a module that you build in the past?

Nobody wants to work on a spagettie code base because if you change one single line then whatever comes next becomes your responsibility.

A spagettie codebase is basically caused by developers who just avoid doing any kind of analysis and jump on the keyboard to finish off the requirements.

Let me explain why requirements should be technically analyzed before you start writing the code with the help of an example

Let’s assume, I am using a car to travel 500 meters where I can just walk and reach there, but then there’s nothing stopping me to take my own car.

Just like there’s nothing stopping developers to use a heavy third party library for API parsing than simply writing 5–6 lines of code using URLSession.

And if I take a car to travel 500 meters then that’s not a smart move

I reach my destination but the cost to reach my destination and then come back to my home is expensive because the car runs on gas (petrol) and now you have spent some amount of it to travel two way.

Let me push this argument a little, what if I take my car and some irresponsible driver dashes my car causing a dent or worst some major damage.
Now the cost to fix my car is higher than me just walking 500 meters and reaching my destination, plus walking is good for health too but I avoided that health benefit and took the car 😪

The technical decisions that you will make to fulfill a requirement will always have cost, risk, and trade-offs.

So rather than just jumping to code the next requirement maybe you want to spend sometime whiteboarding your solution or perhaps making a sequence diagram and then looking at the flow of data and asking yourself these two questions

A. If a change comes how easy would it be to make a change if I go with this approach or pattern?

B. Have I handled all the use cases as per the requirement?

A wise man once said “Think before you code” and the saying will remain true for the next century or maybe till the end of time.

I hope you enjoyed this read, do share and clap if you like the article, share your thoughts on this via comments would love reading and learning from your experience. Have a nice day 😊



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store