编程与软件工程lkml.org
小补丁里的大问题(2004)
The biggest thing with small patches (2004)
2014 — 2018,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
这是 Linus Torvalds 2004 年在 Linux 内核邮件列表上的一段回复,主题是鼓励新手从小的补丁开始参与贡献。核心意思是:小补丁能让新人低风险地熟悉代码风格、贡献流程和社区反馈,也更容易被接纳;不要一上来就做大型改动。
为什么经久不衰:它把开源贡献拆成可练习的小步骤,既降低新手上路的风险,也提醒维护者善待小贡献;多年后仍是开源社区常被引用的入门建议。
HN 评论精选
提交补丁还包括遵守规范和回应反馈;小补丁学习成本低、被拒风险小,适合起步。
我觉得这是很好的建议。虽然我只给少数几个开源项目贡献过代码,也没领导过自己的大型项目,但我完全同意。提交补丁不只是写补丁:理解贡献指南(代码风格、文档、测试)、回应反馈等等,对真正参与一个项目都极其重要。而且起步阶段哪怕只是让一个小补丁被合并,感觉也很棒。再者,没人希望做出一大块有用的功能贡献,却因为不了解社区怎么运作而被丢弃。小补丁在学习如何贡献时风险很低,即使因为某些原因被拒绝也一样。虽然这似乎有点显而易见,但由最大开源项目之一的领导者说出来并得到验证,还是很好。
doughj3查看英文原文
I think this is great advice. While I've only contributed to a couple open source projects and haven't lead my own large ones, I completely agree. There's more to submitting patches than writing the patch- understanding contribution guidelines (code style, documentation, testing), responding to feedback, etc, these are all extremely important in actually contributing to a project. And having even just that little patch merged in feels great when you're starting out. Plus, no one wants to make a big helpful functional contribution only to be thrown away because they weren't aware of how the community operates. Small patches have a low risk as far as learning about how to contribute, even if the patch is rejected for whatever reason. Though this seems somewhat obvious, it's nice to have it stated and validated by the leadership of one of the largest open source projects.
小 PR 能表达善意、试探项目氛围、熟悉流程,是参与更大改动的前提。
这很有道理。回头看任何我贡献过的项目,都是从某个小改动开始的。花时间做一个小 PR 来做一个微小改进:一是表明你关心改进项目,愿意处理别人会忽略的小事;二是可以试探项目氛围,维护者是否接受改动、贡献体验是否愉快,还是你的补丁两周无人回复——你不想花很大力气才发现这些;三是让你熟悉流程和工具、获得练习,并有望因改动被接受而得到回报。例如我第一次给 Go 提交的 CL 只是个小改动,但没有那次(且体验良好)的经历,就不会有现在更复杂的改动。
shurcooL查看英文原文
That makes a lot of sense. If I look at any project I've contributed to, it always started out with something small. Taking the time to make a small PR that makes a tiny improvement: - shows you care about improving the project; you took the time to improve something small that others would ignore - lets you test the waters. Are the project owners receptive of changes? Is it pleasant trying to contribute to the project? Or do they ignore your patch and don't reply for 2 weeks. You wouldn't want to spend a lot of effort just to find that out. - gives you a chance to become familiar with the process, the tools, gain practice, and hopefully get rewarded with your change being accepted For example, my first CL to Go was a trivial change: https://codereview.appspot.com/97280043/patch/40001/50001 But without having done that (and having a good experience) I couldn't have been working on more complicated changes like https://codereview.appspot.com/142360043/ now.
他本人曾专门收集/提交琐碎补丁,认为这扩大了 Linux 和 FOSS 的开发者基础。
显然我也这么认为,所以我开始做 Linus 提到的那个“琐碎补丁猴子”。这件事很久以前就交出去了,但我愿意相信它确实扩大了开发者基础——不只是 Linux,也包括整个自由开源软件社区。
RustyRussell查看英文原文
Obv. feel the same way, which is why I started being the trivial patch monkey which Linus refers to. That's long ago been handed over, but I like to think that it did expand the developer base. Not just for Linux, but for FOSS generally.
LibreOffice 的 EasyHacks 是这种理念的实践,帮新手在庞大代码库中上手。
LibreOffice 项目正试图通过 EasyHacks 做到这一点。我们一直想吸引新开发者,而代码库庞大且常常令人困惑。Easy Hacks 让新手有机会试水,同时又能实际改进代码库。
chris_wot查看英文原文
This is what the LibreOffice project is trying to achieve via EasyHacks. https://wiki.documentfoundation.org/Development/EasyHacks We are always trying to get in new developers, and we have a masssive and often confusing codebase. Easy Hacks give newbies a way of getting their feet wet, in a way that actually helps improve the codebase.
历次讨论
同类还值得读
开源应用架构
The Architecture of Open Source Applications
《开源软件架构》(AOSA)是一本在线免费书,邀请知名开源项目的作者亲自剖析其内部设计,涵盖 SQLAlchemy、LLVM、Audacity、Apache、Bash 等系统。
编程与软件工程上首页 9 次 · 2011–2024aosabook.org编辑精选编程语言简史:简短、不完整且多半错误
A Brief, Incomplete, and Mostly Wrong History of Programming Languages
一篇以戏谑、故意不准确的方式回顾编程语言史的博客文章,用夸张轶事和讽刺定义串起 Lisp、C、C++、Java、JavaScript、PHP 等语言。
编程与软件工程上首页 8 次 · 2009–2021james-iry.blogspot.comSQLite 是如何测试的
How SQLite is tested
SQLite 官方文档页,系统介绍 SQLite 的测试体系:多种测试方法(TCL 测试、模糊测试、回归测试、静态分析等)和海量测试用例,展示了这个小型开源项目如何靠极致测试获得…
编程与软件工程上首页 8 次 · 2009–2025sqlite.org编辑精选高级编程语言(2009)
Advanced programming languages (2009)
Matt Might 的经典文章,按用途推荐“高级编程语言”:如果追求就业就选主流语言,如果追求表达力、学术研究或创业,则推荐 Haskell、OCaml、Scala 等函数式语…
编程与软件工程上首页 8 次 · 2009–2022matt.might.net我的 Forth 与栈机器经历
Yosefk - My history with Forth & stack machines
作者以亲身经历回顾了使用 Forth 语言和栈式机器的历程:既赞叹其简洁优雅、代码量小、可自举的优点,也坦率指出栈操作在实际编程中的痛苦,以及 Forth 社区文化中的问题。
编程与软件工程上首页 8 次 · 2010–2024yosefk.com编辑精选