5 ms·
I have to agree, I think TODO and FIXME comments are just a fact of life. I haven't seen a large codebase that didn't have them. But, if you write one of those
by barrybe 16y ago
I have to agree, I think TODO and FIXME comments are just a fact of life. I haven't seen a large codebase that didn't have them.
But, if you write one of those, at least try to be realistic. Too often I find comments saying "XXX THIS MUST BE FIXED IMMEDIATELY!!" in code that hasn't changed for years.
- bradly 16y agoTODO's and FIXME's are a fact of life, but if you are using a bug or issue tracker, that is probably a better place to report these. Otherwise you'll have tasks in both your code and your issue tracker instead of a central location.
- makecheck 16y agoNot necessarily. Yes, if you're fortunate enough to have something like Trac that can easily link between a line of code and a ticket number, then bug reports can handle everything. But otherwise, how would you describe it? Sometimes a problem only "makes sense" if you're looking directly at the affected line of code, and the comment is right there. If you leave a 'grep'-able thing like "FIXME" in your comment, you won't really lose it.
- mahmud 16y agoI worked on an inherited project that had /* FIXME: 8372 */ except we no longer owned the bug database. Really wished the comment actually explained WTF was broken, instead of leaving me perform exhaustive tests with a SOAP sandbox halfway across the world, and a security/performance hack that involved keeping track of a per-request nonce AND a 5s sleep :-/
- jerf 16y agoTODOs and FIXMEs are, at least in my opinion, things that aren't manifesting as bugs right now, but might in the future. Having them in the tracking system will just confuse management and QA. Just put them in the code, which has the advantage of putting the FIXME right next to the thing that needs to be fixed. They've saved me many times, and I've had exactly the situation I describe above occur, so while I sort of am with you in theory, in practice they should go right in the code.
- nitrogen 16y agoEclipse keeps track of TODO and FIXME comments, and can sync them with a bug database.