Todo
I’m very forgetful so I tend to write every little things down for later reference. Over the years I learned to coop with that trait of mine in many ways. I even bought an Ipod touch so i can take notes and pictures of what i should remember. So it’s not surprising that my todo list got quite big and exhaustive over the ~4 months I’ve been working on my new project. But the problem is that I add a new item in the list and just never go back to do it. I just forget about my todo list… I’m that forgetful. So as an incentive to do my todo list items, I did this:
#define JOIN_STR2__(x) #x
#define JOIN_STR1__(x) JOIN_STR2__(x)
#define LOC_TODO __FILE__ "("JOIN_STR1__(__LINE__)") : Warning _TODO: "
#define TODO(x) __pragma(message(LOC_TODO x))
So when I think about something i should remember and actually do later I just write it down at the right place in the code like this:
TODO("Make this real");
So when I compile I get a warning message that look like:
Warning 110 warning _TODO: Make this real c:\p4\test\test.cpp 96
I like getting a warning message, It reminds me that I should fix it while I’m working in the same file.
Ha! Very nice idea!
Some IDEs will generate TODO-lists dependant on the amount of exclamation marks – very interesting stuff.
One could decide which points are to do so that a new version really is a new version.
Nice! I also have a long todo list but usually after I add something, I never look at it a second time hehe
This is really useful. Thanks!
I have now added to my projects!