← 回到动态
poteto@poteto

这场关于怎么为 agent 改进代码库的演讲里,干货和金句太多了 • agent 靠反馈成长,而类型是最好的反馈之一 • 用类型让非法状态无法表示,这样就能在整个代码库里强制执行全局规则 • 属性测试、fuzzing,甚至全系统确定性模拟测试 • expect 测试:直接把东西打印出来,在测试里捕获。让行为变得可读。这跟编译器的 fixture 测试很像,能缩小需要 review 的范围 • 形式化方法过去非常昂贵:seL4 大约有 8,700 行 C 代码,花了约 25 人年,每行 C 代码对应 23 行证明,但 agent 改变了 ROI

so many gems and great tips in this talk from @yminsky about how to improve your codebase for agents • agents thrive on feedback, and types are one of the best kinds • make illegal states unrepresentable with types, and it enforces global rules across your codebase • property based tests, fuzzing, and even full-system deterministic simulation testing • expect tests: just print stuff out and capture it in the test. makes behavior legible. it's very similar to how compilers have fixture tests, it reduces the review surface area • formal methods used to be very expensive: seL4 is about 8,700 lines of C and took around 25 person-years, with 23 lines of proof for every line of C code, but agents change the roi https://www.youtube.com/watch?v=rUYP4C29yCw
动态
← 回到动态