I'm going to restart work on a project that I paused several months ago.
The overall design is not so bad, you donβt need to rewrite it from scratch, but there are many things that I donβt like, this is mainly because I wrote it in a hurry (without comments and magic numbers everywhere ...), and therefore, that by the way I use C ++ tools, I changed (I would say, improved) in the meantime (I tend to use a lot more links, smart pointers, STL, boost, ...).
I think this is the perfect time to clear this code: it will help me get back into it.
I have two questions about cleaning:
What needs to be done to improve the code written in a hurry?
Things like deleting magic numbers, adding comments, dividing too large functions into smaller ones and replacing the original pointers / array with intelligent objects ...
Is there any tool that can help me detect such (and other) dirty pieces?
source
share