Todo

What is the correct (if any) way to mark code with todo sign (#todo,
@todo, …)?

I use TODO because vim syntax highlights it. I try to stay away from
it in favor of writing a test for it instead.

2009/8/15 Slava M. [email protected]

What is the correct (if any) way to mark code with todo sign (#todo,
@todo, …)?

you could use blocks like this:

def to &b
puts “TODO at file #{b.source_location[0]} line:
#{b.source_location[1]}”
end

puts 1
to do
write code to output “2”
end
puts 3
to do
calculate the square root
end

-Thomas


Thomas P.
[email protected]

Sent from Berlin, BE, Germany
Pablo
Picassohttp://www.brainyquote.com/quotes/authors/p/pablo_picasso.html

  • “Computers are useless. They can only give you answers.”

On Sat, Aug 15, 2009 at 7:08 PM, Jason S.[email protected]
wrote:

I use TODO because vim syntax highlights it. I try to stay away from
it in favor of writing a test for it instead.

I wish I could write tests for that kind
TODO: Refactor that holy mess
:wink:
Well I could maybe use some code metrics to catch the worst cases.

But your advice is sound of course, Jason.

Cheers
Robert

On Sat, Aug 15, 2009 at 6:19 PM, Slava M.[email protected]
wrote:

What is the correct (if any) way to mark code with todo sign (#todo,
@todo, …)?

A failing unit test, and/or:

raise NotImplementedError, “This needs to be implemented…”

On Aug 15, 12:19 pm, Slava M. [email protected] wrote:

What is the correct (if any) way to mark code with todo sign (#todo,
@todo, …)?

TODO: Something I have to do with xyz.

def xyz

end