DEV Community

Discussion on: How do you schedule time for code refactoring?

Collapse
 
dmfay profile image
Dian Fay • Edited

Many text editors and IDEs recognize comments with certain labels:

// TODO streamline this
// FIXME i'm a super weird edge case bug
// HACK i'm not proud of this and it should go away

and highlight them differently or even provide a special search shortcut that only lists notes to your future self, although a manual search is of course not that much more complicated.

In general if I'm working in a file and am not especially pressed for time I'll take a little bit to clean things up and organize the code if it seems like it needs it it. Logging refactoring tasks in an issue tracker doesn't seem to happen consistently if at all. "Google time" to hack at things you'd like to do but couldn't otherwise justify is an interesting possibility too, if you can swing it.

Collapse
 
jjjjcccjjf profile image
endan

To add to this OP, if you're using atom, you can use this package. atom.io/packages/todo-show