This article tells you why code submissions need to be associated with requirements and task information丨IDCF

picture

 

 

This article starts with the function of code submission-related requirements tasks, and discusses its significance, functional expansion, and benefits for improving R&D efficiency.

I remember once I heard a development classmate complaining about why he had to fill in the commit message every time he committed? He felt it was a waste of time, so he came up with various ways to deal with it, such as entering a period or copying and pasting the previous commit message. This kind of temporary laziness will cause a lot of troubles to other co-development partners, such as these unintelligible commit messages.

Not only does it not represent the purpose of each code submission well, it also becomes spam and disrupts the team.

git commit -m “.”

However, many development teams have now agreed on code submission specifications to constrain the standardization of submission information. For example, it must include type (new features, bug fixes, or added tests, etc.) and topic (short description of the submitted code) information.

git commit -m "feature: user query interface development"

It can be seen that the purpose description is added to the code submission information in order to clearly display the function of the code through text. For example, just by looking at the submission information, you can tell that this code is to develop a new required function, without having to browse the code line by line to understand its meaning. A further step is to directly associate code submissions with requirements, tasks or defects. Taking GitHub as an example, requirements and defects can be managed through issues, and you only need to enter the issue ID in the code submission information each time, as follows:

git commit -m “#10 issueid”

You can also modify the issue status by entering commands such as close in the commit information, as follows:

git commit -m “close #10 issueid”

The issue can be closed directly through the git command:

picture

 

Why should code submission be associated with requirements and task information?

Seeing this, I think you may want to ask: Why do I have to go to the trouble of querying the IssueID every time I submit code? What benefits can this bring? Let me give you a rundown:

1. Measurable R&D process assets

Code is a very important R&D process asset, and its native state is unstructured data information that cannot be intuitively associated with the projects or needs that managers are concerned about. Without good data management and measurement mechanisms, managers can only obtain subjective descriptions from front-line engineers through meetings and communication. For example, data such as the workload size of requirements and tasks, code quality and risks refined to the dimensions of requirements and tasks, etc. These data are very important references in project review, resource assessment, quality and risk assessment, etc.

By associating requirements and task IDs in the submitted information, the following data can be obtained:

The above is a summary calculation of basic data, and data such as code complexity, code equivalent, and test coverage in the requirements and task dimensions can also be introduced.

2. Refined code quality and risk control

Both quality and risk control require investment costs. By associating code with requirements and tasks, more fine-grained quality and risk control strategies can be designed, which can be used for early quality prevention, mid-term risk discovery and late problem recovery. Disks can reduce cost investment to a great extent. The current method of precise testing that everyone calls is based on this strategy. When designing a test strategy, you can delineate the scope of code changes based on needs, and then design a high-coverage test strategy for code changes within a certain range, thereby avoiding the need for full coverage. High cost of executing test cases.

picture

 

In addition, quality stuck points such as code scanning, unit testing, and code review can be associated with the flow status of requirements and tasks, so that the quality built-in and testing of requirements and task dimensions can be shifted to the left.

 picture

 

3. Benefits from a developer’s perspective

If you are a front-line engineer, after reading the above two benefits, you will definitely feel that these are all demands of management. So what are the benefits from the perspective of an engineer?

  • Reduce the extra work required to develop performance metrics

R&D efficiency measurement needs to measure how long requirements stay in each stage, such as development time. The more traditional approach is to require R&D students to update the status of requirements and tasks on the R&D collaboration platform when they start writing code, and then submit for testing after writing. Then update the status. These repetitive tasks still take up a lot of time. By establishing an association between demand tasks and code submissions, you can automatically trigger the flow of requirements and task status through events such as code submissions, which can also automatically set the corresponding start time. and end time are automatically recorded, thus facilitating efficient and accurate measurement of R&D effectiveness.

  • Gradually expand from a code-based technical perspective to a global perspective focusing on demand value

Since managers and business parties pay more attention to demand value and project delivery progress, while front-line R&D engineers tend to pay more attention to technical details, it is easy to cause a separation between the information obtained from the managers and business perspectives and the engineers' perspective. For example, as a R&D leader, in order to I am anxious about urgent projects or requirements, and as front-line engineers, they are each immersed in their own code world and don't know why. Then by establishing an association between code submission and requirement tasks, development engineers can not only focus on the code itself, but also summarize the requirement value and completed development tasks achieved at the code warehouse level or version, so that they can pay more attention to the business value, through the technical perspective and business The combination of perspectives promotes better development of technical careers.

Functional expansion of code-related requirements and tasks

The previous part of the article only introduced how to associate requirements and task information when submitting code from the command line. To bring more benefits, this function alone cannot be fully satisfied. Complete functions are generally completed through cooperation with collaboration tools. For example, Jira realizes the association between requirements/tasks and development branches. You can also configure workflows to create branches online while triggering status changes of requirements/tasks (entering the development state). ). The picture below shows the development information on the requirements/task card details page. You can see that a development branch is associated, and you can click on the branch to go to the branch details page of the code base.

 

"Function expansion suggestion: On the premise that the requirement/task has been associated with a code branch, you can set rules to realize that all code submissions under the branch are automatically associated, so that there is no need to fill in the requirement and task ID in each Commit information. Information.”

At present, many collaborative platforms do not only associate commit information and branches with requirements/tasks, but also associate merge requests of the code base. In addition, the association of requirements/tasks with test process assets can also be achieved.

picture

There are two specific implementation methods: one is to manually select the information that needs to be associated on the demand/task card of the collaboration platform, and the second is to actively report the associated information through a three-party tool platform such as the code warehouse and test management system. Requirements and task information.

Conclusion

Although the function of code submission to associate requirements and tasks is not large, it is indeed a good habit to develop. On this basis, it will gradually realize the association of richer code process assets with requirements and tasks, thereby providing performance measurement, quality and risk management and control. More convenience. R&D efficiency improvement includes two levels. One is the efficiency improvement of single-point tasks, such as environment deployment and testing; the other is the improvement of collaborative efficiency among members of different roles. The correlation between code information and required task information is through the process Data visualization enables better collaboration between role members who focus on requirements and tasks and engineers who focus on code.

 

Guess you like

Origin blog.csdn.net/m0_69584846/article/details/132141402