TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Make your legacy code self destruct in Rails to force technical debt clean up

2 pointsby jjbohnover 10 years ago

1 comment

jjbohnover 10 years ago
When in the middle of long refactorings, I'm notoriously terrible at going back and removing deprecated code. So, I made a gem that allows me to mark somewhere in the code to self destruct on a particular date. Prior to that date, you will see warnings in your test suite letting you know when and why the self destruct mechanism is there. After the date, it will start throwing exceptions in your test environment to basically self destruct the build. So far, it's been a great incentive/reminder to go back and clean up after myself. permalink