分享 Kill Your Dependencies

Rei · 2016年02月11日 · 最后由 fighterleslie 回复于 2016年03月17日 · 2094 次阅读

http://www.mikeperham.com/2016/02/09/kill-your-dependencies/

  • No code runs faster than no code.
  • No code has fewer bugs than no code.
  • No code uses less memory than no code.
  • No code is easier to understand than no code.

我在尝试不用 RSpec 用 minitest 也算吧

前 3 条完全赞同,但是最后一条我有不同的想法: 更多的 dependencies,其实是把更多 code 隔离到 dependencies,在 understand 层面,其实更多 dependencies 反而是更少的 code。

#1 楼 @tianzhen

这个不算吧! 只要 Gemfile 中做好分组,用 RSpec 还是 Minitest 都不影响 production 环境。

需要 登录 后方可回复, 如果你还没有账号请 注册新账号