Finding Dead Code
Rationale Over time when we develop code some of that code can become forgotten about and replaced either not being needed or a better solution implemented and the old inferior code remains. This dead code serves no purpose but can be the cause or contribute to multiple issues such as but not limited to: Unnecessary complexity - someone looking to change something may be looking at code they don’t need to, causing confusion on whether it’s safe to delete, update or use it as an example. Performance issues - code that runs that doesn't need to is just waste. Security holes - new implementations that fix a security hole may totally miss code that’s tucked away. Unused endpoints that aren't updated with new auth logic can be big cause for concern. Aims & Purpose Here we aim to talk over some ideas on how to highlight and safely remove dead code from both JS frontend code and NodeJS/express backends. As much as we can we will try to automate the finding of this...