views:

486

answers:

7

In our code, we currently use the following tags that can in turn be listed in the visual studio's tasklist:

TODO to mark tasks inside the code the need to be done

// TODO: optimize this loop

HACK to mark code that is only there to make something work for the moment, for instance for a presentation

// HACK: assume we know the users password to skip the need for a popup here

REVIEW to mark a portion of code that has been reviewed and needs some editing

// REVIEW: the following method is redundant, use ABC.DEF() instead

FIXED to mark REVIEW-codesegments that have been fixed, so that the reviewer can see that the appropriate changes have occurred.

// REVIEW: the following method is redundant, use ABC.DEF() instead
// FIXED: removed the method and updated the calls

What other tags do you use in your daily work? Do you think using tags (and the tasklist) is efficient enough for small teams (up to 10 people)? What other approaches do you use to directly comment on portions of code?

A: 
// SOYLENT:

I use this to mark real bad stuff that requires design changes.

Will
+1  A: 
// I18N

I use this one to mark some parts that have hardcoded strings and need update to "multilanguage" multiculture… We later review those and make sure that we extract the strings or whatever it is in a proper form and add the corresponding "language" calls.

Martín Marconcini
A: 
// CAW: ...

We use our initials whenever we're making a note to other developers or to a future you. However, our convention is if somebody makes an update to your statement, the initials become:

// XXX: ...
sixlettervariables
+2  A: 

I only use TODO. It simplifies life and they only exist during development. Once they are implemented, they are removed. HACKs are really TODO's wearing a different hat, right?

I don't put the rest of those in the code as I let subversion manage my diffs and Mantis manage my backlog. If someone wants to compare what I did before with what I'm doing now in the code, DIFF works great for that.

Just my opinion. Good question, though.

itsmatt
A: 

I only use TODO, but we have a different TODO for each dev on the team so we know which issues are "ours" (e.g., I get NTODO for Nick's To Do).

I also use HACK as a keyword but more for just searching, as in

int thisID = list[0].ID; // hack, assume list found a match

and stuff like that.

Nick
A: 

I use TODO to indicate code that needs to be changed or added, and also to list functionality or code that still needs to be completed, since it often gets forgotten.

I use HACK to define when I am using code that I want to change or have something hardcoded. This also indicates areas I need to do more research on before implementing.

Diago
A: 

We use TODO [Initials] [Date], which helps keep people accountable for their todos.

Kena