# Todo

**URL:** <https://www.ruby-forum.com/t/todo/173813>\
**Category:** Ruby\
**Created:** [August 15, 2009, 6:19pm UTC](https://www.ruby-forum.com/t/todo/173813 "2009-08-15T18:19:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![slavix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b19c9b/32.png) [@slavix](https://www.ruby-forum.com/u/slavix)\
**Post date:** [August 15, 2009, 6:19pm UTC](https://www.ruby-forum.com/t/todo/173813/1 "2009-08-15T18:19:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![slavix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b19c9b/32.png) [@slavix](https://www.ruby-forum.com/u/slavix)\
**Post date:** [August 15, 2009, 7:08pm UTC](https://www.ruby-forum.com/t/todo/173813/2 "2009-08-15T19:08:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![slavix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b19c9b/32.png) [@slavix](https://www.ruby-forum.com/u/slavix)\
**Post date:** [August 15, 2009, 9:14pm UTC](https://www.ruby-forum.com/t/todo/173813/3 "2009-08-15T21:14:02Z")

</div>

2009/8/15 Slava M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> 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.  
removed\_email\_address@domain.invalid

> **[Google Sites: Sign-in](https://accounts.google.com/v3/signin/identifier?dsh=S620820767%3A1688215231590083&continue=https%3A%2F%2Fsites.google.com%2Fsite%2Fsites%2Fsystem%2Ferrors%2FWebspaceNotFound%3Fpath%3D%2Fthopre%2F&followup=https%3A%2F%2Fsites.google.com%2Fsite%2Fsites%2Fsystem%2Ferrors%2FWebspaceNotFound%3Fpath%3D%2Fthopre%2F&ifkv=AeDOFXh02uKbsw3nSUf-NfdDRL7c8mhihJ98xR335pzJARsfTSfaNyUnrpOeEMc7eCk5NmeMRTuhFw&passive=1209600&service=jotspot&flowName=WebLiteSignIn&flowEntry=ServiceLogin)**
>
> Access Google Sites with a personal Google account or Google Workspace account (for business use).

> **[thopre](https://thopre.wordpress.com/)**
>
> Entwicklungen für die Bühne des Lebens

Sent from Berlin, BE, Germany  
Pablo  
Picasso[http://www.brainyquote.com/quotes/authors/p/pablo\_picasso.html](http://www.brainyquote.com/quotes/authors/p/pablo_picasso.html)

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

---

<div class="post-metadata">

**Author:** ![slavix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b19c9b/32.png) [@slavix](https://www.ruby-forum.com/u/slavix)\
**Post date:** [August 18, 2009, 8:46am UTC](https://www.ruby-forum.com/t/todo/173813/4 "2009-08-18T08:46:48Z")

</div>

On Sat, Aug 15, 2009 at 7:08 PM, Jason S.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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  
😉  
Well I could maybe use some code metrics to catch the worst cases.

But your advice is sound of course, Jason.

Cheers  
Robert

---

<div class="post-metadata">

**Author:** ![slavix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b19c9b/32.png) [@slavix](https://www.ruby-forum.com/u/slavix)\
**Post date:** [August 18, 2009, 8:36am UTC](https://www.ruby-forum.com/t/todo/173813/5 "2009-08-18T08:36:15Z")

</div>

On Sat, Aug 15, 2009 at 6:19 PM, Slava M.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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…”

---

<div class="post-metadata">

**Author:** ![slavix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b19c9b/32.png) [@slavix](https://www.ruby-forum.com/u/slavix)\
**Post date:** [August 19, 2009, 5:50am UTC](https://www.ruby-forum.com/t/todo/173813/6 "2009-08-19T05:50:08Z")

</div>

On Aug 15, 12:19 pm, Slava M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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
