Helping Your Future Self
When thinking about helping our future self, look for significant industry trends, the progression of where technology will be in 3–5 years, and what emerging standards appear solid enough.
Actionable and consistent tasks for every project requires effort to identify. Still, when you do, a slight modification to your course early on in a project can change where you end up over time.
The following are some timeless practices that help future self and projects.
Write simple code with meaningful variable/method/class names.
People (including yourself) won’t understand short names that don’t convey meaning or specific terms that change over time. Reduce ambiguity and improve comprehension by using meaningful names.
Have good automated testing
Automated testing will give extra documentation about the code base, which will help the team make changes in the future.
Use version control as documentation.
Use commits/pull request history to explain the whys.
In the future, when the codebase becomes legacy code, no one will be able to understand the decisions and changes made at that time if there’s no documentation. A version control system is the easiest way to explain why a decision was made.
Test everything you write
Enforcing a simple policy of no new code without unit tests can work wonders. No code should be added without unit tests, and no bug should be fixed without a regression test.
One of the best things to keep the codebase future-proof is to have good standards for best practices followed by the entire team. Such small steps will have a massive impact on the quality of the project.