Live data from Hacker News

Auto-expiring TODO notes in Ruby

github.com

1–10 of 42 posts

Re: Auto-expiring TODO notes in Ruby

#3
Wouldn'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)

Re: Auto-expiring TODO notes in Ruby

#5
Might it not make sense to invert the parity of the environment variable and require its being set for do_by to be used? I imagine most would rather set an environment variable in their dev environment than ensure it gets set in every possible production instance... :/

As much as 'turning off asserts' is the classical style, that's more to do with the design of older instrumentation than the sanity of it.

Re: Auto-expiring TODO notes in Ruby

#8
Don't do that.

Some years ago I had the same idea and realized something like that with the C-Preprocessor in a C++-Codebase.

When did my Todo's expire? AFTER testing, just before a new release. With my idea of exipiring Todos I created a major pain in the butt for the team.

It would be different if some other "sort of" alarm would be raised when TODOs proliferate, but a failure in the code is not a good solution. (i.e. hook a todo checker into your contious build system, let the nightly build raise hell when there are too many todos - but do not fail the production code.)

Re: Auto-expiring TODO notes in Ruby

#10
Lovely language / solution mismatch.

Any compiled language would fit this much better - fail at compile time. Or in interpreted-o-world, at least do it at test time.

I guess it's just lovely when deployed, working, test-passing software suddenly starts failing on a server (all servers at once, globally), because someone added a TODO a few weeks ago.

Post reply on HN