TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Funny insult for copy pasting code that made me chuckle

4 点作者 richardbarosky超过 2 年前
&quot;This phrase comes from a student of mine named Boon. She always said that if you copy code from one place and paste it into another, you are obviously creating redundant code. She calls it &quot;inheriting from the Clipboard,&quot; which I think it pretty clever and memorable.<p>When you copy code, ask yourself why you are doing it—and if the same operation is needed in two places, doesn’t this indicate that you need a service in your system?<p>My boss and mentor Alan Shalloway puts it this way: There are three numbers in software: 0, 1, and infinity. 0 represents the things we do not do in a system (we do those for free). 1 represents the things we do once and only once. But at the moment we do something twice, we should treat it as infinitely many and create cohesive services that allow it to be reused.&quot;<p>It actually came from a 2009 book called &quot;Emergent Design: The Evolutionary Nature of Professional Software Development&quot;. Somewhat goes against the grain of the more common wisdom of taking the bullet once or twice. https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Rule_of_three_(computer_programming)

1 comment

johncoltrane超过 2 年前
Nice.<p>The French translation of &quot;copy and paste&quot; is &quot;copier-coller&quot;. A friend and colleague calls it &quot;copier-déconner&quot;, where &quot;déconner&quot; is a word play on &quot;coller&quot; that means &quot;to screw up&quot;, so &quot;copy and screw up&quot;.
评论 #34219204 未加载