-----------
When you maintain other programs, do not delete or modify existing programs. I often see some programmers directly modify expressions or statements in other programs. Do not delete others' programs when modifying others' programs. If you think others' programs are inappropriate, comment out and add your own processing programs, it is impossible for you to know the intention of others 100%. Therefore, to recover, please do not rely on version control software such as CVS or sourcesafe, you still need to view the intention and steps of modifying the program on the source code. This is what a self-developed programmer should do during program maintenance.
As shown below, this is a better method of modification:
/*
* ----- Commented by haoel 2003/04/12 ------
*
* Char * P = (char *) malloc (10 );
* Memset (p, 0, 10 );
*/
/* ------ Added by haoel 2003/04/12 -----*/
Char * P = (char *) calloc (10, sizeof char );
/*----------------------------------------*/
...
Of course, this method is used in software maintenance. This method makes it easy for maintenance personnel to know the actions and intentions of previous code changes, this is also a kind of respect for the original author.
It is better to directly Delete others' programs by modifying others' programs in the form of "comment-Add.