3 ms·
1) This is true for YOU not necessarily for the next person, hopefully when you are rewriting the code you maintain some level of decency and leave a comment tr
by DrJ 15y ago
1) This is true for YOU not necessarily for the next person, hopefully when you are rewriting the code you maintain some level of decency and leave a comment trail. If you optimize and clean the code there is a high chance that you end up with complex functionality packed into one liners.
2,3) If you do not have a test suite how can you reproduce the original code 1 for 1? Similar for new features. I totally agree that code (at least functionally) should always come with a test suite. If there isn't a test suite and you are planning to rewrite the code, the priority should be in writing a test suite or a black-box tester. At the minimum you should have a list of supported features that you are going to check off.