In development or in any field problems are arise. But how to solve problems that are important. What are the cause that creates the problem is important before implementing solution. Once you find the cause of the problem you can solve the problem. Doctor also can’t provide you the medicine until he/she identifies the cause of problem which you have.
So the question is how to find a cause. Here i am talking about the finding the cause of the problems which are arises during developing the software.
Here i am explaining the strategy that i follow while solving the problems which are arise during development phase. Before i start explaining the case let’s take a short case of,
- Searching a person in a City
- Searching in a village (ideally smaller than city)
- Searching in a housing society (ideally smaller than village)
- Searching in a family (ideally smaller than housing society)
So you got the idea behind this cases. As much we break down we can easily find the person and search become faster.
While developing a software if something not working in integrated system like a full web application or in a mobile application. Create a small blank project separately and try to create a small functionality which causes a problem. Try to debug in a decouple system rather than fully integrated system. If it takes time to create same environment that system have than try to provide some dummy data to your program.
Case-1: Android application
While working on android application i am facing issue with fetching image path which were picked from gallery. Android app is consuming the API and open the interface after authentication. Once user authenticated, user can set background image to some view by using picking from gallery. The code written for fetching image path from gallery is not working here. Now what should i do ? I have search and apply some solution and when i run my code and suddenly API stops. Now what i have to wait till API will up and i can authenticate and test my code.
But instead depending on the API, i have created a new blank android project and develop same feature as i want in my app pick image which was picked from gallery. Now Code is small independent of all integrated systems. Code is small to debug and problem isolation. I am trying with alternative solutions debugging it, collecting the data points and finally come to result. Once i find code written in this small project successfully achieved what i need. I can write in integrated system(original app) and it works.
Case-2: Web application
Same way while working with web application i face such issues. In solution i do as mentioned blow:
- If it is a server side concerns, create new project and write plain code independent from tightly integrated with http layer and debug. Like if i need some parameter which are posted from Form, what i do, i will assign some value to variable which holds data posted from html form.
I hope you understand the strategy.