
Code revision is something we may have all done in some point of time. It consists, as its name suggests, of reviewing code written in order to find mistakes, errors or bugs. This is a very important step in coding and thus it has to be preferably as effective and efficient as possible.
There are many tips and tricks to maintain an efficient code revision, but I think there are two main advices every programmer should take.
- Reviewing a lot of code in one sitting tends to be a bad idea, especially when the code is confusing or extensive. The recommendation is to review in parts; no more than 400 lines per hour should be reviewed. This is to maintain focus and being effective at it. Also it is recommended to take rests between revision hours for the same reason.
- Being organized is imperative in code revision, especially if the code does not do what it’s intended to or if the code has a bug which its origin is hard to tell. A method to have this point in check is to have completion lists, also known as milestone or to-do lists. Keeping everything in check, signaling observations, test results or stuff that has not been done yet can greatly improve the revision time and effectiveness.
A powerful and very convenient tool to have if everything decides to go south is revision control, also known as version control or source control. This tool manages changes made overtime not limiting itself to source code; it can also manage assets and metadata. One example of this almighty tool is git (I use Github). It manages a repository in which you can upload any project, it will have in check every upload version you give it and even can branch itself to have different versions, not just in a linear way.
Putting this into practice will improve revision time and maybe lessen the headaches a project may give. Also if you have revision control, it becomes easier to compare versions of the same code from when it was working properly. The only downside I can see is not even a big one. Being organized about a project development requires effort, but I think the effort put into documenting, marking or making a to-do list is much lesser to the effort put to debug a spaghetti code or code only god knows how it works since everyone forgot.