Process for todo/future/etc... items in code #287
Replies: 3 comments 3 replies
-
This originally came up in a PR review comment. |
Beta Was this translation helpful? Give feedback.
-
@jsync-swirlds lets raise this discussion in our next daily and bring awareness to it as well so we can resolve it. |
Beta Was this translation helpful? Give feedback.
-
I agree on this, but maybe So to keep things simple I could suggest to keep only: But I agree that this is a nice suggestion and would like to start using it instead of the infamous TODO 😅 |
Beta Was this translation helpful? Give feedback.
-
Abstract
Often, it is necessary to note in the formal design documents for software (a.k.a. "code") that a task is incomplete, needs further discussion, or is deferred to a later iteration. There are a great many ways to indicate these things, but most involve some form of tagged comment (the most common tag being
TODO
). These tagged comments are often forgotten, and may linger in the documents far beyond usefulness. Some processes even forbid such "to do" comments as a result. Here we offer an alternative that may provide a better balance between useful reference and clean design documents.Process
In our process, tagged comments are written in a Java "Annotation" style, and must refer to an issue opened in Github for the item described. This offers a short and descriptive text within the design document, but also offers a place for much more detailed description of the intended or expected future modification, as well as the tools to track that change to completion (including removing any items tagged for that issue).
Format
We recommend an "Annotation" style for tagged comments. This style incorporates both tag and a parameter for issue(s) tied to that location, as well as a short description.
We recommend the following five (5) defined tags
@todo(###) description
@future(###) description
@bug(###) description
@discussion(###) description
(here the reference may be a discussion, rather than an issue)@decide(###) description
(may also refer to a discussion)Examples
Beta Was this translation helpful? Give feedback.
All reactions