You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Ole Ersoy <ol...@yahoo.com> on 2007/01/30 06:05:07 UTC

[Coding Conventions] TODO's in code

Hey Emmanuel,

I've been going through your 
coding conventions document, which is quite nice
by the way :-)  Concise and to the point.

I noticed there's a note in there about no TODO's in
the code.

Personally I like todo's because some of us might
check code in and have todos in there.  Once we have
better repository capabilities we can feed those into
a "Help Wanted" work queue, and make it available via
the "Help Wanted" section of the site.  This is really
easy to do BTW - I only need 1/2 hour extra in the day
for this.

Thoughts?

Cheers,
- Ole


 
____________________________________________________________________________________
The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

Re: [Coding Conventions] TODO's in code

Posted by Emmanuel Lecharny <el...@gmail.com>.
On 1/30/07, Ole Ersoy <ol...@yahoo.com> wrote:
>
> Hey Emmanuel,
> <snip/>I noticed there's a note in there about no TODO's in
> the code.


Yes, we don't have any TODO rule as a matter of fact.

Personally I like todo's because some of us might
> check code in and have todos in there.  Once we have
> better repository capabilities we can feed those into
> a "Help Wanted" work queue, and make it available via
> the "Help Wanted" section of the site.
>

Well, I'm balanced (but this is just me, may be). We have currently 75 TODOs
in the 1.0.1 code base.

IMHO, TODO is a great idea butit has some drawbacks.
Pros :
- You can quickly add some comment in your code if you feel like you have
some more thing to do
- Eclipse/Idea now have tools that help you to deal with TODOs
- At least, it's better then a piece of paper : closest to where the problem
is.
Cons :
- It clutter the code.
- If the TODO is important, then why do we have to put it in code, when we
already have JIRA which is good also to manage the roadmap?
- If we have smething TODO, isn't it better TODO it instead of postponing
the work?
- last, not least, TODO don't generally capture all of your intention, and
does not allow other users to discuss the point. If you add a TODO in your
code, that mean you either didn't had time to finish (but this is not a
vaild excuse IMHO), or that you don't have a clear vision on how to
implement something (and then it deserve a discussion either on the ML or in
a JIRA)

I guess that it is something we should agree on before setting rules about
TODOs. My best guest is that you should use it whith caution, if needed. If
a vote is launched about "allowing commiters to use TODOs", I'm sorry to say
that I will vote it -1, for the reasons I listed in cons... So better not
launch th vote, and let it be the way it is currently :)

Note that I don't want to be harsh with you, and reject a
-- 
Cordialement,
Emmanuel Lécharny
www.iktek.com

Re: [Coding Conventions] TODO's in code

Posted by Ole Ersoy <ol...@yahoo.com>.
Brilliant!  Thanks Luke.  I guess all we really need
then is for that to run on the entire build, and build
a report.  Then when someone takes care of a todo,
they just remove it from the code, check it back into
subversion, and a subversion hook retriggers the
running of the report.

Thanks again,
- Ole


--- Luke Taylor <ne...@freesurf.ch> wrote:

> 
> 
> Ole Ersoy wrote:
> > Hey Emmanuel,
> > 
> > ...
> > 
> > However, I do agree, that until the repository
> > functionality that scans for todo's in the code
> base 
> > and automatically puts them in something like a
> JIRA
> > tracking system, so that JIRA has complete
> visibility,
> > all TODO's that are open for collaboration should
> be
> > in JIRA.
> > 
> > ...
> 
> Maven's "taglist" plugin can produce a report of
> todos or other tags in
> the code which allows you to track the easily
> 
>
http://monkeymachine.eu/acegisecurity/acegi-security/taglist.html
> 
> Of course, we don't really have any so there's not a
> lot to see :).
> 
> 
> 
> 
> 
> -- 
>  Luke Taylor.                      Monkey Machine
> Ltd.
>  PGP Key ID: 0x57E9523C           
> http://www.monkeymachine.ltd.uk
> 
> 



 
____________________________________________________________________________________
Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front

Re: [Coding Conventions] TODO's in code

Posted by Luke Taylor <ne...@freesurf.ch>.

Ole Ersoy wrote:
> Hey Emmanuel,
> 
> ...
> 
> However, I do agree, that until the repository
> functionality that scans for todo's in the code base 
> and automatically puts them in something like a JIRA
> tracking system, so that JIRA has complete visibility,
> all TODO's that are open for collaboration should be
> in JIRA.
> 
> ...

Maven's "taglist" plugin can produce a report of todos or other tags in
the code which allows you to track the easily

http://monkeymachine.eu/acegisecurity/acegi-security/taglist.html

Of course, we don't really have any so there's not a lot to see :).





-- 
 Luke Taylor.                      Monkey Machine Ltd.
 PGP Key ID: 0x57E9523C            http://www.monkeymachine.ltd.uk


Re: [Coding Conventions] TODO's in code

Posted by Ole Ersoy <ol...@yahoo.com>.
Hey Emmanuel,

Those are all good points and I agree with them all.

I actually go by the same rules 95% of the time.

Sometimes, I put a todo in, when there's a dependency
on an other project.  For instance commons-exec is
adding a shell scripting execution environment based
on the work from Maven's component's so I added a TODO
to switch to that when commons-exec reaches 1.0.

However, I do agree, that until the repository
functionality that scans for todo's in the code base 
and automatically puts them in something like a JIRA
tracking system, so that JIRA has complete visibility,
all TODO's that are open for collaboration should be
in JIRA.

Then there are those todo's that are personal
reminders.  Sometimes we need to do something, before
something else can be done, and we like to leave a
little reminder for ourselves to do it.

I think these are the ones you are suggesting
discretion for.

So I'm a +1 given the contingencies :-)

Cheers,
- Ole


--- Emmanuel Lecharny <el...@gmail.com> wrote:

> oops, a bad 'submit' cut my last sentence ...
> 
> So I don't want to looks like harsh to you by
> rejected all your proposals, I
> just try to capture the way we are currently working
> as a group, even if
> it's not exactly the way I think it should always be
> done. In any case, if a
> proposal seems good, we can vote for it. This is
> like democracy, the worst
> possibly system, if you exclude all the others :)
> 
> Emmanuel
> 
> -- 
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
> 



 
____________________________________________________________________________________
TV dinner still cooling? 
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/

Re: [Coding Conventions] TODO's in code

Posted by Emmanuel Lecharny <el...@gmail.com>.
oops, a bad 'submit' cut my last sentence ...

So I don't want to looks like harsh to you by rejected all your proposals, I
just try to capture the way we are currently working as a group, even if
it's not exactly the way I think it should always be done. In any case, if a
proposal seems good, we can vote for it. This is like democracy, the worst
possibly system, if you exclude all the others :)

Emmanuel

-- 
Cordialement,
Emmanuel Lécharny
www.iktek.com