hack comment

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

Bạn đang xem: hack comment

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

asked Jan 16, 2013 at 19:26

cvsguimaraes's user avatar


My understanding:

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

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

  • UNDONE: A note to tướng 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 tướng fix some particular problem. These are usually not "elegant" solutions but nevertheless make the darn thing work. Often you will see these to tướng 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.

answered Jan 16, 2013 at 19:32


UNDONE to tướng bầm means that the method is not finished, it usually returns the data type despite no internal code

i wanted to tướng say this because some people consider it a reversal, i would not pollute the code with these sorts of comments and have a feeling that many other people might use UNDONE to tướng mean the same as me

it's a liberal ruleset but it's a great system

public int SomeCalculation(int Input) { return 0; //UNDONE } public bool SomeCheck() { return false; //UNDONE }

angelcool.net's user avatar

answered Nov 11, năm ngoái at 17:04

Richard's user avatar


Xem thêm: co ay qua ngot ngao

Tác giả

Bình luận