Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Usage of HACK and UNDONE comment tags

Many software engineers are familiar with the usage of special comment “tags” that can be added to their code comments, for use in searches, automated task tracking, and so forth. Some of the most popular are FIXME, TODO, UNDONE, and HACK.

I'm a bit confused with the usage of HACK and UNDONE tags. Little help please?

Bonus points for showing the basic difference between FIXME and TODO

like image 390
kbtz Avatar asked Jan 16 '13 19:01

kbtz


People also ask

What does Fixme mean?

FixMe.IT is a remote support software that enables users to connect to any remote computer. It caters to users from sole proprietors to global corporations across multiple sectors and industries.

What is Fixme comment?

FIXME comments are often used to indicate code that does not work correctly or that may not work in all supported environments. This may be necessary during the implementation of new functionality but FIXME comments should not be present in stable code.

How do you comment code?

The single line comment is //. Everything from the // to the end of the line is a comment. To mark an entire region as a comment, use /* to start the comment and */ to end the comment. * This is a block comment.


1 Answers

My understanding:

  • TODO: Something that needs to be done. This could be a feature to be added later, or indicating that something is a stub and needs to be implemented.

  • FIXME: A subclass of the TODO tag, indicating something is broken that needs to be fixed.

  • UNDONE: A note to indicate a change which was a rollback or reversal of some other change. This comment will usually indicate what was removed and why.

  • HACK: Something, usually an odd or unorthadox piece of code, which was added to fix some particular problem. These are usually not "elegant" solutions but nevertheless make the darn thing work. Often you will see these to address a bug in the framework or other unexpected behavior. Additionally, the purpose of the commented code will often be unclear were it not for the comment.

like image 77
lc. Avatar answered Sep 17 '22 15:09

lc.