ALL - What is it, what is its usefulness and how to use?
Mystic last edited by
I've seen enough of that word "TODO", mainly in IDE's and always had the curiosity to know what it is.
// TODO: alguma coisa escrita código....
Now the questions:
- What is ALL?
- What is your use?
- How to use?
You saw this in code, it can be called code tags.
Strictly it is a comment like any other. It can have a specific meaning for some tool. It is common IDEs or at least extensions of them have something they search the code looking for comments starting with:
TODO:("to do") Someone [I] needs to get this urgent
FIXME:("me fix") It has a mistake that needs to be fixed here, but it works (
HACK:("gambi") There was no other way to resolve the deadline, then better
XXX:("attention") Some editors highlight comments with this as something important without giving specific semantics
DONE:("made") To warn you
TODOIt's settled. When to remove this?
UNDONE:("defect") I needed to get back to the original for some reason
ASAP:("as fast as possible") You need to get this urgent
REMOVE:("remove") This code has been placed only to test something and must disappear
NOTE:("annotation") Just to let you know you have something important now
BUG:("failure") Has a bug known here that needs to be tidy - specialization of FIXME - usually have an associated ticket number
ISSUE:("question") There is a doubt here whether it should be so
ERROR:("error") Has a reproducible error here - FIXME specialization
BROKEN:("breaking") does not go ahead even, no use insist - specialization of FIXME
GLITCH("failure") Something strange occurs here in a very specific situation
REVIEW:("revise") Review that for me, used where you usually do peer review
WTF:("that p0rr@ is that?") They've done a really big shit here.
And similar. .
The tools catalogue these comments somewhere specific, not just in the code to highlight that the code is not complete or at least needs special attention for programmers not to ignore by accident.
Many allow you to set up whatever you want, but exaggerate can start making it difficult to use, in general the first 3 are very useful (for the VIM only the room is considered), the others are variations, specializations, exaggerations or require better tools.
In general there is a more detailed description after the two points. This Tag specific serves to help the tool identify the semantics of this comment.
This is a practice of organized programmers. Of course, if you stick a lot of them and drop it gives you the same as not to use. In general they must be transitory.
Some teams even forbid code with that to be committed, except in cases that are for communication with other team members. The argument is that if it is a planned and not implemented thing should stay in the documentation, if it is something that is missing to fulfill the planned implementation then the commit cannot be done until complete. The reality prevents the flow from being in fact like this, the most that happens is people take it out of the code and mark it elsewhere easier to forget, just to break the silly rule.
Does anyone remember others?