Friday, July 27, 2007

TODO and FIXME notes

This may help if you developing software in team.
We may add comment on our code as notes for later changes/implementation.

public class Monitor {
public void doMonitor() {
// TODO implement this method
// FIXME create specific exception
throw new IllegalArgumentException("Not implemented yet");
}
public void process() {
// FIXME bugs ....
....
}
}

But when the source is already unified with other source code on the same team, ("TODO implement this method") we might ask "who write this notes? the system is on production state and there are still unimplemented code!" or another case is "FIXME find bugs ....", someone find bugs, but the original writer can read and say "thanks, you save my life by finding my bugs" but he/she didn't know who the one find the bugs.

So it might a good idea if we write a name on our comments


public class Monitor {
public void doMonitor() {
// TODO uudashr: implement this method
// FIXME uudashr: create specific exception
throw new IllegalArgumentException("Not implemented yet");
}
public void process() {
// FIXME uudashr: bugs ....
....
}
}

No comments: