Then, there needs to be awareness and a sense of urgency. Technical debt accrues interest.
In my case, I use deprecation tags:
- @deprecated on javadoc for Java (http://download.java.net/java/jdk9/docs/api/java/lang/Deprec...), JSDoc for JavaScript (http://usejsdoc.org/tags-deprecated.html), Yard for Ruby (http://www.rubydoc.info/gems/yard/file/docs/Tags.md#deprecat...)
- Obsolete attribute on .NET (https://msdn.microsoft.com/en-us/library/22kk2b44(v=vs.90).a...)
- deprecated pragmas and macros in C++
- DeprecationWarning on Python (https://docs.python.org/3/library/warnings.html#warnings.war...)
By doing this:
- You get a deprecation warning.
- Some editors may highlight it.
This signals people to stop using that code.
This creates a sense of urgency to switch to or create a refactored alternative that is cleaner.