Author Topic: I do not understand usage of To-DoList  (Read 5311 times)

shikaku

  • Guest
I do not understand usage of To-DoList
« on: November 30, 2005, 03:34:17 pm »
I used code::blocks for the first time.

However, I do not understand an additional way of an item to To-Do List. :(

Where will it be written?

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: I do not understand usage of To-DoList
« Reply #1 on: November 30, 2005, 04:06:29 pm »
A TODO item is a simple comment in the source code, it just has a different format.

i.e.:

Code
// TODO: Stop showing that stupid "are you really sure?" dialog
showannoyingdialog("Are you really sure?");

The todo plugin is just a manager that manages your special comments.


Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: I do not understand usage of To-DoList
« Reply #2 on: November 30, 2005, 05:10:06 pm »
Hello,

TODO comments are interesting, becuase they help you to remember what you still have to do (as also said by rickg22). For example:

Code
#include <iostream>

int calculateUserAge();

int main()
{
    std::cout << "The age of the user is: " << calculateUserAge() << std::endl;
    return 0;
}

int calculateUserAge()
{
    //TODO: Implement the body of this function
    return 0;
}

The TODO comment will be inserted into the TODO List. So, even if you forget it or you forget where you put it, you can always check the list. It is a useful feature IMHO  :).

Best wishes,
Michael

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: I do not understand usage of To-DoList
« Reply #3 on: November 30, 2005, 07:00:23 pm »
From http://www.realityinteractive.com/rgrzywinski/archives/000035.html
Quote
  • NOTE describes a situation which is not obvious from reading the code directly but is desired behavior or describes assumptions or constraints that are not explicit.
          Ex: "NOTE: this will not work with values less than zero."
          Ex: "NOTE: this function was added as a work around for the bug found "
  • FIXME denotes code that simply does not work. Describe the symptoms or whatis broken.
          Ex: "FIXME: values greater that 10 cause this function to fail."
  • TODO describes functionality that still needs to be added or describes code that performs a function, but work still needs to be done.
          Ex: "TODO: multi-auth is not implemented"
  • CHECK describes functionality that at initial overview does not appear to be correct but does perform the necessary fuction.
          Ex: "CHECK: can 'j' be less than zero here?"
  • BUG followed by an identifier marks a section of code that is in place or has been fixed because of a bug report.
          Ex: "BUG #8452: the value much be checked for null before using"
  • REQ followed by an identifier is a reference to the requirements documentation.
          Ex: "REQ 5.7.1a: non-logged in users are not allowed"
  • PERF is essentially a NOTE but is specific to a performance optimization. For all intents and purposes NOTE can be used in its place.
          Ex: "PERF: ArrayList is explicitly used (rather than List) to minimize the overhead of polymorphism"
//NOTE ;) These are just guidlines and almost everyone uses some more or less than the above, but everyone uses FIXME, TODO and NOTE when writing code
Life would be so much easier if we could just look at the source code.

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: I do not understand usage of To-DoList
« Reply #4 on: November 30, 2005, 07:40:19 pm »
From http://www.realityinteractive.com/rgrzywinski/archives/000035.html
Quote
  • NOTE describes a situation which is not obvious from reading the code directly but is desired behavior or describes assumptions or constraints that are not explicit.
          Ex: "NOTE: this will not work with values less than zero."
          Ex: "NOTE: this function was added as a work around for the bug found "
  • FIXME denotes code that simply does not work. Describe the symptoms or whatis broken.
          Ex: "FIXME: values greater that 10 cause this function to fail."
  • TODO describes functionality that still needs to be added or describes code that performs a function, but work still needs to be done.
          Ex: "TODO: multi-auth is not implemented"
  • CHECK describes functionality that at initial overview does not appear to be correct but does perform the necessary fuction.
          Ex: "CHECK: can 'j' be less than zero here?"
  • BUG followed by an identifier marks a section of code that is in place or has been fixed because of a bug report.
          Ex: "BUG #8452: the value much be checked for null before using"
  • REQ followed by an identifier is a reference to the requirements documentation.
          Ex: "REQ 5.7.1a: non-logged in users are not allowed"
  • PERF is essentially a NOTE but is specific to a performance optimization. For all intents and purposes NOTE can be used in its place.
          Ex: "PERF: ArrayList is explicitly used (rather than List) to minimize the overhead of polymorphism"
Wow :). I have never thought there were such a lot of different comments. Well, today I have learnt something new :). Thank you for providing this info.

Anyway, C::B version RC2 just supports NOTE, FIXME and TODO.

Best wishes,
Michael

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: I do not understand usage of To-DoList
« Reply #5 on: November 30, 2005, 08:08:07 pm »
Quote
Anyway, C::B version RC2 just supports NOTE, FIXME and TODO.

Actually, it allows you to add any other arbitrary value. But there is a bug that won't recognize (i.e. display in the todo list) anything else...
Be patient!
This bug will be fixed soon...