Earlier quoted context omitted.
From the README: "In your production environment, set DISABLE_DO_BY=1 to disable checks."
Given that we are talking about lazy/overworked on top of lazy/overworked here, why any confidence that this will be done 100% of the time? Putting time bombs in your code, regardless of a global configuration switch, is just asking for trouble.
Auto-expiring TODO notes in Ruby
21–30 of 42 posts
Re: Auto-expiring TODO notes in Ruby
#22Earlier quoted context omitted.
I think that's a good idea. Perhaps based on a standard format such as '# TODO 2014-01-01 Fix me' ?
Why put the date in the comment itself? Just ask source control when the line was introduced, and set a max age.
Re: Auto-expiring TODO notes in Ruby
#23Re: Auto-expiring TODO notes in Ruby
#24Re: Auto-expiring TODO notes in Ruby
#25Earlier quoted context omitted.
I think that's a good idea. Perhaps based on a standard format such as '# TODO 2014-01-01 Fix me' ?
Why put the date in the comment itself? Just ask source control when the line was introduced, and set a max age.
Re: Auto-expiring TODO notes in Ruby
#26So there may not be much awareness so this, but Ruby Rails (as noted below, the annotations or part of rails/rake) has this feature that you can add special annotations # TODO # FIXME # OPTIMIZE comments to you code, and "$ rake notes" to list them. it also allows you to have a custom annotations comments : For a full description, see : http://rubyquicktips.com/post/385665023/fixme-todo-and-optim... Better to make a…
Re: Auto-expiring TODO notes in Ruby
#27Wouldn't this be much more suitable to do in an IDE or compiler? Raising exceptions during runtime seems the wrong approach to me. I wouldn't be suprised if this is possible and used in e.g. Mylyn. Another idea would be to automatically create a task/bug/issue for every TODO created (which closes when the TODO is removed)
or an IDE that just scans the code files, picks out the lines of comments containing "TODO" and put them in a list in the gui, so you see it all the time. Or generate a compile warning instead of a comment. Then it will annoy you constantly, with no risk to production.
Re: Auto-expiring TODO notes in Ruby
#28Earlier quoted context omitted.
From the README: "In your production environment, set DISABLE_DO_BY=1 to disable checks."
Given that we are talking about lazy/overworked on top of lazy/overworked here, why any confidence that this will be done 100% of the time? Putting time bombs in your code, regardless of a global configuration switch, is just asking for trouble.
I have to admit to a certain amount of pet-peeve-like sensitivity to people commenting in ways that make it look like they only read the title.
Re: Auto-expiring TODO notes in Ruby
#29I wonder if the TODO method could dynamically generate a test case that does the same.
[1] Everything is a Polyfill: Automate Deleting Code for Front End Performance - Rachel Myers and Emily Nakashima
http://www.slideshare.net/eanakashima/everything-is-a-polyfi...
Re: Auto-expiring TODO notes in Ruby
#30Earlier quoted context omitted.
My TODO comments show up in nice view in GUI I use (Eclipse). I'm sure other GUIs have similar views somewhere. I'm also sure that plugin to turn old ones into syntax errors could be done in a day or two. That sound like much safer approach then runtime exception.
A day or two, really? That seems like an awfully long time requirement for what should be a simple change.