TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

2 点作者 jjbohn超过 10 年前

1 comment

jjbohn超过 10 年前
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