The Codeless Code: Case 8-9 Reduce, Reuse, Recycle(少用、重用、循环利用);infinities(无限)

目录

The Codeless Code: Case 8 Reduce, Reuse, Recycle(少用、重用、循环利用)

The Codeless Code: Case 9 infinities(无限)


The Codeless Code: Case 8 Reduce, Reuse, Recycle(少用、重用、循环利用)

A novice asked the great master: “What is the Way?”

一个新入门的僧侣问大师:"什么是道?"

The master replied, “Writing code is the Way.”

大师回答他:“编写代码就是道”。

The novice then asked, “What is not the Way?”

这个僧侣又接着问:"那什么又不是道?"

The master replied, “Writing code is not the Way.”

大师又回答他道:"编写代码就不是Way"。

The novice said, “Then the writing of code is all things.”

僧侣不解,道:"难道说编写代码既是道,又不是道吗?"

The master replied, “And the not-writing of code also.”

大师回答道:"编不用写的代码也是如此"。

The novice asked, “At the present moment, are we writing code, or not writing code?”

僧侣问:“站在当下而言,我们是正在编写的代码还是正在编不用写的代码?”

The master replied, “We are the code.”

大师回答道:“我们本身就是代码”。

                                                                                                                              (等级不够,无法摸清次则的寓意— —||)

The Codeless Code: Case 9 infinities(无限)

Two monks of the Spider Clan were arguing whether the new input validation routine was caught in an infinite loop.

蜘蛛部落的两个僧侣正在为新输入的验证程序是否会进入死循环而争吵。

“How long has it been running?” asked the abbot.

牧师问他们道:"这个程序会运行多久?"

“No more than thirty minutes,” said the pale thin monk.

肤色稍白的瘦僧侣说:"不会超过30分钟"。

“Yet no less than that either,” said the dark fat monk.

而那个肤色稍黑的胖僧侣说:“(我觉得)不会低于30分钟”。

“And you have done nothing this whole time but wait for it to complete?” asked the abbot.

牧师问他俩:“你们在程序运行的这个过程中就是单纯的等待结果而不再做任何事情吗?”

The monks bowed their heads in shame.

这两个僧侣被问住了,都羞愧的低下了头。

The abbot reported this to the Java master, who nodded. “Which of them believes that the loop is not infinite?”

牧师把这件事报告到了Java大师那,大师点着头说:“他们中谁相信这个循环不是无限的?”

“The pale thin one,” said the abbot.

牧师答道:“那个肤色稍白的僧侣”。

“Then give him a skin of wine, for he is wise. No loop may be truly infinite. Someday the power will fail, the server will rust, the temple will crumble, and the sun will swallow the earth.”

“回头奖给他一皮袋酒,因为他是睿智的人。没有任何循环可能真是无限的。总有一天支撑其循环的能量会耗尽,服务器会报废,修道院也会崩溃,太阳也会吞没地球”。

Asked the abbot, “What of the dark fat one, who believes that the loop is infinite?”

牧师问到:"如何评价那个认为循环会无限进行下去的那个肤色稍黑的僧侣呢?"

“Give him two skins of wine, for he is wiser. To the user waiting at his browser, ten seconds is agony, a minute is an aeon, and anything longer is effectively an eternity. When the tiger mauls the antelope, the antelope does not question whether eight claws were used, or a million.”

“奖给他两皮袋酒,他是一个更睿智的人。对于等待浏览器反应的用户而言,等待10秒钟就会生气,等待1分钟就会感觉极其漫长,任何长一点的东西都感觉像是永恒。当老虎撕咬羚羊的时候,羚羊不会考虑到底老虎是用了八个爪子去扑打它,还是用了一百万个”。

发布了271 篇原创文章 · 获赞 8 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qq_17846375/article/details/104751198
今日推荐