Sometimes people will ask me if it is better to reframe or recreate the whole system or function, my suggestions are depending on the different programming languages.
With good comments on the old system, we usually strongly suggest reframing unless the performance could not fulfill anymore. Based on the cost and time concern, if recreation could fill with. To recreate the whole thing usually is easier for the engineer. However, the above situation assumes that you are using the same programming language. If you are using different languages it is better to use different frameworks. Therefore, recreation will be chosen to fill up the need.
All engineers have experience with reframing or modified the coding that was created by others. And, we all know if the comments are not clear, we need to spend a lot of time to understand what the system or function is doing. Sometimes with old structures, even hard to track and to understand what the function is doing if there are no comments.
Good comments could help yourself also. For example, there was a system that I created a year ago. One day my boss asked me to modify due to the new functions that the client requested. Without the comment that I left in coding a year ago, I might not know what I was doing as well.
Some people will say that if you write down everything then other people could take over your job. Yet, what if no one could understand it and no one could help you out while you were busy. Then you will hope that you wrote down good comments so that you could ask someone to help out.
Therefore, to learn how to write good comments in the program is not only helping others but also helping yourself also.