HN 精选

Ruby Conf 12 - Boundaries by Gary Bernhardt

Confreaks
8 人推荐 · 跨 9 个月 · 2015–2024
测试、调试与开发工具软件架构与系统设计函数式编程
Ruby Conf 12 - Boundaries by Gary Bernhardt

中文导读

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 上的提及

rec zachrose · 2015-03 · 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.
rec lectrick · 2015-10 · HN 原文
Also see Gary Bernhardt's "Boundaries" talk for more interesting thought in that vein
rec itsmemattchung · 2016-03 · HN 原文
I recommend watching this talk
strong_rec pmarreck · 2016-04 · HN 原文
Gary Bernhardt's awesome "Boundaries" talk
strong_rec dnautics · 2020-01 · HN 原文
I can't more strongly recommend watching this video

相关视频