Ruby Conf 12 - Boundaries by Gary Bernhardt
8 人推荐 · 跨 9 个月 · 2015–2024

中文导读
Gary Bernhardt 在 RubyConf 2012 上带来的经典分享,主张在不过度使用 mock 的前提下做隔离测试。他深入对比了行为与数据、可变与不可变,提出“函数式核心,命令式外壳”(functional core, imperative shell)架构,让代码自然具备强隔离性与并行测试能力。
为什么 HN 推它
HN 公认阐释“函数式核心,命令式外壳”的最权威讲座,也是在单元测试与集成测试选型争论中极具实操价值的解题思路。
「强烈推荐这个视频,它从更有哲学意味的视角讲透了如何跳出面向对象来写“非纯函数式编程”。」HN 网友原话:I highly recommend this video for a more philosophical take on how to do "impure FP" without OO
英文原摘要(HackerTube / Claude 整理)
Gary Bernhardt's RubyConf 2012 talk on testing in isolation without mocking everything. It goes through behavior versus data, mutation versus immutability, and how a functional core with an imperative shell yields natural isolation and parallelism.
HN recommends it as the canonical presentation of 'functional core, imperative shell' and a practical answer to unit versus integration testing.
HN 上的提及
I've found the ideas in Gary Bernhardt's talk, Boundaries (1), to be very helpful in figuring out how to test interactive web UIs.
Also see Gary Bernhardt's "Boundaries" talk for more interesting thought in that vein
I recommend watching this talk
Gary Bernhardt's awesome "Boundaries" talk
I can't more strongly recommend watching this video