The task list in eclipse is very useful - as you edit code it keeps a list of all the things you need to do before your code will compile, which can really help boost the edit-compile-test cycle. Being able to 'quick fix' things really makes a massive performance boost to coding as well.
Sometimes as your coding you notice something in the code that needs to be done but you don't have time to do it right now, but you still want to make a note of it so that later on someone can come back and fix it. Typically folks add a task tag to the code in the comments along with a description of what needs to be done.
Over the last 20 years writing code I've done this myself alot and seen many other developers do the same in various different languages using different notations. Usually its some easy to grep string like ####, XXX or just TODO or whatever.
So a comment is added to the code to alert future readers that a certain thing has been intentionally missed, some corner cut, some further investigation required etc. This is often the result of following either a tight deadline, a quick hack or you're following an agile development model - that a certain feature isn't required yet but one day we might wanna go back and add or fix something.
Task tags are often used for spring cleaning chores, marking sections of the code that really should be refactored or improved when someone has the chance but its not a requirement right now.
Using task tags in Maven and Eclipse
The Maven project has started using the comment @todo so that a doclet can generate a task list (to do list) report of things to do as part of the build. This is a very simple yet nice use of doclet tags.
Now back to eclipse (finally :) - if you're using 2.1 M5 and open the Preferences window (via the Window menu) and go to Java -> Task Tags you'll see a way to add your own task tags to Eclipse along with priorities. So if you're using Maven it makes sense to add "@todo" as a task tag to the list of tags that Eclipse understands.
Once you've done this, whenever you add a @todo comment in your code to highlight some task that needs to be done, your Eclipse task list and your Maven generated website will stay in sync documenting all those tasks. Neat.
10:09:24 AM
|