Click to See Complete Forum and Search --> : A tip that helped me about "todo"


answer
March 24th, 2005, 09:15 PM
As I code I alway's make classes and reuse them as needed. One class I didn't use for a long time, I well documented the class by puting suffiecient comments. What really helped me is I made a "todo" file right beside the class. Something was horribly wrong with the class and I didn't know, I check the "todo" file and viola, I wrote down what I was doing along time ago, I finished and fixed the problem.

Its like a miracle, I rarely make "todo" type stuff. I just thought I might share this becuase this really made my coding time mazingly less to do.

Well I learned my lesson, now I will write "todo" files more often. First time I learned a lesson with a result of a benifit :cool:

ovidiucucu
March 28th, 2005, 06:14 AM
As I code I alway's make classes and reuse them as needed. One class I didn't use for a long time, I well documented the class by puting suffiecient comments. What really helped me is I made a "todo" file right beside the class. Something was horribly wrong with the class and I didn't know, I check the "todo" file and viola, I wrote down what I was doing along time ago, I finished and fixed the problem.

Its like a miracle, I rarely make "todo" type stuff. I just thought I might share this becuase this really made my coding time mazingly less to do.

Well I learned my lesson, now I will write "todo" files more often. First time I learned a lesson with a result of a benifit :cool:

And do not forget todo all you have todo! Write a todo remembering you've got some todos todo.
;)

darwen
March 30th, 2005, 04:35 AM
As an alternative : why don't you just finish your classes when you're writing them ?

There's not much point to re-using classes that are half finished.

Darwen.

ovidiucucu
March 30th, 2005, 05:32 AM
Sometimes indeed it's possible to have no choice. Let's say you've got just one-two hours remained until the deadline, something remained unfinished, just for this implementation you need a piece of code only in one module but that code would be reused also in other modules in the furure.

Implementing that code in a base module requires additional time for build and testing and you have not that time available.

Q: What we GONNADO?
A: Write a TODO!

Well, maybe it's not the best example (please don't mention bad planning, design, etc), but as already said it's possible to forget you have TODOs, so no comment what can happen when you haven't. ;)

ovidiucucu
March 30th, 2005, 05:51 AM
Something was horribly wrong with the class and I didn't know, I check the "todo" file and viola, I wrote down what I was doing along time ago, I finished and fixed the problem.
Just curious. What YOUDO when "something was horribly wrong" and you DONOT find what in TODO?

answer
April 1st, 2005, 11:41 PM
Just curious. What YOUDO when "something was horribly wrong" and you DONOT find what in TODO?

you will have to write more code. I would try and find the error but wouldn't spend much time in finding and fixing the problem unless I will need to use lots of the features of the class. If I really can't fix it I might copy and paste stuff if well commented which I always try to keep my code to be.

kirants
April 5th, 2005, 08:54 PM
I tend to put the reminder in code using this macro ...

#define __STR2__(x) #x
#define __STR1__(x) __STR2__(x)
#define __LOC__ __FILE__ "("__STR1__(__LINE__)") : Remember to... "

#define TODO(msg) message(__LOC__ #msg)

I can then use:

if(too bored to do this stuff now.. )
{
#pragma TODO("zzzzzzzzzzzzzzz..");
}

Krzemo
April 6th, 2005, 06:35 AM
If U have VS.NET than U can place "// TODO: ..." marks in your code, and (when U enable showing it) it will appear in task list.
Unfortunetly in VS U have to open the document to make task appear in list ( for example in SharpDevelop you don't need to do it - all files are automatically analyzed when project is loaded)

Anyhow in all versions of IDE you can place TODO marks in source code an use "Find In Files" functionality to find it - IMHO it is better than separate TODO files.

Best regards,
Krzemo.